From 9966f747b5a29de20f38027d79d0e0a55c391d94 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Mon, 12 May 2025 09:50:50 +0000 Subject: [PATCH 1/4] Generate stackitmarketplace --- services/stackitmarketplace/api_default.go | 4 +- .../model_organization_id.go | 80 +++++++++++++++++++ .../stackitmarketplace/model_project_id.go | 2 +- .../model_vendor_subscription.go | 45 ++++++++++- 4 files changed, 127 insertions(+), 4 deletions(-) create mode 100644 services/stackitmarketplace/model_organization_id.go diff --git a/services/stackitmarketplace/api_default.go b/services/stackitmarketplace/api_default.go index aed62f184..843e0601b 100644 --- a/services/stackitmarketplace/api_default.go +++ b/services/stackitmarketplace/api_default.go @@ -1071,9 +1071,9 @@ func (r ApiListVendorSubscriptionsRequest) Execute() (*ListVendorSubscriptionsRe } /* -ListVendorSubscriptions: List all subscriptions +ListVendorSubscriptions: List all subscriptions of a project. -List all subscriptions. +List all subscriptions of a project. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The project ID. diff --git a/services/stackitmarketplace/model_organization_id.go b/services/stackitmarketplace/model_organization_id.go new file mode 100644 index 000000000..1d9dccbc6 --- /dev/null +++ b/services/stackitmarketplace/model_organization_id.go @@ -0,0 +1,80 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackitmarketplace + +import ( + "encoding/json" +) + +// checks if the OrganizationId type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrganizationId{} + +// OrganizationId The associated organization ID. +type OrganizationId struct { +} + +// NewOrganizationId instantiates a new OrganizationId 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 NewOrganizationId() *OrganizationId { + this := OrganizationId{} + return &this +} + +// NewOrganizationIdWithDefaults instantiates a new OrganizationId 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 NewOrganizationIdWithDefaults() *OrganizationId { + this := OrganizationId{} + return &this +} + +func (o OrganizationId) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + return toSerialize, nil +} + +type NullableOrganizationId struct { + value *OrganizationId + isSet bool +} + +func (v NullableOrganizationId) Get() *OrganizationId { + return v.value +} + +func (v *NullableOrganizationId) Set(val *OrganizationId) { + v.value = val + v.isSet = true +} + +func (v NullableOrganizationId) IsSet() bool { + return v.isSet +} + +func (v *NullableOrganizationId) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrganizationId(val *OrganizationId) *NullableOrganizationId { + return &NullableOrganizationId{value: val, isSet: true} +} + +func (v NullableOrganizationId) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrganizationId) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/model_project_id.go b/services/stackitmarketplace/model_project_id.go index b76c2bbd0..93347f9c6 100644 --- a/services/stackitmarketplace/model_project_id.go +++ b/services/stackitmarketplace/model_project_id.go @@ -17,7 +17,7 @@ import ( // checks if the ProjectId type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ProjectId{} -// ProjectId The associated consumer project ID. +// ProjectId The associated project ID. type ProjectId struct { } diff --git a/services/stackitmarketplace/model_vendor_subscription.go b/services/stackitmarketplace/model_vendor_subscription.go index 91365b7cf..28b8712f6 100644 --- a/services/stackitmarketplace/model_vendor_subscription.go +++ b/services/stackitmarketplace/model_vendor_subscription.go @@ -37,6 +37,26 @@ func setVendorSubscriptionGetLifecycleStateAttributeType(arg *VendorSubscription *arg = &val } +/* + types and functions for organizationId +*/ + +// isModel +type VendorSubscriptionGetOrganizationIdAttributeType = *OrganizationId +type VendorSubscriptionGetOrganizationIdArgType = OrganizationId +type VendorSubscriptionGetOrganizationIdRetType = OrganizationId + +func getVendorSubscriptionGetOrganizationIdAttributeTypeOk(arg VendorSubscriptionGetOrganizationIdAttributeType) (ret VendorSubscriptionGetOrganizationIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setVendorSubscriptionGetOrganizationIdAttributeType(arg *VendorSubscriptionGetOrganizationIdAttributeType, val VendorSubscriptionGetOrganizationIdRetType) { + *arg = &val +} + /* types and functions for product */ @@ -102,6 +122,8 @@ type VendorSubscription struct { // REQUIRED LifecycleState VendorSubscriptionGetLifecycleStateAttributeType `json:"lifecycleState"` // REQUIRED + OrganizationId VendorSubscriptionGetOrganizationIdAttributeType `json:"organizationId"` + // REQUIRED Product VendorSubscriptionGetProductAttributeType `json:"product"` // REQUIRED ProjectId VendorSubscriptionGetProjectIdAttributeType `json:"projectId"` @@ -115,9 +137,10 @@ type _VendorSubscription VendorSubscription // 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 NewVendorSubscription(lifecycleState VendorSubscriptionGetLifecycleStateArgType, product VendorSubscriptionGetProductArgType, projectId VendorSubscriptionGetProjectIdArgType, subscriptionId VendorSubscriptionGetSubscriptionIdArgType) *VendorSubscription { +func NewVendorSubscription(lifecycleState VendorSubscriptionGetLifecycleStateArgType, organizationId VendorSubscriptionGetOrganizationIdArgType, product VendorSubscriptionGetProductArgType, projectId VendorSubscriptionGetProjectIdArgType, subscriptionId VendorSubscriptionGetSubscriptionIdArgType) *VendorSubscription { this := VendorSubscription{} setVendorSubscriptionGetLifecycleStateAttributeType(&this.LifecycleState, lifecycleState) + setVendorSubscriptionGetOrganizationIdAttributeType(&this.OrganizationId, organizationId) setVendorSubscriptionGetProductAttributeType(&this.Product, product) setVendorSubscriptionGetProjectIdAttributeType(&this.ProjectId, projectId) setVendorSubscriptionGetSubscriptionIdAttributeType(&this.SubscriptionId, subscriptionId) @@ -149,6 +172,23 @@ func (o *VendorSubscription) SetLifecycleState(v VendorSubscriptionGetLifecycleS setVendorSubscriptionGetLifecycleStateAttributeType(&o.LifecycleState, v) } +// GetOrganizationId returns the OrganizationId field value +func (o *VendorSubscription) GetOrganizationId() (ret VendorSubscriptionGetOrganizationIdRetType) { + ret, _ = o.GetOrganizationIdOk() + return ret +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *VendorSubscription) GetOrganizationIdOk() (ret VendorSubscriptionGetOrganizationIdRetType, ok bool) { + return getVendorSubscriptionGetOrganizationIdAttributeTypeOk(o.OrganizationId) +} + +// SetOrganizationId sets field value +func (o *VendorSubscription) SetOrganizationId(v VendorSubscriptionGetOrganizationIdRetType) { + setVendorSubscriptionGetOrganizationIdAttributeType(&o.OrganizationId, v) +} + // GetProduct returns the Product field value func (o *VendorSubscription) GetProduct() (ret VendorSubscriptionGetProductRetType) { ret, _ = o.GetProductOk() @@ -205,6 +245,9 @@ func (o VendorSubscription) ToMap() (map[string]interface{}, error) { if val, ok := getVendorSubscriptionGetLifecycleStateAttributeTypeOk(o.LifecycleState); ok { toSerialize["LifecycleState"] = val } + if val, ok := getVendorSubscriptionGetOrganizationIdAttributeTypeOk(o.OrganizationId); ok { + toSerialize["OrganizationId"] = val + } if val, ok := getVendorSubscriptionGetProductAttributeTypeOk(o.Product); ok { toSerialize["Product"] = val } From 8b0ada8c10eeb90b50a7e5483475c1389a24cae5 Mon Sep 17 00:00:00 2001 From: Alexander Dahmen Date: Tue, 13 May 2025 12:27:14 +0200 Subject: [PATCH 2/4] Add changelog Signed-off-by: Alexander Dahmen --- CHANGELOG.md | 4 ++++ services/stackitmarketplace/CHANGELOG.md | 3 +++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dba7a5a53..6e1172737 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## Release (2025-XX-XX) +- `stackitmarketplace`: [v1.0.2](services/stackitmarketplace/CHANGELOG.md#v102-2025-05-13) + - **Breaking Change:** Added organization id to `VendorSubscription` + ## Release (2025-05-09) - `resourcemanager`: - [v0.13.3](services/resourcemanager/CHANGELOG.md#v0133-2025-05-09) diff --git a/services/stackitmarketplace/CHANGELOG.md b/services/stackitmarketplace/CHANGELOG.md index 58417a0b0..123aebb82 100644 --- a/services/stackitmarketplace/CHANGELOG.md +++ b/services/stackitmarketplace/CHANGELOG.md @@ -1,3 +1,6 @@ +## v1.0.2 (2025-05-13) +- **Breaking Change:** Added organization id to `VendorSubscription` + ## v1.0.1 (2025-05-09) - **Feature:** Update user-agent header From c3fe4f4fff5c0e17ffa9f15e9645204651be37cf Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Mon, 12 May 2025 09:50:42 +0000 Subject: [PATCH 3/4] Generate ske --- services/ske/model_cluster_error.go | 175 +++++++++++++++++++++++++++ services/ske/model_cluster_status.go | 47 +++++++ 2 files changed, 222 insertions(+) create mode 100644 services/ske/model_cluster_error.go diff --git a/services/ske/model_cluster_error.go b/services/ske/model_cluster_error.go new file mode 100644 index 000000000..39567e727 --- /dev/null +++ b/services/ske/model_cluster_error.go @@ -0,0 +1,175 @@ +/* +SKE-API + +The SKE API provides endpoints to create, update, delete clusters within STACKIT portal projects and to trigger further cluster management tasks. + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ske + +import ( + "encoding/json" +) + +// checks if the ClusterError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ClusterError{} + +/* + types and functions for code +*/ + +// isEnumRef +type ClusterErrorGetCodeAttributeType = *string +type ClusterErrorGetCodeArgType = string +type ClusterErrorGetCodeRetType = string + +func getClusterErrorGetCodeAttributeTypeOk(arg ClusterErrorGetCodeAttributeType) (ret ClusterErrorGetCodeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setClusterErrorGetCodeAttributeType(arg *ClusterErrorGetCodeAttributeType, val ClusterErrorGetCodeRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type ClusterErrorGetMessageAttributeType = *string + +func getClusterErrorGetMessageAttributeTypeOk(arg ClusterErrorGetMessageAttributeType) (ret ClusterErrorGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setClusterErrorGetMessageAttributeType(arg *ClusterErrorGetMessageAttributeType, val ClusterErrorGetMessageRetType) { + *arg = &val +} + +type ClusterErrorGetMessageArgType = string +type ClusterErrorGetMessageRetType = string + +// ClusterError struct for ClusterError +type ClusterError struct { + Code ClusterErrorGetCodeAttributeType `json:"code,omitempty"` + Message ClusterErrorGetMessageAttributeType `json:"message,omitempty"` +} + +// NewClusterError instantiates a new ClusterError 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 NewClusterError() *ClusterError { + this := ClusterError{} + return &this +} + +// NewClusterErrorWithDefaults instantiates a new ClusterError 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 NewClusterErrorWithDefaults() *ClusterError { + this := ClusterError{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *ClusterError) GetCode() (res ClusterErrorGetCodeRetType) { + res, _ = o.GetCodeOk() + return +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterError) GetCodeOk() (ret ClusterErrorGetCodeRetType, ok bool) { + return getClusterErrorGetCodeAttributeTypeOk(o.Code) +} + +// HasCode returns a boolean if a field has been set. +func (o *ClusterError) HasCode() bool { + _, ok := o.GetCodeOk() + return ok +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *ClusterError) SetCode(v ClusterErrorGetCodeRetType) { + setClusterErrorGetCodeAttributeType(&o.Code, v) +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ClusterError) GetMessage() (res ClusterErrorGetMessageRetType) { + res, _ = o.GetMessageOk() + return +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterError) GetMessageOk() (ret ClusterErrorGetMessageRetType, ok bool) { + return getClusterErrorGetMessageAttributeTypeOk(o.Message) +} + +// HasMessage returns a boolean if a field has been set. +func (o *ClusterError) HasMessage() bool { + _, ok := o.GetMessageOk() + return ok +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ClusterError) SetMessage(v ClusterErrorGetMessageRetType) { + setClusterErrorGetMessageAttributeType(&o.Message, v) +} + +func (o ClusterError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getClusterErrorGetCodeAttributeTypeOk(o.Code); ok { + toSerialize["Code"] = val + } + if val, ok := getClusterErrorGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + return toSerialize, nil +} + +type NullableClusterError struct { + value *ClusterError + isSet bool +} + +func (v NullableClusterError) Get() *ClusterError { + return v.value +} + +func (v *NullableClusterError) Set(val *ClusterError) { + v.value = val + v.isSet = true +} + +func (v NullableClusterError) IsSet() bool { + return v.isSet +} + +func (v *NullableClusterError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableClusterError(val *ClusterError) *NullableClusterError { + return &NullableClusterError{value: val, isSet: true} +} + +func (v NullableClusterError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableClusterError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/ske/model_cluster_status.go b/services/ske/model_cluster_status.go index 18638528d..c1d263807 100644 --- a/services/ske/model_cluster_status.go +++ b/services/ske/model_cluster_status.go @@ -118,6 +118,26 @@ func setClusterStatusGetErrorAttributeType(arg *ClusterStatusGetErrorAttributeTy *arg = &val } +/* + types and functions for errors +*/ + +// isArray +type ClusterStatusGetErrorsAttributeType = *[]ClusterError +type ClusterStatusGetErrorsArgType = []ClusterError +type ClusterStatusGetErrorsRetType = []ClusterError + +func getClusterStatusGetErrorsAttributeTypeOk(arg ClusterStatusGetErrorsAttributeType) (ret ClusterStatusGetErrorsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setClusterStatusGetErrorsAttributeType(arg *ClusterStatusGetErrorsAttributeType, val ClusterStatusGetErrorsRetType) { + *arg = &val +} + /* types and functions for hibernated */ @@ -147,6 +167,7 @@ type ClusterStatus struct { // The outgoing network ranges (in CIDR notation) of traffic originating from workload on the cluster. EgressAddressRanges ClusterStatusGetEgressAddressRangesAttributeType `json:"egressAddressRanges,omitempty"` Error ClusterStatusGetErrorAttributeType `json:"error,omitempty"` + Errors ClusterStatusGetErrorsAttributeType `json:"errors,omitempty"` Hibernated ClusterStatusgetHibernatedAttributeType `json:"hibernated,omitempty"` } @@ -284,6 +305,29 @@ func (o *ClusterStatus) SetError(v ClusterStatusGetErrorRetType) { setClusterStatusGetErrorAttributeType(&o.Error, v) } +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *ClusterStatus) GetErrors() (res ClusterStatusGetErrorsRetType) { + res, _ = o.GetErrorsOk() + return +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterStatus) GetErrorsOk() (ret ClusterStatusGetErrorsRetType, ok bool) { + return getClusterStatusGetErrorsAttributeTypeOk(o.Errors) +} + +// HasErrors returns a boolean if a field has been set. +func (o *ClusterStatus) HasErrors() bool { + _, ok := o.GetErrorsOk() + return ok +} + +// SetErrors gets a reference to the given []ClusterError and assigns it to the Errors field. +func (o *ClusterStatus) SetErrors(v ClusterStatusGetErrorsRetType) { + setClusterStatusGetErrorsAttributeType(&o.Errors, v) +} + // GetHibernated returns the Hibernated field value if set, zero value otherwise. func (o *ClusterStatus) GetHibernated() (res ClusterStatusgetHibernatedRetType) { res, _ = o.GetHibernatedOk() @@ -324,6 +368,9 @@ func (o ClusterStatus) ToMap() (map[string]interface{}, error) { if val, ok := getClusterStatusGetErrorAttributeTypeOk(o.Error); ok { toSerialize["Error"] = val } + if val, ok := getClusterStatusGetErrorsAttributeTypeOk(o.Errors); ok { + toSerialize["Errors"] = val + } if val, ok := getClusterStatusgetHibernatedAttributeTypeOk(o.Hibernated); ok { toSerialize["Hibernated"] = val } From c5460d49903faca965c38d7b2f148ac7a838483e Mon Sep 17 00:00:00 2001 From: Alexander Dahmen Date: Tue, 13 May 2025 12:31:53 +0200 Subject: [PATCH 4/4] Add changelog Signed-off-by: Alexander Dahmen --- CHANGELOG.md | 5 ++++- services/ske/CHANGELOG.md | 3 +++ services/stackitmarketplace/CHANGELOG.md | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e1172737..5b4d5c8e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ ## Release (2025-XX-XX) -- `stackitmarketplace`: [v1.0.2](services/stackitmarketplace/CHANGELOG.md#v102-2025-05-13) +- `stackitmarketplace`: [v1.1.0](services/stackitmarketplace/CHANGELOG.md#v110-2025-05-13) - **Breaking Change:** Added organization id to `VendorSubscription` +- `ske`: [v0.22.4](services/ske/CHANGELOG.md#v0224-2025-05-13) + - **Feature:** Added `ClusterError` + ## Release (2025-05-09) - `resourcemanager`: diff --git a/services/ske/CHANGELOG.md b/services/ske/CHANGELOG.md index 12808e3ef..03266c774 100644 --- a/services/ske/CHANGELOG.md +++ b/services/ske/CHANGELOG.md @@ -1,3 +1,6 @@ +## v0.22.4 (2025-05-13) +- **Feature:** Added `ClusterError` + ## v0.22.3 (2025-05-09) - **Feature:** Update user-agent header diff --git a/services/stackitmarketplace/CHANGELOG.md b/services/stackitmarketplace/CHANGELOG.md index 123aebb82..e8bb1fc1a 100644 --- a/services/stackitmarketplace/CHANGELOG.md +++ b/services/stackitmarketplace/CHANGELOG.md @@ -1,4 +1,4 @@ -## v1.0.2 (2025-05-13) +## v1.1.0 (2025-05-13) - **Breaking Change:** Added organization id to `VendorSubscription` ## v1.0.1 (2025-05-09)