diff --git a/services/resourcemanager/oas_commit b/services/resourcemanager/oas_commit index 0af22f1b..d5d15003 100644 --- a/services/resourcemanager/oas_commit +++ b/services/resourcemanager/oas_commit @@ -1 +1 @@ -dba2b6e065de87745d57269c1eaba07e3833f709 +f385f3b154cb566b3c9e5156c29b28150f2af4a2 diff --git a/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/v0api/JSON.java b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/v0api/JSON.java index 3e065f68..19562416 100644 --- a/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/v0api/JSON.java +++ b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/v0api/JSON.java @@ -95,9 +95,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); - gsonBuilder.registerTypeAdapterFactory( - new cloud.stackit.sdk.resourcemanager.v0api.model.ContainerSearchResult - .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.resourcemanager.v0api.model.CreateFolderPayload .CustomTypeAdapterFactory()); diff --git a/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/v0api/api/DefaultApi.java b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/v0api/api/DefaultApi.java index c451849f..def7b08e 100644 --- a/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/v0api/api/DefaultApi.java +++ b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/v0api/api/DefaultApi.java @@ -201,7 +201,9 @@ private okhttp3.Call createFolderValidateBeforeCall( } /** - * Create Folder Create a new folder. + * Create Folder Creates a new folder within a parent organization or folder. Authorization + * & Permissions: - Evaluated on Target Parent Container: resource-manager.folder.create + * (required permission on the target parent organization or folder to create a folder). * * @param createFolderPayload (optional) * @return FolderResponse @@ -225,7 +227,9 @@ public FolderResponse createFolder( } /** - * Create Folder Create a new folder. + * Create Folder Creates a new folder within a parent organization or folder. Authorization + * & Permissions: - Evaluated on Target Parent Container: resource-manager.folder.create + * (required permission on the target parent organization or folder to create a folder). * * @param createFolderPayload (optional) * @return ApiResponse<FolderResponse> @@ -250,7 +254,10 @@ public ApiResponse createFolderWithHttpInfo( } /** - * Create Folder (asynchronously) Create a new folder. + * Create Folder (asynchronously) Creates a new folder within a parent organization or folder. + * Authorization & Permissions: - Evaluated on Target Parent Container: + * resource-manager.folder.create (required permission on the target parent organization or + * folder to create a folder). * * @param createFolderPayload (optional) * @param _callback The callback to be executed when the API call finishes @@ -360,8 +367,11 @@ private okhttp3.Call createProjectValidateBeforeCall( } /** - * Create Project Create a new project. - The request is synchronous, but the workflow-based - * creation is asynchronous. - Lifecycle state remains in CREATING, until workflow completes + * Create Project Creates a new project within a parent container. - Creation request returns + * synchronously, while underlying resource provisioning runs asynchronously. - Initial + * lifecycle state is CREATING until provisioning completes. Authorization & Permissions: - + * Evaluated on Target Parent Container: resource-manager.project.create (required permission on + * the target parent organization or folder to create a project). * * @param createProjectPayload (optional) * @return Project @@ -385,8 +395,11 @@ public Project createProject( } /** - * Create Project Create a new project. - The request is synchronous, but the workflow-based - * creation is asynchronous. - Lifecycle state remains in CREATING, until workflow completes + * Create Project Creates a new project within a parent container. - Creation request returns + * synchronously, while underlying resource provisioning runs asynchronously. - Initial + * lifecycle state is CREATING until provisioning completes. Authorization & Permissions: - + * Evaluated on Target Parent Container: resource-manager.project.create (required permission on + * the target parent organization or folder to create a project). * * @param createProjectPayload (optional) * @return ApiResponse<Project> @@ -411,9 +424,11 @@ public ApiResponse createProjectWithHttpInfo( } /** - * Create Project (asynchronously) Create a new project. - The request is synchronous, but the - * workflow-based creation is asynchronous. - Lifecycle state remains in CREATING, until - * workflow completes + * Create Project (asynchronously) Creates a new project within a parent container. - Creation + * request returns synchronously, while underlying resource provisioning runs asynchronously. - + * Initial lifecycle state is CREATING until provisioning completes. Authorization & + * Permissions: - Evaluated on Target Parent Container: resource-manager.project.create + * (required permission on the target parent organization or folder to create a project). * * @param createProjectPayload (optional) * @param _callback The callback to be executed when the API call finishes @@ -542,9 +557,10 @@ private okhttp3.Call deleteFolderValidateBeforeCall( } /** - * Delete Folder Delete a folder and its metadata. - Folder must not be parent of any other - * container - A force flag may be set, deleting all underlying folders recursively - if no - * project is attached! + * Delete Folder Delete a folder and its metadata. - Folder must not contain active child + * containers unless force deletion is enabled without attached projects. Authorization & + * Permissions: - Evaluated on Target Folder: resource-manager.folder.delete (required + * permission on the target folder to delete it). * * @param containerId Folder identifier - containerId as well as UUID identifier is supported. * (required) @@ -568,9 +584,10 @@ public void deleteFolder( } /** - * Delete Folder Delete a folder and its metadata. - Folder must not be parent of any other - * container - A force flag may be set, deleting all underlying folders recursively - if no - * project is attached! + * Delete Folder Delete a folder and its metadata. - Folder must not contain active child + * containers unless force deletion is enabled without attached projects. Authorization & + * Permissions: - Evaluated on Target Folder: resource-manager.folder.delete (required + * permission on the target folder to delete it). * * @param containerId Folder identifier - containerId as well as UUID identifier is supported. * (required) @@ -596,9 +613,10 @@ public ApiResponse deleteFolderWithHttpInfo( } /** - * Delete Folder (asynchronously) Delete a folder and its metadata. - Folder must not be parent - * of any other container - A force flag may be set, deleting all underlying folders recursively - * - if no project is attached! + * Delete Folder (asynchronously) Delete a folder and its metadata. - Folder must not contain + * active child containers unless force deletion is enabled without attached projects. + * Authorization & Permissions: - Evaluated on Target Folder: resource-manager.folder.delete + * (required permission on the target folder to delete it). * * @param containerId Folder identifier - containerId as well as UUID identifier is supported. * (required) @@ -727,8 +745,9 @@ private okhttp3.Call deleteFolderLabelsValidateBeforeCall( } /** - * Delete Folder Labels Deletes all folder labels by given keys. - Specific labels may be - * deleted by key(s) - If no key is specified, all labels will be deleted! + * Delete Folder Labels Deletes folder labels by specified keys, or removes all labels if no key + * is provided. Authorization & Permissions: - Evaluated on Target Folder: + * resource-manager.folder.edit (required permission on the target folder to delete its labels). * * @param containerId Folder identifier - containerId as well as UUID identifier is supported. * (required) @@ -751,8 +770,9 @@ public void deleteFolderLabels( } /** - * Delete Folder Labels Deletes all folder labels by given keys. - Specific labels may be - * deleted by key(s) - If no key is specified, all labels will be deleted! + * Delete Folder Labels Deletes folder labels by specified keys, or removes all labels if no key + * is provided. Authorization & Permissions: - Evaluated on Target Folder: + * resource-manager.folder.edit (required permission on the target folder to delete its labels). * * @param containerId Folder identifier - containerId as well as UUID identifier is supported. * (required) @@ -777,8 +797,9 @@ public ApiResponse deleteFolderLabelsWithHttpInfo( } /** - * Delete Folder Labels (asynchronously) Deletes all folder labels by given keys. - Specific - * labels may be deleted by key(s) - If no key is specified, all labels will be deleted! + * Delete Folder Labels (asynchronously) Deletes folder labels by specified keys, or removes all + * labels if no key is provided. Authorization & Permissions: - Evaluated on Target Folder: + * resource-manager.folder.edit (required permission on the target folder to delete its labels). * * @param containerId Folder identifier - containerId as well as UUID identifier is supported. * (required) @@ -906,8 +927,10 @@ private okhttp3.Call deleteOrganizationLabelsValidateBeforeCall( } /** - * Delete Organization Labels Deletes all organization labels by given keys. - Specific labels - * may be deleted by key(s) - If no key is specified, all labels will be deleted! + * Delete Organization Labels Deletes organization labels by specified keys, or removes all + * labels if no key is provided. Authorization & Permissions: - Evaluated on Target + * Organization: resource-manager.organization.edit (required permission on the organization to + * delete labels). * * @param containerId Organization identifier - containerId as well as UUID identifier is * supported. (required) @@ -930,8 +953,10 @@ public void deleteOrganizationLabels( } /** - * Delete Organization Labels Deletes all organization labels by given keys. - Specific labels - * may be deleted by key(s) - If no key is specified, all labels will be deleted! + * Delete Organization Labels Deletes organization labels by specified keys, or removes all + * labels if no key is provided. Authorization & Permissions: - Evaluated on Target + * Organization: resource-manager.organization.edit (required permission on the organization to + * delete labels). * * @param containerId Organization identifier - containerId as well as UUID identifier is * supported. (required) @@ -957,9 +982,10 @@ public ApiResponse deleteOrganizationLabelsWithHttpInfo( } /** - * Delete Organization Labels (asynchronously) Deletes all organization labels by given keys. - - * Specific labels may be deleted by key(s) - If no key is specified, all labels will be - * deleted! + * Delete Organization Labels (asynchronously) Deletes organization labels by specified keys, or + * removes all labels if no key is provided. Authorization & Permissions: - Evaluated on + * Target Organization: resource-manager.organization.edit (required permission on the + * organization to delete labels). * * @param containerId Organization identifier - containerId as well as UUID identifier is * supported. (required) @@ -1073,9 +1099,10 @@ private okhttp3.Call deleteProjectValidateBeforeCall( } /** - * Delete Project Triggers the deletion of a project. - The request is synchronous, but the - * workflow-based deletion is asynchronous - Lifecycle state remains in DELETING, until workflow - * completes + * Delete Project Triggers the deletion of a project. - Request returns synchronously, while + * deletion process runs asynchronously. - Initial lifecycle state is DELETING until workflow + * completes. Authorization & Permissions: - Evaluated on Target Project: + * resource-manager.project.delete (required permission on the project to delete it). * * @param id Project identifier - containerId as well as UUID identifier is supported. * (required) @@ -1094,9 +1121,10 @@ public void deleteProject(@javax.annotation.Nonnull String id) throws ApiExcepti } /** - * Delete Project Triggers the deletion of a project. - The request is synchronous, but the - * workflow-based deletion is asynchronous - Lifecycle state remains in DELETING, until workflow - * completes + * Delete Project Triggers the deletion of a project. - Request returns synchronously, while + * deletion process runs asynchronously. - Initial lifecycle state is DELETING until workflow + * completes. Authorization & Permissions: - Evaluated on Target Project: + * resource-manager.project.delete (required permission on the project to delete it). * * @param id Project identifier - containerId as well as UUID identifier is supported. * (required) @@ -1118,9 +1146,10 @@ public ApiResponse deleteProjectWithHttpInfo(@javax.annotation.Nonnull Str } /** - * Delete Project (asynchronously) Triggers the deletion of a project. - The request is - * synchronous, but the workflow-based deletion is asynchronous - Lifecycle state remains in - * DELETING, until workflow completes + * Delete Project (asynchronously) Triggers the deletion of a project. - Request returns + * synchronously, while deletion process runs asynchronously. - Initial lifecycle state is + * DELETING until workflow completes. Authorization & Permissions: - Evaluated on Target + * Project: resource-manager.project.delete (required permission on the project to delete it). * * @param id Project identifier - containerId as well as UUID identifier is supported. * (required) @@ -1244,8 +1273,9 @@ private okhttp3.Call deleteProjectLabelsValidateBeforeCall( } /** - * Delete Project Labels Deletes all project labels by given keys. - Specific labels may be - * deleted by key(s) - If no key is specified, all labels will be deleted! + * Delete Project Labels Deletes project labels by specified keys, or removes all labels if no + * key is provided. Authorization & Permissions: - Evaluated on Target Project: + * resource-manager.project.edit (required permission on the project to delete its labels). * * @param containerId Project identifier - containerId as well as UUID identifier is supported. * (required) @@ -1268,8 +1298,9 @@ public void deleteProjectLabels( } /** - * Delete Project Labels Deletes all project labels by given keys. - Specific labels may be - * deleted by key(s) - If no key is specified, all labels will be deleted! + * Delete Project Labels Deletes project labels by specified keys, or removes all labels if no + * key is provided. Authorization & Permissions: - Evaluated on Target Project: + * resource-manager.project.edit (required permission on the project to delete its labels). * * @param containerId Project identifier - containerId as well as UUID identifier is supported. * (required) @@ -1294,8 +1325,10 @@ public ApiResponse deleteProjectLabelsWithHttpInfo( } /** - * Delete Project Labels (asynchronously) Deletes all project labels by given keys. - Specific - * labels may be deleted by key(s) - If no key is specified, all labels will be deleted! + * Delete Project Labels (asynchronously) Deletes project labels by specified keys, or removes + * all labels if no key is provided. Authorization & Permissions: - Evaluated on Target + * Project: resource-manager.project.edit (required permission on the project to delete its + * labels). * * @param containerId Project identifier - containerId as well as UUID identifier is supported. * (required) @@ -1424,7 +1457,10 @@ private okhttp3.Call getFolderDetailsValidateBeforeCall( } /** - * Get Folder Details Returns all metadata for a specific folder. + * Get Folder Details Returns metadata for a specific folder. Authorization & Permissions: - + * Evaluated on Target Folder: resource-manager.folder.get (required primary permission to + * retrieve folder details). - Evaluated on Parent Containers: resource-manager.organization.get + * and resource-manager.folder.get implicitly to resolve parent hierarchy details. * * @param containerId Folder identifier - containerId as well as UUID identifier is supported. * (required) @@ -1451,7 +1487,10 @@ public GetFolderDetailsResponse getFolderDetails( } /** - * Get Folder Details Returns all metadata for a specific folder. + * Get Folder Details Returns metadata for a specific folder. Authorization & Permissions: - + * Evaluated on Target Folder: resource-manager.folder.get (required primary permission to + * retrieve folder details). - Evaluated on Parent Containers: resource-manager.organization.get + * and resource-manager.folder.get implicitly to resolve parent hierarchy details. * * @param containerId Folder identifier - containerId as well as UUID identifier is supported. * (required) @@ -1479,7 +1518,11 @@ public ApiResponse getFolderDetailsWithHttpInfo( } /** - * Get Folder Details (asynchronously) Returns all metadata for a specific folder. + * Get Folder Details (asynchronously) Returns metadata for a specific folder. Authorization + * & Permissions: - Evaluated on Target Folder: resource-manager.folder.get (required + * primary permission to retrieve folder details). - Evaluated on Parent Containers: + * resource-manager.organization.get and resource-manager.folder.get implicitly to resolve + * parent hierarchy details. * * @param containerId Folder identifier - containerId as well as UUID identifier is supported. * (required) @@ -1595,7 +1638,9 @@ private okhttp3.Call getOrganizationValidateBeforeCall( } /** - * Get Organization Details Returns the organization and its metadata. + * Get Organization Details Returns metadata for a specific organization. Authorization & + * Permissions: - Evaluated on Target Organization: resource-manager.organization.get (required + * permission on the organization to view its details). * * @param id Organization identifier - containerId as well as UUID identifier is supported. * (required) @@ -1617,7 +1662,9 @@ public OrganizationResponse getOrganization(@javax.annotation.Nonnull String id) } /** - * Get Organization Details Returns the organization and its metadata. + * Get Organization Details Returns metadata for a specific organization. Authorization & + * Permissions: - Evaluated on Target Organization: resource-manager.organization.get (required + * permission on the organization to view its details). * * @param id Organization identifier - containerId as well as UUID identifier is supported. * (required) @@ -1640,7 +1687,10 @@ public ApiResponse getOrganizationWithHttpInfo( } /** - * Get Organization Details (asynchronously) Returns the organization and its metadata. + * Get Organization Details (asynchronously) Returns metadata for a specific organization. + * Authorization & Permissions: - Evaluated on Target Organization: + * resource-manager.organization.get (required permission on the organization to view its + * details). * * @param id Organization identifier - containerId as well as UUID identifier is supported. * (required) @@ -1764,7 +1814,11 @@ private okhttp3.Call getProjectValidateBeforeCall( } /** - * Get Project Details Returns the project and its metadata. + * Get Project Details Returns the project and its metadata. Authorization & Permissions: - + * Evaluated on Target Project: resource-manager.project.get (required primary permission to + * view project details). - Evaluated on Parent Containers: resource-manager.organization.get + * and resource-manager.folder.get on parent organizations/folders implicitly to resolve and + * include parent metadata in the response hierarchy. * * @param id Project identifier - containerId as well as UUID identifier is supported. * (required) @@ -1789,7 +1843,11 @@ public GetProjectResponse getProject( } /** - * Get Project Details Returns the project and its metadata. + * Get Project Details Returns the project and its metadata. Authorization & Permissions: - + * Evaluated on Target Project: resource-manager.project.get (required primary permission to + * view project details). - Evaluated on Parent Containers: resource-manager.organization.get + * and resource-manager.folder.get on parent organizations/folders implicitly to resolve and + * include parent metadata in the response hierarchy. * * @param id Project identifier - containerId as well as UUID identifier is supported. * (required) @@ -1815,7 +1873,12 @@ public ApiResponse getProjectWithHttpInfo( } /** - * Get Project Details (asynchronously) Returns the project and its metadata. + * Get Project Details (asynchronously) Returns the project and its metadata. Authorization + * & Permissions: - Evaluated on Target Project: resource-manager.project.get (required + * primary permission to view project details). - Evaluated on Parent Containers: + * resource-manager.organization.get and resource-manager.folder.get on parent + * organizations/folders implicitly to resolve and include parent metadata in the response + * hierarchy. * * @param id Project identifier - containerId as well as UUID identifier is supported. * (required) @@ -1988,7 +2051,13 @@ private okhttp3.Call listFoldersValidateBeforeCall( * Either containerParentId OR containerIds OR member must be passed - If containerId and * containerParentId are given, both are used for filtering - containers must point to the same * parent - If member and containerParentId are given, both are used for filtering - If member - * is given, containers must not point to the same container parent + * is given, containers must not point to the same container parent Authorization & + * Permissions: - When filtering by member: resource-manager.folder.direct.get is evaluated on + * target folders for the member; if caller differs from target member, system-level + * resource-manager.folder.get is required. - When filtering by containerParentId: + * resource-manager.folder.list is evaluated on the parent container. - When filtering by + * containerIds: resource-manager.folder.get is evaluated on the parent container of requested + * folders. * * @param containerParentId Identifier of the parent resource container - containerId as well as * UUID identifier is supported. (optional) @@ -2036,7 +2105,13 @@ public ListFoldersResponse listFolders( * Either containerParentId OR containerIds OR member must be passed - If containerId and * containerParentId are given, both are used for filtering - containers must point to the same * parent - If member and containerParentId are given, both are used for filtering - If member - * is given, containers must not point to the same container parent + * is given, containers must not point to the same container parent Authorization & + * Permissions: - When filtering by member: resource-manager.folder.direct.get is evaluated on + * target folders for the member; if caller differs from target member, system-level + * resource-manager.folder.get is required. - When filtering by containerParentId: + * resource-manager.folder.list is evaluated on the parent container. - When filtering by + * containerIds: resource-manager.folder.get is evaluated on the parent container of requested + * folders. * * @param containerParentId Identifier of the parent resource container - containerId as well as * UUID identifier is supported. (optional) @@ -2092,6 +2167,12 @@ public ApiResponse listFoldersWithHttpInfo( * containerId and containerParentId are given, both are used for filtering - containers must * point to the same parent - If member and containerParentId are given, both are used for * filtering - If member is given, containers must not point to the same container parent + * Authorization & Permissions: - When filtering by member: + * resource-manager.folder.direct.get is evaluated on target folders for the member; if caller + * differs from target member, system-level resource-manager.folder.get is required. - When + * filtering by containerParentId: resource-manager.folder.list is evaluated on the parent + * container. - When filtering by containerIds: resource-manager.folder.get is evaluated on the + * parent container of requested folders. * * @param containerParentId Identifier of the parent resource container - containerId as well as * UUID identifier is supported. (optional) @@ -2266,10 +2347,11 @@ private okhttp3.Call listOrganizationsValidateBeforeCall( } /** - * Get All Organizations Returns all organizations and their metadata. - If no containerIds are - * specified, all organizations are returned, if permitted - ContainerIds may be set to filter - - * Member may be set to filter - If member and containerIds are given, both are used for - * filtering + * Get all organizations of member Returns all organizations and their metadata accessible to + * the caller. - Filterable by containerIds or member. Authorization & Permissions: - + * Evaluated on Target Organizations: resource-manager.organization.list and/or (depending if + * containerIDs was used in the request) resource-manager.organization.get to filter and list + * accessible organizations. * * @param containerIds Organization identifiers - containerId as well as UUID identifier is * supported. A combination of both is not allowed. (optional) @@ -2308,10 +2390,11 @@ public ListOrganizationsResponse listOrganizations( } /** - * Get All Organizations Returns all organizations and their metadata. - If no containerIds are - * specified, all organizations are returned, if permitted - ContainerIds may be set to filter - - * Member may be set to filter - If member and containerIds are given, both are used for - * filtering + * Get all organizations of member Returns all organizations and their metadata accessible to + * the caller. - Filterable by containerIds or member. Authorization & Permissions: - + * Evaluated on Target Organizations: resource-manager.organization.list and/or (depending if + * containerIDs was used in the request) resource-manager.organization.get to filter and list + * accessible organizations. * * @param containerIds Organization identifiers - containerId as well as UUID identifier is * supported. A combination of both is not allowed. (optional) @@ -2351,10 +2434,11 @@ public ApiResponse listOrganizationsWithHttpInfo( } /** - * Get All Organizations (asynchronously) Returns all organizations and their metadata. - If no - * containerIds are specified, all organizations are returned, if permitted - ContainerIds may - * be set to filter - Member may be set to filter - If member and containerIds are given, both - * are used for filtering + * Get all organizations of member (asynchronously) Returns all organizations and their metadata + * accessible to the caller. - Filterable by containerIds or member. Authorization & + * Permissions: - Evaluated on Target Organizations: resource-manager.organization.list and/or + * (depending if containerIDs was used in the request) resource-manager.organization.get to + * filter and list accessible organizations. * * @param containerIds Organization identifiers - containerId as well as UUID identifier is * supported. A combination of both is not allowed. (optional) @@ -2534,12 +2618,15 @@ private okhttp3.Call listProjectsValidateBeforeCall( } /** - * Get All Projects Returns all projects and their metadata that: - Are children of the specific - * containerParentId - Match the given containerIds - User is member of Filter: - Either - * containerParentId OR containerIds OR member must be passed - If containerId and + * Get All Projects of a member. Returns all projects and their metadata that: - Are children of + * the specific containerParentId - Match the given containerIds - User is member of Filter: - + * Either containerParentId OR containerIds OR member must be passed - If containerId and * containerParentId are given, both are used for filtering - containers must point to the same * parent - If member and containerParentId are given, both are used for filtering - If member - * is given, containers must not point to the same container parent + * is given, containers must not point to the same container parent Authorization & + * Permissions: - Evaluated on Target Projects: resource-manager.project.get, + * resource-manager.project.list, or resource-manager.project.direct.get to filter and return + * accessible projects. * * @param containerParentId Identifier of the parent resource container - containerId as well as * UUID identifier is supported. (optional) @@ -2581,12 +2668,15 @@ public ListProjectsResponse listProjects( } /** - * Get All Projects Returns all projects and their metadata that: - Are children of the specific - * containerParentId - Match the given containerIds - User is member of Filter: - Either - * containerParentId OR containerIds OR member must be passed - If containerId and + * Get All Projects of a member. Returns all projects and their metadata that: - Are children of + * the specific containerParentId - Match the given containerIds - User is member of Filter: - + * Either containerParentId OR containerIds OR member must be passed - If containerId and * containerParentId are given, both are used for filtering - containers must point to the same * parent - If member and containerParentId are given, both are used for filtering - If member - * is given, containers must not point to the same container parent + * is given, containers must not point to the same container parent Authorization & + * Permissions: - Evaluated on Target Projects: resource-manager.project.get, + * resource-manager.project.list, or resource-manager.project.direct.get to filter and return + * accessible projects. * * @param containerParentId Identifier of the parent resource container - containerId as well as * UUID identifier is supported. (optional) @@ -2635,12 +2725,15 @@ public ApiResponse listProjectsWithHttpInfo( } /** - * Get All Projects (asynchronously) Returns all projects and their metadata that: - Are - * children of the specific containerParentId - Match the given containerIds - User is member of - * Filter: - Either containerParentId OR containerIds OR member must be passed - If containerId - * and containerParentId are given, both are used for filtering - containers must point to the - * same parent - If member and containerParentId are given, both are used for filtering - If - * member is given, containers must not point to the same container parent + * Get All Projects of a member. (asynchronously) Returns all projects and their metadata that: + * - Are children of the specific containerParentId - Match the given containerIds - User is + * member of Filter: - Either containerParentId OR containerIds OR member must be passed - If + * containerId and containerParentId are given, both are used for filtering - containers must + * point to the same parent - If member and containerParentId are given, both are used for + * filtering - If member is given, containers must not point to the same container parent + * Authorization & Permissions: - Evaluated on Target Projects: + * resource-manager.project.get, resource-manager.project.list, or + * resource-manager.project.direct.get to filter and return accessible projects. * * @param containerParentId Identifier of the parent resource container - containerId as well as * UUID identifier is supported. (optional) @@ -2788,8 +2881,9 @@ private okhttp3.Call partialUpdateFolderValidateBeforeCall( } /** - * Update Folder Update the folder and its metadata. - Update folder name - Update folder labels - * - Update folder parent (folder or organization) + * Update Folder Update the folder and its metadata (name, labels, parent container). + * Authorization & Permissions: - Evaluated on Target Folder: resource-manager.folder.edit + * (required permission on the target folder to modify its details, labels, or parent). * * @param containerId Folder identifier - containerId as well as UUID identifier is supported. * (required) @@ -2817,8 +2911,9 @@ public FolderResponse partialUpdateFolder( } /** - * Update Folder Update the folder and its metadata. - Update folder name - Update folder labels - * - Update folder parent (folder or organization) + * Update Folder Update the folder and its metadata (name, labels, parent container). + * Authorization & Permissions: - Evaluated on Target Folder: resource-manager.folder.edit + * (required permission on the target folder to modify its details, labels, or parent). * * @param containerId Folder identifier - containerId as well as UUID identifier is supported. * (required) @@ -2848,8 +2943,10 @@ public ApiResponse partialUpdateFolderWithHttpInfo( } /** - * Update Folder (asynchronously) Update the folder and its metadata. - Update folder name - - * Update folder labels - Update folder parent (folder or organization) + * Update Folder (asynchronously) Update the folder and its metadata (name, labels, parent + * container). Authorization & Permissions: - Evaluated on Target Folder: + * resource-manager.folder.edit (required permission on the target folder to modify its details, + * labels, or parent). * * @param containerId Folder identifier - containerId as well as UUID identifier is supported. * (required) @@ -2975,8 +3072,9 @@ private okhttp3.Call partialUpdateOrganizationValidateBeforeCall( } /** - * Update Organization Update the organization and its metadata. - Update organization name - - * Update organization labels + * Update Organization Updates organization metadata (name, labels). Authorization & + * Permissions: - Evaluated on Target Organization: resource-manager.organization.edit (required + * permission on the organization to update metadata and labels). * * @param id Organization identifier - containerId as well as UUID identifier is supported. * (required) @@ -3003,8 +3101,9 @@ public OrganizationResponse partialUpdateOrganization( } /** - * Update Organization Update the organization and its metadata. - Update organization name - - * Update organization labels + * Update Organization Updates organization metadata (name, labels). Authorization & + * Permissions: - Evaluated on Target Organization: resource-manager.organization.edit (required + * permission on the organization to update metadata and labels). * * @param id Organization identifier - containerId as well as UUID identifier is supported. * (required) @@ -3033,8 +3132,10 @@ public ApiResponse partialUpdateOrganizationWithHttpInfo( } /** - * Update Organization (asynchronously) Update the organization and its metadata. - Update - * organization name - Update organization labels + * Update Organization (asynchronously) Updates organization metadata (name, labels). + * Authorization & Permissions: - Evaluated on Target Organization: + * resource-manager.organization.edit (required permission on the organization to update + * metadata and labels). * * @param id Organization identifier - containerId as well as UUID identifier is supported. * (required) @@ -3160,8 +3261,9 @@ private okhttp3.Call partialUpdateProjectValidateBeforeCall( } /** - * Update Project Update the project and its metadata. - Update project name - Update project - * labels - Update project parent (folder or organization) + * Update Project Updates project metadata (name, labels, or parent hierarchy). Authorization + * & Permissions: - Evaluated on Target Project: resource-manager.project.edit (required + * permission on the project to modify its details, labels, or parent). * * @param id Project identifier - containerId as well as UUID identifier is supported. * (required) @@ -3189,8 +3291,9 @@ public Project partialUpdateProject( } /** - * Update Project Update the project and its metadata. - Update project name - Update project - * labels - Update project parent (folder or organization) + * Update Project Updates project metadata (name, labels, or parent hierarchy). Authorization + * & Permissions: - Evaluated on Target Project: resource-manager.project.edit (required + * permission on the project to modify its details, labels, or parent). * * @param id Project identifier - containerId as well as UUID identifier is supported. * (required) @@ -3219,8 +3322,9 @@ public ApiResponse partialUpdateProjectWithHttpInfo( } /** - * Update Project (asynchronously) Update the project and its metadata. - Update project name - - * Update project labels - Update project parent (folder or organization) + * Update Project (asynchronously) Updates project metadata (name, labels, or parent hierarchy). + * Authorization & Permissions: - Evaluated on Target Project: resource-manager.project.edit + * (required permission on the project to modify its details, labels, or parent). * * @param id Project identifier - containerId as well as UUID identifier is supported. * (required) diff --git a/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/v0api/model/ContainerSearchResult.java b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/v0api/model/ContainerSearchResult.java deleted file mode 100644 index 5020c8a4..00000000 --- a/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/v0api/model/ContainerSearchResult.java +++ /dev/null @@ -1,545 +0,0 @@ -/* - * STACKIT Resource Manager API - * API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists - * - * The version of the OpenAPI document: 2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package cloud.stackit.sdk.resourcemanager.v0api.model; - -import cloud.stackit.sdk.resourcemanager.v0api.JSON; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.reflect.TypeToken; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.UUID; - -/** ContainerSearchResult */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") -public class ContainerSearchResult { - public static final String SERIALIZED_NAME_CONTAINER_ID = "containerId"; - - @SerializedName(SERIALIZED_NAME_CONTAINER_ID) - @javax.annotation.Nonnull - private String containerId; - - /** Resource container type. */ - @JsonAdapter(ContainerTypeEnum.Adapter.class) - public enum ContainerTypeEnum { - PROJECT("PROJECT"), - - FOLDER("FOLDER"), - - UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); - - private String value; - - ContainerTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static ContainerTypeEnum fromValue(String value) { - for (ContainerTypeEnum b : ContainerTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return UNKNOWN_DEFAULT_OPEN_API; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final ContainerTypeEnum enumeration) - throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public ContainerTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return ContainerTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - ContainerTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_CONTAINER_TYPE = "containerType"; - - @SerializedName(SERIALIZED_NAME_CONTAINER_TYPE) - @javax.annotation.Nonnull - private ContainerTypeEnum containerType; - - public static final String SERIALIZED_NAME_ID = "id"; - - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nonnull - private UUID id; - - public static final String SERIALIZED_NAME_LIFECYCLE_STATE = "lifecycleState"; - - @SerializedName(SERIALIZED_NAME_LIFECYCLE_STATE) - @javax.annotation.Nullable private LifecycleState lifecycleState; - - public static final String SERIALIZED_NAME_NAME = "name"; - - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_ORGANIZATION_ID = "organizationId"; - - @SerializedName(SERIALIZED_NAME_ORGANIZATION_ID) - @javax.annotation.Nullable private UUID organizationId; - - public ContainerSearchResult() {} - - public ContainerSearchResult containerId(@javax.annotation.Nonnull String containerId) { - this.containerId = containerId; - return this; - } - - /** - * Globally unique user-friendly identifier. - * - * @return containerId - */ - @javax.annotation.Nonnull - public String getContainerId() { - return containerId; - } - - public void setContainerId(@javax.annotation.Nonnull String containerId) { - this.containerId = containerId; - } - - public ContainerSearchResult containerType( - @javax.annotation.Nonnull ContainerTypeEnum containerType) { - this.containerType = containerType; - return this; - } - - /** - * Resource container type. - * - * @return containerType - */ - @javax.annotation.Nonnull - public ContainerTypeEnum getContainerType() { - return containerType; - } - - public void setContainerType(@javax.annotation.Nonnull ContainerTypeEnum containerType) { - this.containerType = containerType; - } - - public ContainerSearchResult id(@javax.annotation.Nonnull UUID id) { - this.id = id; - return this; - } - - /** - * Globally unique identifier. - * - * @return id - */ - @javax.annotation.Nonnull - public UUID getId() { - return id; - } - - public void setId(@javax.annotation.Nonnull UUID id) { - this.id = id; - } - - public ContainerSearchResult lifecycleState( - @javax.annotation.Nullable LifecycleState lifecycleState) { - this.lifecycleState = lifecycleState; - return this; - } - - /** - * Get lifecycleState - * - * @return lifecycleState - */ - @javax.annotation.Nullable public LifecycleState getLifecycleState() { - return lifecycleState; - } - - public void setLifecycleState(@javax.annotation.Nullable LifecycleState lifecycleState) { - this.lifecycleState = lifecycleState; - } - - public ContainerSearchResult name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Resource container name. - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - public ContainerSearchResult organizationId(@javax.annotation.Nullable UUID organizationId) { - this.organizationId = organizationId; - return this; - } - - /** - * Id of the organization the container is in. - * - * @return organizationId - */ - @javax.annotation.Nullable public UUID getOrganizationId() { - return organizationId; - } - - public void setOrganizationId(@javax.annotation.Nullable UUID organizationId) { - this.organizationId = organizationId; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the ContainerSearchResult instance itself - */ - public ContainerSearchResult putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ContainerSearchResult containerSearchResult = (ContainerSearchResult) o; - return Objects.equals(this.containerId, containerSearchResult.containerId) - && Objects.equals(this.containerType, containerSearchResult.containerType) - && Objects.equals(this.id, containerSearchResult.id) - && Objects.equals(this.lifecycleState, containerSearchResult.lifecycleState) - && Objects.equals(this.name, containerSearchResult.name) - && Objects.equals(this.organizationId, containerSearchResult.organizationId) - && Objects.equals( - this.additionalProperties, containerSearchResult.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash( - containerId, - containerType, - id, - lifecycleState, - name, - organizationId, - additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ContainerSearchResult {\n"); - sb.append(" containerId: ").append(toIndentedString(containerId)).append("\n"); - sb.append(" containerType: ").append(toIndentedString(containerType)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" lifecycleState: ").append(toIndentedString(lifecycleState)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" organizationId: ").append(toIndentedString(organizationId)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first - * line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = - new HashSet( - Arrays.asList( - "containerId", - "containerType", - "id", - "lifecycleState", - "name", - "organizationId")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = - new HashSet(Arrays.asList("containerId", "containerType", "id", "name")); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ContainerSearchResult - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ContainerSearchResult.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - java.util.Locale.ROOT, - "The required field(s) %s in ContainerSearchResult is not found in the empty JSON string", - ContainerSearchResult.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ContainerSearchResult.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - java.util.Locale.ROOT, - "The required field `%s` is not found in the JSON string: %s", - requiredField, - jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("containerId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - java.util.Locale.ROOT, - "Expected the field `containerId` to be a primitive type in the JSON string but got `%s`", - jsonObj.get("containerId").toString())); - } - if (!jsonObj.get("containerType").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - java.util.Locale.ROOT, - "Expected the field `containerType` to be a primitive type in the JSON string but got `%s`", - jsonObj.get("containerType").toString())); - } - // validate the required field `containerType` - ContainerTypeEnum.validateJsonElement(jsonObj.get("containerType")); - if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - java.util.Locale.ROOT, - "Expected the field `id` to be a primitive type in the JSON string but got `%s`", - jsonObj.get("id").toString())); - } - // validate the optional field `lifecycleState` - if (jsonObj.get("lifecycleState") != null && !jsonObj.get("lifecycleState").isJsonNull()) { - LifecycleState.validateJsonElement(jsonObj.get("lifecycleState")); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - java.util.Locale.ROOT, - "Expected the field `name` to be a primitive type in the JSON string but got `%s`", - jsonObj.get("name").toString())); - } - if ((jsonObj.get("organizationId") != null && !jsonObj.get("organizationId").isJsonNull()) - && !jsonObj.get("organizationId").isJsonPrimitive()) { - throw new IllegalArgumentException( - String.format( - java.util.Locale.ROOT, - "Expected the field `organizationId` to be a primitive type in the JSON string but got `%s`", - jsonObj.get("organizationId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ContainerSearchResult.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ContainerSearchResult' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(ContainerSearchResult.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, ContainerSearchResult value) - throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : - value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty( - entry.getKey(), (Character) entry.getValue()); - else { - JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { - obj.add(entry.getKey(), jsonElement.getAsJsonArray()); - } else { - obj.add(entry.getKey(), jsonElement.getAsJsonObject()); - } - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public ContainerSearchResult read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - ContainerSearchResult instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty( - entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty( - entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty( - entry.getKey(), - entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException( - String.format( - java.util.Locale.ROOT, - "The field `%s` has unknown primitive type. Value: %s", - entry.getKey(), - entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty( - entry.getKey(), - gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty( - entry.getKey(), - gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - }.nullSafe(); - } - } - - /** - * Create an instance of ContainerSearchResult given an JSON string - * - * @param jsonString JSON string - * @return An instance of ContainerSearchResult - * @throws IOException if the JSON string is invalid with respect to ContainerSearchResult - */ - public static ContainerSearchResult fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ContainerSearchResult.class); - } - - /** - * Convert an instance of ContainerSearchResult to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -}