From 1657d2e2e07a635917a1c9a5d2bcd1315d46cc37 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Tue, 8 Sep 2026 10:09:44 +0000 Subject: [PATCH] Generate resourcemanager --- services/resourcemanager/api_default.go | 111 ++-- .../model_container_search_result.go | 550 ------------------ .../model_container_search_result_test.go | 58 -- services/resourcemanager/oas_commit | 2 +- services/resourcemanager/v0api/api_default.go | 247 +++++--- .../v0api/model_container_search_result.go | 331 ----------- ..._container_search_result_container_type.go | 113 ---- 7 files changed, 230 insertions(+), 1182 deletions(-) delete mode 100644 services/resourcemanager/model_container_search_result.go delete mode 100644 services/resourcemanager/model_container_search_result_test.go delete mode 100644 services/resourcemanager/v0api/model_container_search_result.go delete mode 100644 services/resourcemanager/v0api/model_container_search_result_container_type.go diff --git a/services/resourcemanager/api_default.go b/services/resourcemanager/api_default.go index 998d79cf5..eef2a3c79 100644 --- a/services/resourcemanager/api_default.go +++ b/services/resourcemanager/api_default.go @@ -30,7 +30,10 @@ import ( type DefaultApi interface { /* CreateFolder Create Folder - Create a new 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateFolderRequest @@ -49,9 +52,12 @@ type DefaultApi interface { CreateFolderExecute(ctx context.Context) (*FolderResponse, error) /* 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 + 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateProjectRequest @@ -71,8 +77,10 @@ type DefaultApi interface { /* 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! + - 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param containerId Folder identifier - containerId as well as UUID identifier is supported. @@ -89,9 +97,10 @@ type DefaultApi interface { DeleteFolderExecute(ctx context.Context, containerId string) error /* 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! + 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param containerId Folder identifier - containerId as well as UUID identifier is supported. @@ -108,9 +117,10 @@ type DefaultApi interface { DeleteFolderLabelsExecute(ctx context.Context, containerId string) error /* 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! + 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param containerId Organization identifier - containerId as well as UUID identifier is supported. @@ -128,8 +138,11 @@ type DefaultApi interface { /* DeleteProject 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 + - 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param id Project identifier - containerId as well as UUID identifier is supported. @@ -146,9 +159,10 @@ type DefaultApi interface { DeleteProjectExecute(ctx context.Context, id string) error /* 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! + 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param containerId Project identifier - containerId as well as UUID identifier is supported. @@ -165,7 +179,11 @@ type DefaultApi interface { DeleteProjectLabelsExecute(ctx context.Context, containerId string) error /* GetFolderDetails Get Folder Details - Returns all metadata for a specific folder. + 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param containerId Folder identifier - containerId as well as UUID identifier is supported. @@ -186,7 +204,10 @@ type DefaultApi interface { GetFolderDetailsExecute(ctx context.Context, containerId string) (*GetFolderDetailsResponse, error) /* GetOrganization Get Organization Details - Returns the organization and its metadata. + 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param id Organization identifier - containerId as well as UUID identifier is supported. @@ -209,6 +230,10 @@ type DefaultApi interface { GetProject 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param id Project identifier - containerId as well as UUID identifier is supported. @return ApiGetProjectRequest @@ -239,6 +264,11 @@ type DefaultApi interface { - 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListFoldersRequest @@ -256,13 +286,12 @@ type DefaultApi interface { */ ListFoldersExecute(ctx context.Context) (*ListFoldersResponse, error) /* - 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 + ListOrganizations 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListOrganizationsRequest @@ -280,7 +309,7 @@ type DefaultApi interface { */ ListOrganizationsExecute(ctx context.Context) (*ListOrganizationsResponse, error) /* - ListProjects Get All Projects + ListProjects Get All Projects of a member. Returns all projects and their metadata that: - Are children of the specific containerParentId - Match the given containerIds @@ -292,6 +321,9 @@ type DefaultApi interface { - 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListProjectsRequest @@ -309,10 +341,10 @@ type DefaultApi interface { ListProjectsExecute(ctx context.Context) (*ListProjectsResponse, error) /* PartialUpdateFolder Update Folder - Update the folder and its metadata. - - Update folder name - - Update folder labels - - Update folder parent (folder or organization) + 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param containerId Folder identifier - containerId as well as UUID identifier is supported. @@ -333,9 +365,10 @@ type DefaultApi interface { PartialUpdateFolderExecute(ctx context.Context, containerId string) (*FolderResponse, error) /* PartialUpdateOrganization Update Organization - Update the organization and its metadata. - - Update organization name - - Update organization labels + 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param id Organization identifier - containerId as well as UUID identifier is supported. @@ -356,10 +389,10 @@ type DefaultApi interface { PartialUpdateOrganizationExecute(ctx context.Context, id string) (*OrganizationResponse, error) /* PartialUpdateProject Update Project - Update the project and its metadata. - - Update project name - - Update project labels - - Update project parent (folder or organization) + 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param id Project identifier - containerId as well as UUID identifier is supported. @@ -2420,7 +2453,7 @@ func (r ListOrganizationsRequest) Execute() (*ListOrganizationsResponse, error) } /* -ListOrganizations: Get All Organizations +ListOrganizations: Get all organizations of member Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -2634,7 +2667,7 @@ func (r ListProjectsRequest) Execute() (*ListProjectsResponse, error) { } /* -ListProjects: Get All Projects +ListProjects: Get All Projects of a member. Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead diff --git a/services/resourcemanager/model_container_search_result.go b/services/resourcemanager/model_container_search_result.go deleted file mode 100644 index 5a4b57e78..000000000 --- a/services/resourcemanager/model_container_search_result.go +++ /dev/null @@ -1,550 +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 - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package resourcemanager - -import ( - "encoding/json" - "fmt" -) - -// checks if the ContainerSearchResult type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ContainerSearchResult{} - -/* - types and functions for containerId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ContainerSearchResultGetContainerIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getContainerSearchResultGetContainerIdAttributeTypeOk(arg ContainerSearchResultGetContainerIdAttributeType) (ret ContainerSearchResultGetContainerIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setContainerSearchResultGetContainerIdAttributeType(arg *ContainerSearchResultGetContainerIdAttributeType, val ContainerSearchResultGetContainerIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ContainerSearchResultGetContainerIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ContainerSearchResultGetContainerIdRetType = string - -/* - types and functions for containerType -*/ - -// isEnum - -// ContainerSearchResultContainerType Resource container type. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ContainerSearchResultContainerType string - -// List of ContainerType -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CONTAINERSEARCHRESULTCONTAINER_TYPE_PROJECT ContainerSearchResultContainerType = "PROJECT" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CONTAINERSEARCHRESULTCONTAINER_TYPE_FOLDER ContainerSearchResultContainerType = "FOLDER" -) - -// All allowed values of ContainerSearchResult enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedContainerSearchResultContainerTypeEnumValues = []ContainerSearchResultContainerType{ - "PROJECT", - "FOLDER", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *ContainerSearchResultContainerType) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson ContainerSearchResultContainerType - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := ContainerSearchResultContainerType(value) - for _, existing := range AllowedContainerSearchResultContainerTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid ContainerSearchResult", value) -} - -// NewContainerSearchResultContainerTypeFromValue returns a pointer to a valid ContainerSearchResultContainerType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewContainerSearchResultContainerTypeFromValue(v ContainerSearchResultContainerType) (*ContainerSearchResultContainerType, error) { - ev := ContainerSearchResultContainerType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for ContainerSearchResultContainerType: valid values are %v", v, AllowedContainerSearchResultContainerTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v ContainerSearchResultContainerType) IsValid() bool { - for _, existing := range AllowedContainerSearchResultContainerTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to ContainerTypeContainerType value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v ContainerSearchResultContainerType) Ptr() *ContainerSearchResultContainerType { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableContainerSearchResultContainerType struct { - value *ContainerSearchResultContainerType - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableContainerSearchResultContainerType) Get() *ContainerSearchResultContainerType { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableContainerSearchResultContainerType) Set(val *ContainerSearchResultContainerType) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableContainerSearchResultContainerType) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableContainerSearchResultContainerType) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableContainerSearchResultContainerType(val *ContainerSearchResultContainerType) *NullableContainerSearchResultContainerType { - return &NullableContainerSearchResultContainerType{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableContainerSearchResultContainerType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableContainerSearchResultContainerType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ContainerSearchResultGetContainerTypeAttributeType = *ContainerSearchResultContainerType - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ContainerSearchResultGetContainerTypeArgType = ContainerSearchResultContainerType - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ContainerSearchResultGetContainerTypeRetType = ContainerSearchResultContainerType - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getContainerSearchResultGetContainerTypeAttributeTypeOk(arg ContainerSearchResultGetContainerTypeAttributeType) (ret ContainerSearchResultGetContainerTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setContainerSearchResultGetContainerTypeAttributeType(arg *ContainerSearchResultGetContainerTypeAttributeType, val ContainerSearchResultGetContainerTypeRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ContainerSearchResultGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getContainerSearchResultGetIdAttributeTypeOk(arg ContainerSearchResultGetIdAttributeType) (ret ContainerSearchResultGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setContainerSearchResultGetIdAttributeType(arg *ContainerSearchResultGetIdAttributeType, val ContainerSearchResultGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ContainerSearchResultGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ContainerSearchResultGetIdRetType = string - -/* - types and functions for lifecycleState -*/ - -// isEnumRef -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ContainerSearchResultGetLifecycleStateAttributeType = *LifecycleState - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ContainerSearchResultGetLifecycleStateArgType = LifecycleState - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ContainerSearchResultGetLifecycleStateRetType = LifecycleState - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getContainerSearchResultGetLifecycleStateAttributeTypeOk(arg ContainerSearchResultGetLifecycleStateAttributeType) (ret ContainerSearchResultGetLifecycleStateRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setContainerSearchResultGetLifecycleStateAttributeType(arg *ContainerSearchResultGetLifecycleStateAttributeType, val ContainerSearchResultGetLifecycleStateRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ContainerSearchResultGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getContainerSearchResultGetNameAttributeTypeOk(arg ContainerSearchResultGetNameAttributeType) (ret ContainerSearchResultGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setContainerSearchResultGetNameAttributeType(arg *ContainerSearchResultGetNameAttributeType, val ContainerSearchResultGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ContainerSearchResultGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ContainerSearchResultGetNameRetType = string - -/* - types and functions for organizationId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ContainerSearchResultGetOrganizationIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getContainerSearchResultGetOrganizationIdAttributeTypeOk(arg ContainerSearchResultGetOrganizationIdAttributeType) (ret ContainerSearchResultGetOrganizationIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setContainerSearchResultGetOrganizationIdAttributeType(arg *ContainerSearchResultGetOrganizationIdAttributeType, val ContainerSearchResultGetOrganizationIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ContainerSearchResultGetOrganizationIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ContainerSearchResultGetOrganizationIdRetType = string - -// ContainerSearchResult struct for ContainerSearchResult -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ContainerSearchResult struct { - // Globally unique user-friendly identifier. - // REQUIRED - ContainerId ContainerSearchResultGetContainerIdAttributeType `json:"containerId" required:"true"` - // Resource container type. - // REQUIRED - ContainerType ContainerSearchResultGetContainerTypeAttributeType `json:"containerType" required:"true"` - // Globally unique identifier. - // REQUIRED - Id ContainerSearchResultGetIdAttributeType `json:"id" required:"true"` - LifecycleState ContainerSearchResultGetLifecycleStateAttributeType `json:"lifecycleState,omitempty"` - // Resource container name. - // REQUIRED - Name ContainerSearchResultGetNameAttributeType `json:"name" required:"true"` - // Id of the organization the container is in. - OrganizationId ContainerSearchResultGetOrganizationIdAttributeType `json:"organizationId,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _ContainerSearchResult ContainerSearchResult - -// NewContainerSearchResult instantiates a new ContainerSearchResult object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewContainerSearchResult(containerId ContainerSearchResultGetContainerIdArgType, containerType ContainerSearchResultGetContainerTypeArgType, id ContainerSearchResultGetIdArgType, name ContainerSearchResultGetNameArgType) *ContainerSearchResult { - this := ContainerSearchResult{} - setContainerSearchResultGetContainerIdAttributeType(&this.ContainerId, containerId) - setContainerSearchResultGetContainerTypeAttributeType(&this.ContainerType, containerType) - setContainerSearchResultGetIdAttributeType(&this.Id, id) - setContainerSearchResultGetNameAttributeType(&this.Name, name) - return &this -} - -// NewContainerSearchResultWithDefaults instantiates a new ContainerSearchResult object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewContainerSearchResultWithDefaults() *ContainerSearchResult { - this := ContainerSearchResult{} - return &this -} - -// GetContainerId returns the ContainerId field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ContainerSearchResult) GetContainerId() (ret ContainerSearchResultGetContainerIdRetType) { - ret, _ = o.GetContainerIdOk() - return ret -} - -// GetContainerIdOk returns a tuple with the ContainerId field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ContainerSearchResult) GetContainerIdOk() (ret ContainerSearchResultGetContainerIdRetType, ok bool) { - return getContainerSearchResultGetContainerIdAttributeTypeOk(o.ContainerId) -} - -// SetContainerId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ContainerSearchResult) SetContainerId(v ContainerSearchResultGetContainerIdRetType) { - setContainerSearchResultGetContainerIdAttributeType(&o.ContainerId, v) -} - -// GetContainerType returns the ContainerType field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ContainerSearchResult) GetContainerType() (ret ContainerSearchResultGetContainerTypeRetType) { - ret, _ = o.GetContainerTypeOk() - return ret -} - -// GetContainerTypeOk returns a tuple with the ContainerType field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ContainerSearchResult) GetContainerTypeOk() (ret ContainerSearchResultGetContainerTypeRetType, ok bool) { - return getContainerSearchResultGetContainerTypeAttributeTypeOk(o.ContainerType) -} - -// SetContainerType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ContainerSearchResult) SetContainerType(v ContainerSearchResultGetContainerTypeRetType) { - setContainerSearchResultGetContainerTypeAttributeType(&o.ContainerType, v) -} - -// GetId returns the Id field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ContainerSearchResult) GetId() (ret ContainerSearchResultGetIdRetType) { - ret, _ = o.GetIdOk() - return ret -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ContainerSearchResult) GetIdOk() (ret ContainerSearchResultGetIdRetType, ok bool) { - return getContainerSearchResultGetIdAttributeTypeOk(o.Id) -} - -// SetId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ContainerSearchResult) SetId(v ContainerSearchResultGetIdRetType) { - setContainerSearchResultGetIdAttributeType(&o.Id, v) -} - -// GetLifecycleState returns the LifecycleState field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ContainerSearchResult) GetLifecycleState() (res ContainerSearchResultGetLifecycleStateRetType) { - res, _ = o.GetLifecycleStateOk() - return -} - -// GetLifecycleStateOk returns a tuple with the LifecycleState field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ContainerSearchResult) GetLifecycleStateOk() (ret ContainerSearchResultGetLifecycleStateRetType, ok bool) { - return getContainerSearchResultGetLifecycleStateAttributeTypeOk(o.LifecycleState) -} - -// HasLifecycleState returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ContainerSearchResult) HasLifecycleState() bool { - _, ok := o.GetLifecycleStateOk() - return ok -} - -// SetLifecycleState gets a reference to the given LifecycleState and assigns it to the LifecycleState field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ContainerSearchResult) SetLifecycleState(v ContainerSearchResultGetLifecycleStateRetType) { - setContainerSearchResultGetLifecycleStateAttributeType(&o.LifecycleState, v) -} - -// GetName returns the Name field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ContainerSearchResult) GetName() (ret ContainerSearchResultGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ContainerSearchResult) GetNameOk() (ret ContainerSearchResultGetNameRetType, ok bool) { - return getContainerSearchResultGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ContainerSearchResult) SetName(v ContainerSearchResultGetNameRetType) { - setContainerSearchResultGetNameAttributeType(&o.Name, v) -} - -// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ContainerSearchResult) GetOrganizationId() (res ContainerSearchResultGetOrganizationIdRetType) { - res, _ = o.GetOrganizationIdOk() - return -} - -// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ContainerSearchResult) GetOrganizationIdOk() (ret ContainerSearchResultGetOrganizationIdRetType, ok bool) { - return getContainerSearchResultGetOrganizationIdAttributeTypeOk(o.OrganizationId) -} - -// HasOrganizationId returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ContainerSearchResult) HasOrganizationId() bool { - _, ok := o.GetOrganizationIdOk() - return ok -} - -// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ContainerSearchResult) SetOrganizationId(v ContainerSearchResultGetOrganizationIdRetType) { - setContainerSearchResultGetOrganizationIdAttributeType(&o.OrganizationId, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ContainerSearchResult) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getContainerSearchResultGetContainerIdAttributeTypeOk(o.ContainerId); ok { - toSerialize["ContainerId"] = val - } - if val, ok := getContainerSearchResultGetContainerTypeAttributeTypeOk(o.ContainerType); ok { - toSerialize["ContainerType"] = val - } - if val, ok := getContainerSearchResultGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getContainerSearchResultGetLifecycleStateAttributeTypeOk(o.LifecycleState); ok { - toSerialize["LifecycleState"] = val - } - if val, ok := getContainerSearchResultGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getContainerSearchResultGetOrganizationIdAttributeTypeOk(o.OrganizationId); ok { - toSerialize["OrganizationId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableContainerSearchResult struct { - value *ContainerSearchResult - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableContainerSearchResult) Get() *ContainerSearchResult { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableContainerSearchResult) Set(val *ContainerSearchResult) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableContainerSearchResult) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableContainerSearchResult) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableContainerSearchResult(val *ContainerSearchResult) *NullableContainerSearchResult { - return &NullableContainerSearchResult{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableContainerSearchResult) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableContainerSearchResult) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/resourcemanager/model_container_search_result_test.go b/services/resourcemanager/model_container_search_result_test.go deleted file mode 100644 index 7f2c778e5..000000000 --- a/services/resourcemanager/model_container_search_result_test.go +++ /dev/null @@ -1,58 +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 - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package resourcemanager - -import ( - "testing" -) - -// isEnum - -func TestContainerSearchResultContainerType_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"PROJECT"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"FOLDER"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := ContainerSearchResultContainerType("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/resourcemanager/oas_commit b/services/resourcemanager/oas_commit index 5542f81cd..84fb2776f 100644 --- a/services/resourcemanager/oas_commit +++ b/services/resourcemanager/oas_commit @@ -1 +1 @@ -1ecc5ee263a36af12f8c9314dbed780cabe4deb2 +3fc1363ce4ead752c576a30ee9cf0e1b5836ae35 diff --git a/services/resourcemanager/v0api/api_default.go b/services/resourcemanager/v0api/api_default.go index b01d2c499..595ebe1cc 100644 --- a/services/resourcemanager/v0api/api_default.go +++ b/services/resourcemanager/v0api/api_default.go @@ -26,12 +26,15 @@ import ( type DefaultAPI interface { /* - CreateFolder Create Folder + CreateFolder Create Folder - Create a new folder. + Creates a new folder within a parent organization or folder. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateFolderRequest + 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateFolderRequest */ CreateFolder(ctx context.Context) ApiCreateFolderRequest @@ -42,9 +45,12 @@ type DefaultAPI interface { /* 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 + 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateProjectRequest @@ -59,8 +65,10 @@ type DefaultAPI interface { 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! + - 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param containerId Folder identifier - containerId as well as UUID identifier is supported. @@ -74,9 +82,10 @@ type DefaultAPI interface { /* 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! + 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param containerId Folder identifier - containerId as well as UUID identifier is supported. @@ -90,9 +99,10 @@ type DefaultAPI interface { /* 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! + 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param containerId Organization identifier - containerId as well as UUID identifier is supported. @@ -107,8 +117,11 @@ type DefaultAPI interface { DeleteProject 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 + - 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param id Project identifier - containerId as well as UUID identifier is supported. @@ -122,9 +135,10 @@ type DefaultAPI interface { /* 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! + 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param containerId Project identifier - containerId as well as UUID identifier is supported. @@ -136,13 +150,17 @@ type DefaultAPI interface { DeleteProjectLabelsExecute(r ApiDeleteProjectLabelsRequest) error /* - GetFolderDetails Get Folder Details + GetFolderDetails Get Folder Details - Returns all metadata for a specific folder. + Returns metadata for a specific folder. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param containerId Folder identifier - containerId as well as UUID identifier is supported. - @return ApiGetFolderDetailsRequest + 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param containerId Folder identifier - containerId as well as UUID identifier is supported. + @return ApiGetFolderDetailsRequest */ GetFolderDetails(ctx context.Context, containerId string) ApiGetFolderDetailsRequest @@ -151,13 +169,16 @@ type DefaultAPI interface { GetFolderDetailsExecute(r ApiGetFolderDetailsRequest) (*GetFolderDetailsResponse, error) /* - GetOrganization Get Organization Details + GetOrganization Get Organization Details + + Returns metadata for a specific organization. - Returns the organization and its metadata. + Authorization & Permissions: + - Evaluated on Target Organization: resource-manager.organization.get (required permission on the organization to view its details). - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id Organization identifier - containerId as well as UUID identifier is supported. - @return ApiGetOrganizationRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Organization identifier - containerId as well as UUID identifier is supported. + @return ApiGetOrganizationRequest */ GetOrganization(ctx context.Context, id string) ApiGetOrganizationRequest @@ -166,13 +187,17 @@ type DefaultAPI interface { GetOrganizationExecute(r ApiGetOrganizationRequest) (*OrganizationResponse, error) /* - GetProject Get Project Details + GetProject Get Project Details + + Returns the project and its metadata. - 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id Project identifier - containerId as well as UUID identifier is supported. - @return ApiGetProjectRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Project identifier - containerId as well as UUID identifier is supported. + @return ApiGetProjectRequest */ GetProject(ctx context.Context, id string) ApiGetProjectRequest @@ -194,6 +219,11 @@ type DefaultAPI interface { - 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListFoldersRequest @@ -205,14 +235,13 @@ type DefaultAPI interface { ListFoldersExecute(r ApiListFoldersRequest) (*ListFoldersResponse, error) /* - ListOrganizations Get All Organizations + ListOrganizations Get all organizations of member - 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 + 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListOrganizationsRequest @@ -224,7 +253,7 @@ type DefaultAPI interface { ListOrganizationsExecute(r ApiListOrganizationsRequest) (*ListOrganizationsResponse, error) /* - ListProjects Get All Projects + ListProjects Get All Projects of a member. Returns all projects and their metadata that: - Are children of the specific containerParentId @@ -237,6 +266,9 @@ type DefaultAPI interface { - 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListProjectsRequest */ @@ -249,10 +281,10 @@ type DefaultAPI interface { /* PartialUpdateFolder Update Folder - Update the folder and its metadata. - - Update folder name - - Update folder labels - - Update folder parent (folder or organization) + 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param containerId Folder identifier - containerId as well as UUID identifier is supported. @@ -267,9 +299,10 @@ type DefaultAPI interface { /* PartialUpdateOrganization Update Organization - Update the organization and its metadata. - - Update organization name - - Update organization labels + 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param id Organization identifier - containerId as well as UUID identifier is supported. @@ -284,10 +317,10 @@ type DefaultAPI interface { /* PartialUpdateProject Update Project - Update the project and its metadata. - - Update project name - - Update project labels - - Update project parent (folder or organization) + 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param id Project identifier - containerId as well as UUID identifier is supported. @@ -321,7 +354,10 @@ func (r ApiCreateFolderRequest) Execute() (*FolderResponse, error) { /* CreateFolder Create Folder -Create a new 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateFolderRequest @@ -472,9 +508,12 @@ func (r ApiCreateProjectRequest) Execute() (*Project, error) { /* 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 +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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateProjectRequest @@ -628,8 +667,10 @@ func (r ApiDeleteFolderRequest) Execute() error { 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! +- 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param containerId Folder identifier - containerId as well as UUID identifier is supported. @@ -766,9 +807,10 @@ func (r ApiDeleteFolderLabelsRequest) Execute() error { /* 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! +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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param containerId Folder identifier - containerId as well as UUID identifier is supported. @@ -898,9 +940,10 @@ func (r ApiDeleteOrganizationLabelsRequest) Execute() error { /* 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! +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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param containerId Organization identifier - containerId as well as UUID identifier is supported. @@ -1024,8 +1067,11 @@ func (r ApiDeleteProjectRequest) Execute() error { DeleteProject 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 +- 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param id Project identifier - containerId as well as UUID identifier is supported. @@ -1144,9 +1190,10 @@ func (r ApiDeleteProjectLabelsRequest) Execute() error { /* 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! +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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param containerId Project identifier - containerId as well as UUID identifier is supported. @@ -1275,7 +1322,11 @@ func (r ApiGetFolderDetailsRequest) Execute() (*GetFolderDetailsResponse, error) /* GetFolderDetails Get Folder Details -Returns all metadata for a specific folder. +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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param containerId Folder identifier - containerId as well as UUID identifier is supported. @@ -1418,7 +1469,10 @@ func (r ApiGetOrganizationRequest) Execute() (*OrganizationResponse, error) { /* GetOrganization Get Organization Details -Returns the organization and its metadata. +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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param id Organization identifier - containerId as well as UUID identifier is supported. @@ -1551,6 +1605,10 @@ GetProject 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param id Project identifier - containerId as well as UUID identifier is supported. @return ApiGetProjectRequest @@ -1744,6 +1802,11 @@ Filter: - 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListFoldersRequest */ @@ -1952,13 +2015,13 @@ func (r ApiListOrganizationsRequest) Execute() (*ListOrganizationsResponse, erro } /* -ListOrganizations Get All Organizations +ListOrganizations Get all organizations of member + +Returns all organizations and their metadata accessible to the caller. +- Filterable by containerIds or member. -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 +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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListOrganizationsRequest @@ -2161,7 +2224,7 @@ func (r ApiListProjectsRequest) Execute() (*ListProjectsResponse, error) { } /* -ListProjects Get All Projects +ListProjects Get All Projects of a member. Returns all projects and their metadata that: - Are children of the specific containerParentId @@ -2174,6 +2237,9 @@ Filter: - 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListProjectsRequest */ @@ -2345,10 +2411,10 @@ func (r ApiPartialUpdateFolderRequest) Execute() (*FolderResponse, error) { /* PartialUpdateFolder Update Folder -Update the folder and its metadata. -- Update folder name -- Update folder labels -- Update folder parent (folder or organization) +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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param containerId Folder identifier - containerId as well as UUID identifier is supported. @@ -2503,9 +2569,10 @@ func (r ApiPartialUpdateOrganizationRequest) Execute() (*OrganizationResponse, e /* PartialUpdateOrganization Update Organization -Update the organization and its metadata. -- Update organization name -- Update organization labels +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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param id Organization identifier - containerId as well as UUID identifier is supported. @@ -2649,10 +2716,10 @@ func (r ApiPartialUpdateProjectRequest) Execute() (*Project, error) { /* PartialUpdateProject Update Project -Update the project and its metadata. -- Update project name -- Update project labels -- Update project parent (folder or organization) +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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param id Project identifier - containerId as well as UUID identifier is supported. diff --git a/services/resourcemanager/v0api/model_container_search_result.go b/services/resourcemanager/v0api/model_container_search_result.go deleted file mode 100644 index d17ce420b..000000000 --- a/services/resourcemanager/v0api/model_container_search_result.go +++ /dev/null @@ -1,331 +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 - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v0api - -import ( - "encoding/json" - "fmt" -) - -// checks if the ContainerSearchResult type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ContainerSearchResult{} - -// ContainerSearchResult struct for ContainerSearchResult -type ContainerSearchResult struct { - // Globally unique user-friendly identifier. - ContainerId string `json:"containerId"` - ContainerType ContainerSearchResultContainerType `json:"containerType"` - // Globally unique identifier. - Id string `json:"id"` - LifecycleState *LifecycleState `json:"lifecycleState,omitempty"` - // Resource container name. - Name string `json:"name"` - // Id of the organization the container is in. - OrganizationId *string `json:"organizationId,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _ContainerSearchResult ContainerSearchResult - -// NewContainerSearchResult instantiates a new ContainerSearchResult object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewContainerSearchResult(containerId string, containerType ContainerSearchResultContainerType, id string, name string) *ContainerSearchResult { - this := ContainerSearchResult{} - this.ContainerId = containerId - this.ContainerType = containerType - this.Id = id - this.Name = name - return &this -} - -// NewContainerSearchResultWithDefaults instantiates a new ContainerSearchResult object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewContainerSearchResultWithDefaults() *ContainerSearchResult { - this := ContainerSearchResult{} - return &this -} - -// GetContainerId returns the ContainerId field value -func (o *ContainerSearchResult) GetContainerId() string { - if o == nil { - var ret string - return ret - } - - return o.ContainerId -} - -// GetContainerIdOk returns a tuple with the ContainerId field value -// and a boolean to check if the value has been set. -func (o *ContainerSearchResult) GetContainerIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContainerId, true -} - -// SetContainerId sets field value -func (o *ContainerSearchResult) SetContainerId(v string) { - o.ContainerId = v -} - -// GetContainerType returns the ContainerType field value -func (o *ContainerSearchResult) GetContainerType() ContainerSearchResultContainerType { - if o == nil { - var ret ContainerSearchResultContainerType - return ret - } - - return o.ContainerType -} - -// GetContainerTypeOk returns a tuple with the ContainerType field value -// and a boolean to check if the value has been set. -func (o *ContainerSearchResult) GetContainerTypeOk() (*ContainerSearchResultContainerType, bool) { - if o == nil { - return nil, false - } - return &o.ContainerType, true -} - -// SetContainerType sets field value -func (o *ContainerSearchResult) SetContainerType(v ContainerSearchResultContainerType) { - o.ContainerType = v -} - -// GetId returns the Id field value -func (o *ContainerSearchResult) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ContainerSearchResult) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ContainerSearchResult) SetId(v string) { - o.Id = v -} - -// GetLifecycleState returns the LifecycleState field value if set, zero value otherwise. -func (o *ContainerSearchResult) GetLifecycleState() LifecycleState { - if o == nil || IsNil(o.LifecycleState) { - var ret LifecycleState - return ret - } - return *o.LifecycleState -} - -// GetLifecycleStateOk returns a tuple with the LifecycleState field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContainerSearchResult) GetLifecycleStateOk() (*LifecycleState, bool) { - if o == nil || IsNil(o.LifecycleState) { - return nil, false - } - return o.LifecycleState, true -} - -// HasLifecycleState returns a boolean if a field has been set. -func (o *ContainerSearchResult) HasLifecycleState() bool { - if o != nil && !IsNil(o.LifecycleState) { - return true - } - - return false -} - -// SetLifecycleState gets a reference to the given LifecycleState and assigns it to the LifecycleState field. -func (o *ContainerSearchResult) SetLifecycleState(v LifecycleState) { - o.LifecycleState = &v -} - -// GetName returns the Name field value -func (o *ContainerSearchResult) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *ContainerSearchResult) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *ContainerSearchResult) SetName(v string) { - o.Name = v -} - -// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. -func (o *ContainerSearchResult) GetOrganizationId() string { - if o == nil || IsNil(o.OrganizationId) { - var ret string - return ret - } - return *o.OrganizationId -} - -// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContainerSearchResult) GetOrganizationIdOk() (*string, bool) { - if o == nil || IsNil(o.OrganizationId) { - return nil, false - } - return o.OrganizationId, true -} - -// HasOrganizationId returns a boolean if a field has been set. -func (o *ContainerSearchResult) HasOrganizationId() bool { - if o != nil && !IsNil(o.OrganizationId) { - return true - } - - return false -} - -// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field. -func (o *ContainerSearchResult) SetOrganizationId(v string) { - o.OrganizationId = &v -} - -func (o ContainerSearchResult) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ContainerSearchResult) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["containerId"] = o.ContainerId - toSerialize["containerType"] = o.ContainerType - toSerialize["id"] = o.Id - if !IsNil(o.LifecycleState) { - toSerialize["lifecycleState"] = o.LifecycleState - } - toSerialize["name"] = o.Name - if !IsNil(o.OrganizationId) { - toSerialize["organizationId"] = o.OrganizationId - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ContainerSearchResult) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "containerId", - "containerType", - "id", - "name", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err - } - - for _, requiredProperty := range requiredProperties { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varContainerSearchResult := _ContainerSearchResult{} - - err = json.Unmarshal(data, &varContainerSearchResult) - - if err != nil { - return err - } - - *o = ContainerSearchResult(varContainerSearchResult) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "containerId") - delete(additionalProperties, "containerType") - delete(additionalProperties, "id") - delete(additionalProperties, "lifecycleState") - delete(additionalProperties, "name") - delete(additionalProperties, "organizationId") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableContainerSearchResult struct { - value *ContainerSearchResult - isSet bool -} - -func (v NullableContainerSearchResult) Get() *ContainerSearchResult { - return v.value -} - -func (v *NullableContainerSearchResult) Set(val *ContainerSearchResult) { - v.value = val - v.isSet = true -} - -func (v NullableContainerSearchResult) IsSet() bool { - return v.isSet -} - -func (v *NullableContainerSearchResult) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableContainerSearchResult(val *ContainerSearchResult) *NullableContainerSearchResult { - return &NullableContainerSearchResult{value: val, isSet: true} -} - -func (v NullableContainerSearchResult) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableContainerSearchResult) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/resourcemanager/v0api/model_container_search_result_container_type.go b/services/resourcemanager/v0api/model_container_search_result_container_type.go deleted file mode 100644 index a66d44530..000000000 --- a/services/resourcemanager/v0api/model_container_search_result_container_type.go +++ /dev/null @@ -1,113 +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 - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v0api - -import ( - "encoding/json" - "fmt" -) - -// ContainerSearchResultContainerType Resource container type. -type ContainerSearchResultContainerType string - -// List of ContainerSearchResult_containerType -const ( - CONTAINERSEARCHRESULTCONTAINERTYPE_PROJECT ContainerSearchResultContainerType = "PROJECT" - CONTAINERSEARCHRESULTCONTAINERTYPE_FOLDER ContainerSearchResultContainerType = "FOLDER" - CONTAINERSEARCHRESULTCONTAINERTYPE_UNKNOWN_DEFAULT_OPEN_API ContainerSearchResultContainerType = "unknown_default_open_api" -) - -// All allowed values of ContainerSearchResultContainerType enum -var AllowedContainerSearchResultContainerTypeEnumValues = []ContainerSearchResultContainerType{ - "PROJECT", - "FOLDER", - "unknown_default_open_api", -} - -func (v *ContainerSearchResultContainerType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := ContainerSearchResultContainerType(value) - for _, existing := range AllowedContainerSearchResultContainerTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - *v = CONTAINERSEARCHRESULTCONTAINERTYPE_UNKNOWN_DEFAULT_OPEN_API - return nil -} - -// NewContainerSearchResultContainerTypeFromValue returns a pointer to a valid ContainerSearchResultContainerType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewContainerSearchResultContainerTypeFromValue(v string) (*ContainerSearchResultContainerType, error) { - ev := ContainerSearchResultContainerType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for ContainerSearchResultContainerType: valid values are %v", v, AllowedContainerSearchResultContainerTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v ContainerSearchResultContainerType) IsValid() bool { - for _, existing := range AllowedContainerSearchResultContainerTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to ContainerSearchResult_containerType value -func (v ContainerSearchResultContainerType) Ptr() *ContainerSearchResultContainerType { - return &v -} - -type NullableContainerSearchResultContainerType struct { - value *ContainerSearchResultContainerType - isSet bool -} - -func (v NullableContainerSearchResultContainerType) Get() *ContainerSearchResultContainerType { - return v.value -} - -func (v *NullableContainerSearchResultContainerType) Set(val *ContainerSearchResultContainerType) { - v.value = val - v.isSet = true -} - -func (v NullableContainerSearchResultContainerType) IsSet() bool { - return v.isSet -} - -func (v *NullableContainerSearchResultContainerType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableContainerSearchResultContainerType(val *ContainerSearchResultContainerType) *NullableContainerSearchResultContainerType { - return &NullableContainerSearchResultContainerType{value: val, isSet: true} -} - -func (v NullableContainerSearchResultContainerType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableContainerSearchResultContainerType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -}