From 2363b8ed97520f72b302fc9ed024d19f360fe0f7 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Wed, 13 May 2026 06:57:48 +0000 Subject: [PATCH 1/2] Generate sfs --- .../sfs/model_update_resource_pool_payload.go | 33 ++++++++++++++----- services/sfs/oas_commit | 2 +- .../model_update_resource_pool_payload.go | 33 ++++++++++++------- 3 files changed, 48 insertions(+), 20 deletions(-) diff --git a/services/sfs/model_update_resource_pool_payload.go b/services/sfs/model_update_resource_pool_payload.go index e9df30f92..deef32fe4 100644 --- a/services/sfs/model_update_resource_pool_payload.go +++ b/services/sfs/model_update_resource_pool_payload.go @@ -130,28 +130,32 @@ func setUpdateResourcePoolPayloadGetSizeGigabytesAttributeType(arg *UpdateResour types and functions for snapshotPolicyId */ -// isNotNullableString +// isNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateResourcePoolPayloadGetSnapshotPolicyIdAttributeType = *string +type UpdateResourcePoolPayloadGetSnapshotPolicyIdAttributeType = *NullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateResourcePoolPayloadGetSnapshotPolicyIdAttributeTypeOk(arg UpdateResourcePoolPayloadGetSnapshotPolicyIdAttributeType) (ret UpdateResourcePoolPayloadGetSnapshotPolicyIdRetType, ok bool) { if arg == nil { - return ret, false + return nil, false } - return *arg, true + return arg.Get(), true } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateResourcePoolPayloadGetSnapshotPolicyIdAttributeType(arg *UpdateResourcePoolPayloadGetSnapshotPolicyIdAttributeType, val UpdateResourcePoolPayloadGetSnapshotPolicyIdRetType) { - *arg = &val + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateResourcePoolPayloadGetSnapshotPolicyIdArgType = string +type UpdateResourcePoolPayloadGetSnapshotPolicyIdArgType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateResourcePoolPayloadGetSnapshotPolicyIdRetType = string +type UpdateResourcePoolPayloadGetSnapshotPolicyIdRetType = *string /* types and functions for snapshotsAreVisible @@ -338,7 +342,7 @@ func (o *UpdateResourcePoolPayload) UnsetSizeGigabytes() { o.SizeGigabytes = nil } -// GetSnapshotPolicyId returns the SnapshotPolicyId field value if set, zero value otherwise. +// GetSnapshotPolicyId returns the SnapshotPolicyId field value if set, zero value otherwise (both if not set or set to explicit null). // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolPayload) GetSnapshotPolicyId() (res UpdateResourcePoolPayloadGetSnapshotPolicyIdRetType) { res, _ = o.GetSnapshotPolicyIdOk() @@ -347,6 +351,7 @@ func (o *UpdateResourcePoolPayload) GetSnapshotPolicyId() (res UpdateResourcePoo // GetSnapshotPolicyIdOk returns a tuple with the SnapshotPolicyId field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolPayload) GetSnapshotPolicyIdOk() (ret UpdateResourcePoolPayloadGetSnapshotPolicyIdRetType, ok bool) { return getUpdateResourcePoolPayloadGetSnapshotPolicyIdAttributeTypeOk(o.SnapshotPolicyId) @@ -365,6 +370,18 @@ func (o *UpdateResourcePoolPayload) SetSnapshotPolicyId(v UpdateResourcePoolPayl setUpdateResourcePoolPayloadGetSnapshotPolicyIdAttributeType(&o.SnapshotPolicyId, v) } +// SetSnapshotPolicyIdNil sets the value for SnapshotPolicyId to be an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *UpdateResourcePoolPayload) SetSnapshotPolicyIdNil() { + o.SnapshotPolicyId = nil +} + +// UnsetSnapshotPolicyId ensures that no value is present for SnapshotPolicyId, not even an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *UpdateResourcePoolPayload) UnsetSnapshotPolicyId() { + o.SnapshotPolicyId = nil +} + // GetSnapshotsAreVisible returns the SnapshotsAreVisible 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 *UpdateResourcePoolPayload) GetSnapshotsAreVisible() (res UpdateResourcePoolPayloadgetSnapshotsAreVisibleRetType) { diff --git a/services/sfs/oas_commit b/services/sfs/oas_commit index c08a6770d..b11b4bcce 100644 --- a/services/sfs/oas_commit +++ b/services/sfs/oas_commit @@ -1 +1 @@ -4407196dbbef4e53e6798809e856725cbc84ae05 +8ccf08fdae6320251259ca695f1e7180eeb21275 diff --git a/services/sfs/v1api/model_update_resource_pool_payload.go b/services/sfs/v1api/model_update_resource_pool_payload.go index b0a9d0288..7738ea13d 100644 --- a/services/sfs/v1api/model_update_resource_pool_payload.go +++ b/services/sfs/v1api/model_update_resource_pool_payload.go @@ -28,7 +28,7 @@ type UpdateResourcePoolPayload struct { // (optional) Size of the Resource Pool (unit: gigabytes) SizeGigabytes NullableInt32 `json:"sizeGigabytes,omitempty"` // (optional) Id of the Snapshot Policy to use If not set, the Snapshot Policy is not updated If set to an empty string, the Snapshot Policy is removed - SnapshotPolicyId *string `json:"snapshotPolicyId,omitempty"` + SnapshotPolicyId NullableString `json:"snapshotPolicyId,omitempty"` // Whether the .snapshot directory is visible when mounting the resource pool. Setting this value to false might prevent you from accessing the snapshots (e.g. for security reasons). Additionally, the access to the snapshots is always controlled by the export policy of the resource pool. That means, if snapshots are visible and the export policy allows for reading the resource pool, then it also allows reading the snapshot of all shares. SnapshotsAreVisible *bool `json:"snapshotsAreVisible,omitempty"` AdditionalProperties map[string]interface{} @@ -192,36 +192,47 @@ func (o *UpdateResourcePoolPayload) UnsetSizeGigabytes() { o.SizeGigabytes.Unset() } -// GetSnapshotPolicyId returns the SnapshotPolicyId field value if set, zero value otherwise. +// GetSnapshotPolicyId returns the SnapshotPolicyId field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UpdateResourcePoolPayload) GetSnapshotPolicyId() string { - if o == nil || IsNil(o.SnapshotPolicyId) { + if o == nil || IsNil(o.SnapshotPolicyId.Get()) { var ret string return ret } - return *o.SnapshotPolicyId + return *o.SnapshotPolicyId.Get() } // GetSnapshotPolicyIdOk returns a tuple with the SnapshotPolicyId field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *UpdateResourcePoolPayload) GetSnapshotPolicyIdOk() (*string, bool) { - if o == nil || IsNil(o.SnapshotPolicyId) { + if o == nil { return nil, false } - return o.SnapshotPolicyId, true + return o.SnapshotPolicyId.Get(), o.SnapshotPolicyId.IsSet() } // HasSnapshotPolicyId returns a boolean if a field has been set. func (o *UpdateResourcePoolPayload) HasSnapshotPolicyId() bool { - if o != nil && !IsNil(o.SnapshotPolicyId) { + if o != nil && o.SnapshotPolicyId.IsSet() { return true } return false } -// SetSnapshotPolicyId gets a reference to the given string and assigns it to the SnapshotPolicyId field. +// SetSnapshotPolicyId gets a reference to the given NullableString and assigns it to the SnapshotPolicyId field. func (o *UpdateResourcePoolPayload) SetSnapshotPolicyId(v string) { - o.SnapshotPolicyId = &v + o.SnapshotPolicyId.Set(&v) +} + +// SetSnapshotPolicyIdNil sets the value for SnapshotPolicyId to be an explicit nil +func (o *UpdateResourcePoolPayload) SetSnapshotPolicyIdNil() { + o.SnapshotPolicyId.Set(nil) +} + +// UnsetSnapshotPolicyId ensures that no value is present for SnapshotPolicyId, not even an explicit nil +func (o *UpdateResourcePoolPayload) UnsetSnapshotPolicyId() { + o.SnapshotPolicyId.Unset() } // GetSnapshotsAreVisible returns the SnapshotsAreVisible field value if set, zero value otherwise. @@ -278,8 +289,8 @@ func (o UpdateResourcePoolPayload) ToMap() (map[string]interface{}, error) { if o.SizeGigabytes.IsSet() { toSerialize["sizeGigabytes"] = o.SizeGigabytes.Get() } - if !IsNil(o.SnapshotPolicyId) { - toSerialize["snapshotPolicyId"] = o.SnapshotPolicyId + if o.SnapshotPolicyId.IsSet() { + toSerialize["snapshotPolicyId"] = o.SnapshotPolicyId.Get() } if !IsNil(o.SnapshotsAreVisible) { toSerialize["snapshotsAreVisible"] = o.SnapshotsAreVisible From 49488277c73bccff8d6a8e577029cac6d4ab09db Mon Sep 17 00:00:00 2001 From: Marcel Jacek Date: Wed, 13 May 2026 09:05:07 +0200 Subject: [PATCH 2/2] add changelog entry --- CHANGELOG.md | 2 ++ services/sfs/CHANGELOG.md | 3 +++ services/sfs/VERSION | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffebbd049..0e47bcfe4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -393,6 +393,8 @@ - **Feature:** new field `SnapshotSchedules` in model `SnapshotPolicy` - **Feature:** new field `Interval` in model `SnapshotPolicySchedule` - **Feature:** new model `SnapshotPolicySnapshotPolicySchedule` + - [v0.10.0](services/sfs/CHANGELOG.md#v0100) + - **Breaking change:** Change type from `*string` to `NullableString` of field `SnapshotPolicyId` in model `UpdateResourcePoolPayload` - `ske`: - [v1.11.2](services/ske/CHANGELOG.md#v1112) - **Dependencies:** Bump STACKIT SDK core module from `v0.24.0` to `v0.24.1` diff --git a/services/sfs/CHANGELOG.md b/services/sfs/CHANGELOG.md index c38d3146f..506bba85c 100644 --- a/services/sfs/CHANGELOG.md +++ b/services/sfs/CHANGELOG.md @@ -1,3 +1,6 @@ +## v0.10.0 +- **Breaking change:** Change type from `*string` to `NullableString` of field `SnapshotPolicyId` in model `UpdateResourcePoolPayload` + ## v0.9.0 - **Deprecation:** deprecated field `Schedules` in model `SnapshotPolicy` - **Feature:** new field `SnapshotSchedules` in model `SnapshotPolicy` diff --git a/services/sfs/VERSION b/services/sfs/VERSION index 7965b36d6..f78dc3652 100644 --- a/services/sfs/VERSION +++ b/services/sfs/VERSION @@ -1 +1 @@ -v0.9.0 \ No newline at end of file +v0.10.0 \ No newline at end of file