From 68c2bd59eb0ac9ce70ff08fb7b761ccc5096ffec Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Tue, 11 Nov 2025 08:42:37 +0000 Subject: [PATCH 1/2] Generate stackitmarketplace --- services/stackitmarketplace/api_default.go | 28 +++-- .../model_catalog_product_pricing_option.go | 45 ++++++- services/stackitmarketplace/model_scope.go | 117 ++++++++++++++++++ .../stackitmarketplace/model_scope_test.go | 11 ++ 4 files changed, 192 insertions(+), 9 deletions(-) create mode 100644 services/stackitmarketplace/model_scope.go create mode 100644 services/stackitmarketplace/model_scope_test.go diff --git a/services/stackitmarketplace/api_default.go b/services/stackitmarketplace/api_default.go index 63ffb4e73..1a6c2a430 100644 --- a/services/stackitmarketplace/api_default.go +++ b/services/stackitmarketplace/api_default.go @@ -41,7 +41,7 @@ type DefaultApi interface { ApproveSubscriptionExecute(ctx context.Context, projectId string, subscriptionId string) error /* GetCatalogProduct Get a product - Get a product. + Deprecated: Get a product. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param productId The product ID. @@ -55,6 +55,7 @@ type DefaultApi interface { @param productId The product ID. @return CatalogProductDetail + Deprecated: Get a product. */ GetCatalogProductExecute(ctx context.Context, productId string) (*CatalogProductDetail, error) /* @@ -79,7 +80,7 @@ type DefaultApi interface { GetVendorSubscriptionExecute(ctx context.Context, projectId string, subscriptionId string) (*VendorSubscription, error) /* InquiriesCreateInquiry Create inquiry - Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes. + Deprecated: Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiInquiriesCreateInquiryRequest @@ -88,11 +89,12 @@ type DefaultApi interface { /* InquiriesCreateInquiryExecute executes the request + Deprecated: Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes. */ InquiriesCreateInquiryExecute(ctx context.Context) error /* ListCatalogProducts List all products - List all products. + Deprecated: List all products. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListCatalogProductsRequest @@ -104,6 +106,7 @@ type DefaultApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ListCatalogProductsResponse + Deprecated: List all products. */ ListCatalogProductsExecute(ctx context.Context) (*ListCatalogProductsResponse, error) /* @@ -186,7 +189,7 @@ type ApiListCatalogProductsRequest interface { Limit(limit float32) ApiListCatalogProductsRequest // The language of the response. Locale(locale string) ApiListCatalogProductsRequest - // Filter the products based on attributes, e.g., `deliveryMethod eq \"SAAS\"`. The supported operators are: - `PR` (present; `name pr`) - `EQ` (equal) - `NE` (not equal) - `CO` (contains; `text co \"searching\"`) - `SW` (starts with) - `EW` (ends with) - `GT` (greater than) - `LT` (less than) - `GE` (greater than or equal) - `LE` (less than or equal). These expressions can be logically linked with `AND` and `OR`. All attributes (and the special `text` attribute) can be used as filters, if the attribute type allows the operator. + // Filter the products based on attributes, e.g., `deliveryMethod eq \"SAAS\"`. The supported operators are: - `PR` (present; `name pr`) - `EQ` (equal) - `NE` (not equal) - `CO` (contains; `text co \"searching\"`) - `SW` (starts with) - `EW` (ends with) - `GT` (greater than) - `LT` (less than) - `GE` (greater than or equal) - `LE` (less than or equal). These expressions can be logically linked with `AND` and `OR`. All attributes (and the special `text` attribute) can be used as filters, if the attribute type allows the operator. Filter(filter string) ApiListCatalogProductsRequest // Sort the products based on attributes and order e.g. `name:asc`. Attributes with scalar types (`createdAt`, `isProductListing`) or keywords (`name`, `deliveryMethod`, `lifecycleState`, `vendor.name`) can be used as sort criteria. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name:asc,price:desc`. Sort(sort string) ApiListCatalogProductsRequest @@ -551,7 +554,7 @@ func (r GetCatalogProductRequest) Execute() (*CatalogProductDetail, error) { /* GetCatalogProduct: Get a product -Get a product. +Deprecated: Get a product. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param productId The product ID. @@ -565,6 +568,9 @@ func (a *APIClient) GetCatalogProduct(ctx context.Context, productId string) Api } } +/* +Deprecated: Get a product. +*/ func (a *APIClient) GetCatalogProductExecute(ctx context.Context, productId string) (*CatalogProductDetail, error) { r := GetCatalogProductRequest{ apiService: a.defaultApi, @@ -894,7 +900,7 @@ func (r InquiriesCreateInquiryRequest) Execute() error { /* InquiriesCreateInquiry: Create inquiry -Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes. +Deprecated: Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiInquiriesCreateInquiryRequest @@ -906,6 +912,9 @@ func (a *APIClient) InquiriesCreateInquiry(ctx context.Context) ApiInquiriesCrea } } +/* +Deprecated: Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes. +*/ func (a *APIClient) InquiriesCreateInquiryExecute(ctx context.Context) error { r := InquiriesCreateInquiryRequest{ apiService: a.defaultApi, @@ -945,7 +954,7 @@ func (r ListCatalogProductsRequest) Locale(locale string) ApiListCatalogProducts return r } -// Filter the products based on attributes, e.g., `deliveryMethod eq \"SAAS\"`. The supported operators are: - `PR` (present; `name pr`) - `EQ` (equal) - `NE` (not equal) - `CO` (contains; `text co \"searching\"`) - `SW` (starts with) - `EW` (ends with) - `GT` (greater than) - `LT` (less than) - `GE` (greater than or equal) - `LE` (less than or equal). These expressions can be logically linked with `AND` and `OR`. All attributes (and the special `text` attribute) can be used as filters, if the attribute type allows the operator. +// Filter the products based on attributes, e.g., `deliveryMethod eq \"SAAS\"`. The supported operators are: - `PR` (present; `name pr`) - `EQ` (equal) - `NE` (not equal) - `CO` (contains; `text co \"searching\"`) - `SW` (starts with) - `EW` (ends with) - `GT` (greater than) - `LT` (less than) - `GE` (greater than or equal) - `LE` (less than or equal). These expressions can be logically linked with `AND` and `OR`. All attributes (and the special `text` attribute) can be used as filters, if the attribute type allows the operator. func (r ListCatalogProductsRequest) Filter(filter string) ApiListCatalogProductsRequest { r.filter = &filter @@ -1097,7 +1106,7 @@ func (r ListCatalogProductsRequest) Execute() (*ListCatalogProductsResponse, err /* ListCatalogProducts: List all products -List all products. +Deprecated: List all products. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListCatalogProductsRequest @@ -1109,6 +1118,9 @@ func (a *APIClient) ListCatalogProducts(ctx context.Context) ApiListCatalogProdu } } +/* +Deprecated: List all products. +*/ func (a *APIClient) ListCatalogProductsExecute(ctx context.Context) (*ListCatalogProductsResponse, error) { r := ListCatalogProductsRequest{ apiService: a.defaultApi, diff --git a/services/stackitmarketplace/model_catalog_product_pricing_option.go b/services/stackitmarketplace/model_catalog_product_pricing_option.go index e25ff7e81..a9441da04 100644 --- a/services/stackitmarketplace/model_catalog_product_pricing_option.go +++ b/services/stackitmarketplace/model_catalog_product_pricing_option.go @@ -182,6 +182,26 @@ func setCatalogProductPricingOptionGetRateAttributeType(arg *CatalogProductPrici type CatalogProductPricingOptionGetRateArgType = string type CatalogProductPricingOptionGetRateRetType = string +/* + types and functions for scope +*/ + +// isEnumRef +type CatalogProductPricingOptionGetScopeAttributeType = *Scope +type CatalogProductPricingOptionGetScopeArgType = Scope +type CatalogProductPricingOptionGetScopeRetType = Scope + +func getCatalogProductPricingOptionGetScopeAttributeTypeOk(arg CatalogProductPricingOptionGetScopeAttributeType) (ret CatalogProductPricingOptionGetScopeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductPricingOptionGetScopeAttributeType(arg *CatalogProductPricingOptionGetScopeAttributeType, val CatalogProductPricingOptionGetScopeRetType) { + *arg = &val +} + /* types and functions for sku */ @@ -285,6 +305,8 @@ type CatalogProductPricingOption struct { PricingPlan CatalogProductPricingOptionGetPricingPlanAttributeType `json:"pricingPlan,omitempty"` // The price of the product (per unit). Rate CatalogProductPricingOptionGetRateAttributeType `json:"rate,omitempty"` + // REQUIRED + Scope CatalogProductPricingOptionGetScopeAttributeType `json:"scope" required:"true"` // The concrete variant of the product. // REQUIRED Sku CatalogProductPricingOptionGetSkuAttributeType `json:"sku" required:"true"` @@ -303,12 +325,13 @@ type _CatalogProductPricingOption CatalogProductPricingOption // 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 NewCatalogProductPricingOption(description CatalogProductPricingOptionGetDescriptionArgType, highlights CatalogProductPricingOptionGetHighlightsArgType, name CatalogProductPricingOptionGetNameArgType, planId CatalogProductPricingOptionGetPlanIdArgType, sku CatalogProductPricingOptionGetSkuArgType, skuInfo CatalogProductPricingOptionGetSkuInfoArgType, skuInfoDetails CatalogProductPricingOptionGetSkuInfoDetailsArgType) *CatalogProductPricingOption { +func NewCatalogProductPricingOption(description CatalogProductPricingOptionGetDescriptionArgType, highlights CatalogProductPricingOptionGetHighlightsArgType, name CatalogProductPricingOptionGetNameArgType, planId CatalogProductPricingOptionGetPlanIdArgType, scope CatalogProductPricingOptionGetScopeArgType, sku CatalogProductPricingOptionGetSkuArgType, skuInfo CatalogProductPricingOptionGetSkuInfoArgType, skuInfoDetails CatalogProductPricingOptionGetSkuInfoDetailsArgType) *CatalogProductPricingOption { this := CatalogProductPricingOption{} setCatalogProductPricingOptionGetDescriptionAttributeType(&this.Description, description) setCatalogProductPricingOptionGetHighlightsAttributeType(&this.Highlights, highlights) setCatalogProductPricingOptionGetNameAttributeType(&this.Name, name) setCatalogProductPricingOptionGetPlanIdAttributeType(&this.PlanId, planId) + setCatalogProductPricingOptionGetScopeAttributeType(&this.Scope, scope) setCatalogProductPricingOptionGetSkuAttributeType(&this.Sku, sku) setCatalogProductPricingOptionGetSkuInfoAttributeType(&this.SkuInfo, skuInfo) setCatalogProductPricingOptionGetSkuInfoDetailsAttributeType(&this.SkuInfoDetails, skuInfoDetails) @@ -483,6 +506,23 @@ func (o *CatalogProductPricingOption) SetRate(v CatalogProductPricingOptionGetRa setCatalogProductPricingOptionGetRateAttributeType(&o.Rate, v) } +// GetScope returns the Scope field value +func (o *CatalogProductPricingOption) GetScope() (ret CatalogProductPricingOptionGetScopeRetType) { + ret, _ = o.GetScopeOk() + return ret +} + +// GetScopeOk returns a tuple with the Scope field value +// and a boolean to check if the value has been set. +func (o *CatalogProductPricingOption) GetScopeOk() (ret CatalogProductPricingOptionGetScopeRetType, ok bool) { + return getCatalogProductPricingOptionGetScopeAttributeTypeOk(o.Scope) +} + +// SetScope sets field value +func (o *CatalogProductPricingOption) SetScope(v CatalogProductPricingOptionGetScopeRetType) { + setCatalogProductPricingOptionGetScopeAttributeType(&o.Scope, v) +} + // GetSku returns the Sku field value func (o *CatalogProductPricingOption) GetSku() (ret CatalogProductPricingOptionGetSkuRetType) { ret, _ = o.GetSkuOk() @@ -583,6 +623,9 @@ func (o CatalogProductPricingOption) ToMap() (map[string]interface{}, error) { if val, ok := getCatalogProductPricingOptionGetRateAttributeTypeOk(o.Rate); ok { toSerialize["Rate"] = val } + if val, ok := getCatalogProductPricingOptionGetScopeAttributeTypeOk(o.Scope); ok { + toSerialize["Scope"] = val + } if val, ok := getCatalogProductPricingOptionGetSkuAttributeTypeOk(o.Sku); ok { toSerialize["Sku"] = val } diff --git a/services/stackitmarketplace/model_scope.go b/services/stackitmarketplace/model_scope.go new file mode 100644 index 000000000..95aaab158 --- /dev/null +++ b/services/stackitmarketplace/model_scope.go @@ -0,0 +1,117 @@ +/* +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" + "fmt" +) + +// Scope The (visibility) scope. +type Scope string + +// List of scope +const ( + SCOPE_PUBLIC Scope = "PUBLIC" + SCOPE_AUTHENTICATED Scope = "AUTHENTICATED" + SCOPE_PRIVATE_PROJECT Scope = "PRIVATE_PROJECT" +) + +// All allowed values of Scope enum +var AllowedScopeEnumValues = []Scope{ + "PUBLIC", + "AUTHENTICATED", + "PRIVATE_PROJECT", +} + +func (v *Scope) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue string + if value == zeroValue { + return nil + } + enumTypeValue := Scope(value) + for _, existing := range AllowedScopeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid Scope", value) +} + +// NewScopeFromValue returns a pointer to a valid Scope +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewScopeFromValue(v string) (*Scope, error) { + ev := Scope(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for Scope: valid values are %v", v, AllowedScopeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v Scope) IsValid() bool { + for _, existing := range AllowedScopeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to scope value +func (v Scope) Ptr() *Scope { + return &v +} + +type NullableScope struct { + value *Scope + isSet bool +} + +func (v NullableScope) Get() *Scope { + return v.value +} + +func (v *NullableScope) Set(val *Scope) { + v.value = val + v.isSet = true +} + +func (v NullableScope) IsSet() bool { + return v.isSet +} + +func (v *NullableScope) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScope(val *Scope) *NullableScope { + return &NullableScope{value: val, isSet: true} +} + +func (v NullableScope) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScope) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/model_scope_test.go b/services/stackitmarketplace/model_scope_test.go new file mode 100644 index 000000000..8d52b2c3c --- /dev/null +++ b/services/stackitmarketplace/model_scope_test.go @@ -0,0 +1,11 @@ +/* +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 From 3cf553b13b9aff644871e6da744016f2cec718c1 Mon Sep 17 00:00:00 2001 From: Marcel Jacek Date: Tue, 11 Nov 2025 14:47:58 +0100 Subject: [PATCH 2/2] add changelog entries --- CHANGELOG.md | 8 ++++++-- services/stackitmarketplace/CHANGELOG.md | 6 +++++- services/stackitmarketplace/VERSION | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d7a48ff2..200d471a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,12 @@ ## Release (2025-xx-xx) - `core`: [v0.18.0](core/CHANGELOG.md#v0180) - **New:** Added duration utils -- `stackitmarketplace`: [v1.16.0](services/stackitmarketplace/CHANGELOG.md#v1160) - - **Breaking Change:** Remove unused `ProjectId` model struct +- `stackitmarketplace`: + - [v1.17.0](services/stackitmarketplace/CHANGELOG.md#v1170) + - **Feature:** Add new field `Scope` in `CatalogProductPricingOption` model + - **Deprecation:** Deprecated API methods `GetCatalogProduct`, `ListCatalogProducts` and `InquiriesCreateInquiry` + - [v1.16.0](services/stackitmarketplace/CHANGELOG.md#v1160) + - **Breaking Change:** Remove unused `ProjectId` model struct - `iaas`: - [v1.2.0](services/iaas/CHANGELOG.md#v120) - **Feature:** Add new field `Encrypted` to `Backup` model, which indicates if a backup is encrypted diff --git a/services/stackitmarketplace/CHANGELOG.md b/services/stackitmarketplace/CHANGELOG.md index 29525acc8..3b7702bb7 100644 --- a/services/stackitmarketplace/CHANGELOG.md +++ b/services/stackitmarketplace/CHANGELOG.md @@ -1,3 +1,7 @@ +## v1.17.0 +- **Feature:** Add new field `Scope` in `CatalogProductPricingOption` model +- **Deprecation:** Deprecated API methods `GetCatalogProduct`, `ListCatalogProducts` and `InquiriesCreateInquiry` + ## v1.16.0 - **Breaking Change:** Remove unused `ProjectId` model struct @@ -32,7 +36,7 @@ - **Breaking Change:** Update `InquiryFormType` enums ## v1.6.1 - - **Dependencies:** Bump `github.com/golang-jwt/jwt/v5` from `v5.2.2` to `v5.2.3` +- **Dependencies:** Bump `github.com/golang-jwt/jwt/v5` from `v5.2.2` to `v5.2.3` ## v1.6.0 - **Feature:** Add new `Assets` model for managing service certificate assets diff --git a/services/stackitmarketplace/VERSION b/services/stackitmarketplace/VERSION index a406138ee..07c3efad8 100644 --- a/services/stackitmarketplace/VERSION +++ b/services/stackitmarketplace/VERSION @@ -1 +1 @@ -v1.16.0 +v1.17.0