diff --git a/CHANGELOG.md b/CHANGELOG.md index e6e0cb9025..d6c2c0f38c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -229,6 +229,10 @@ - [v0.1.0](services/registry/CHANGELOG.md#v010) - **New**: New package which can be used for communication with the registry v1 API - `resourcemanager`: + - [v0.28.0](services/resourcemanager/CHANGELOG.md#v0280) + - `v0api`: + - Update regex of the `Name` field in the model structs `CreateFolderPayload`, `CreateProjectPayload`, `PartialUpdateFolderPayload`, `PartialUpdateOrganizationPayload`, `PartialUpdateProjectPayload` + - **Feature:** The `Members` field is now optional (previously required) in the `CreateProjectPayload` model struct - [v0.27.0](services/resourcemanager/CHANGELOG.md#v0270) - **Breaking change:** Removal of deprecated compatibility layer previously found in the root of the SDK module - [v0.26.1](services/resourcemanager/CHANGELOG.md#v0261) diff --git a/services/resourcemanager/CHANGELOG.md b/services/resourcemanager/CHANGELOG.md index a3ac0ff870..22a72c5ddd 100644 --- a/services/resourcemanager/CHANGELOG.md +++ b/services/resourcemanager/CHANGELOG.md @@ -1,3 +1,8 @@ +## v0.28.0 +- `v0api`: + - Update regex of the `Name` field in the model structs `CreateFolderPayload`, `CreateProjectPayload`, `PartialUpdateFolderPayload`, `PartialUpdateOrganizationPayload`, `PartialUpdateProjectPayload` + - **Feature:** The `Members` field is now optional (previously required) in the `CreateProjectPayload` model struct + ## v0.27.0 - **Breaking change:** Removal of deprecated compatibility layer previously found in the root of the SDK module diff --git a/services/resourcemanager/VERSION b/services/resourcemanager/VERSION index 0a8bf80d69..31950dacac 100644 --- a/services/resourcemanager/VERSION +++ b/services/resourcemanager/VERSION @@ -1 +1 @@ -v0.27.0 +v0.28.0 diff --git a/services/resourcemanager/oas_commit b/services/resourcemanager/oas_commit index 6a8ba08d49..06fd33893d 100644 --- a/services/resourcemanager/oas_commit +++ b/services/resourcemanager/oas_commit @@ -1 +1 @@ -ef9232ba8d49c72fc3397a365b09ca1a8205b25e +3d55d58fe8607afa4f894077e1e5c0a19ef57b3f diff --git a/services/resourcemanager/v0api/model_create_folder_payload.go b/services/resourcemanager/v0api/model_create_folder_payload.go index fba21a15ce..217edb3203 100644 --- a/services/resourcemanager/v0api/model_create_folder_payload.go +++ b/services/resourcemanager/v0api/model_create_folder_payload.go @@ -20,14 +20,14 @@ var _ MappedNullable = &CreateFolderPayload{} // CreateFolderPayload struct for CreateFolderPayload type CreateFolderPayload struct { - // Identifier of the parent resource container - containerId as well as UUID identifier is supported. + // Identifier of the parent resource container ContainerParentId string `json:"containerParentId"` // Key-value string pairs attached to a resource container during creation. Certain labels may be enforced via organizational policies. * **Key:** Must be between 1 and 63 characters long (excluding an optional domain prefix). Must start and end with an alphanumeric character `[a-zA-Z0-9]` and can contain alphanumerics, dashes (-), underscores (_), and dots (.). May include an optional domain prefix up to 250 characters (a lowercase DNS subdomain containing `[a-z0-9]`, `-`, and `.`) followed by a slash (/). Total maximum key length is 314 characters. * **Value:** Must be 63 characters or less. May be empty (\"\"). If non-empty, must start and end with an alphanumeric character `[a-zA-Z0-9]` and can contain alphanumerics, dashes (-), underscores (_), and dots (.). * Either a `\"scope\": \"PUBLIC\"` label or a valid `networkArea` label must be provided for project creation. * To create a project within a STACKIT Network Area, you must set the label `\"networkArea\": \"\"`. > **Important:** The `networkArea` label is immutable and **cannot be changed** after project creation. Labels *map[string]string `json:"labels,omitempty"` - // The initial members assigned to the project. At least one subject needs to be a user, and not a client or service account. + // The initial members assigned to the folder. Members []Member `json:"members,omitempty"` - // The name of the folder matching the regex `^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){0,39}$`. - Name string `json:"name" validate:"regexp=^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){0\\,39}$"` + // Folder name matching the regex `^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){1,40}$`. + Name string `json:"name" validate:"regexp=^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){1\\,40}$"` AdditionalProperties map[string]interface{} } diff --git a/services/resourcemanager/v0api/model_create_project_payload.go b/services/resourcemanager/v0api/model_create_project_payload.go index a2003f1ee2..a78e72666e 100644 --- a/services/resourcemanager/v0api/model_create_project_payload.go +++ b/services/resourcemanager/v0api/model_create_project_payload.go @@ -25,9 +25,9 @@ type CreateProjectPayload struct { // Key-value string pairs attached to a resource container during creation. Certain labels may be enforced via organizational policies. * **Key:** Must be between 1 and 63 characters long (excluding an optional domain prefix). Must start and end with an alphanumeric character `[a-zA-Z0-9]` and can contain alphanumerics, dashes (-), underscores (_), and dots (.). May include an optional domain prefix up to 250 characters (a lowercase DNS subdomain containing `[a-z0-9]`, `-`, and `.`) followed by a slash (/). Total maximum key length is 314 characters. * **Value:** Must be 63 characters or less. May be empty (\"\"). If non-empty, must start and end with an alphanumeric character `[a-zA-Z0-9]` and can contain alphanumerics, dashes (-), underscores (_), and dots (.). * Either a `\"scope\": \"PUBLIC\"` label or a valid `networkArea` label must be provided for project creation. * To create a project within a STACKIT Network Area, you must set the label `\"networkArea\": \"\"`. > **Important:** The `networkArea` label is immutable and **cannot be changed** after project creation. Labels *map[string]string `json:"labels,omitempty"` // The initial members assigned to the project. At least one subject needs to be a user, and not a client or service account. - Members []Member `json:"members"` - // Project name matching the regex `^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){0,39}$`. - Name string `json:"name" validate:"regexp=^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){0\\,39}$"` + Members []Member `json:"members,omitempty"` + // Project name matching the regex `^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){1,40}$`. + Name string `json:"name" validate:"regexp=^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){1\\,40}$"` AdditionalProperties map[string]interface{} } @@ -37,10 +37,9 @@ type _CreateProjectPayload CreateProjectPayload // 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 NewCreateProjectPayload(containerParentId string, members []Member, name string) *CreateProjectPayload { +func NewCreateProjectPayload(containerParentId string, name string) *CreateProjectPayload { this := CreateProjectPayload{} this.ContainerParentId = containerParentId - this.Members = members this.Name = name return &this } @@ -109,26 +108,34 @@ func (o *CreateProjectPayload) SetLabels(v map[string]string) { o.Labels = &v } -// GetMembers returns the Members field value +// GetMembers returns the Members field value if set, zero value otherwise. func (o *CreateProjectPayload) GetMembers() []Member { - if o == nil { + if o == nil || IsNil(o.Members) { var ret []Member return ret } - return o.Members } -// GetMembersOk returns a tuple with the Members field value +// GetMembersOk returns a tuple with the Members field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CreateProjectPayload) GetMembersOk() ([]Member, bool) { - if o == nil { + if o == nil || IsNil(o.Members) { return nil, false } return o.Members, true } -// SetMembers sets field value +// HasMembers returns a boolean if a field has been set. +func (o *CreateProjectPayload) HasMembers() bool { + if o != nil && !IsNil(o.Members) { + return true + } + + return false +} + +// SetMembers gets a reference to the given []Member and assigns it to the Members field. func (o *CreateProjectPayload) SetMembers(v []Member) { o.Members = v } @@ -171,7 +178,9 @@ func (o CreateProjectPayload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Labels) { toSerialize["labels"] = o.Labels } - toSerialize["members"] = o.Members + if !IsNil(o.Members) { + toSerialize["members"] = o.Members + } toSerialize["name"] = o.Name for key, value := range o.AdditionalProperties { @@ -187,7 +196,6 @@ func (o *CreateProjectPayload) UnmarshalJSON(data []byte) (err error) { // that every required field exists as a key in the generic map. requiredProperties := []string{ "containerParentId", - "members", "name", } diff --git a/services/resourcemanager/v0api/model_partial_update_folder_payload.go b/services/resourcemanager/v0api/model_partial_update_folder_payload.go index 0b70f56f88..7a32cd5c4f 100644 --- a/services/resourcemanager/v0api/model_partial_update_folder_payload.go +++ b/services/resourcemanager/v0api/model_partial_update_folder_payload.go @@ -21,10 +21,10 @@ var _ MappedNullable = &PartialUpdateFolderPayload{} type PartialUpdateFolderPayload struct { // New parent identifier for the resource container - containerId as well as UUID identifier is supported. ContainerParentId *string `json:"containerParentId,omitempty"` - // Key-value string pairs attached to an existing resource container. Certain labels may be enforced via organizational policies. Setting an individual label's value to `null` removes/deletes that label from the resource. * **Key:** Must be between 1 and 63 characters long (excluding an optional domain prefix). Must start and end with an alphanumeric character `[a-zA-Z0-9]` and can contain alphanumerics, dashes (-), underscores (_), and dots (.). May include an optional domain prefix up to 250 characters (a lowercase DNS subdomain containing `[a-z0-9]`, `-`, and `.`) followed by a slash (/). Total maximum key length is 314 characters. * **Value:** Must be 63 characters or less. May be empty (\"\"). If non-empty, must start and end with an alphanumeric character `[a-zA-Z0-9]` and can contain alphanumerics, dashes (-), underscores (_), and dots (.). > Note: Additional naming restrictions may apply depending on your specific organization.* + // Key-value string pairs attached to an existing resource container. Certain labels may be enforced via organizational policies. Setting an individual label's value to `null` removes/deletes that label from the resource. * **Key:** Must be between 1 and 63 characters long (excluding an optional domain prefix). Must start and end with an alphanumeric character `[a-zA-Z0-9]` and can contain alphanumerics, dashes (-), underscores (_), and dots (.). May include an optional domain prefix up to 250 characters (a lowercase DNS subdomain containing `[a-z0-9]`, `-`, and `.`) followed by a slash (/). Total maximum key length is 314 characters. * **Value:** Must be 63 characters or less. May be empty (\"\"). If non-empty, must start and end with an alphanumeric character `[a-zA-Z0-9]` and can contain alphanumerics, dashes (-), underscores (_), and dots (.). Can be set to null to delete the label. > Note: Additional naming restrictions may apply depending on your specific organization.* Labels *map[string]*string `json:"labels,omitempty"` - // New name for the resource container matching the regex `^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){0,39}$`. - Name *string `json:"name,omitempty" validate:"regexp=^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){0\\,39}$"` + // New name for the resource container matching the regex `^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){1,40}$`. + Name *string `json:"name,omitempty" validate:"regexp=^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){1\\,40}$"` AdditionalProperties map[string]interface{} } diff --git a/services/resourcemanager/v0api/model_partial_update_organization_payload.go b/services/resourcemanager/v0api/model_partial_update_organization_payload.go index b86285c383..07734d9154 100644 --- a/services/resourcemanager/v0api/model_partial_update_organization_payload.go +++ b/services/resourcemanager/v0api/model_partial_update_organization_payload.go @@ -19,10 +19,10 @@ var _ MappedNullable = &PartialUpdateOrganizationPayload{} // PartialUpdateOrganizationPayload struct for PartialUpdateOrganizationPayload type PartialUpdateOrganizationPayload struct { - // Key-value string pairs attached to an existing resource container. Certain labels may be enforced via organizational policies. Setting an individual label's value to `null` removes/deletes that label from the resource. * **Key:** Must be between 1 and 63 characters long (excluding an optional domain prefix). Must start and end with an alphanumeric character `[a-zA-Z0-9]` and can contain alphanumerics, dashes (-), underscores (_), and dots (.). May include an optional domain prefix up to 250 characters (a lowercase DNS subdomain containing `[a-z0-9]`, `-`, and `.`) followed by a slash (/). Total maximum key length is 314 characters. * **Value:** Must be 63 characters or less. May be empty (\"\"). If non-empty, must start and end with an alphanumeric character `[a-zA-Z0-9]` and can contain alphanumerics, dashes (-), underscores (_), and dots (.). > Note: Additional naming restrictions may apply depending on your specific organization.* + // Key-value string pairs attached to an existing resource container. Certain labels may be enforced via organizational policies. Setting an individual label's value to `null` removes/deletes that label from the resource. * **Key:** Must be between 1 and 63 characters long (excluding an optional domain prefix). Must start and end with an alphanumeric character `[a-zA-Z0-9]` and can contain alphanumerics, dashes (-), underscores (_), and dots (.). May include an optional domain prefix up to 250 characters (a lowercase DNS subdomain containing `[a-z0-9]`, `-`, and `.`) followed by a slash (/). Total maximum key length is 314 characters. * **Value:** Must be 63 characters or less. May be empty (\"\"). If non-empty, must start and end with an alphanumeric character `[a-zA-Z0-9]` and can contain alphanumerics, dashes (-), underscores (_), and dots (.). Can be set to null to delete the label. > Note: Additional naming restrictions may apply depending on your specific organization.* Labels *map[string]*string `json:"labels,omitempty"` - // The new name of the organization matching the regex `^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){0,39}$`. - Name *string `json:"name,omitempty" validate:"regexp=^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){0\\,39}$"` + // The new name of the organization matching the regex `^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){1,40}$`. + Name *string `json:"name,omitempty" validate:"regexp=^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){1\\,40}$"` AdditionalProperties map[string]interface{} } diff --git a/services/resourcemanager/v0api/model_partial_update_project_payload.go b/services/resourcemanager/v0api/model_partial_update_project_payload.go index ec1120c8dc..e20b5f11e1 100644 --- a/services/resourcemanager/v0api/model_partial_update_project_payload.go +++ b/services/resourcemanager/v0api/model_partial_update_project_payload.go @@ -21,10 +21,10 @@ var _ MappedNullable = &PartialUpdateProjectPayload{} type PartialUpdateProjectPayload struct { // New parent identifier for the resource container - containerId as well as UUID identifier is supported. ContainerParentId *string `json:"containerParentId,omitempty"` - // Key-value string pairs attached to an existing resource container. Certain labels may be enforced via organizational policies. Setting an individual label's value to `null` removes/deletes that label from the resource. * **Key:** Must be between 1 and 63 characters long (excluding an optional domain prefix). Must start and end with an alphanumeric character `[a-zA-Z0-9]` and can contain alphanumerics, dashes (-), underscores (_), and dots (.). May include an optional domain prefix up to 250 characters (a lowercase DNS subdomain containing `[a-z0-9]`, `-`, and `.`) followed by a slash (/). Total maximum key length is 314 characters. * **Value:** Must be 63 characters or less. May be empty (\"\"). If non-empty, must start and end with an alphanumeric character `[a-zA-Z0-9]` and can contain alphanumerics, dashes (-), underscores (_), and dots (.). > Note: Additional naming restrictions may apply depending on your specific organization.* + // Key-value string pairs attached to an existing resource container. Certain labels may be enforced via organizational policies. Setting an individual label's value to `null` removes/deletes that label from the resource. * **Key:** Must be between 1 and 63 characters long (excluding an optional domain prefix). Must start and end with an alphanumeric character `[a-zA-Z0-9]` and can contain alphanumerics, dashes (-), underscores (_), and dots (.). May include an optional domain prefix up to 250 characters (a lowercase DNS subdomain containing `[a-z0-9]`, `-`, and `.`) followed by a slash (/). Total maximum key length is 314 characters. * **Value:** Must be 63 characters or less. May be empty (\"\"). If non-empty, must start and end with an alphanumeric character `[a-zA-Z0-9]` and can contain alphanumerics, dashes (-), underscores (_), and dots (.). Can be set to null to delete the label. > Note: Additional naming restrictions may apply depending on your specific organization.* Labels *map[string]*string `json:"labels,omitempty"` - // New name for the resource container matching the regex `^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){0,39}$`. - Name *string `json:"name,omitempty" validate:"regexp=^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){0\\,39}$"` + // New name for the resource container matching the regex `^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){1,40}$`. + Name *string `json:"name,omitempty" validate:"regexp=^[a-zA-ZäüöÄÜÖ0-9]( ?[a-zA-ZäüöÄÜÖß0-9_+&-]){1\\,40}$"` AdditionalProperties map[string]interface{} }