From 4f7c5d441b81533fda8b138bdc07155253c4916d Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Thu, 10 Apr 2025 12:14:10 +0000 Subject: [PATCH 1/2] Generate stackitmarketplace --- services/stackitmarketplace/api_default.go | 42 +++ services/stackitmarketplace/go.mod | 2 +- services/stackitmarketplace/go.sum | 4 +- .../model_approve_subscription_payload.go | 2 +- .../stackitmarketplace/model_become_vendor.go | 15 +- .../model_become_vendor_become_vendor.go | 172 ---------- .../model_catalog_product_detail.go | 141 ++++---- .../model_catalog_product_details_vendor.go | 27 +- .../model_catalog_product_overview.go | 37 +-- .../model_catalog_product_overview_vendor.go | 14 +- .../model_catalog_product_pricing_option.go | 25 +- .../model_catalog_product_support_resource.go | 2 +- .../model_catalog_product_vendor_terms.go | 6 +- .../stackitmarketplace/model_contact_sales.go | 13 +- .../model_contact_sales_contact_sales.go | 307 ------------------ ...del_current_subscription_state_response.go | 171 ---------- .../model_delivery_method.go | 119 +++++++ .../model_inquiry_become_vendor.go | 172 ++++++++++ .../model_inquiry_contact_sales.go | 305 +++++++++++++++++ .../model_inquiry_form_type.go | 119 +++++++ .../model_inquiry_register_testing.go | 217 +++++++++++++ .../model_inquiry_suggest_product.go | 266 +++++++++++++++ .../model_list_catalog_products_response.go | 15 +- ...odel_list_vendor_subscriptions_response.go | 15 +- .../stackitmarketplace/model_price_type.go | 121 +++++++ .../model_pricing_option_unit.go | 113 +++++++ .../stackitmarketplace/model_product_id.go | 80 +++++ .../model_product_lifecycle_state.go | 115 +++++++ .../stackitmarketplace/model_project_id.go | 80 +++++ .../model_register_testing.go | 13 +- ...model_register_testing_register_testing.go | 217 ------------- ...l_requested_subscription_state_response.go | 171 ---------- .../model_subscription_cancel_response.go | 168 ---------- .../model_subscription_id.go | 80 +++++ .../model_subscription_lifecycle_state.go | 123 +++++++ .../model_subscription_product.go | 39 +-- .../model_suggest_product.go | 13 +- .../model_suggest_product_suggest_product.go | 266 --------------- .../stackitmarketplace/model_vendor_id.go | 80 +++++ .../model_vendor_subscription.go | 27 +- 40 files changed, 2220 insertions(+), 1694 deletions(-) delete mode 100644 services/stackitmarketplace/model_become_vendor_become_vendor.go delete mode 100644 services/stackitmarketplace/model_contact_sales_contact_sales.go delete mode 100644 services/stackitmarketplace/model_current_subscription_state_response.go create mode 100644 services/stackitmarketplace/model_delivery_method.go create mode 100644 services/stackitmarketplace/model_inquiry_become_vendor.go create mode 100644 services/stackitmarketplace/model_inquiry_contact_sales.go create mode 100644 services/stackitmarketplace/model_inquiry_form_type.go create mode 100644 services/stackitmarketplace/model_inquiry_register_testing.go create mode 100644 services/stackitmarketplace/model_inquiry_suggest_product.go create mode 100644 services/stackitmarketplace/model_price_type.go create mode 100644 services/stackitmarketplace/model_pricing_option_unit.go create mode 100644 services/stackitmarketplace/model_product_id.go create mode 100644 services/stackitmarketplace/model_product_lifecycle_state.go create mode 100644 services/stackitmarketplace/model_project_id.go delete mode 100644 services/stackitmarketplace/model_register_testing_register_testing.go delete mode 100644 services/stackitmarketplace/model_requested_subscription_state_response.go delete mode 100644 services/stackitmarketplace/model_subscription_cancel_response.go create mode 100644 services/stackitmarketplace/model_subscription_id.go create mode 100644 services/stackitmarketplace/model_subscription_lifecycle_state.go delete mode 100644 services/stackitmarketplace/model_suggest_product_suggest_product.go create mode 100644 services/stackitmarketplace/model_vendor_id.go diff --git a/services/stackitmarketplace/api_default.go b/services/stackitmarketplace/api_default.go index 51aa79b3f..87738d345 100644 --- a/services/stackitmarketplace/api_default.go +++ b/services/stackitmarketplace/api_default.go @@ -58,6 +58,18 @@ func (r ApiApproveSubscriptionRequest) Execute() error { localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if strlen(r.projectId) < 36 { + return fmt.Errorf("projectId must have at least 36 elements") + } + if strlen(r.projectId) > 36 { + return fmt.Errorf("projectId must have less than 36 elements") + } + if strlen(r.subscriptionId) < 36 { + return fmt.Errorf("subscriptionId must have at least 36 elements") + } + if strlen(r.subscriptionId) > 36 { + return fmt.Errorf("subscriptionId must have less than 36 elements") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -221,6 +233,12 @@ func (r ApiGetCatalogProductRequest) Execute() (*CatalogProductDetail, error) { localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if strlen(r.productId) < 36 { + return localVarReturnValue, fmt.Errorf("productId must have at least 36 elements") + } + if strlen(r.productId) > 36 { + return localVarReturnValue, fmt.Errorf("productId must have less than 36 elements") + } if r.locale != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "locale", r.locale, "") @@ -386,6 +404,18 @@ func (r ApiGetVendorSubscriptionRequest) Execute() (*VendorSubscription, error) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if strlen(r.projectId) < 36 { + return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") + } + if strlen(r.projectId) > 36 { + return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") + } + if strlen(r.subscriptionId) < 36 { + return localVarReturnValue, fmt.Errorf("subscriptionId must have at least 36 elements") + } + if strlen(r.subscriptionId) > 36 { + return localVarReturnValue, fmt.Errorf("subscriptionId must have less than 36 elements") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -927,6 +957,12 @@ func (r ApiListVendorSubscriptionsRequest) Execute() (*ListVendorSubscriptionsRe localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if strlen(r.projectId) < 36 { + return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") + } + if strlen(r.projectId) > 36 { + return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") + } if r.cursor != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "") @@ -1091,6 +1127,12 @@ func (r ApiResolveCustomerRequest) Execute() (*VendorSubscription, error) { localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if strlen(r.projectId) < 36 { + return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") + } + if strlen(r.projectId) > 36 { + return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") + } if r.resolveCustomerPayload == nil { return localVarReturnValue, fmt.Errorf("resolveCustomerPayload is required and must be specified") } diff --git a/services/stackitmarketplace/go.mod b/services/stackitmarketplace/go.mod index 3df74c64c..01b15bd01 100644 --- a/services/stackitmarketplace/go.mod +++ b/services/stackitmarketplace/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/google/uuid v1.6.0 - github.com/stackitcloud/stackit-sdk-go/core v0.17.1 + github.com/stackitcloud/stackit-sdk-go/core v0.16.2 ) require github.com/golang-jwt/jwt/v5 v5.2.2 // indirect diff --git a/services/stackitmarketplace/go.sum b/services/stackitmarketplace/go.sum index 2b714ffcc..93bc53c57 100644 --- a/services/stackitmarketplace/go.sum +++ b/services/stackitmarketplace/go.sum @@ -4,5 +4,5 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/stackitcloud/stackit-sdk-go/core v0.17.1 h1:TTrVoB1lERd/qfWzpe6HpwCJSjtaGnUI7UE7ITb5IT0= -github.com/stackitcloud/stackit-sdk-go/core v0.17.1/go.mod h1:8KIw3czdNJ9sdil9QQimxjR6vHjeINFrRv0iZ67wfn0= +github.com/stackitcloud/stackit-sdk-go/core v0.16.2 h1:F8A4P/LLlQSbz0S0+G3m8rb3BUOK6EcR/CKx5UQY5jQ= +github.com/stackitcloud/stackit-sdk-go/core v0.16.2/go.mod h1:8KIw3czdNJ9sdil9QQimxjR6vHjeINFrRv0iZ67wfn0= diff --git a/services/stackitmarketplace/model_approve_subscription_payload.go b/services/stackitmarketplace/model_approve_subscription_payload.go index cc3e53c86..956d25c1f 100644 --- a/services/stackitmarketplace/model_approve_subscription_payload.go +++ b/services/stackitmarketplace/model_approve_subscription_payload.go @@ -40,7 +40,7 @@ type ApproveSubscriptionPayloadGetInstanceTargetRetType = string // ApproveSubscriptionPayload struct for ApproveSubscriptionPayload type ApproveSubscriptionPayload struct { - // The target URL of the user instance, used to redirect the user to the instance after the subscription is active. + // Uniform Resource Locator. InstanceTarget ApproveSubscriptionPayloadGetInstanceTargetAttributeType `json:"instanceTarget,omitempty"` } diff --git a/services/stackitmarketplace/model_become_vendor.go b/services/stackitmarketplace/model_become_vendor.go index 36f8da877..c39901a9a 100644 --- a/services/stackitmarketplace/model_become_vendor.go +++ b/services/stackitmarketplace/model_become_vendor.go @@ -22,9 +22,9 @@ var _ MappedNullable = &BecomeVendor{} */ // isModel -type BecomeVendorGetBecomeVendorAttributeType = *BecomeVendorBecomeVendor -type BecomeVendorGetBecomeVendorArgType = BecomeVendorBecomeVendor -type BecomeVendorGetBecomeVendorRetType = BecomeVendorBecomeVendor +type BecomeVendorGetBecomeVendorAttributeType = *InquiryBecomeVendor +type BecomeVendorGetBecomeVendorArgType = InquiryBecomeVendor +type BecomeVendorGetBecomeVendorRetType = InquiryBecomeVendor func getBecomeVendorGetBecomeVendorAttributeTypeOk(arg BecomeVendorGetBecomeVendorAttributeType) (ret BecomeVendorGetBecomeVendorRetType, ok bool) { if arg == nil { @@ -42,9 +42,9 @@ func setBecomeVendorGetBecomeVendorAttributeType(arg *BecomeVendorGetBecomeVendo */ // isEnumRef -type BecomeVendorGetTypeAttributeType = *string -type BecomeVendorGetTypeArgType = string -type BecomeVendorGetTypeRetType = string +type BecomeVendorGetTypeAttributeType = *InquiryFormType +type BecomeVendorGetTypeArgType = InquiryFormType +type BecomeVendorGetTypeRetType = InquiryFormType func getBecomeVendorGetTypeAttributeTypeOk(arg BecomeVendorGetTypeAttributeType) (ret BecomeVendorGetTypeRetType, ok bool) { if arg == nil { @@ -57,11 +57,10 @@ func setBecomeVendorGetTypeAttributeType(arg *BecomeVendorGetTypeAttributeType, *arg = &val } -// BecomeVendor Become a vendor. +// BecomeVendor Become a Vendor. type BecomeVendor struct { // REQUIRED BecomeVendor BecomeVendorGetBecomeVendorAttributeType `json:"becomeVendor"` - // The form type. // REQUIRED Type BecomeVendorGetTypeAttributeType `json:"type"` } diff --git a/services/stackitmarketplace/model_become_vendor_become_vendor.go b/services/stackitmarketplace/model_become_vendor_become_vendor.go deleted file mode 100644 index bba7bd3c8..000000000 --- a/services/stackitmarketplace/model_become_vendor_become_vendor.go +++ /dev/null @@ -1,172 +0,0 @@ -/* -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 BecomeVendorBecomeVendor type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BecomeVendorBecomeVendor{} - -/* - types and functions for contactEmail -*/ - -// isNotNullableString -type BecomeVendorBecomeVendorGetContactEmailAttributeType = *string - -func getBecomeVendorBecomeVendorGetContactEmailAttributeTypeOk(arg BecomeVendorBecomeVendorGetContactEmailAttributeType) (ret BecomeVendorBecomeVendorGetContactEmailRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setBecomeVendorBecomeVendorGetContactEmailAttributeType(arg *BecomeVendorBecomeVendorGetContactEmailAttributeType, val BecomeVendorBecomeVendorGetContactEmailRetType) { - *arg = &val -} - -type BecomeVendorBecomeVendorGetContactEmailArgType = string -type BecomeVendorBecomeVendorGetContactEmailRetType = string - -/* - types and functions for message -*/ - -// isNotNullableString -type BecomeVendorBecomeVendorGetMessageAttributeType = *string - -func getBecomeVendorBecomeVendorGetMessageAttributeTypeOk(arg BecomeVendorBecomeVendorGetMessageAttributeType) (ret BecomeVendorBecomeVendorGetMessageRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setBecomeVendorBecomeVendorGetMessageAttributeType(arg *BecomeVendorBecomeVendorGetMessageAttributeType, val BecomeVendorBecomeVendorGetMessageRetType) { - *arg = &val -} - -type BecomeVendorBecomeVendorGetMessageArgType = string -type BecomeVendorBecomeVendorGetMessageRetType = string - -// BecomeVendorBecomeVendor struct for BecomeVendorBecomeVendor -type BecomeVendorBecomeVendor struct { - // The contact e-mail address. - // REQUIRED - ContactEmail BecomeVendorBecomeVendorGetContactEmailAttributeType `json:"contactEmail"` - // The message content. - // REQUIRED - Message BecomeVendorBecomeVendorGetMessageAttributeType `json:"message"` -} - -type _BecomeVendorBecomeVendor BecomeVendorBecomeVendor - -// NewBecomeVendorBecomeVendor instantiates a new BecomeVendorBecomeVendor 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 NewBecomeVendorBecomeVendor(contactEmail BecomeVendorBecomeVendorGetContactEmailArgType, message BecomeVendorBecomeVendorGetMessageArgType) *BecomeVendorBecomeVendor { - this := BecomeVendorBecomeVendor{} - setBecomeVendorBecomeVendorGetContactEmailAttributeType(&this.ContactEmail, contactEmail) - setBecomeVendorBecomeVendorGetMessageAttributeType(&this.Message, message) - return &this -} - -// NewBecomeVendorBecomeVendorWithDefaults instantiates a new BecomeVendorBecomeVendor 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 NewBecomeVendorBecomeVendorWithDefaults() *BecomeVendorBecomeVendor { - this := BecomeVendorBecomeVendor{} - return &this -} - -// GetContactEmail returns the ContactEmail field value -func (o *BecomeVendorBecomeVendor) GetContactEmail() (ret BecomeVendorBecomeVendorGetContactEmailRetType) { - ret, _ = o.GetContactEmailOk() - return ret -} - -// GetContactEmailOk returns a tuple with the ContactEmail field value -// and a boolean to check if the value has been set. -func (o *BecomeVendorBecomeVendor) GetContactEmailOk() (ret BecomeVendorBecomeVendorGetContactEmailRetType, ok bool) { - return getBecomeVendorBecomeVendorGetContactEmailAttributeTypeOk(o.ContactEmail) -} - -// SetContactEmail sets field value -func (o *BecomeVendorBecomeVendor) SetContactEmail(v BecomeVendorBecomeVendorGetContactEmailRetType) { - setBecomeVendorBecomeVendorGetContactEmailAttributeType(&o.ContactEmail, v) -} - -// GetMessage returns the Message field value -func (o *BecomeVendorBecomeVendor) GetMessage() (ret BecomeVendorBecomeVendorGetMessageRetType) { - ret, _ = o.GetMessageOk() - return ret -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *BecomeVendorBecomeVendor) GetMessageOk() (ret BecomeVendorBecomeVendorGetMessageRetType, ok bool) { - return getBecomeVendorBecomeVendorGetMessageAttributeTypeOk(o.Message) -} - -// SetMessage sets field value -func (o *BecomeVendorBecomeVendor) SetMessage(v BecomeVendorBecomeVendorGetMessageRetType) { - setBecomeVendorBecomeVendorGetMessageAttributeType(&o.Message, v) -} - -func (o BecomeVendorBecomeVendor) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getBecomeVendorBecomeVendorGetContactEmailAttributeTypeOk(o.ContactEmail); ok { - toSerialize["ContactEmail"] = val - } - if val, ok := getBecomeVendorBecomeVendorGetMessageAttributeTypeOk(o.Message); ok { - toSerialize["Message"] = val - } - return toSerialize, nil -} - -type NullableBecomeVendorBecomeVendor struct { - value *BecomeVendorBecomeVendor - isSet bool -} - -func (v NullableBecomeVendorBecomeVendor) Get() *BecomeVendorBecomeVendor { - return v.value -} - -func (v *NullableBecomeVendorBecomeVendor) Set(val *BecomeVendorBecomeVendor) { - v.value = val - v.isSet = true -} - -func (v NullableBecomeVendorBecomeVendor) IsSet() bool { - return v.isSet -} - -func (v *NullableBecomeVendorBecomeVendor) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBecomeVendorBecomeVendor(val *BecomeVendorBecomeVendor) *NullableBecomeVendorBecomeVendor { - return &NullableBecomeVendorBecomeVendor{value: val, isSet: true} -} - -func (v NullableBecomeVendorBecomeVendor) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBecomeVendorBecomeVendor) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_catalog_product_detail.go b/services/stackitmarketplace/model_catalog_product_detail.go index 1e0b96176..305962f07 100644 --- a/services/stackitmarketplace/model_catalog_product_detail.go +++ b/services/stackitmarketplace/model_catalog_product_detail.go @@ -42,9 +42,9 @@ func setCatalogProductDetailGetCategoriesAttributeType(arg *CatalogProductDetail */ // isEnumRef -type CatalogProductDetailGetDeliveryMethodAttributeType = *string -type CatalogProductDetailGetDeliveryMethodArgType = string -type CatalogProductDetailGetDeliveryMethodRetType = string +type CatalogProductDetailGetDeliveryMethodAttributeType = *DeliveryMethod +type CatalogProductDetailGetDeliveryMethodArgType = DeliveryMethod +type CatalogProductDetailGetDeliveryMethodRetType = DeliveryMethod func getCatalogProductDetailGetDeliveryMethodAttributeTypeOk(arg CatalogProductDetailGetDeliveryMethodAttributeType) (ret CatalogProductDetailGetDeliveryMethodRetType, ok bool) { if arg == nil { @@ -99,6 +99,27 @@ func setCatalogProductDetailGetDocumentationUrlAttributeType(arg *CatalogProduct type CatalogProductDetailGetDocumentationUrlArgType = string type CatalogProductDetailGetDocumentationUrlRetType = string +/* + types and functions for email +*/ + +// isNotNullableString +type CatalogProductDetailGetEmailAttributeType = *string + +func getCatalogProductDetailGetEmailAttributeTypeOk(arg CatalogProductDetailGetEmailAttributeType) (ret CatalogProductDetailGetEmailRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailGetEmailAttributeType(arg *CatalogProductDetailGetEmailAttributeType, val CatalogProductDetailGetEmailRetType) { + *arg = &val +} + +type CatalogProductDetailGetEmailArgType = string +type CatalogProductDetailGetEmailRetType = string + /* types and functions for highlights */ @@ -144,9 +165,9 @@ func setCatalogProductDetailgetIsProductListingAttributeType(arg *CatalogProduct */ // isEnumRef -type CatalogProductDetailGetLifecycleStateAttributeType = *string -type CatalogProductDetailGetLifecycleStateArgType = string -type CatalogProductDetailGetLifecycleStateRetType = string +type CatalogProductDetailGetLifecycleStateAttributeType = *ProductLifecycleState +type CatalogProductDetailGetLifecycleStateArgType = ProductLifecycleState +type CatalogProductDetailGetLifecycleStateRetType = ProductLifecycleState func getCatalogProductDetailGetLifecycleStateAttributeTypeOk(arg CatalogProductDetailGetLifecycleStateAttributeType) (ret CatalogProductDetailGetLifecycleStateRetType, ok bool) { if arg == nil { @@ -163,8 +184,10 @@ func setCatalogProductDetailGetLifecycleStateAttributeType(arg *CatalogProductDe types and functions for logo */ -// isNotNullableString -type CatalogProductDetailGetLogoAttributeType = *string +// isByteArray +type CatalogProductDetailGetLogoAttributeType = *[]byte +type CatalogProductDetailGetLogoArgType = []byte +type CatalogProductDetailGetLogoRetType = []byte func getCatalogProductDetailGetLogoAttributeTypeOk(arg CatalogProductDetailGetLogoAttributeType) (ret CatalogProductDetailGetLogoRetType, ok bool) { if arg == nil { @@ -177,9 +200,6 @@ func setCatalogProductDetailGetLogoAttributeType(arg *CatalogProductDetailGetLog *arg = &val } -type CatalogProductDetailGetLogoArgType = string -type CatalogProductDetailGetLogoRetType = string - /* types and functions for name */ @@ -225,8 +245,10 @@ func setCatalogProductDetailGetPricingOptionsAttributeType(arg *CatalogProductDe types and functions for productId */ -// isNotNullableString -type CatalogProductDetailGetProductIdAttributeType = *string +// isModel +type CatalogProductDetailGetProductIdAttributeType = *ProductId +type CatalogProductDetailGetProductIdArgType = ProductId +type CatalogProductDetailGetProductIdRetType = ProductId func getCatalogProductDetailGetProductIdAttributeTypeOk(arg CatalogProductDetailGetProductIdAttributeType) (ret CatalogProductDetailGetProductIdRetType, ok bool) { if arg == nil { @@ -239,9 +261,6 @@ func setCatalogProductDetailGetProductIdAttributeType(arg *CatalogProductDetailG *arg = &val } -type CatalogProductDetailGetProductIdArgType = string -type CatalogProductDetailGetProductIdRetType = string - /* types and functions for summary */ @@ -263,27 +282,6 @@ func setCatalogProductDetailGetSummaryAttributeType(arg *CatalogProductDetailGet type CatalogProductDetailGetSummaryArgType = string type CatalogProductDetailGetSummaryRetType = string -/* - types and functions for supportEmail -*/ - -// isNotNullableString -type CatalogProductDetailGetSupportEmailAttributeType = *string - -func getCatalogProductDetailGetSupportEmailAttributeTypeOk(arg CatalogProductDetailGetSupportEmailAttributeType) (ret CatalogProductDetailGetSupportEmailRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetSupportEmailAttributeType(arg *CatalogProductDetailGetSupportEmailAttributeType, val CatalogProductDetailGetSupportEmailRetType) { - *arg = &val -} - -type CatalogProductDetailGetSupportEmailArgType = string -type CatalogProductDetailGetSupportEmailRetType = string - /* types and functions for supportFaq */ @@ -411,42 +409,39 @@ type CatalogProductDetailGetVideoUrlRetType = string type CatalogProductDetail struct { // The list of categories associated to the product. Categories CatalogProductDetailGetCategoriesAttributeType `json:"categories,omitempty"` - // The product type. For reference: SAAS - Software as a Service, SAI - STACKIT Application Image // REQUIRED DeliveryMethod CatalogProductDetailGetDeliveryMethodAttributeType `json:"deliveryMethod"` // The product description. // REQUIRED Description CatalogProductDetailGetDescriptionAttributeType `json:"description"` - // The documentation URL. + // Uniform Resource Locator. // REQUIRED DocumentationUrl CatalogProductDetailGetDocumentationUrlAttributeType `json:"documentationUrl"` + // A e-mail address. + Email CatalogProductDetailGetEmailAttributeType `json:"email,omitempty"` // The list of highlights. // REQUIRED Highlights CatalogProductDetailGetHighlightsAttributeType `json:"highlights"` - // If true, the product is not fully integrated but only listed. Product listings may not have prices and support information. + // Boolean data type. // REQUIRED IsProductListing CatalogProductDetailgetIsProductListingAttributeType `json:"isProductListing"` - // The lifecycle state of the product. // REQUIRED LifecycleState CatalogProductDetailGetLifecycleStateAttributeType `json:"lifecycleState"` // The logo base64 encoded. // REQUIRED Logo CatalogProductDetailGetLogoAttributeType `json:"logo"` - // The product name. + // The name of the product. // REQUIRED Name CatalogProductDetailGetNameAttributeType `json:"name"` // The list of pricing options. // REQUIRED PricingOptions CatalogProductDetailGetPricingOptionsAttributeType `json:"pricingOptions"` - // The product ID. // REQUIRED ProductId CatalogProductDetailGetProductIdAttributeType `json:"productId"` // The short summary of the product. // REQUIRED Summary CatalogProductDetailGetSummaryAttributeType `json:"summary"` - // The e-mail address for support inquiries. - SupportEmail CatalogProductDetailGetSupportEmailAttributeType `json:"supportEmail,omitempty"` - // The support FAQ URL. + // Uniform Resource Locator. SupportFaq CatalogProductDetailGetSupportFaqAttributeType `json:"supportFaq,omitempty"` // The phone number for support inquiries. SupportPhone CatalogProductDetailGetSupportPhoneAttributeType `json:"supportPhone,omitempty"` @@ -456,7 +451,7 @@ type CatalogProductDetail struct { Vendor CatalogProductDetailGetVendorAttributeType `json:"vendor"` // The list of terms of use. VendorTerms CatalogProductDetailGetVendorTermsAttributeType `json:"vendorTerms,omitempty"` - // The video URL. + // Uniform Resource Locator. // REQUIRED VideoUrl CatalogProductDetailGetVideoUrlAttributeType `json:"videoUrl"` } @@ -567,6 +562,29 @@ func (o *CatalogProductDetail) SetDocumentationUrl(v CatalogProductDetailGetDocu setCatalogProductDetailGetDocumentationUrlAttributeType(&o.DocumentationUrl, v) } +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *CatalogProductDetail) GetEmail() (res CatalogProductDetailGetEmailRetType) { + res, _ = o.GetEmailOk() + return +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CatalogProductDetail) GetEmailOk() (ret CatalogProductDetailGetEmailRetType, ok bool) { + return getCatalogProductDetailGetEmailAttributeTypeOk(o.Email) +} + +// HasEmail returns a boolean if a field has been set. +func (o *CatalogProductDetail) HasEmail() bool { + _, ok := o.GetEmailOk() + return ok +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *CatalogProductDetail) SetEmail(v CatalogProductDetailGetEmailRetType) { + setCatalogProductDetailGetEmailAttributeType(&o.Email, v) +} + // GetHighlights returns the Highlights field value func (o *CatalogProductDetail) GetHighlights() (ret CatalogProductDetailGetHighlightsRetType) { ret, _ = o.GetHighlightsOk() @@ -703,29 +721,6 @@ func (o *CatalogProductDetail) SetSummary(v CatalogProductDetailGetSummaryRetTyp setCatalogProductDetailGetSummaryAttributeType(&o.Summary, v) } -// GetSupportEmail returns the SupportEmail field value if set, zero value otherwise. -func (o *CatalogProductDetail) GetSupportEmail() (res CatalogProductDetailGetSupportEmailRetType) { - res, _ = o.GetSupportEmailOk() - return -} - -// GetSupportEmailOk returns a tuple with the SupportEmail field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetSupportEmailOk() (ret CatalogProductDetailGetSupportEmailRetType, ok bool) { - return getCatalogProductDetailGetSupportEmailAttributeTypeOk(o.SupportEmail) -} - -// HasSupportEmail returns a boolean if a field has been set. -func (o *CatalogProductDetail) HasSupportEmail() bool { - _, ok := o.GetSupportEmailOk() - return ok -} - -// SetSupportEmail gets a reference to the given string and assigns it to the SupportEmail field. -func (o *CatalogProductDetail) SetSupportEmail(v CatalogProductDetailGetSupportEmailRetType) { - setCatalogProductDetailGetSupportEmailAttributeType(&o.SupportEmail, v) -} - // GetSupportFaq returns the SupportFaq field value if set, zero value otherwise. func (o *CatalogProductDetail) GetSupportFaq() (res CatalogProductDetailGetSupportFaqRetType) { res, _ = o.GetSupportFaqOk() @@ -866,6 +861,9 @@ func (o CatalogProductDetail) ToMap() (map[string]interface{}, error) { if val, ok := getCatalogProductDetailGetDocumentationUrlAttributeTypeOk(o.DocumentationUrl); ok { toSerialize["DocumentationUrl"] = val } + if val, ok := getCatalogProductDetailGetEmailAttributeTypeOk(o.Email); ok { + toSerialize["Email"] = val + } if val, ok := getCatalogProductDetailGetHighlightsAttributeTypeOk(o.Highlights); ok { toSerialize["Highlights"] = val } @@ -890,9 +888,6 @@ func (o CatalogProductDetail) ToMap() (map[string]interface{}, error) { if val, ok := getCatalogProductDetailGetSummaryAttributeTypeOk(o.Summary); ok { toSerialize["Summary"] = val } - if val, ok := getCatalogProductDetailGetSupportEmailAttributeTypeOk(o.SupportEmail); ok { - toSerialize["SupportEmail"] = val - } if val, ok := getCatalogProductDetailGetSupportFaqAttributeTypeOk(o.SupportFaq); ok { toSerialize["SupportFaq"] = val } diff --git a/services/stackitmarketplace/model_catalog_product_details_vendor.go b/services/stackitmarketplace/model_catalog_product_details_vendor.go index 6f847e930..dc6030a29 100644 --- a/services/stackitmarketplace/model_catalog_product_details_vendor.go +++ b/services/stackitmarketplace/model_catalog_product_details_vendor.go @@ -42,8 +42,10 @@ type CatalogProductDetailsVendorGetDescriptionRetType = string types and functions for logo */ -// isNotNullableString -type CatalogProductDetailsVendorGetLogoAttributeType = *string +// isByteArray +type CatalogProductDetailsVendorGetLogoAttributeType = *[]byte +type CatalogProductDetailsVendorGetLogoArgType = []byte +type CatalogProductDetailsVendorGetLogoRetType = []byte func getCatalogProductDetailsVendorGetLogoAttributeTypeOk(arg CatalogProductDetailsVendorGetLogoAttributeType) (ret CatalogProductDetailsVendorGetLogoRetType, ok bool) { if arg == nil { @@ -56,9 +58,6 @@ func setCatalogProductDetailsVendorGetLogoAttributeType(arg *CatalogProductDetai *arg = &val } -type CatalogProductDetailsVendorGetLogoArgType = string -type CatalogProductDetailsVendorGetLogoRetType = string - /* types and functions for name */ @@ -84,8 +83,10 @@ type CatalogProductDetailsVendorGetNameRetType = string types and functions for vendorId */ -// isNotNullableString -type CatalogProductDetailsVendorGetVendorIdAttributeType = *string +// isModel +type CatalogProductDetailsVendorGetVendorIdAttributeType = *VendorId +type CatalogProductDetailsVendorGetVendorIdArgType = VendorId +type CatalogProductDetailsVendorGetVendorIdRetType = VendorId func getCatalogProductDetailsVendorGetVendorIdAttributeTypeOk(arg CatalogProductDetailsVendorGetVendorIdAttributeType) (ret CatalogProductDetailsVendorGetVendorIdRetType, ok bool) { if arg == nil { @@ -98,9 +99,6 @@ func setCatalogProductDetailsVendorGetVendorIdAttributeType(arg *CatalogProductD *arg = &val } -type CatalogProductDetailsVendorGetVendorIdArgType = string -type CatalogProductDetailsVendorGetVendorIdRetType = string - /* types and functions for videoUrl */ @@ -148,19 +146,18 @@ type CatalogProductDetailsVendor struct { // The vendor description. // REQUIRED Description CatalogProductDetailsVendorGetDescriptionAttributeType `json:"description"` - // The vendor logo base64 encoded. + // The logo base64 encoded. // REQUIRED Logo CatalogProductDetailsVendorGetLogoAttributeType `json:"logo"` - // The vendor name. + // The product's vendor name. // REQUIRED Name CatalogProductDetailsVendorGetNameAttributeType `json:"name"` - // The vendor ID. // REQUIRED VendorId CatalogProductDetailsVendorGetVendorIdAttributeType `json:"vendorId"` - // The vendor video URL. + // Uniform Resource Locator. // REQUIRED VideoUrl CatalogProductDetailsVendorGetVideoUrlAttributeType `json:"videoUrl"` - // The vendor website URL. + // Uniform Resource Locator. // REQUIRED WebsiteUrl CatalogProductDetailsVendorGetWebsiteUrlAttributeType `json:"websiteUrl"` } diff --git a/services/stackitmarketplace/model_catalog_product_overview.go b/services/stackitmarketplace/model_catalog_product_overview.go index 6d6cdb548..55a299feb 100644 --- a/services/stackitmarketplace/model_catalog_product_overview.go +++ b/services/stackitmarketplace/model_catalog_product_overview.go @@ -22,9 +22,9 @@ var _ MappedNullable = &CatalogProductOverview{} */ // isEnumRef -type CatalogProductOverviewGetDeliveryMethodAttributeType = *string -type CatalogProductOverviewGetDeliveryMethodArgType = string -type CatalogProductOverviewGetDeliveryMethodRetType = string +type CatalogProductOverviewGetDeliveryMethodAttributeType = *DeliveryMethod +type CatalogProductOverviewGetDeliveryMethodArgType = DeliveryMethod +type CatalogProductOverviewGetDeliveryMethodRetType = DeliveryMethod func getCatalogProductOverviewGetDeliveryMethodAttributeTypeOk(arg CatalogProductOverviewGetDeliveryMethodAttributeType) (ret CatalogProductOverviewGetDeliveryMethodRetType, ok bool) { if arg == nil { @@ -42,9 +42,9 @@ func setCatalogProductOverviewGetDeliveryMethodAttributeType(arg *CatalogProduct */ // isEnumRef -type CatalogProductOverviewGetLifecycleStateAttributeType = *string -type CatalogProductOverviewGetLifecycleStateArgType = string -type CatalogProductOverviewGetLifecycleStateRetType = string +type CatalogProductOverviewGetLifecycleStateAttributeType = *ProductLifecycleState +type CatalogProductOverviewGetLifecycleStateArgType = ProductLifecycleState +type CatalogProductOverviewGetLifecycleStateRetType = ProductLifecycleState func getCatalogProductOverviewGetLifecycleStateAttributeTypeOk(arg CatalogProductOverviewGetLifecycleStateAttributeType) (ret CatalogProductOverviewGetLifecycleStateRetType, ok bool) { if arg == nil { @@ -61,8 +61,10 @@ func setCatalogProductOverviewGetLifecycleStateAttributeType(arg *CatalogProduct types and functions for logo */ -// isNotNullableString -type CatalogProductOverviewGetLogoAttributeType = *string +// isByteArray +type CatalogProductOverviewGetLogoAttributeType = *[]byte +type CatalogProductOverviewGetLogoArgType = []byte +type CatalogProductOverviewGetLogoRetType = []byte func getCatalogProductOverviewGetLogoAttributeTypeOk(arg CatalogProductOverviewGetLogoAttributeType) (ret CatalogProductOverviewGetLogoRetType, ok bool) { if arg == nil { @@ -75,9 +77,6 @@ func setCatalogProductOverviewGetLogoAttributeType(arg *CatalogProductOverviewGe *arg = &val } -type CatalogProductOverviewGetLogoArgType = string -type CatalogProductOverviewGetLogoRetType = string - /* types and functions for name */ @@ -103,8 +102,10 @@ type CatalogProductOverviewGetNameRetType = string types and functions for productId */ -// isNotNullableString -type CatalogProductOverviewGetProductIdAttributeType = *string +// isModel +type CatalogProductOverviewGetProductIdAttributeType = *ProductId +type CatalogProductOverviewGetProductIdArgType = ProductId +type CatalogProductOverviewGetProductIdRetType = ProductId func getCatalogProductOverviewGetProductIdAttributeTypeOk(arg CatalogProductOverviewGetProductIdAttributeType) (ret CatalogProductOverviewGetProductIdRetType, ok bool) { if arg == nil { @@ -117,9 +118,6 @@ func setCatalogProductOverviewGetProductIdAttributeType(arg *CatalogProductOverv *arg = &val } -type CatalogProductOverviewGetProductIdArgType = string -type CatalogProductOverviewGetProductIdRetType = string - /* types and functions for summary */ @@ -163,21 +161,18 @@ func setCatalogProductOverviewGetVendorAttributeType(arg *CatalogProductOverview // CatalogProductOverview struct for CatalogProductOverview type CatalogProductOverview struct { - // The product type. For reference: SAAS - Software as a Service, SAI - STACKIT Application Image // REQUIRED DeliveryMethod CatalogProductOverviewGetDeliveryMethodAttributeType `json:"deliveryMethod"` - // The lifecycle state of the product. // REQUIRED LifecycleState CatalogProductOverviewGetLifecycleStateAttributeType `json:"lifecycleState"` // The logo base64 encoded. Logo CatalogProductOverviewGetLogoAttributeType `json:"logo,omitempty"` - // The product name. + // The name of the product. // REQUIRED Name CatalogProductOverviewGetNameAttributeType `json:"name"` - // The product ID. // REQUIRED ProductId CatalogProductOverviewGetProductIdAttributeType `json:"productId"` - // The short summary of the product. + // A custom message. // REQUIRED Summary CatalogProductOverviewGetSummaryAttributeType `json:"summary"` // REQUIRED diff --git a/services/stackitmarketplace/model_catalog_product_overview_vendor.go b/services/stackitmarketplace/model_catalog_product_overview_vendor.go index d56d69ecf..613686016 100644 --- a/services/stackitmarketplace/model_catalog_product_overview_vendor.go +++ b/services/stackitmarketplace/model_catalog_product_overview_vendor.go @@ -42,8 +42,10 @@ type CatalogProductOverviewVendorGetNameRetType = string types and functions for vendorId */ -// isNotNullableString -type CatalogProductOverviewVendorGetVendorIdAttributeType = *string +// isModel +type CatalogProductOverviewVendorGetVendorIdAttributeType = *VendorId +type CatalogProductOverviewVendorGetVendorIdArgType = VendorId +type CatalogProductOverviewVendorGetVendorIdRetType = VendorId func getCatalogProductOverviewVendorGetVendorIdAttributeTypeOk(arg CatalogProductOverviewVendorGetVendorIdAttributeType) (ret CatalogProductOverviewVendorGetVendorIdRetType, ok bool) { if arg == nil { @@ -56,9 +58,6 @@ func setCatalogProductOverviewVendorGetVendorIdAttributeType(arg *CatalogProduct *arg = &val } -type CatalogProductOverviewVendorGetVendorIdArgType = string -type CatalogProductOverviewVendorGetVendorIdRetType = string - /* types and functions for websiteUrl */ @@ -82,13 +81,12 @@ type CatalogProductOverviewVendorGetWebsiteUrlRetType = string // CatalogProductOverviewVendor struct for CatalogProductOverviewVendor type CatalogProductOverviewVendor struct { - // The vendor name. + // The product's vendor name. // REQUIRED Name CatalogProductOverviewVendorGetNameAttributeType `json:"name"` - // The vendor ID. // REQUIRED VendorId CatalogProductOverviewVendorGetVendorIdAttributeType `json:"vendorId"` - // The vendor website URL. + // Uniform Resource Locator. // REQUIRED WebsiteUrl CatalogProductOverviewVendorGetWebsiteUrlAttributeType `json:"websiteUrl"` } diff --git a/services/stackitmarketplace/model_catalog_product_pricing_option.go b/services/stackitmarketplace/model_catalog_product_pricing_option.go index 2215b12fa..b84b0aeba 100644 --- a/services/stackitmarketplace/model_catalog_product_pricing_option.go +++ b/services/stackitmarketplace/model_catalog_product_pricing_option.go @@ -84,9 +84,9 @@ type CatalogProductPricingOptionGetNameRetType = string */ // isEnumRef -type CatalogProductPricingOptionGetPriceTypeAttributeType = *string -type CatalogProductPricingOptionGetPriceTypeArgType = string -type CatalogProductPricingOptionGetPriceTypeRetType = string +type CatalogProductPricingOptionGetPriceTypeAttributeType = *PriceType +type CatalogProductPricingOptionGetPriceTypeArgType = PriceType +type CatalogProductPricingOptionGetPriceTypeRetType = PriceType func getCatalogProductPricingOptionGetPriceTypeAttributeTypeOk(arg CatalogProductPricingOptionGetPriceTypeAttributeType) (ret CatalogProductPricingOptionGetPriceTypeRetType, ok bool) { if arg == nil { @@ -208,8 +208,10 @@ type CatalogProductPricingOptionGetSkuInfoDetailsRetType = string types and functions for unit */ -// isNotNullableString -type CatalogProductPricingOptionGetUnitAttributeType = *string +// isEnumRef +type CatalogProductPricingOptionGetUnitAttributeType = *PricingOptionUnit +type CatalogProductPricingOptionGetUnitArgType = PricingOptionUnit +type CatalogProductPricingOptionGetUnitRetType = PricingOptionUnit func getCatalogProductPricingOptionGetUnitAttributeTypeOk(arg CatalogProductPricingOptionGetUnitAttributeType) (ret CatalogProductPricingOptionGetUnitRetType, ok bool) { if arg == nil { @@ -222,9 +224,6 @@ func setCatalogProductPricingOptionGetUnitAttributeType(arg *CatalogProductPrici *arg = &val } -type CatalogProductPricingOptionGetUnitArgType = string -type CatalogProductPricingOptionGetUnitRetType = string - // CatalogProductPricingOption struct for CatalogProductPricingOption type CatalogProductPricingOption struct { // The pricing option description. @@ -235,8 +234,7 @@ type CatalogProductPricingOption struct { Highlights CatalogProductPricingOptionGetHighlightsAttributeType `json:"highlights"` // The pricing option name. // REQUIRED - Name CatalogProductPricingOptionGetNameAttributeType `json:"name"` - // The price type / pricing model. + Name CatalogProductPricingOptionGetNameAttributeType `json:"name"` PriceType CatalogProductPricingOptionGetPriceTypeAttributeType `json:"priceType,omitempty"` // Additional price type information. PricingPlan CatalogProductPricingOptionGetPricingPlanAttributeType `json:"pricingPlan,omitempty"` @@ -251,8 +249,7 @@ type CatalogProductPricingOption struct { // More details about what this offering entails. // REQUIRED SkuInfoDetails CatalogProductPricingOptionGetSkuInfoDetailsAttributeType `json:"skuInfoDetails"` - // The interval to which the rate applies. - Unit CatalogProductPricingOptionGetUnitAttributeType `json:"unit,omitempty"` + Unit CatalogProductPricingOptionGetUnitAttributeType `json:"unit,omitempty"` } type _CatalogProductPricingOption CatalogProductPricingOption @@ -349,7 +346,7 @@ func (o *CatalogProductPricingOption) HasPriceType() bool { return ok } -// SetPriceType gets a reference to the given string and assigns it to the PriceType field. +// SetPriceType gets a reference to the given PriceType and assigns it to the PriceType field. func (o *CatalogProductPricingOption) SetPriceType(v CatalogProductPricingOptionGetPriceTypeRetType) { setCatalogProductPricingOptionGetPriceTypeAttributeType(&o.PriceType, v) } @@ -469,7 +466,7 @@ func (o *CatalogProductPricingOption) HasUnit() bool { return ok } -// SetUnit gets a reference to the given string and assigns it to the Unit field. +// SetUnit gets a reference to the given PricingOptionUnit and assigns it to the Unit field. func (o *CatalogProductPricingOption) SetUnit(v CatalogProductPricingOptionGetUnitRetType) { setCatalogProductPricingOptionGetUnitAttributeType(&o.Unit, v) } diff --git a/services/stackitmarketplace/model_catalog_product_support_resource.go b/services/stackitmarketplace/model_catalog_product_support_resource.go index ee4daaa4e..f966bf4d3 100644 --- a/services/stackitmarketplace/model_catalog_product_support_resource.go +++ b/services/stackitmarketplace/model_catalog_product_support_resource.go @@ -61,7 +61,7 @@ type CatalogProductSupportResourceGetSupportLinkTitleRetType = string // CatalogProductSupportResource struct for CatalogProductSupportResource type CatalogProductSupportResource struct { - // The support resource link. + // Uniform Resource Locator. SupportLink CatalogProductSupportResourceGetSupportLinkAttributeType `json:"supportLink,omitempty"` // The support resource link title. SupportLinkTitle CatalogProductSupportResourceGetSupportLinkTitleAttributeType `json:"supportLinkTitle,omitempty"` diff --git a/services/stackitmarketplace/model_catalog_product_vendor_terms.go b/services/stackitmarketplace/model_catalog_product_vendor_terms.go index c01f80fd8..531ae53a1 100644 --- a/services/stackitmarketplace/model_catalog_product_vendor_terms.go +++ b/services/stackitmarketplace/model_catalog_product_vendor_terms.go @@ -82,13 +82,13 @@ type CatalogProductVendorTermsGetUrlRetType = string // CatalogProductVendorTerms struct for CatalogProductVendorTerms type CatalogProductVendorTerms struct { - // The terms of use description. + // The terms of service description. // REQUIRED Description CatalogProductVendorTermsGetDescriptionAttributeType `json:"description"` - // The terms of use title. + // The terms of service title. // REQUIRED Title CatalogProductVendorTermsGetTitleAttributeType `json:"title"` - // The terms of use url. + // Uniform Resource Locator. // REQUIRED Url CatalogProductVendorTermsGetUrlAttributeType `json:"url"` } diff --git a/services/stackitmarketplace/model_contact_sales.go b/services/stackitmarketplace/model_contact_sales.go index e4e2fd7e1..ca5d36a16 100644 --- a/services/stackitmarketplace/model_contact_sales.go +++ b/services/stackitmarketplace/model_contact_sales.go @@ -22,9 +22,9 @@ var _ MappedNullable = &ContactSales{} */ // isModel -type ContactSalesGetContactSalesAttributeType = *ContactSalesContactSales -type ContactSalesGetContactSalesArgType = ContactSalesContactSales -type ContactSalesGetContactSalesRetType = ContactSalesContactSales +type ContactSalesGetContactSalesAttributeType = *InquiryContactSales +type ContactSalesGetContactSalesArgType = InquiryContactSales +type ContactSalesGetContactSalesRetType = InquiryContactSales func getContactSalesGetContactSalesAttributeTypeOk(arg ContactSalesGetContactSalesAttributeType) (ret ContactSalesGetContactSalesRetType, ok bool) { if arg == nil { @@ -42,9 +42,9 @@ func setContactSalesGetContactSalesAttributeType(arg *ContactSalesGetContactSale */ // isEnumRef -type ContactSalesGetTypeAttributeType = *string -type ContactSalesGetTypeArgType = string -type ContactSalesGetTypeRetType = string +type ContactSalesGetTypeAttributeType = *InquiryFormType +type ContactSalesGetTypeArgType = InquiryFormType +type ContactSalesGetTypeRetType = InquiryFormType func getContactSalesGetTypeAttributeTypeOk(arg ContactSalesGetTypeAttributeType) (ret ContactSalesGetTypeRetType, ok bool) { if arg == nil { @@ -61,7 +61,6 @@ func setContactSalesGetTypeAttributeType(arg *ContactSalesGetTypeAttributeType, type ContactSales struct { // REQUIRED ContactSales ContactSalesGetContactSalesAttributeType `json:"contactSales"` - // The form type. // REQUIRED Type ContactSalesGetTypeAttributeType `json:"type"` } diff --git a/services/stackitmarketplace/model_contact_sales_contact_sales.go b/services/stackitmarketplace/model_contact_sales_contact_sales.go deleted file mode 100644 index d28265a95..000000000 --- a/services/stackitmarketplace/model_contact_sales_contact_sales.go +++ /dev/null @@ -1,307 +0,0 @@ -/* -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 ContactSalesContactSales type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ContactSalesContactSales{} - -/* - types and functions for companyName -*/ - -// isNotNullableString -type ContactSalesContactSalesGetCompanyNameAttributeType = *string - -func getContactSalesContactSalesGetCompanyNameAttributeTypeOk(arg ContactSalesContactSalesGetCompanyNameAttributeType) (ret ContactSalesContactSalesGetCompanyNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setContactSalesContactSalesGetCompanyNameAttributeType(arg *ContactSalesContactSalesGetCompanyNameAttributeType, val ContactSalesContactSalesGetCompanyNameRetType) { - *arg = &val -} - -type ContactSalesContactSalesGetCompanyNameArgType = string -type ContactSalesContactSalesGetCompanyNameRetType = string - -/* - types and functions for contactEmail -*/ - -// isNotNullableString -type ContactSalesContactSalesGetContactEmailAttributeType = *string - -func getContactSalesContactSalesGetContactEmailAttributeTypeOk(arg ContactSalesContactSalesGetContactEmailAttributeType) (ret ContactSalesContactSalesGetContactEmailRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setContactSalesContactSalesGetContactEmailAttributeType(arg *ContactSalesContactSalesGetContactEmailAttributeType, val ContactSalesContactSalesGetContactEmailRetType) { - *arg = &val -} - -type ContactSalesContactSalesGetContactEmailArgType = string -type ContactSalesContactSalesGetContactEmailRetType = string - -/* - types and functions for fullName -*/ - -// isNotNullableString -type ContactSalesContactSalesGetFullNameAttributeType = *string - -func getContactSalesContactSalesGetFullNameAttributeTypeOk(arg ContactSalesContactSalesGetFullNameAttributeType) (ret ContactSalesContactSalesGetFullNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setContactSalesContactSalesGetFullNameAttributeType(arg *ContactSalesContactSalesGetFullNameAttributeType, val ContactSalesContactSalesGetFullNameRetType) { - *arg = &val -} - -type ContactSalesContactSalesGetFullNameArgType = string -type ContactSalesContactSalesGetFullNameRetType = string - -/* - types and functions for message -*/ - -// isNotNullableString -type ContactSalesContactSalesGetMessageAttributeType = *string - -func getContactSalesContactSalesGetMessageAttributeTypeOk(arg ContactSalesContactSalesGetMessageAttributeType) (ret ContactSalesContactSalesGetMessageRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setContactSalesContactSalesGetMessageAttributeType(arg *ContactSalesContactSalesGetMessageAttributeType, val ContactSalesContactSalesGetMessageRetType) { - *arg = &val -} - -type ContactSalesContactSalesGetMessageArgType = string -type ContactSalesContactSalesGetMessageRetType = string - -/* - types and functions for productId -*/ - -// isNotNullableString -type ContactSalesContactSalesGetProductIdAttributeType = *string - -func getContactSalesContactSalesGetProductIdAttributeTypeOk(arg ContactSalesContactSalesGetProductIdAttributeType) (ret ContactSalesContactSalesGetProductIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setContactSalesContactSalesGetProductIdAttributeType(arg *ContactSalesContactSalesGetProductIdAttributeType, val ContactSalesContactSalesGetProductIdRetType) { - *arg = &val -} - -type ContactSalesContactSalesGetProductIdArgType = string -type ContactSalesContactSalesGetProductIdRetType = string - -// ContactSalesContactSales struct for ContactSalesContactSales -type ContactSalesContactSales struct { - // The company name. - // REQUIRED - CompanyName ContactSalesContactSalesGetCompanyNameAttributeType `json:"companyName"` - // The contact e-mail address. - // REQUIRED - ContactEmail ContactSalesContactSalesGetContactEmailAttributeType `json:"contactEmail"` - // The full name of the contact person. - // REQUIRED - FullName ContactSalesContactSalesGetFullNameAttributeType `json:"fullName"` - // The message content. - // REQUIRED - Message ContactSalesContactSalesGetMessageAttributeType `json:"message"` - // The product ID. - // REQUIRED - ProductId ContactSalesContactSalesGetProductIdAttributeType `json:"productId"` -} - -type _ContactSalesContactSales ContactSalesContactSales - -// NewContactSalesContactSales instantiates a new ContactSalesContactSales 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 NewContactSalesContactSales(companyName ContactSalesContactSalesGetCompanyNameArgType, contactEmail ContactSalesContactSalesGetContactEmailArgType, fullName ContactSalesContactSalesGetFullNameArgType, message ContactSalesContactSalesGetMessageArgType, productId ContactSalesContactSalesGetProductIdArgType) *ContactSalesContactSales { - this := ContactSalesContactSales{} - setContactSalesContactSalesGetCompanyNameAttributeType(&this.CompanyName, companyName) - setContactSalesContactSalesGetContactEmailAttributeType(&this.ContactEmail, contactEmail) - setContactSalesContactSalesGetFullNameAttributeType(&this.FullName, fullName) - setContactSalesContactSalesGetMessageAttributeType(&this.Message, message) - setContactSalesContactSalesGetProductIdAttributeType(&this.ProductId, productId) - return &this -} - -// NewContactSalesContactSalesWithDefaults instantiates a new ContactSalesContactSales 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 NewContactSalesContactSalesWithDefaults() *ContactSalesContactSales { - this := ContactSalesContactSales{} - return &this -} - -// GetCompanyName returns the CompanyName field value -func (o *ContactSalesContactSales) GetCompanyName() (ret ContactSalesContactSalesGetCompanyNameRetType) { - ret, _ = o.GetCompanyNameOk() - return ret -} - -// GetCompanyNameOk returns a tuple with the CompanyName field value -// and a boolean to check if the value has been set. -func (o *ContactSalesContactSales) GetCompanyNameOk() (ret ContactSalesContactSalesGetCompanyNameRetType, ok bool) { - return getContactSalesContactSalesGetCompanyNameAttributeTypeOk(o.CompanyName) -} - -// SetCompanyName sets field value -func (o *ContactSalesContactSales) SetCompanyName(v ContactSalesContactSalesGetCompanyNameRetType) { - setContactSalesContactSalesGetCompanyNameAttributeType(&o.CompanyName, v) -} - -// GetContactEmail returns the ContactEmail field value -func (o *ContactSalesContactSales) GetContactEmail() (ret ContactSalesContactSalesGetContactEmailRetType) { - ret, _ = o.GetContactEmailOk() - return ret -} - -// GetContactEmailOk returns a tuple with the ContactEmail field value -// and a boolean to check if the value has been set. -func (o *ContactSalesContactSales) GetContactEmailOk() (ret ContactSalesContactSalesGetContactEmailRetType, ok bool) { - return getContactSalesContactSalesGetContactEmailAttributeTypeOk(o.ContactEmail) -} - -// SetContactEmail sets field value -func (o *ContactSalesContactSales) SetContactEmail(v ContactSalesContactSalesGetContactEmailRetType) { - setContactSalesContactSalesGetContactEmailAttributeType(&o.ContactEmail, v) -} - -// GetFullName returns the FullName field value -func (o *ContactSalesContactSales) GetFullName() (ret ContactSalesContactSalesGetFullNameRetType) { - ret, _ = o.GetFullNameOk() - return ret -} - -// GetFullNameOk returns a tuple with the FullName field value -// and a boolean to check if the value has been set. -func (o *ContactSalesContactSales) GetFullNameOk() (ret ContactSalesContactSalesGetFullNameRetType, ok bool) { - return getContactSalesContactSalesGetFullNameAttributeTypeOk(o.FullName) -} - -// SetFullName sets field value -func (o *ContactSalesContactSales) SetFullName(v ContactSalesContactSalesGetFullNameRetType) { - setContactSalesContactSalesGetFullNameAttributeType(&o.FullName, v) -} - -// GetMessage returns the Message field value -func (o *ContactSalesContactSales) GetMessage() (ret ContactSalesContactSalesGetMessageRetType) { - ret, _ = o.GetMessageOk() - return ret -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *ContactSalesContactSales) GetMessageOk() (ret ContactSalesContactSalesGetMessageRetType, ok bool) { - return getContactSalesContactSalesGetMessageAttributeTypeOk(o.Message) -} - -// SetMessage sets field value -func (o *ContactSalesContactSales) SetMessage(v ContactSalesContactSalesGetMessageRetType) { - setContactSalesContactSalesGetMessageAttributeType(&o.Message, v) -} - -// GetProductId returns the ProductId field value -func (o *ContactSalesContactSales) GetProductId() (ret ContactSalesContactSalesGetProductIdRetType) { - ret, _ = o.GetProductIdOk() - return ret -} - -// GetProductIdOk returns a tuple with the ProductId field value -// and a boolean to check if the value has been set. -func (o *ContactSalesContactSales) GetProductIdOk() (ret ContactSalesContactSalesGetProductIdRetType, ok bool) { - return getContactSalesContactSalesGetProductIdAttributeTypeOk(o.ProductId) -} - -// SetProductId sets field value -func (o *ContactSalesContactSales) SetProductId(v ContactSalesContactSalesGetProductIdRetType) { - setContactSalesContactSalesGetProductIdAttributeType(&o.ProductId, v) -} - -func (o ContactSalesContactSales) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getContactSalesContactSalesGetCompanyNameAttributeTypeOk(o.CompanyName); ok { - toSerialize["CompanyName"] = val - } - if val, ok := getContactSalesContactSalesGetContactEmailAttributeTypeOk(o.ContactEmail); ok { - toSerialize["ContactEmail"] = val - } - if val, ok := getContactSalesContactSalesGetFullNameAttributeTypeOk(o.FullName); ok { - toSerialize["FullName"] = val - } - if val, ok := getContactSalesContactSalesGetMessageAttributeTypeOk(o.Message); ok { - toSerialize["Message"] = val - } - if val, ok := getContactSalesContactSalesGetProductIdAttributeTypeOk(o.ProductId); ok { - toSerialize["ProductId"] = val - } - return toSerialize, nil -} - -type NullableContactSalesContactSales struct { - value *ContactSalesContactSales - isSet bool -} - -func (v NullableContactSalesContactSales) Get() *ContactSalesContactSales { - return v.value -} - -func (v *NullableContactSalesContactSales) Set(val *ContactSalesContactSales) { - v.value = val - v.isSet = true -} - -func (v NullableContactSalesContactSales) IsSet() bool { - return v.isSet -} - -func (v *NullableContactSalesContactSales) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableContactSalesContactSales(val *ContactSalesContactSales) *NullableContactSalesContactSales { - return &NullableContactSalesContactSales{value: val, isSet: true} -} - -func (v NullableContactSalesContactSales) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableContactSalesContactSales) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_current_subscription_state_response.go b/services/stackitmarketplace/model_current_subscription_state_response.go deleted file mode 100644 index b641736cc..000000000 --- a/services/stackitmarketplace/model_current_subscription_state_response.go +++ /dev/null @@ -1,171 +0,0 @@ -/* -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 CurrentSubscriptionStateResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CurrentSubscriptionStateResponse{} - -/* - types and functions for lifecycleState -*/ - -// isEnumRef -type CurrentSubscriptionStateResponseGetLifecycleStateAttributeType = *string -type CurrentSubscriptionStateResponseGetLifecycleStateArgType = string -type CurrentSubscriptionStateResponseGetLifecycleStateRetType = string - -func getCurrentSubscriptionStateResponseGetLifecycleStateAttributeTypeOk(arg CurrentSubscriptionStateResponseGetLifecycleStateAttributeType) (ret CurrentSubscriptionStateResponseGetLifecycleStateRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCurrentSubscriptionStateResponseGetLifecycleStateAttributeType(arg *CurrentSubscriptionStateResponseGetLifecycleStateAttributeType, val CurrentSubscriptionStateResponseGetLifecycleStateRetType) { - *arg = &val -} - -/* - types and functions for subscriptionId -*/ - -// isNotNullableString -type CurrentSubscriptionStateResponseGetSubscriptionIdAttributeType = *string - -func getCurrentSubscriptionStateResponseGetSubscriptionIdAttributeTypeOk(arg CurrentSubscriptionStateResponseGetSubscriptionIdAttributeType) (ret CurrentSubscriptionStateResponseGetSubscriptionIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCurrentSubscriptionStateResponseGetSubscriptionIdAttributeType(arg *CurrentSubscriptionStateResponseGetSubscriptionIdAttributeType, val CurrentSubscriptionStateResponseGetSubscriptionIdRetType) { - *arg = &val -} - -type CurrentSubscriptionStateResponseGetSubscriptionIdArgType = string -type CurrentSubscriptionStateResponseGetSubscriptionIdRetType = string - -// CurrentSubscriptionStateResponse struct for CurrentSubscriptionStateResponse -type CurrentSubscriptionStateResponse struct { - // Lifecycle state of the subscription. - // REQUIRED - LifecycleState CurrentSubscriptionStateResponseGetLifecycleStateAttributeType `json:"lifecycleState"` - // The subscription ID. - // REQUIRED - SubscriptionId CurrentSubscriptionStateResponseGetSubscriptionIdAttributeType `json:"subscriptionId"` -} - -type _CurrentSubscriptionStateResponse CurrentSubscriptionStateResponse - -// NewCurrentSubscriptionStateResponse instantiates a new CurrentSubscriptionStateResponse 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 NewCurrentSubscriptionStateResponse(lifecycleState CurrentSubscriptionStateResponseGetLifecycleStateArgType, subscriptionId CurrentSubscriptionStateResponseGetSubscriptionIdArgType) *CurrentSubscriptionStateResponse { - this := CurrentSubscriptionStateResponse{} - setCurrentSubscriptionStateResponseGetLifecycleStateAttributeType(&this.LifecycleState, lifecycleState) - setCurrentSubscriptionStateResponseGetSubscriptionIdAttributeType(&this.SubscriptionId, subscriptionId) - return &this -} - -// NewCurrentSubscriptionStateResponseWithDefaults instantiates a new CurrentSubscriptionStateResponse 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 NewCurrentSubscriptionStateResponseWithDefaults() *CurrentSubscriptionStateResponse { - this := CurrentSubscriptionStateResponse{} - return &this -} - -// GetLifecycleState returns the LifecycleState field value -func (o *CurrentSubscriptionStateResponse) GetLifecycleState() (ret CurrentSubscriptionStateResponseGetLifecycleStateRetType) { - ret, _ = o.GetLifecycleStateOk() - return ret -} - -// GetLifecycleStateOk returns a tuple with the LifecycleState field value -// and a boolean to check if the value has been set. -func (o *CurrentSubscriptionStateResponse) GetLifecycleStateOk() (ret CurrentSubscriptionStateResponseGetLifecycleStateRetType, ok bool) { - return getCurrentSubscriptionStateResponseGetLifecycleStateAttributeTypeOk(o.LifecycleState) -} - -// SetLifecycleState sets field value -func (o *CurrentSubscriptionStateResponse) SetLifecycleState(v CurrentSubscriptionStateResponseGetLifecycleStateRetType) { - setCurrentSubscriptionStateResponseGetLifecycleStateAttributeType(&o.LifecycleState, v) -} - -// GetSubscriptionId returns the SubscriptionId field value -func (o *CurrentSubscriptionStateResponse) GetSubscriptionId() (ret CurrentSubscriptionStateResponseGetSubscriptionIdRetType) { - ret, _ = o.GetSubscriptionIdOk() - return ret -} - -// GetSubscriptionIdOk returns a tuple with the SubscriptionId field value -// and a boolean to check if the value has been set. -func (o *CurrentSubscriptionStateResponse) GetSubscriptionIdOk() (ret CurrentSubscriptionStateResponseGetSubscriptionIdRetType, ok bool) { - return getCurrentSubscriptionStateResponseGetSubscriptionIdAttributeTypeOk(o.SubscriptionId) -} - -// SetSubscriptionId sets field value -func (o *CurrentSubscriptionStateResponse) SetSubscriptionId(v CurrentSubscriptionStateResponseGetSubscriptionIdRetType) { - setCurrentSubscriptionStateResponseGetSubscriptionIdAttributeType(&o.SubscriptionId, v) -} - -func (o CurrentSubscriptionStateResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCurrentSubscriptionStateResponseGetLifecycleStateAttributeTypeOk(o.LifecycleState); ok { - toSerialize["LifecycleState"] = val - } - if val, ok := getCurrentSubscriptionStateResponseGetSubscriptionIdAttributeTypeOk(o.SubscriptionId); ok { - toSerialize["SubscriptionId"] = val - } - return toSerialize, nil -} - -type NullableCurrentSubscriptionStateResponse struct { - value *CurrentSubscriptionStateResponse - isSet bool -} - -func (v NullableCurrentSubscriptionStateResponse) Get() *CurrentSubscriptionStateResponse { - return v.value -} - -func (v *NullableCurrentSubscriptionStateResponse) Set(val *CurrentSubscriptionStateResponse) { - v.value = val - v.isSet = true -} - -func (v NullableCurrentSubscriptionStateResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableCurrentSubscriptionStateResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCurrentSubscriptionStateResponse(val *CurrentSubscriptionStateResponse) *NullableCurrentSubscriptionStateResponse { - return &NullableCurrentSubscriptionStateResponse{value: val, isSet: true} -} - -func (v NullableCurrentSubscriptionStateResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCurrentSubscriptionStateResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_delivery_method.go b/services/stackitmarketplace/model_delivery_method.go new file mode 100644 index 000000000..ee72f2bd2 --- /dev/null +++ b/services/stackitmarketplace/model_delivery_method.go @@ -0,0 +1,119 @@ +/* +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" +) + +// DeliveryMethod The product delivery method/type. For reference: SAAS - Software as a Service, SAI - STACKIT Application Image +type DeliveryMethod string + +// List of deliveryMethod +const ( + DELIVERYMETHOD_SAAS DeliveryMethod = "SAAS" + DELIVERYMETHOD_KUBERNETES DeliveryMethod = "KUBERNETES" + DELIVERYMETHOD_SAI DeliveryMethod = "SAI" + DELIVERYMETHOD_PROFESSIONAL_SERVICE DeliveryMethod = "PROFESSIONAL_SERVICE" +) + +// All allowed values of DeliveryMethod enum +var AllowedDeliveryMethodEnumValues = []DeliveryMethod{ + "SAAS", + "KUBERNETES", + "SAI", + "PROFESSIONAL_SERVICE", +} + +func (v *DeliveryMethod) 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 := DeliveryMethod(value) + for _, existing := range AllowedDeliveryMethodEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid DeliveryMethod", value) +} + +// NewDeliveryMethodFromValue returns a pointer to a valid DeliveryMethod +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewDeliveryMethodFromValue(v string) (*DeliveryMethod, error) { + ev := DeliveryMethod(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for DeliveryMethod: valid values are %v", v, AllowedDeliveryMethodEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v DeliveryMethod) IsValid() bool { + for _, existing := range AllowedDeliveryMethodEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to deliveryMethod value +func (v DeliveryMethod) Ptr() *DeliveryMethod { + return &v +} + +type NullableDeliveryMethod struct { + value *DeliveryMethod + isSet bool +} + +func (v NullableDeliveryMethod) Get() *DeliveryMethod { + return v.value +} + +func (v *NullableDeliveryMethod) Set(val *DeliveryMethod) { + v.value = val + v.isSet = true +} + +func (v NullableDeliveryMethod) IsSet() bool { + return v.isSet +} + +func (v *NullableDeliveryMethod) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeliveryMethod(val *DeliveryMethod) *NullableDeliveryMethod { + return &NullableDeliveryMethod{value: val, isSet: true} +} + +func (v NullableDeliveryMethod) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeliveryMethod) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/model_inquiry_become_vendor.go b/services/stackitmarketplace/model_inquiry_become_vendor.go new file mode 100644 index 000000000..e23420f07 --- /dev/null +++ b/services/stackitmarketplace/model_inquiry_become_vendor.go @@ -0,0 +1,172 @@ +/* +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 InquiryBecomeVendor type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InquiryBecomeVendor{} + +/* + types and functions for contactEmail +*/ + +// isNotNullableString +type InquiryBecomeVendorGetContactEmailAttributeType = *string + +func getInquiryBecomeVendorGetContactEmailAttributeTypeOk(arg InquiryBecomeVendorGetContactEmailAttributeType) (ret InquiryBecomeVendorGetContactEmailRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquiryBecomeVendorGetContactEmailAttributeType(arg *InquiryBecomeVendorGetContactEmailAttributeType, val InquiryBecomeVendorGetContactEmailRetType) { + *arg = &val +} + +type InquiryBecomeVendorGetContactEmailArgType = string +type InquiryBecomeVendorGetContactEmailRetType = string + +/* + types and functions for message +*/ + +// isNotNullableString +type InquiryBecomeVendorGetMessageAttributeType = *string + +func getInquiryBecomeVendorGetMessageAttributeTypeOk(arg InquiryBecomeVendorGetMessageAttributeType) (ret InquiryBecomeVendorGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquiryBecomeVendorGetMessageAttributeType(arg *InquiryBecomeVendorGetMessageAttributeType, val InquiryBecomeVendorGetMessageRetType) { + *arg = &val +} + +type InquiryBecomeVendorGetMessageArgType = string +type InquiryBecomeVendorGetMessageRetType = string + +// InquiryBecomeVendor Become a vendor. +type InquiryBecomeVendor struct { + // A e-mail address. + // REQUIRED + ContactEmail InquiryBecomeVendorGetContactEmailAttributeType `json:"contactEmail"` + // A custom message. + // REQUIRED + Message InquiryBecomeVendorGetMessageAttributeType `json:"message"` +} + +type _InquiryBecomeVendor InquiryBecomeVendor + +// NewInquiryBecomeVendor instantiates a new InquiryBecomeVendor 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 NewInquiryBecomeVendor(contactEmail InquiryBecomeVendorGetContactEmailArgType, message InquiryBecomeVendorGetMessageArgType) *InquiryBecomeVendor { + this := InquiryBecomeVendor{} + setInquiryBecomeVendorGetContactEmailAttributeType(&this.ContactEmail, contactEmail) + setInquiryBecomeVendorGetMessageAttributeType(&this.Message, message) + return &this +} + +// NewInquiryBecomeVendorWithDefaults instantiates a new InquiryBecomeVendor 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 NewInquiryBecomeVendorWithDefaults() *InquiryBecomeVendor { + this := InquiryBecomeVendor{} + return &this +} + +// GetContactEmail returns the ContactEmail field value +func (o *InquiryBecomeVendor) GetContactEmail() (ret InquiryBecomeVendorGetContactEmailRetType) { + ret, _ = o.GetContactEmailOk() + return ret +} + +// GetContactEmailOk returns a tuple with the ContactEmail field value +// and a boolean to check if the value has been set. +func (o *InquiryBecomeVendor) GetContactEmailOk() (ret InquiryBecomeVendorGetContactEmailRetType, ok bool) { + return getInquiryBecomeVendorGetContactEmailAttributeTypeOk(o.ContactEmail) +} + +// SetContactEmail sets field value +func (o *InquiryBecomeVendor) SetContactEmail(v InquiryBecomeVendorGetContactEmailRetType) { + setInquiryBecomeVendorGetContactEmailAttributeType(&o.ContactEmail, v) +} + +// GetMessage returns the Message field value +func (o *InquiryBecomeVendor) GetMessage() (ret InquiryBecomeVendorGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *InquiryBecomeVendor) GetMessageOk() (ret InquiryBecomeVendorGetMessageRetType, ok bool) { + return getInquiryBecomeVendorGetMessageAttributeTypeOk(o.Message) +} + +// SetMessage sets field value +func (o *InquiryBecomeVendor) SetMessage(v InquiryBecomeVendorGetMessageRetType) { + setInquiryBecomeVendorGetMessageAttributeType(&o.Message, v) +} + +func (o InquiryBecomeVendor) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getInquiryBecomeVendorGetContactEmailAttributeTypeOk(o.ContactEmail); ok { + toSerialize["ContactEmail"] = val + } + if val, ok := getInquiryBecomeVendorGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + return toSerialize, nil +} + +type NullableInquiryBecomeVendor struct { + value *InquiryBecomeVendor + isSet bool +} + +func (v NullableInquiryBecomeVendor) Get() *InquiryBecomeVendor { + return v.value +} + +func (v *NullableInquiryBecomeVendor) Set(val *InquiryBecomeVendor) { + v.value = val + v.isSet = true +} + +func (v NullableInquiryBecomeVendor) IsSet() bool { + return v.isSet +} + +func (v *NullableInquiryBecomeVendor) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInquiryBecomeVendor(val *InquiryBecomeVendor) *NullableInquiryBecomeVendor { + return &NullableInquiryBecomeVendor{value: val, isSet: true} +} + +func (v NullableInquiryBecomeVendor) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInquiryBecomeVendor) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/model_inquiry_contact_sales.go b/services/stackitmarketplace/model_inquiry_contact_sales.go new file mode 100644 index 000000000..8ce37bd66 --- /dev/null +++ b/services/stackitmarketplace/model_inquiry_contact_sales.go @@ -0,0 +1,305 @@ +/* +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 InquiryContactSales type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InquiryContactSales{} + +/* + types and functions for companyName +*/ + +// isNotNullableString +type InquiryContactSalesGetCompanyNameAttributeType = *string + +func getInquiryContactSalesGetCompanyNameAttributeTypeOk(arg InquiryContactSalesGetCompanyNameAttributeType) (ret InquiryContactSalesGetCompanyNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquiryContactSalesGetCompanyNameAttributeType(arg *InquiryContactSalesGetCompanyNameAttributeType, val InquiryContactSalesGetCompanyNameRetType) { + *arg = &val +} + +type InquiryContactSalesGetCompanyNameArgType = string +type InquiryContactSalesGetCompanyNameRetType = string + +/* + types and functions for contactEmail +*/ + +// isNotNullableString +type InquiryContactSalesGetContactEmailAttributeType = *string + +func getInquiryContactSalesGetContactEmailAttributeTypeOk(arg InquiryContactSalesGetContactEmailAttributeType) (ret InquiryContactSalesGetContactEmailRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquiryContactSalesGetContactEmailAttributeType(arg *InquiryContactSalesGetContactEmailAttributeType, val InquiryContactSalesGetContactEmailRetType) { + *arg = &val +} + +type InquiryContactSalesGetContactEmailArgType = string +type InquiryContactSalesGetContactEmailRetType = string + +/* + types and functions for fullName +*/ + +// isNotNullableString +type InquiryContactSalesGetFullNameAttributeType = *string + +func getInquiryContactSalesGetFullNameAttributeTypeOk(arg InquiryContactSalesGetFullNameAttributeType) (ret InquiryContactSalesGetFullNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquiryContactSalesGetFullNameAttributeType(arg *InquiryContactSalesGetFullNameAttributeType, val InquiryContactSalesGetFullNameRetType) { + *arg = &val +} + +type InquiryContactSalesGetFullNameArgType = string +type InquiryContactSalesGetFullNameRetType = string + +/* + types and functions for message +*/ + +// isNotNullableString +type InquiryContactSalesGetMessageAttributeType = *string + +func getInquiryContactSalesGetMessageAttributeTypeOk(arg InquiryContactSalesGetMessageAttributeType) (ret InquiryContactSalesGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquiryContactSalesGetMessageAttributeType(arg *InquiryContactSalesGetMessageAttributeType, val InquiryContactSalesGetMessageRetType) { + *arg = &val +} + +type InquiryContactSalesGetMessageArgType = string +type InquiryContactSalesGetMessageRetType = string + +/* + types and functions for productId +*/ + +// isModel +type InquiryContactSalesGetProductIdAttributeType = *ProductId +type InquiryContactSalesGetProductIdArgType = ProductId +type InquiryContactSalesGetProductIdRetType = ProductId + +func getInquiryContactSalesGetProductIdAttributeTypeOk(arg InquiryContactSalesGetProductIdAttributeType) (ret InquiryContactSalesGetProductIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquiryContactSalesGetProductIdAttributeType(arg *InquiryContactSalesGetProductIdAttributeType, val InquiryContactSalesGetProductIdRetType) { + *arg = &val +} + +// InquiryContactSales Contact sales. +type InquiryContactSales struct { + // The product's vendor name. + // REQUIRED + CompanyName InquiryContactSalesGetCompanyNameAttributeType `json:"companyName"` + // A e-mail address. + // REQUIRED + ContactEmail InquiryContactSalesGetContactEmailAttributeType `json:"contactEmail"` + // The full name of the contact person. + // REQUIRED + FullName InquiryContactSalesGetFullNameAttributeType `json:"fullName"` + // A custom message. + // REQUIRED + Message InquiryContactSalesGetMessageAttributeType `json:"message"` + // REQUIRED + ProductId InquiryContactSalesGetProductIdAttributeType `json:"productId"` +} + +type _InquiryContactSales InquiryContactSales + +// NewInquiryContactSales instantiates a new InquiryContactSales 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 NewInquiryContactSales(companyName InquiryContactSalesGetCompanyNameArgType, contactEmail InquiryContactSalesGetContactEmailArgType, fullName InquiryContactSalesGetFullNameArgType, message InquiryContactSalesGetMessageArgType, productId InquiryContactSalesGetProductIdArgType) *InquiryContactSales { + this := InquiryContactSales{} + setInquiryContactSalesGetCompanyNameAttributeType(&this.CompanyName, companyName) + setInquiryContactSalesGetContactEmailAttributeType(&this.ContactEmail, contactEmail) + setInquiryContactSalesGetFullNameAttributeType(&this.FullName, fullName) + setInquiryContactSalesGetMessageAttributeType(&this.Message, message) + setInquiryContactSalesGetProductIdAttributeType(&this.ProductId, productId) + return &this +} + +// NewInquiryContactSalesWithDefaults instantiates a new InquiryContactSales 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 NewInquiryContactSalesWithDefaults() *InquiryContactSales { + this := InquiryContactSales{} + return &this +} + +// GetCompanyName returns the CompanyName field value +func (o *InquiryContactSales) GetCompanyName() (ret InquiryContactSalesGetCompanyNameRetType) { + ret, _ = o.GetCompanyNameOk() + return ret +} + +// GetCompanyNameOk returns a tuple with the CompanyName field value +// and a boolean to check if the value has been set. +func (o *InquiryContactSales) GetCompanyNameOk() (ret InquiryContactSalesGetCompanyNameRetType, ok bool) { + return getInquiryContactSalesGetCompanyNameAttributeTypeOk(o.CompanyName) +} + +// SetCompanyName sets field value +func (o *InquiryContactSales) SetCompanyName(v InquiryContactSalesGetCompanyNameRetType) { + setInquiryContactSalesGetCompanyNameAttributeType(&o.CompanyName, v) +} + +// GetContactEmail returns the ContactEmail field value +func (o *InquiryContactSales) GetContactEmail() (ret InquiryContactSalesGetContactEmailRetType) { + ret, _ = o.GetContactEmailOk() + return ret +} + +// GetContactEmailOk returns a tuple with the ContactEmail field value +// and a boolean to check if the value has been set. +func (o *InquiryContactSales) GetContactEmailOk() (ret InquiryContactSalesGetContactEmailRetType, ok bool) { + return getInquiryContactSalesGetContactEmailAttributeTypeOk(o.ContactEmail) +} + +// SetContactEmail sets field value +func (o *InquiryContactSales) SetContactEmail(v InquiryContactSalesGetContactEmailRetType) { + setInquiryContactSalesGetContactEmailAttributeType(&o.ContactEmail, v) +} + +// GetFullName returns the FullName field value +func (o *InquiryContactSales) GetFullName() (ret InquiryContactSalesGetFullNameRetType) { + ret, _ = o.GetFullNameOk() + return ret +} + +// GetFullNameOk returns a tuple with the FullName field value +// and a boolean to check if the value has been set. +func (o *InquiryContactSales) GetFullNameOk() (ret InquiryContactSalesGetFullNameRetType, ok bool) { + return getInquiryContactSalesGetFullNameAttributeTypeOk(o.FullName) +} + +// SetFullName sets field value +func (o *InquiryContactSales) SetFullName(v InquiryContactSalesGetFullNameRetType) { + setInquiryContactSalesGetFullNameAttributeType(&o.FullName, v) +} + +// GetMessage returns the Message field value +func (o *InquiryContactSales) GetMessage() (ret InquiryContactSalesGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *InquiryContactSales) GetMessageOk() (ret InquiryContactSalesGetMessageRetType, ok bool) { + return getInquiryContactSalesGetMessageAttributeTypeOk(o.Message) +} + +// SetMessage sets field value +func (o *InquiryContactSales) SetMessage(v InquiryContactSalesGetMessageRetType) { + setInquiryContactSalesGetMessageAttributeType(&o.Message, v) +} + +// GetProductId returns the ProductId field value +func (o *InquiryContactSales) GetProductId() (ret InquiryContactSalesGetProductIdRetType) { + ret, _ = o.GetProductIdOk() + return ret +} + +// GetProductIdOk returns a tuple with the ProductId field value +// and a boolean to check if the value has been set. +func (o *InquiryContactSales) GetProductIdOk() (ret InquiryContactSalesGetProductIdRetType, ok bool) { + return getInquiryContactSalesGetProductIdAttributeTypeOk(o.ProductId) +} + +// SetProductId sets field value +func (o *InquiryContactSales) SetProductId(v InquiryContactSalesGetProductIdRetType) { + setInquiryContactSalesGetProductIdAttributeType(&o.ProductId, v) +} + +func (o InquiryContactSales) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getInquiryContactSalesGetCompanyNameAttributeTypeOk(o.CompanyName); ok { + toSerialize["CompanyName"] = val + } + if val, ok := getInquiryContactSalesGetContactEmailAttributeTypeOk(o.ContactEmail); ok { + toSerialize["ContactEmail"] = val + } + if val, ok := getInquiryContactSalesGetFullNameAttributeTypeOk(o.FullName); ok { + toSerialize["FullName"] = val + } + if val, ok := getInquiryContactSalesGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + if val, ok := getInquiryContactSalesGetProductIdAttributeTypeOk(o.ProductId); ok { + toSerialize["ProductId"] = val + } + return toSerialize, nil +} + +type NullableInquiryContactSales struct { + value *InquiryContactSales + isSet bool +} + +func (v NullableInquiryContactSales) Get() *InquiryContactSales { + return v.value +} + +func (v *NullableInquiryContactSales) Set(val *InquiryContactSales) { + v.value = val + v.isSet = true +} + +func (v NullableInquiryContactSales) IsSet() bool { + return v.isSet +} + +func (v *NullableInquiryContactSales) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInquiryContactSales(val *InquiryContactSales) *NullableInquiryContactSales { + return &NullableInquiryContactSales{value: val, isSet: true} +} + +func (v NullableInquiryContactSales) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInquiryContactSales) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/model_inquiry_form_type.go b/services/stackitmarketplace/model_inquiry_form_type.go new file mode 100644 index 000000000..91c3564dd --- /dev/null +++ b/services/stackitmarketplace/model_inquiry_form_type.go @@ -0,0 +1,119 @@ +/* +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" +) + +// InquiryFormType The form type. +type InquiryFormType string + +// List of inquiryFormType +const ( + INQUIRYFORMTYPE_SUGGEST_PRODUCT InquiryFormType = "suggestProduct" + INQUIRYFORMTYPE_CONTACT_SALES InquiryFormType = "contactSales" + INQUIRYFORMTYPE_BECOME_VENDOR InquiryFormType = "becomeVendor" + INQUIRYFORMTYPE_REGISTER_TESTING InquiryFormType = "registerTesting" +) + +// All allowed values of InquiryFormType enum +var AllowedInquiryFormTypeEnumValues = []InquiryFormType{ + "suggestProduct", + "contactSales", + "becomeVendor", + "registerTesting", +} + +func (v *InquiryFormType) 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 := InquiryFormType(value) + for _, existing := range AllowedInquiryFormTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid InquiryFormType", value) +} + +// NewInquiryFormTypeFromValue returns a pointer to a valid InquiryFormType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewInquiryFormTypeFromValue(v string) (*InquiryFormType, error) { + ev := InquiryFormType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for InquiryFormType: valid values are %v", v, AllowedInquiryFormTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v InquiryFormType) IsValid() bool { + for _, existing := range AllowedInquiryFormTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to inquiryFormType value +func (v InquiryFormType) Ptr() *InquiryFormType { + return &v +} + +type NullableInquiryFormType struct { + value *InquiryFormType + isSet bool +} + +func (v NullableInquiryFormType) Get() *InquiryFormType { + return v.value +} + +func (v *NullableInquiryFormType) Set(val *InquiryFormType) { + v.value = val + v.isSet = true +} + +func (v NullableInquiryFormType) IsSet() bool { + return v.isSet +} + +func (v *NullableInquiryFormType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInquiryFormType(val *InquiryFormType) *NullableInquiryFormType { + return &NullableInquiryFormType{value: val, isSet: true} +} + +func (v NullableInquiryFormType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInquiryFormType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/model_inquiry_register_testing.go b/services/stackitmarketplace/model_inquiry_register_testing.go new file mode 100644 index 000000000..ba4b0204d --- /dev/null +++ b/services/stackitmarketplace/model_inquiry_register_testing.go @@ -0,0 +1,217 @@ +/* +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 InquiryRegisterTesting type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InquiryRegisterTesting{} + +/* + types and functions for contactEmail +*/ + +// isNotNullableString +type InquiryRegisterTestingGetContactEmailAttributeType = *string + +func getInquiryRegisterTestingGetContactEmailAttributeTypeOk(arg InquiryRegisterTestingGetContactEmailAttributeType) (ret InquiryRegisterTestingGetContactEmailRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquiryRegisterTestingGetContactEmailAttributeType(arg *InquiryRegisterTestingGetContactEmailAttributeType, val InquiryRegisterTestingGetContactEmailRetType) { + *arg = &val +} + +type InquiryRegisterTestingGetContactEmailArgType = string +type InquiryRegisterTestingGetContactEmailRetType = string + +/* + types and functions for fullName +*/ + +// isNotNullableString +type InquiryRegisterTestingGetFullNameAttributeType = *string + +func getInquiryRegisterTestingGetFullNameAttributeTypeOk(arg InquiryRegisterTestingGetFullNameAttributeType) (ret InquiryRegisterTestingGetFullNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquiryRegisterTestingGetFullNameAttributeType(arg *InquiryRegisterTestingGetFullNameAttributeType, val InquiryRegisterTestingGetFullNameRetType) { + *arg = &val +} + +type InquiryRegisterTestingGetFullNameArgType = string +type InquiryRegisterTestingGetFullNameRetType = string + +/* + types and functions for message +*/ + +// isNotNullableString +type InquiryRegisterTestingGetMessageAttributeType = *string + +func getInquiryRegisterTestingGetMessageAttributeTypeOk(arg InquiryRegisterTestingGetMessageAttributeType) (ret InquiryRegisterTestingGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquiryRegisterTestingGetMessageAttributeType(arg *InquiryRegisterTestingGetMessageAttributeType, val InquiryRegisterTestingGetMessageRetType) { + *arg = &val +} + +type InquiryRegisterTestingGetMessageArgType = string +type InquiryRegisterTestingGetMessageRetType = string + +// InquiryRegisterTesting Register for testing. +type InquiryRegisterTesting struct { + // A e-mail address. + // REQUIRED + ContactEmail InquiryRegisterTestingGetContactEmailAttributeType `json:"contactEmail"` + // The full name of the contact person. + // REQUIRED + FullName InquiryRegisterTestingGetFullNameAttributeType `json:"fullName"` + // A custom message. + // REQUIRED + Message InquiryRegisterTestingGetMessageAttributeType `json:"message"` +} + +type _InquiryRegisterTesting InquiryRegisterTesting + +// NewInquiryRegisterTesting instantiates a new InquiryRegisterTesting 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 NewInquiryRegisterTesting(contactEmail InquiryRegisterTestingGetContactEmailArgType, fullName InquiryRegisterTestingGetFullNameArgType, message InquiryRegisterTestingGetMessageArgType) *InquiryRegisterTesting { + this := InquiryRegisterTesting{} + setInquiryRegisterTestingGetContactEmailAttributeType(&this.ContactEmail, contactEmail) + setInquiryRegisterTestingGetFullNameAttributeType(&this.FullName, fullName) + setInquiryRegisterTestingGetMessageAttributeType(&this.Message, message) + return &this +} + +// NewInquiryRegisterTestingWithDefaults instantiates a new InquiryRegisterTesting 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 NewInquiryRegisterTestingWithDefaults() *InquiryRegisterTesting { + this := InquiryRegisterTesting{} + return &this +} + +// GetContactEmail returns the ContactEmail field value +func (o *InquiryRegisterTesting) GetContactEmail() (ret InquiryRegisterTestingGetContactEmailRetType) { + ret, _ = o.GetContactEmailOk() + return ret +} + +// GetContactEmailOk returns a tuple with the ContactEmail field value +// and a boolean to check if the value has been set. +func (o *InquiryRegisterTesting) GetContactEmailOk() (ret InquiryRegisterTestingGetContactEmailRetType, ok bool) { + return getInquiryRegisterTestingGetContactEmailAttributeTypeOk(o.ContactEmail) +} + +// SetContactEmail sets field value +func (o *InquiryRegisterTesting) SetContactEmail(v InquiryRegisterTestingGetContactEmailRetType) { + setInquiryRegisterTestingGetContactEmailAttributeType(&o.ContactEmail, v) +} + +// GetFullName returns the FullName field value +func (o *InquiryRegisterTesting) GetFullName() (ret InquiryRegisterTestingGetFullNameRetType) { + ret, _ = o.GetFullNameOk() + return ret +} + +// GetFullNameOk returns a tuple with the FullName field value +// and a boolean to check if the value has been set. +func (o *InquiryRegisterTesting) GetFullNameOk() (ret InquiryRegisterTestingGetFullNameRetType, ok bool) { + return getInquiryRegisterTestingGetFullNameAttributeTypeOk(o.FullName) +} + +// SetFullName sets field value +func (o *InquiryRegisterTesting) SetFullName(v InquiryRegisterTestingGetFullNameRetType) { + setInquiryRegisterTestingGetFullNameAttributeType(&o.FullName, v) +} + +// GetMessage returns the Message field value +func (o *InquiryRegisterTesting) GetMessage() (ret InquiryRegisterTestingGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *InquiryRegisterTesting) GetMessageOk() (ret InquiryRegisterTestingGetMessageRetType, ok bool) { + return getInquiryRegisterTestingGetMessageAttributeTypeOk(o.Message) +} + +// SetMessage sets field value +func (o *InquiryRegisterTesting) SetMessage(v InquiryRegisterTestingGetMessageRetType) { + setInquiryRegisterTestingGetMessageAttributeType(&o.Message, v) +} + +func (o InquiryRegisterTesting) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getInquiryRegisterTestingGetContactEmailAttributeTypeOk(o.ContactEmail); ok { + toSerialize["ContactEmail"] = val + } + if val, ok := getInquiryRegisterTestingGetFullNameAttributeTypeOk(o.FullName); ok { + toSerialize["FullName"] = val + } + if val, ok := getInquiryRegisterTestingGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + return toSerialize, nil +} + +type NullableInquiryRegisterTesting struct { + value *InquiryRegisterTesting + isSet bool +} + +func (v NullableInquiryRegisterTesting) Get() *InquiryRegisterTesting { + return v.value +} + +func (v *NullableInquiryRegisterTesting) Set(val *InquiryRegisterTesting) { + v.value = val + v.isSet = true +} + +func (v NullableInquiryRegisterTesting) IsSet() bool { + return v.isSet +} + +func (v *NullableInquiryRegisterTesting) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInquiryRegisterTesting(val *InquiryRegisterTesting) *NullableInquiryRegisterTesting { + return &NullableInquiryRegisterTesting{value: val, isSet: true} +} + +func (v NullableInquiryRegisterTesting) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInquiryRegisterTesting) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/model_inquiry_suggest_product.go b/services/stackitmarketplace/model_inquiry_suggest_product.go new file mode 100644 index 000000000..21f74fcc3 --- /dev/null +++ b/services/stackitmarketplace/model_inquiry_suggest_product.go @@ -0,0 +1,266 @@ +/* +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 InquirySuggestProduct type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InquirySuggestProduct{} + +/* + types and functions for companyName +*/ + +// isNotNullableString +type InquirySuggestProductGetCompanyNameAttributeType = *string + +func getInquirySuggestProductGetCompanyNameAttributeTypeOk(arg InquirySuggestProductGetCompanyNameAttributeType) (ret InquirySuggestProductGetCompanyNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquirySuggestProductGetCompanyNameAttributeType(arg *InquirySuggestProductGetCompanyNameAttributeType, val InquirySuggestProductGetCompanyNameRetType) { + *arg = &val +} + +type InquirySuggestProductGetCompanyNameArgType = string +type InquirySuggestProductGetCompanyNameRetType = string + +/* + types and functions for message +*/ + +// isNotNullableString +type InquirySuggestProductGetMessageAttributeType = *string + +func getInquirySuggestProductGetMessageAttributeTypeOk(arg InquirySuggestProductGetMessageAttributeType) (ret InquirySuggestProductGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquirySuggestProductGetMessageAttributeType(arg *InquirySuggestProductGetMessageAttributeType, val InquirySuggestProductGetMessageRetType) { + *arg = &val +} + +type InquirySuggestProductGetMessageArgType = string +type InquirySuggestProductGetMessageRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type InquirySuggestProductGetNameAttributeType = *string + +func getInquirySuggestProductGetNameAttributeTypeOk(arg InquirySuggestProductGetNameAttributeType) (ret InquirySuggestProductGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquirySuggestProductGetNameAttributeType(arg *InquirySuggestProductGetNameAttributeType, val InquirySuggestProductGetNameRetType) { + *arg = &val +} + +type InquirySuggestProductGetNameArgType = string +type InquirySuggestProductGetNameRetType = string + +/* + types and functions for url +*/ + +// isNotNullableString +type InquirySuggestProductGetUrlAttributeType = *string + +func getInquirySuggestProductGetUrlAttributeTypeOk(arg InquirySuggestProductGetUrlAttributeType) (ret InquirySuggestProductGetUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquirySuggestProductGetUrlAttributeType(arg *InquirySuggestProductGetUrlAttributeType, val InquirySuggestProductGetUrlRetType) { + *arg = &val +} + +type InquirySuggestProductGetUrlArgType = string +type InquirySuggestProductGetUrlRetType = string + +// InquirySuggestProduct Suggest a product. +type InquirySuggestProduct struct { + // The product's vendor name. + // REQUIRED + CompanyName InquirySuggestProductGetCompanyNameAttributeType `json:"companyName"` + // A custom message. + Message InquirySuggestProductGetMessageAttributeType `json:"message,omitempty"` + // The name of the product. + // REQUIRED + Name InquirySuggestProductGetNameAttributeType `json:"name"` + // Uniform Resource Locator. + // REQUIRED + Url InquirySuggestProductGetUrlAttributeType `json:"url"` +} + +type _InquirySuggestProduct InquirySuggestProduct + +// NewInquirySuggestProduct instantiates a new InquirySuggestProduct 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 NewInquirySuggestProduct(companyName InquirySuggestProductGetCompanyNameArgType, name InquirySuggestProductGetNameArgType, url InquirySuggestProductGetUrlArgType) *InquirySuggestProduct { + this := InquirySuggestProduct{} + setInquirySuggestProductGetCompanyNameAttributeType(&this.CompanyName, companyName) + setInquirySuggestProductGetNameAttributeType(&this.Name, name) + setInquirySuggestProductGetUrlAttributeType(&this.Url, url) + return &this +} + +// NewInquirySuggestProductWithDefaults instantiates a new InquirySuggestProduct 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 NewInquirySuggestProductWithDefaults() *InquirySuggestProduct { + this := InquirySuggestProduct{} + return &this +} + +// GetCompanyName returns the CompanyName field value +func (o *InquirySuggestProduct) GetCompanyName() (ret InquirySuggestProductGetCompanyNameRetType) { + ret, _ = o.GetCompanyNameOk() + return ret +} + +// GetCompanyNameOk returns a tuple with the CompanyName field value +// and a boolean to check if the value has been set. +func (o *InquirySuggestProduct) GetCompanyNameOk() (ret InquirySuggestProductGetCompanyNameRetType, ok bool) { + return getInquirySuggestProductGetCompanyNameAttributeTypeOk(o.CompanyName) +} + +// SetCompanyName sets field value +func (o *InquirySuggestProduct) SetCompanyName(v InquirySuggestProductGetCompanyNameRetType) { + setInquirySuggestProductGetCompanyNameAttributeType(&o.CompanyName, v) +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *InquirySuggestProduct) GetMessage() (res InquirySuggestProductGetMessageRetType) { + 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 *InquirySuggestProduct) GetMessageOk() (ret InquirySuggestProductGetMessageRetType, ok bool) { + return getInquirySuggestProductGetMessageAttributeTypeOk(o.Message) +} + +// HasMessage returns a boolean if a field has been set. +func (o *InquirySuggestProduct) HasMessage() bool { + _, ok := o.GetMessageOk() + return ok +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *InquirySuggestProduct) SetMessage(v InquirySuggestProductGetMessageRetType) { + setInquirySuggestProductGetMessageAttributeType(&o.Message, v) +} + +// GetName returns the Name field value +func (o *InquirySuggestProduct) GetName() (ret InquirySuggestProductGetNameRetType) { + 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. +func (o *InquirySuggestProduct) GetNameOk() (ret InquirySuggestProductGetNameRetType, ok bool) { + return getInquirySuggestProductGetNameAttributeTypeOk(o.Name) +} + +// SetName sets field value +func (o *InquirySuggestProduct) SetName(v InquirySuggestProductGetNameRetType) { + setInquirySuggestProductGetNameAttributeType(&o.Name, v) +} + +// GetUrl returns the Url field value +func (o *InquirySuggestProduct) GetUrl() (ret InquirySuggestProductGetUrlRetType) { + ret, _ = o.GetUrlOk() + return ret +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *InquirySuggestProduct) GetUrlOk() (ret InquirySuggestProductGetUrlRetType, ok bool) { + return getInquirySuggestProductGetUrlAttributeTypeOk(o.Url) +} + +// SetUrl sets field value +func (o *InquirySuggestProduct) SetUrl(v InquirySuggestProductGetUrlRetType) { + setInquirySuggestProductGetUrlAttributeType(&o.Url, v) +} + +func (o InquirySuggestProduct) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getInquirySuggestProductGetCompanyNameAttributeTypeOk(o.CompanyName); ok { + toSerialize["CompanyName"] = val + } + if val, ok := getInquirySuggestProductGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + if val, ok := getInquirySuggestProductGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getInquirySuggestProductGetUrlAttributeTypeOk(o.Url); ok { + toSerialize["Url"] = val + } + return toSerialize, nil +} + +type NullableInquirySuggestProduct struct { + value *InquirySuggestProduct + isSet bool +} + +func (v NullableInquirySuggestProduct) Get() *InquirySuggestProduct { + return v.value +} + +func (v *NullableInquirySuggestProduct) Set(val *InquirySuggestProduct) { + v.value = val + v.isSet = true +} + +func (v NullableInquirySuggestProduct) IsSet() bool { + return v.isSet +} + +func (v *NullableInquirySuggestProduct) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInquirySuggestProduct(val *InquirySuggestProduct) *NullableInquirySuggestProduct { + return &NullableInquirySuggestProduct{value: val, isSet: true} +} + +func (v NullableInquirySuggestProduct) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInquirySuggestProduct) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/model_list_catalog_products_response.go b/services/stackitmarketplace/model_list_catalog_products_response.go index 2affa5312..af447ca23 100644 --- a/services/stackitmarketplace/model_list_catalog_products_response.go +++ b/services/stackitmarketplace/model_list_catalog_products_response.go @@ -62,10 +62,10 @@ func setListCatalogProductsResponseGetItemsAttributeType(arg *ListCatalogProduct types and functions for limit */ -// isInteger -type ListCatalogProductsResponseGetLimitAttributeType = *int64 -type ListCatalogProductsResponseGetLimitArgType = int64 -type ListCatalogProductsResponseGetLimitRetType = int64 +// isNumber +type ListCatalogProductsResponseGetLimitAttributeType = *float64 +type ListCatalogProductsResponseGetLimitArgType = float64 +type ListCatalogProductsResponseGetLimitRetType = float64 func getListCatalogProductsResponseGetLimitAttributeTypeOk(arg ListCatalogProductsResponseGetLimitAttributeType) (ret ListCatalogProductsResponseGetLimitRetType, ok bool) { if arg == nil { @@ -80,13 +80,12 @@ func setListCatalogProductsResponseGetLimitAttributeType(arg *ListCatalogProduct // ListCatalogProductsResponse struct for ListCatalogProductsResponse type ListCatalogProductsResponse struct { - // A pagination cursor that represents a position in the dataset. Use it in subsequent requests to continue retrieving data from this position. If `null`, there are no more results to retrieve. + // A pagination cursor that represents a position in the dataset. If given, results will be returned from the item after the cursor. If not given, results will be returned from the beginning. // REQUIRED Cursor ListCatalogProductsResponseGetCursorAttributeType `json:"cursor"` // REQUIRED Items ListCatalogProductsResponseGetItemsAttributeType `json:"items"` - // The maximum number of items to return in the response. If not present, an appropriate default will be used. If maximum is exceeded, maximum is used. - // Can be cast to int32 without loss of precision. + // Limit for returned Objects. // REQUIRED Limit ListCatalogProductsResponseGetLimitAttributeType `json:"limit"` } @@ -110,7 +109,7 @@ func NewListCatalogProductsResponse(cursor ListCatalogProductsResponseGetCursorA // but it doesn't guarantee that properties required by API are set func NewListCatalogProductsResponseWithDefaults() *ListCatalogProductsResponse { this := ListCatalogProductsResponse{} - var limit int64 = 50 + var limit float64 = 50 this.Limit = &limit return &this } diff --git a/services/stackitmarketplace/model_list_vendor_subscriptions_response.go b/services/stackitmarketplace/model_list_vendor_subscriptions_response.go index 3df1bbe56..3c112cfcc 100644 --- a/services/stackitmarketplace/model_list_vendor_subscriptions_response.go +++ b/services/stackitmarketplace/model_list_vendor_subscriptions_response.go @@ -62,10 +62,10 @@ func setListVendorSubscriptionsResponseGetItemsAttributeType(arg *ListVendorSubs types and functions for limit */ -// isInteger -type ListVendorSubscriptionsResponseGetLimitAttributeType = *int64 -type ListVendorSubscriptionsResponseGetLimitArgType = int64 -type ListVendorSubscriptionsResponseGetLimitRetType = int64 +// isNumber +type ListVendorSubscriptionsResponseGetLimitAttributeType = *float64 +type ListVendorSubscriptionsResponseGetLimitArgType = float64 +type ListVendorSubscriptionsResponseGetLimitRetType = float64 func getListVendorSubscriptionsResponseGetLimitAttributeTypeOk(arg ListVendorSubscriptionsResponseGetLimitAttributeType) (ret ListVendorSubscriptionsResponseGetLimitRetType, ok bool) { if arg == nil { @@ -80,14 +80,13 @@ func setListVendorSubscriptionsResponseGetLimitAttributeType(arg *ListVendorSubs // ListVendorSubscriptionsResponse struct for ListVendorSubscriptionsResponse type ListVendorSubscriptionsResponse struct { - // A pagination cursor that represents a position in the dataset. Use it in subsequent requests to continue retrieving data from this position. If `null`, there are no more results to retrieve. + // A pagination cursor that represents a position in the dataset. If given, results will be returned from the item after the cursor. If not given, results will be returned from the beginning. // REQUIRED Cursor ListVendorSubscriptionsResponseGetCursorAttributeType `json:"cursor"` // List of subscriptions. // REQUIRED Items ListVendorSubscriptionsResponseGetItemsAttributeType `json:"items"` - // Number of subscriptions returned for a single request. - // Can be cast to int32 without loss of precision. + // Limit for returned Objects. // REQUIRED Limit ListVendorSubscriptionsResponseGetLimitAttributeType `json:"limit"` } @@ -111,7 +110,7 @@ func NewListVendorSubscriptionsResponse(cursor ListVendorSubscriptionsResponseGe // but it doesn't guarantee that properties required by API are set func NewListVendorSubscriptionsResponseWithDefaults() *ListVendorSubscriptionsResponse { this := ListVendorSubscriptionsResponse{} - var limit int64 = 50 + var limit float64 = 50 this.Limit = &limit return &this } diff --git a/services/stackitmarketplace/model_price_type.go b/services/stackitmarketplace/model_price_type.go new file mode 100644 index 000000000..a212268e9 --- /dev/null +++ b/services/stackitmarketplace/model_price_type.go @@ -0,0 +1,121 @@ +/* +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" +) + +// PriceType The product's price type. +type PriceType string + +// List of priceType +const ( + PRICETYPE_CONTRACT PriceType = "CONTRACT" + PRICETYPE_FREE PriceType = "FREE" + PRICETYPE_FREE_TRIAL PriceType = "FREE_TRIAL" + PRICETYPE_BYOL PriceType = "BYOL" + PRICETYPE_PAYG PriceType = "PAYG" +) + +// All allowed values of PriceType enum +var AllowedPriceTypeEnumValues = []PriceType{ + "CONTRACT", + "FREE", + "FREE_TRIAL", + "BYOL", + "PAYG", +} + +func (v *PriceType) 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 := PriceType(value) + for _, existing := range AllowedPriceTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid PriceType", value) +} + +// NewPriceTypeFromValue returns a pointer to a valid PriceType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewPriceTypeFromValue(v string) (*PriceType, error) { + ev := PriceType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for PriceType: valid values are %v", v, AllowedPriceTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v PriceType) IsValid() bool { + for _, existing := range AllowedPriceTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to priceType value +func (v PriceType) Ptr() *PriceType { + return &v +} + +type NullablePriceType struct { + value *PriceType + isSet bool +} + +func (v NullablePriceType) Get() *PriceType { + return v.value +} + +func (v *NullablePriceType) Set(val *PriceType) { + v.value = val + v.isSet = true +} + +func (v NullablePriceType) IsSet() bool { + return v.isSet +} + +func (v *NullablePriceType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePriceType(val *PriceType) *NullablePriceType { + return &NullablePriceType{value: val, isSet: true} +} + +func (v NullablePriceType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePriceType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/model_pricing_option_unit.go b/services/stackitmarketplace/model_pricing_option_unit.go new file mode 100644 index 000000000..21c482db1 --- /dev/null +++ b/services/stackitmarketplace/model_pricing_option_unit.go @@ -0,0 +1,113 @@ +/* +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" +) + +// PricingOptionUnit The interval to which the rate applies. +type PricingOptionUnit string + +// List of pricingOptionUnit +const ( + PRICINGOPTIONUNIT_MONTH PricingOptionUnit = "month" +) + +// All allowed values of PricingOptionUnit enum +var AllowedPricingOptionUnitEnumValues = []PricingOptionUnit{ + "month", +} + +func (v *PricingOptionUnit) 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 := PricingOptionUnit(value) + for _, existing := range AllowedPricingOptionUnitEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid PricingOptionUnit", value) +} + +// NewPricingOptionUnitFromValue returns a pointer to a valid PricingOptionUnit +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewPricingOptionUnitFromValue(v string) (*PricingOptionUnit, error) { + ev := PricingOptionUnit(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for PricingOptionUnit: valid values are %v", v, AllowedPricingOptionUnitEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v PricingOptionUnit) IsValid() bool { + for _, existing := range AllowedPricingOptionUnitEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to pricingOptionUnit value +func (v PricingOptionUnit) Ptr() *PricingOptionUnit { + return &v +} + +type NullablePricingOptionUnit struct { + value *PricingOptionUnit + isSet bool +} + +func (v NullablePricingOptionUnit) Get() *PricingOptionUnit { + return v.value +} + +func (v *NullablePricingOptionUnit) Set(val *PricingOptionUnit) { + v.value = val + v.isSet = true +} + +func (v NullablePricingOptionUnit) IsSet() bool { + return v.isSet +} + +func (v *NullablePricingOptionUnit) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePricingOptionUnit(val *PricingOptionUnit) *NullablePricingOptionUnit { + return &NullablePricingOptionUnit{value: val, isSet: true} +} + +func (v NullablePricingOptionUnit) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePricingOptionUnit) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/model_product_id.go b/services/stackitmarketplace/model_product_id.go new file mode 100644 index 000000000..c23f0d321 --- /dev/null +++ b/services/stackitmarketplace/model_product_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 ProductId type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProductId{} + +// ProductId The product ID. +type ProductId struct { +} + +// NewProductId instantiates a new ProductId 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 NewProductId() *ProductId { + this := ProductId{} + return &this +} + +// NewProductIdWithDefaults instantiates a new ProductId 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 NewProductIdWithDefaults() *ProductId { + this := ProductId{} + return &this +} + +func (o ProductId) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + return toSerialize, nil +} + +type NullableProductId struct { + value *ProductId + isSet bool +} + +func (v NullableProductId) Get() *ProductId { + return v.value +} + +func (v *NullableProductId) Set(val *ProductId) { + v.value = val + v.isSet = true +} + +func (v NullableProductId) IsSet() bool { + return v.isSet +} + +func (v *NullableProductId) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProductId(val *ProductId) *NullableProductId { + return &NullableProductId{value: val, isSet: true} +} + +func (v NullableProductId) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProductId) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/model_product_lifecycle_state.go b/services/stackitmarketplace/model_product_lifecycle_state.go new file mode 100644 index 000000000..8d67cebea --- /dev/null +++ b/services/stackitmarketplace/model_product_lifecycle_state.go @@ -0,0 +1,115 @@ +/* +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" +) + +// ProductLifecycleState The lifecycle state of the product. +type ProductLifecycleState string + +// List of productLifecycleState +const ( + PRODUCTLIFECYCLESTATE_LIVE ProductLifecycleState = "PRODUCT_LIVE" + PRODUCTLIFECYCLESTATE_PREVIEW ProductLifecycleState = "PRODUCT_PREVIEW" +) + +// All allowed values of ProductLifecycleState enum +var AllowedProductLifecycleStateEnumValues = []ProductLifecycleState{ + "PRODUCT_LIVE", + "PRODUCT_PREVIEW", +} + +func (v *ProductLifecycleState) 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 := ProductLifecycleState(value) + for _, existing := range AllowedProductLifecycleStateEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ProductLifecycleState", value) +} + +// NewProductLifecycleStateFromValue returns a pointer to a valid ProductLifecycleState +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewProductLifecycleStateFromValue(v string) (*ProductLifecycleState, error) { + ev := ProductLifecycleState(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ProductLifecycleState: valid values are %v", v, AllowedProductLifecycleStateEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ProductLifecycleState) IsValid() bool { + for _, existing := range AllowedProductLifecycleStateEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to productLifecycleState value +func (v ProductLifecycleState) Ptr() *ProductLifecycleState { + return &v +} + +type NullableProductLifecycleState struct { + value *ProductLifecycleState + isSet bool +} + +func (v NullableProductLifecycleState) Get() *ProductLifecycleState { + return v.value +} + +func (v *NullableProductLifecycleState) Set(val *ProductLifecycleState) { + v.value = val + v.isSet = true +} + +func (v NullableProductLifecycleState) IsSet() bool { + return v.isSet +} + +func (v *NullableProductLifecycleState) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProductLifecycleState(val *ProductLifecycleState) *NullableProductLifecycleState { + return &NullableProductLifecycleState{value: val, isSet: true} +} + +func (v NullableProductLifecycleState) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProductLifecycleState) 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 new file mode 100644 index 000000000..b76c2bbd0 --- /dev/null +++ b/services/stackitmarketplace/model_project_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 ProjectId type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProjectId{} + +// ProjectId The associated consumer project ID. +type ProjectId struct { +} + +// NewProjectId instantiates a new ProjectId 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 NewProjectId() *ProjectId { + this := ProjectId{} + return &this +} + +// NewProjectIdWithDefaults instantiates a new ProjectId 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 NewProjectIdWithDefaults() *ProjectId { + this := ProjectId{} + return &this +} + +func (o ProjectId) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + return toSerialize, nil +} + +type NullableProjectId struct { + value *ProjectId + isSet bool +} + +func (v NullableProjectId) Get() *ProjectId { + return v.value +} + +func (v *NullableProjectId) Set(val *ProjectId) { + v.value = val + v.isSet = true +} + +func (v NullableProjectId) IsSet() bool { + return v.isSet +} + +func (v *NullableProjectId) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProjectId(val *ProjectId) *NullableProjectId { + return &NullableProjectId{value: val, isSet: true} +} + +func (v NullableProjectId) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProjectId) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/model_register_testing.go b/services/stackitmarketplace/model_register_testing.go index affb85b15..a43ce635f 100644 --- a/services/stackitmarketplace/model_register_testing.go +++ b/services/stackitmarketplace/model_register_testing.go @@ -22,9 +22,9 @@ var _ MappedNullable = &RegisterTesting{} */ // isModel -type RegisterTestingGetRegisterTestingAttributeType = *RegisterTestingRegisterTesting -type RegisterTestingGetRegisterTestingArgType = RegisterTestingRegisterTesting -type RegisterTestingGetRegisterTestingRetType = RegisterTestingRegisterTesting +type RegisterTestingGetRegisterTestingAttributeType = *InquiryRegisterTesting +type RegisterTestingGetRegisterTestingArgType = InquiryRegisterTesting +type RegisterTestingGetRegisterTestingRetType = InquiryRegisterTesting func getRegisterTestingGetRegisterTestingAttributeTypeOk(arg RegisterTestingGetRegisterTestingAttributeType) (ret RegisterTestingGetRegisterTestingRetType, ok bool) { if arg == nil { @@ -42,9 +42,9 @@ func setRegisterTestingGetRegisterTestingAttributeType(arg *RegisterTestingGetRe */ // isEnumRef -type RegisterTestingGetTypeAttributeType = *string -type RegisterTestingGetTypeArgType = string -type RegisterTestingGetTypeRetType = string +type RegisterTestingGetTypeAttributeType = *InquiryFormType +type RegisterTestingGetTypeArgType = InquiryFormType +type RegisterTestingGetTypeRetType = InquiryFormType func getRegisterTestingGetTypeAttributeTypeOk(arg RegisterTestingGetTypeAttributeType) (ret RegisterTestingGetTypeRetType, ok bool) { if arg == nil { @@ -61,7 +61,6 @@ func setRegisterTestingGetTypeAttributeType(arg *RegisterTestingGetTypeAttribute type RegisterTesting struct { // REQUIRED RegisterTesting RegisterTestingGetRegisterTestingAttributeType `json:"registerTesting"` - // The form type. // REQUIRED Type RegisterTestingGetTypeAttributeType `json:"type"` } diff --git a/services/stackitmarketplace/model_register_testing_register_testing.go b/services/stackitmarketplace/model_register_testing_register_testing.go deleted file mode 100644 index 6ac07646f..000000000 --- a/services/stackitmarketplace/model_register_testing_register_testing.go +++ /dev/null @@ -1,217 +0,0 @@ -/* -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 RegisterTestingRegisterTesting type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RegisterTestingRegisterTesting{} - -/* - types and functions for contactEmail -*/ - -// isNotNullableString -type RegisterTestingRegisterTestingGetContactEmailAttributeType = *string - -func getRegisterTestingRegisterTestingGetContactEmailAttributeTypeOk(arg RegisterTestingRegisterTestingGetContactEmailAttributeType) (ret RegisterTestingRegisterTestingGetContactEmailRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setRegisterTestingRegisterTestingGetContactEmailAttributeType(arg *RegisterTestingRegisterTestingGetContactEmailAttributeType, val RegisterTestingRegisterTestingGetContactEmailRetType) { - *arg = &val -} - -type RegisterTestingRegisterTestingGetContactEmailArgType = string -type RegisterTestingRegisterTestingGetContactEmailRetType = string - -/* - types and functions for fullName -*/ - -// isNotNullableString -type RegisterTestingRegisterTestingGetFullNameAttributeType = *string - -func getRegisterTestingRegisterTestingGetFullNameAttributeTypeOk(arg RegisterTestingRegisterTestingGetFullNameAttributeType) (ret RegisterTestingRegisterTestingGetFullNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setRegisterTestingRegisterTestingGetFullNameAttributeType(arg *RegisterTestingRegisterTestingGetFullNameAttributeType, val RegisterTestingRegisterTestingGetFullNameRetType) { - *arg = &val -} - -type RegisterTestingRegisterTestingGetFullNameArgType = string -type RegisterTestingRegisterTestingGetFullNameRetType = string - -/* - types and functions for message -*/ - -// isNotNullableString -type RegisterTestingRegisterTestingGetMessageAttributeType = *string - -func getRegisterTestingRegisterTestingGetMessageAttributeTypeOk(arg RegisterTestingRegisterTestingGetMessageAttributeType) (ret RegisterTestingRegisterTestingGetMessageRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setRegisterTestingRegisterTestingGetMessageAttributeType(arg *RegisterTestingRegisterTestingGetMessageAttributeType, val RegisterTestingRegisterTestingGetMessageRetType) { - *arg = &val -} - -type RegisterTestingRegisterTestingGetMessageArgType = string -type RegisterTestingRegisterTestingGetMessageRetType = string - -// RegisterTestingRegisterTesting struct for RegisterTestingRegisterTesting -type RegisterTestingRegisterTesting struct { - // The contact e-mail address. - // REQUIRED - ContactEmail RegisterTestingRegisterTestingGetContactEmailAttributeType `json:"contactEmail"` - // The full name of the contact person. - // REQUIRED - FullName RegisterTestingRegisterTestingGetFullNameAttributeType `json:"fullName"` - // The message content. - // REQUIRED - Message RegisterTestingRegisterTestingGetMessageAttributeType `json:"message"` -} - -type _RegisterTestingRegisterTesting RegisterTestingRegisterTesting - -// NewRegisterTestingRegisterTesting instantiates a new RegisterTestingRegisterTesting 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 NewRegisterTestingRegisterTesting(contactEmail RegisterTestingRegisterTestingGetContactEmailArgType, fullName RegisterTestingRegisterTestingGetFullNameArgType, message RegisterTestingRegisterTestingGetMessageArgType) *RegisterTestingRegisterTesting { - this := RegisterTestingRegisterTesting{} - setRegisterTestingRegisterTestingGetContactEmailAttributeType(&this.ContactEmail, contactEmail) - setRegisterTestingRegisterTestingGetFullNameAttributeType(&this.FullName, fullName) - setRegisterTestingRegisterTestingGetMessageAttributeType(&this.Message, message) - return &this -} - -// NewRegisterTestingRegisterTestingWithDefaults instantiates a new RegisterTestingRegisterTesting 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 NewRegisterTestingRegisterTestingWithDefaults() *RegisterTestingRegisterTesting { - this := RegisterTestingRegisterTesting{} - return &this -} - -// GetContactEmail returns the ContactEmail field value -func (o *RegisterTestingRegisterTesting) GetContactEmail() (ret RegisterTestingRegisterTestingGetContactEmailRetType) { - ret, _ = o.GetContactEmailOk() - return ret -} - -// GetContactEmailOk returns a tuple with the ContactEmail field value -// and a boolean to check if the value has been set. -func (o *RegisterTestingRegisterTesting) GetContactEmailOk() (ret RegisterTestingRegisterTestingGetContactEmailRetType, ok bool) { - return getRegisterTestingRegisterTestingGetContactEmailAttributeTypeOk(o.ContactEmail) -} - -// SetContactEmail sets field value -func (o *RegisterTestingRegisterTesting) SetContactEmail(v RegisterTestingRegisterTestingGetContactEmailRetType) { - setRegisterTestingRegisterTestingGetContactEmailAttributeType(&o.ContactEmail, v) -} - -// GetFullName returns the FullName field value -func (o *RegisterTestingRegisterTesting) GetFullName() (ret RegisterTestingRegisterTestingGetFullNameRetType) { - ret, _ = o.GetFullNameOk() - return ret -} - -// GetFullNameOk returns a tuple with the FullName field value -// and a boolean to check if the value has been set. -func (o *RegisterTestingRegisterTesting) GetFullNameOk() (ret RegisterTestingRegisterTestingGetFullNameRetType, ok bool) { - return getRegisterTestingRegisterTestingGetFullNameAttributeTypeOk(o.FullName) -} - -// SetFullName sets field value -func (o *RegisterTestingRegisterTesting) SetFullName(v RegisterTestingRegisterTestingGetFullNameRetType) { - setRegisterTestingRegisterTestingGetFullNameAttributeType(&o.FullName, v) -} - -// GetMessage returns the Message field value -func (o *RegisterTestingRegisterTesting) GetMessage() (ret RegisterTestingRegisterTestingGetMessageRetType) { - ret, _ = o.GetMessageOk() - return ret -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *RegisterTestingRegisterTesting) GetMessageOk() (ret RegisterTestingRegisterTestingGetMessageRetType, ok bool) { - return getRegisterTestingRegisterTestingGetMessageAttributeTypeOk(o.Message) -} - -// SetMessage sets field value -func (o *RegisterTestingRegisterTesting) SetMessage(v RegisterTestingRegisterTestingGetMessageRetType) { - setRegisterTestingRegisterTestingGetMessageAttributeType(&o.Message, v) -} - -func (o RegisterTestingRegisterTesting) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getRegisterTestingRegisterTestingGetContactEmailAttributeTypeOk(o.ContactEmail); ok { - toSerialize["ContactEmail"] = val - } - if val, ok := getRegisterTestingRegisterTestingGetFullNameAttributeTypeOk(o.FullName); ok { - toSerialize["FullName"] = val - } - if val, ok := getRegisterTestingRegisterTestingGetMessageAttributeTypeOk(o.Message); ok { - toSerialize["Message"] = val - } - return toSerialize, nil -} - -type NullableRegisterTestingRegisterTesting struct { - value *RegisterTestingRegisterTesting - isSet bool -} - -func (v NullableRegisterTestingRegisterTesting) Get() *RegisterTestingRegisterTesting { - return v.value -} - -func (v *NullableRegisterTestingRegisterTesting) Set(val *RegisterTestingRegisterTesting) { - v.value = val - v.isSet = true -} - -func (v NullableRegisterTestingRegisterTesting) IsSet() bool { - return v.isSet -} - -func (v *NullableRegisterTestingRegisterTesting) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRegisterTestingRegisterTesting(val *RegisterTestingRegisterTesting) *NullableRegisterTestingRegisterTesting { - return &NullableRegisterTestingRegisterTesting{value: val, isSet: true} -} - -func (v NullableRegisterTestingRegisterTesting) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRegisterTestingRegisterTesting) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_requested_subscription_state_response.go b/services/stackitmarketplace/model_requested_subscription_state_response.go deleted file mode 100644 index 1cc680118..000000000 --- a/services/stackitmarketplace/model_requested_subscription_state_response.go +++ /dev/null @@ -1,171 +0,0 @@ -/* -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 RequestedSubscriptionStateResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RequestedSubscriptionStateResponse{} - -/* - types and functions for lifecycleState -*/ - -// isEnumRef -type RequestedSubscriptionStateResponseGetLifecycleStateAttributeType = *string -type RequestedSubscriptionStateResponseGetLifecycleStateArgType = string -type RequestedSubscriptionStateResponseGetLifecycleStateRetType = string - -func getRequestedSubscriptionStateResponseGetLifecycleStateAttributeTypeOk(arg RequestedSubscriptionStateResponseGetLifecycleStateAttributeType) (ret RequestedSubscriptionStateResponseGetLifecycleStateRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setRequestedSubscriptionStateResponseGetLifecycleStateAttributeType(arg *RequestedSubscriptionStateResponseGetLifecycleStateAttributeType, val RequestedSubscriptionStateResponseGetLifecycleStateRetType) { - *arg = &val -} - -/* - types and functions for subscriptionId -*/ - -// isNotNullableString -type RequestedSubscriptionStateResponseGetSubscriptionIdAttributeType = *string - -func getRequestedSubscriptionStateResponseGetSubscriptionIdAttributeTypeOk(arg RequestedSubscriptionStateResponseGetSubscriptionIdAttributeType) (ret RequestedSubscriptionStateResponseGetSubscriptionIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setRequestedSubscriptionStateResponseGetSubscriptionIdAttributeType(arg *RequestedSubscriptionStateResponseGetSubscriptionIdAttributeType, val RequestedSubscriptionStateResponseGetSubscriptionIdRetType) { - *arg = &val -} - -type RequestedSubscriptionStateResponseGetSubscriptionIdArgType = string -type RequestedSubscriptionStateResponseGetSubscriptionIdRetType = string - -// RequestedSubscriptionStateResponse struct for RequestedSubscriptionStateResponse -type RequestedSubscriptionStateResponse struct { - // Lifecycle state of the subscription. - // REQUIRED - LifecycleState RequestedSubscriptionStateResponseGetLifecycleStateAttributeType `json:"lifecycleState"` - // The subscription ID. - // REQUIRED - SubscriptionId RequestedSubscriptionStateResponseGetSubscriptionIdAttributeType `json:"subscriptionId"` -} - -type _RequestedSubscriptionStateResponse RequestedSubscriptionStateResponse - -// NewRequestedSubscriptionStateResponse instantiates a new RequestedSubscriptionStateResponse 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 NewRequestedSubscriptionStateResponse(lifecycleState RequestedSubscriptionStateResponseGetLifecycleStateArgType, subscriptionId RequestedSubscriptionStateResponseGetSubscriptionIdArgType) *RequestedSubscriptionStateResponse { - this := RequestedSubscriptionStateResponse{} - setRequestedSubscriptionStateResponseGetLifecycleStateAttributeType(&this.LifecycleState, lifecycleState) - setRequestedSubscriptionStateResponseGetSubscriptionIdAttributeType(&this.SubscriptionId, subscriptionId) - return &this -} - -// NewRequestedSubscriptionStateResponseWithDefaults instantiates a new RequestedSubscriptionStateResponse 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 NewRequestedSubscriptionStateResponseWithDefaults() *RequestedSubscriptionStateResponse { - this := RequestedSubscriptionStateResponse{} - return &this -} - -// GetLifecycleState returns the LifecycleState field value -func (o *RequestedSubscriptionStateResponse) GetLifecycleState() (ret RequestedSubscriptionStateResponseGetLifecycleStateRetType) { - ret, _ = o.GetLifecycleStateOk() - return ret -} - -// GetLifecycleStateOk returns a tuple with the LifecycleState field value -// and a boolean to check if the value has been set. -func (o *RequestedSubscriptionStateResponse) GetLifecycleStateOk() (ret RequestedSubscriptionStateResponseGetLifecycleStateRetType, ok bool) { - return getRequestedSubscriptionStateResponseGetLifecycleStateAttributeTypeOk(o.LifecycleState) -} - -// SetLifecycleState sets field value -func (o *RequestedSubscriptionStateResponse) SetLifecycleState(v RequestedSubscriptionStateResponseGetLifecycleStateRetType) { - setRequestedSubscriptionStateResponseGetLifecycleStateAttributeType(&o.LifecycleState, v) -} - -// GetSubscriptionId returns the SubscriptionId field value -func (o *RequestedSubscriptionStateResponse) GetSubscriptionId() (ret RequestedSubscriptionStateResponseGetSubscriptionIdRetType) { - ret, _ = o.GetSubscriptionIdOk() - return ret -} - -// GetSubscriptionIdOk returns a tuple with the SubscriptionId field value -// and a boolean to check if the value has been set. -func (o *RequestedSubscriptionStateResponse) GetSubscriptionIdOk() (ret RequestedSubscriptionStateResponseGetSubscriptionIdRetType, ok bool) { - return getRequestedSubscriptionStateResponseGetSubscriptionIdAttributeTypeOk(o.SubscriptionId) -} - -// SetSubscriptionId sets field value -func (o *RequestedSubscriptionStateResponse) SetSubscriptionId(v RequestedSubscriptionStateResponseGetSubscriptionIdRetType) { - setRequestedSubscriptionStateResponseGetSubscriptionIdAttributeType(&o.SubscriptionId, v) -} - -func (o RequestedSubscriptionStateResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getRequestedSubscriptionStateResponseGetLifecycleStateAttributeTypeOk(o.LifecycleState); ok { - toSerialize["LifecycleState"] = val - } - if val, ok := getRequestedSubscriptionStateResponseGetSubscriptionIdAttributeTypeOk(o.SubscriptionId); ok { - toSerialize["SubscriptionId"] = val - } - return toSerialize, nil -} - -type NullableRequestedSubscriptionStateResponse struct { - value *RequestedSubscriptionStateResponse - isSet bool -} - -func (v NullableRequestedSubscriptionStateResponse) Get() *RequestedSubscriptionStateResponse { - return v.value -} - -func (v *NullableRequestedSubscriptionStateResponse) Set(val *RequestedSubscriptionStateResponse) { - v.value = val - v.isSet = true -} - -func (v NullableRequestedSubscriptionStateResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableRequestedSubscriptionStateResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRequestedSubscriptionStateResponse(val *RequestedSubscriptionStateResponse) *NullableRequestedSubscriptionStateResponse { - return &NullableRequestedSubscriptionStateResponse{value: val, isSet: true} -} - -func (v NullableRequestedSubscriptionStateResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRequestedSubscriptionStateResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_subscription_cancel_response.go b/services/stackitmarketplace/model_subscription_cancel_response.go deleted file mode 100644 index b014344fb..000000000 --- a/services/stackitmarketplace/model_subscription_cancel_response.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -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 SubscriptionCancelResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SubscriptionCancelResponse{} - -/* - types and functions for currentSubscription -*/ - -// isModel -type SubscriptionCancelResponseGetCurrentSubscriptionAttributeType = *CurrentSubscriptionStateResponse -type SubscriptionCancelResponseGetCurrentSubscriptionArgType = CurrentSubscriptionStateResponse -type SubscriptionCancelResponseGetCurrentSubscriptionRetType = CurrentSubscriptionStateResponse - -func getSubscriptionCancelResponseGetCurrentSubscriptionAttributeTypeOk(arg SubscriptionCancelResponseGetCurrentSubscriptionAttributeType) (ret SubscriptionCancelResponseGetCurrentSubscriptionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setSubscriptionCancelResponseGetCurrentSubscriptionAttributeType(arg *SubscriptionCancelResponseGetCurrentSubscriptionAttributeType, val SubscriptionCancelResponseGetCurrentSubscriptionRetType) { - *arg = &val -} - -/* - types and functions for requestedSubscription -*/ - -// isModel -type SubscriptionCancelResponseGetRequestedSubscriptionAttributeType = *RequestedSubscriptionStateResponse -type SubscriptionCancelResponseGetRequestedSubscriptionArgType = RequestedSubscriptionStateResponse -type SubscriptionCancelResponseGetRequestedSubscriptionRetType = RequestedSubscriptionStateResponse - -func getSubscriptionCancelResponseGetRequestedSubscriptionAttributeTypeOk(arg SubscriptionCancelResponseGetRequestedSubscriptionAttributeType) (ret SubscriptionCancelResponseGetRequestedSubscriptionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setSubscriptionCancelResponseGetRequestedSubscriptionAttributeType(arg *SubscriptionCancelResponseGetRequestedSubscriptionAttributeType, val SubscriptionCancelResponseGetRequestedSubscriptionRetType) { - *arg = &val -} - -// SubscriptionCancelResponse struct for SubscriptionCancelResponse -type SubscriptionCancelResponse struct { - // REQUIRED - CurrentSubscription SubscriptionCancelResponseGetCurrentSubscriptionAttributeType `json:"currentSubscription"` - // REQUIRED - RequestedSubscription SubscriptionCancelResponseGetRequestedSubscriptionAttributeType `json:"requestedSubscription"` -} - -type _SubscriptionCancelResponse SubscriptionCancelResponse - -// NewSubscriptionCancelResponse instantiates a new SubscriptionCancelResponse 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 NewSubscriptionCancelResponse(currentSubscription SubscriptionCancelResponseGetCurrentSubscriptionArgType, requestedSubscription SubscriptionCancelResponseGetRequestedSubscriptionArgType) *SubscriptionCancelResponse { - this := SubscriptionCancelResponse{} - setSubscriptionCancelResponseGetCurrentSubscriptionAttributeType(&this.CurrentSubscription, currentSubscription) - setSubscriptionCancelResponseGetRequestedSubscriptionAttributeType(&this.RequestedSubscription, requestedSubscription) - return &this -} - -// NewSubscriptionCancelResponseWithDefaults instantiates a new SubscriptionCancelResponse 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 NewSubscriptionCancelResponseWithDefaults() *SubscriptionCancelResponse { - this := SubscriptionCancelResponse{} - return &this -} - -// GetCurrentSubscription returns the CurrentSubscription field value -func (o *SubscriptionCancelResponse) GetCurrentSubscription() (ret SubscriptionCancelResponseGetCurrentSubscriptionRetType) { - ret, _ = o.GetCurrentSubscriptionOk() - return ret -} - -// GetCurrentSubscriptionOk returns a tuple with the CurrentSubscription field value -// and a boolean to check if the value has been set. -func (o *SubscriptionCancelResponse) GetCurrentSubscriptionOk() (ret SubscriptionCancelResponseGetCurrentSubscriptionRetType, ok bool) { - return getSubscriptionCancelResponseGetCurrentSubscriptionAttributeTypeOk(o.CurrentSubscription) -} - -// SetCurrentSubscription sets field value -func (o *SubscriptionCancelResponse) SetCurrentSubscription(v SubscriptionCancelResponseGetCurrentSubscriptionRetType) { - setSubscriptionCancelResponseGetCurrentSubscriptionAttributeType(&o.CurrentSubscription, v) -} - -// GetRequestedSubscription returns the RequestedSubscription field value -func (o *SubscriptionCancelResponse) GetRequestedSubscription() (ret SubscriptionCancelResponseGetRequestedSubscriptionRetType) { - ret, _ = o.GetRequestedSubscriptionOk() - return ret -} - -// GetRequestedSubscriptionOk returns a tuple with the RequestedSubscription field value -// and a boolean to check if the value has been set. -func (o *SubscriptionCancelResponse) GetRequestedSubscriptionOk() (ret SubscriptionCancelResponseGetRequestedSubscriptionRetType, ok bool) { - return getSubscriptionCancelResponseGetRequestedSubscriptionAttributeTypeOk(o.RequestedSubscription) -} - -// SetRequestedSubscription sets field value -func (o *SubscriptionCancelResponse) SetRequestedSubscription(v SubscriptionCancelResponseGetRequestedSubscriptionRetType) { - setSubscriptionCancelResponseGetRequestedSubscriptionAttributeType(&o.RequestedSubscription, v) -} - -func (o SubscriptionCancelResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getSubscriptionCancelResponseGetCurrentSubscriptionAttributeTypeOk(o.CurrentSubscription); ok { - toSerialize["CurrentSubscription"] = val - } - if val, ok := getSubscriptionCancelResponseGetRequestedSubscriptionAttributeTypeOk(o.RequestedSubscription); ok { - toSerialize["RequestedSubscription"] = val - } - return toSerialize, nil -} - -type NullableSubscriptionCancelResponse struct { - value *SubscriptionCancelResponse - isSet bool -} - -func (v NullableSubscriptionCancelResponse) Get() *SubscriptionCancelResponse { - return v.value -} - -func (v *NullableSubscriptionCancelResponse) Set(val *SubscriptionCancelResponse) { - v.value = val - v.isSet = true -} - -func (v NullableSubscriptionCancelResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableSubscriptionCancelResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSubscriptionCancelResponse(val *SubscriptionCancelResponse) *NullableSubscriptionCancelResponse { - return &NullableSubscriptionCancelResponse{value: val, isSet: true} -} - -func (v NullableSubscriptionCancelResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSubscriptionCancelResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_subscription_id.go b/services/stackitmarketplace/model_subscription_id.go new file mode 100644 index 000000000..aa7a92652 --- /dev/null +++ b/services/stackitmarketplace/model_subscription_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 SubscriptionId type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SubscriptionId{} + +// SubscriptionId The subscription ID. +type SubscriptionId struct { +} + +// NewSubscriptionId instantiates a new SubscriptionId 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 NewSubscriptionId() *SubscriptionId { + this := SubscriptionId{} + return &this +} + +// NewSubscriptionIdWithDefaults instantiates a new SubscriptionId 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 NewSubscriptionIdWithDefaults() *SubscriptionId { + this := SubscriptionId{} + return &this +} + +func (o SubscriptionId) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + return toSerialize, nil +} + +type NullableSubscriptionId struct { + value *SubscriptionId + isSet bool +} + +func (v NullableSubscriptionId) Get() *SubscriptionId { + return v.value +} + +func (v *NullableSubscriptionId) Set(val *SubscriptionId) { + v.value = val + v.isSet = true +} + +func (v NullableSubscriptionId) IsSet() bool { + return v.isSet +} + +func (v *NullableSubscriptionId) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSubscriptionId(val *SubscriptionId) *NullableSubscriptionId { + return &NullableSubscriptionId{value: val, isSet: true} +} + +func (v NullableSubscriptionId) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSubscriptionId) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/model_subscription_lifecycle_state.go b/services/stackitmarketplace/model_subscription_lifecycle_state.go new file mode 100644 index 000000000..bb76b2643 --- /dev/null +++ b/services/stackitmarketplace/model_subscription_lifecycle_state.go @@ -0,0 +1,123 @@ +/* +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" +) + +// SubscriptionLifecycleState Lifecycle state of the subscription. +type SubscriptionLifecycleState string + +// List of subscriptionLifecycleState +const ( + SUBSCRIPTIONLIFECYCLESTATE_PENDING SubscriptionLifecycleState = "SUBSCRIPTION_PENDING" + SUBSCRIPTIONLIFECYCLESTATE_ACTIVE SubscriptionLifecycleState = "SUBSCRIPTION_ACTIVE" + SUBSCRIPTIONLIFECYCLESTATE_INACTIVE SubscriptionLifecycleState = "SUBSCRIPTION_INACTIVE" + SUBSCRIPTIONLIFECYCLESTATE_CANCELLING SubscriptionLifecycleState = "SUBSCRIPTION_CANCELLING" + SUBSCRIPTIONLIFECYCLESTATE_CANCELLED SubscriptionLifecycleState = "SUBSCRIPTION_CANCELLED" + SUBSCRIPTIONLIFECYCLESTATE_REJECTED SubscriptionLifecycleState = "SUBSCRIPTION_REJECTED" +) + +// All allowed values of SubscriptionLifecycleState enum +var AllowedSubscriptionLifecycleStateEnumValues = []SubscriptionLifecycleState{ + "SUBSCRIPTION_PENDING", + "SUBSCRIPTION_ACTIVE", + "SUBSCRIPTION_INACTIVE", + "SUBSCRIPTION_CANCELLING", + "SUBSCRIPTION_CANCELLED", + "SUBSCRIPTION_REJECTED", +} + +func (v *SubscriptionLifecycleState) 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 := SubscriptionLifecycleState(value) + for _, existing := range AllowedSubscriptionLifecycleStateEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid SubscriptionLifecycleState", value) +} + +// NewSubscriptionLifecycleStateFromValue returns a pointer to a valid SubscriptionLifecycleState +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewSubscriptionLifecycleStateFromValue(v string) (*SubscriptionLifecycleState, error) { + ev := SubscriptionLifecycleState(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for SubscriptionLifecycleState: valid values are %v", v, AllowedSubscriptionLifecycleStateEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v SubscriptionLifecycleState) IsValid() bool { + for _, existing := range AllowedSubscriptionLifecycleStateEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to subscriptionLifecycleState value +func (v SubscriptionLifecycleState) Ptr() *SubscriptionLifecycleState { + return &v +} + +type NullableSubscriptionLifecycleState struct { + value *SubscriptionLifecycleState + isSet bool +} + +func (v NullableSubscriptionLifecycleState) Get() *SubscriptionLifecycleState { + return v.value +} + +func (v *NullableSubscriptionLifecycleState) Set(val *SubscriptionLifecycleState) { + v.value = val + v.isSet = true +} + +func (v NullableSubscriptionLifecycleState) IsSet() bool { + return v.isSet +} + +func (v *NullableSubscriptionLifecycleState) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSubscriptionLifecycleState(val *SubscriptionLifecycleState) *NullableSubscriptionLifecycleState { + return &NullableSubscriptionLifecycleState{value: val, isSet: true} +} + +func (v NullableSubscriptionLifecycleState) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSubscriptionLifecycleState) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/model_subscription_product.go b/services/stackitmarketplace/model_subscription_product.go index c09a59ad3..e5e9b7d7a 100644 --- a/services/stackitmarketplace/model_subscription_product.go +++ b/services/stackitmarketplace/model_subscription_product.go @@ -22,9 +22,9 @@ var _ MappedNullable = &SubscriptionProduct{} */ // isEnumRef -type SubscriptionProductGetDeliveryMethodAttributeType = *string -type SubscriptionProductGetDeliveryMethodArgType = string -type SubscriptionProductGetDeliveryMethodRetType = string +type SubscriptionProductGetDeliveryMethodAttributeType = *DeliveryMethod +type SubscriptionProductGetDeliveryMethodArgType = DeliveryMethod +type SubscriptionProductGetDeliveryMethodRetType = DeliveryMethod func getSubscriptionProductGetDeliveryMethodAttributeTypeOk(arg SubscriptionProductGetDeliveryMethodAttributeType) (ret SubscriptionProductGetDeliveryMethodRetType, ok bool) { if arg == nil { @@ -42,9 +42,9 @@ func setSubscriptionProductGetDeliveryMethodAttributeType(arg *SubscriptionProdu */ // isEnumRef -type SubscriptionProductGetLifecycleStateAttributeType = *string -type SubscriptionProductGetLifecycleStateArgType = string -type SubscriptionProductGetLifecycleStateRetType = string +type SubscriptionProductGetLifecycleStateAttributeType = *ProductLifecycleState +type SubscriptionProductGetLifecycleStateArgType = ProductLifecycleState +type SubscriptionProductGetLifecycleStateRetType = ProductLifecycleState func getSubscriptionProductGetLifecycleStateAttributeTypeOk(arg SubscriptionProductGetLifecycleStateAttributeType) (ret SubscriptionProductGetLifecycleStateRetType, ok bool) { if arg == nil { @@ -62,9 +62,9 @@ func setSubscriptionProductGetLifecycleStateAttributeType(arg *SubscriptionProdu */ // isEnumRef -type SubscriptionProductGetPriceTypeAttributeType = *string -type SubscriptionProductGetPriceTypeArgType = string -type SubscriptionProductGetPriceTypeRetType = string +type SubscriptionProductGetPriceTypeAttributeType = *PriceType +type SubscriptionProductGetPriceTypeArgType = PriceType +type SubscriptionProductGetPriceTypeRetType = PriceType func getSubscriptionProductGetPriceTypeAttributeTypeOk(arg SubscriptionProductGetPriceTypeAttributeType) (ret SubscriptionProductGetPriceTypeRetType, ok bool) { if arg == nil { @@ -102,8 +102,10 @@ type SubscriptionProductGetPricingPlanRetType = string types and functions for productId */ -// isNotNullableString -type SubscriptionProductGetProductIdAttributeType = *string +// isModel +type SubscriptionProductGetProductIdAttributeType = *ProductId +type SubscriptionProductGetProductIdArgType = ProductId +type SubscriptionProductGetProductIdRetType = ProductId func getSubscriptionProductGetProductIdAttributeTypeOk(arg SubscriptionProductGetProductIdAttributeType) (ret SubscriptionProductGetProductIdRetType, ok bool) { if arg == nil { @@ -116,9 +118,6 @@ func setSubscriptionProductGetProductIdAttributeType(arg *SubscriptionProductGet *arg = &val } -type SubscriptionProductGetProductIdArgType = string -type SubscriptionProductGetProductIdRetType = string - /* types and functions for productName */ @@ -203,21 +202,17 @@ func setSubscriptionProductGetVendorWebsiteUrlAttributeType(arg *SubscriptionPro type SubscriptionProductGetVendorWebsiteUrlArgType = string type SubscriptionProductGetVendorWebsiteUrlRetType = string -// SubscriptionProduct struct for SubscriptionProduct +// SubscriptionProduct The product of a subscription type SubscriptionProduct struct { - // The product's delivery method. // REQUIRED DeliveryMethod SubscriptionProductGetDeliveryMethodAttributeType `json:"deliveryMethod"` - // The lifecycle state of the product. // REQUIRED LifecycleState SubscriptionProductGetLifecycleStateAttributeType `json:"lifecycleState"` - // The product's price type. // REQUIRED PriceType SubscriptionProductGetPriceTypeAttributeType `json:"priceType"` - // The product's pricing plan. + // Additional price type information. // REQUIRED PricingPlan SubscriptionProductGetPricingPlanAttributeType `json:"pricingPlan"` - // The product ID. // REQUIRED ProductId SubscriptionProductGetProductIdAttributeType `json:"productId"` // The name of the product. @@ -226,9 +221,9 @@ type SubscriptionProduct struct { // The product's vendor name. // REQUIRED VendorName SubscriptionProductGetVendorNameAttributeType `json:"vendorName"` - // The product ID provided by the Vendor. + // The vendor provided product ID. VendorProductId SubscriptionProductGetVendorProductIdAttributeType `json:"vendorProductId,omitempty"` - // The vendor's website. + // Uniform Resource Locator. // REQUIRED VendorWebsiteUrl SubscriptionProductGetVendorWebsiteUrlAttributeType `json:"vendorWebsiteUrl"` } diff --git a/services/stackitmarketplace/model_suggest_product.go b/services/stackitmarketplace/model_suggest_product.go index 4887527dd..aea67f875 100644 --- a/services/stackitmarketplace/model_suggest_product.go +++ b/services/stackitmarketplace/model_suggest_product.go @@ -22,9 +22,9 @@ var _ MappedNullable = &SuggestProduct{} */ // isModel -type SuggestProductGetSuggestProductAttributeType = *SuggestProductSuggestProduct -type SuggestProductGetSuggestProductArgType = SuggestProductSuggestProduct -type SuggestProductGetSuggestProductRetType = SuggestProductSuggestProduct +type SuggestProductGetSuggestProductAttributeType = *InquirySuggestProduct +type SuggestProductGetSuggestProductArgType = InquirySuggestProduct +type SuggestProductGetSuggestProductRetType = InquirySuggestProduct func getSuggestProductGetSuggestProductAttributeTypeOk(arg SuggestProductGetSuggestProductAttributeType) (ret SuggestProductGetSuggestProductRetType, ok bool) { if arg == nil { @@ -42,9 +42,9 @@ func setSuggestProductGetSuggestProductAttributeType(arg *SuggestProductGetSugge */ // isEnumRef -type SuggestProductGetTypeAttributeType = *string -type SuggestProductGetTypeArgType = string -type SuggestProductGetTypeRetType = string +type SuggestProductGetTypeAttributeType = *InquiryFormType +type SuggestProductGetTypeArgType = InquiryFormType +type SuggestProductGetTypeRetType = InquiryFormType func getSuggestProductGetTypeAttributeTypeOk(arg SuggestProductGetTypeAttributeType) (ret SuggestProductGetTypeRetType, ok bool) { if arg == nil { @@ -61,7 +61,6 @@ func setSuggestProductGetTypeAttributeType(arg *SuggestProductGetTypeAttributeTy type SuggestProduct struct { // REQUIRED SuggestProduct SuggestProductGetSuggestProductAttributeType `json:"suggestProduct"` - // The form type. // REQUIRED Type SuggestProductGetTypeAttributeType `json:"type"` } diff --git a/services/stackitmarketplace/model_suggest_product_suggest_product.go b/services/stackitmarketplace/model_suggest_product_suggest_product.go deleted file mode 100644 index 3af962546..000000000 --- a/services/stackitmarketplace/model_suggest_product_suggest_product.go +++ /dev/null @@ -1,266 +0,0 @@ -/* -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 SuggestProductSuggestProduct type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SuggestProductSuggestProduct{} - -/* - types and functions for companyName -*/ - -// isNotNullableString -type SuggestProductSuggestProductGetCompanyNameAttributeType = *string - -func getSuggestProductSuggestProductGetCompanyNameAttributeTypeOk(arg SuggestProductSuggestProductGetCompanyNameAttributeType) (ret SuggestProductSuggestProductGetCompanyNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setSuggestProductSuggestProductGetCompanyNameAttributeType(arg *SuggestProductSuggestProductGetCompanyNameAttributeType, val SuggestProductSuggestProductGetCompanyNameRetType) { - *arg = &val -} - -type SuggestProductSuggestProductGetCompanyNameArgType = string -type SuggestProductSuggestProductGetCompanyNameRetType = string - -/* - types and functions for message -*/ - -// isNotNullableString -type SuggestProductSuggestProductGetMessageAttributeType = *string - -func getSuggestProductSuggestProductGetMessageAttributeTypeOk(arg SuggestProductSuggestProductGetMessageAttributeType) (ret SuggestProductSuggestProductGetMessageRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setSuggestProductSuggestProductGetMessageAttributeType(arg *SuggestProductSuggestProductGetMessageAttributeType, val SuggestProductSuggestProductGetMessageRetType) { - *arg = &val -} - -type SuggestProductSuggestProductGetMessageArgType = string -type SuggestProductSuggestProductGetMessageRetType = string - -/* - types and functions for name -*/ - -// isNotNullableString -type SuggestProductSuggestProductGetNameAttributeType = *string - -func getSuggestProductSuggestProductGetNameAttributeTypeOk(arg SuggestProductSuggestProductGetNameAttributeType) (ret SuggestProductSuggestProductGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setSuggestProductSuggestProductGetNameAttributeType(arg *SuggestProductSuggestProductGetNameAttributeType, val SuggestProductSuggestProductGetNameRetType) { - *arg = &val -} - -type SuggestProductSuggestProductGetNameArgType = string -type SuggestProductSuggestProductGetNameRetType = string - -/* - types and functions for url -*/ - -// isNotNullableString -type SuggestProductSuggestProductGetUrlAttributeType = *string - -func getSuggestProductSuggestProductGetUrlAttributeTypeOk(arg SuggestProductSuggestProductGetUrlAttributeType) (ret SuggestProductSuggestProductGetUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setSuggestProductSuggestProductGetUrlAttributeType(arg *SuggestProductSuggestProductGetUrlAttributeType, val SuggestProductSuggestProductGetUrlRetType) { - *arg = &val -} - -type SuggestProductSuggestProductGetUrlArgType = string -type SuggestProductSuggestProductGetUrlRetType = string - -// SuggestProductSuggestProduct struct for SuggestProductSuggestProduct -type SuggestProductSuggestProduct struct { - // The suggested product's company name. - // REQUIRED - CompanyName SuggestProductSuggestProductGetCompanyNameAttributeType `json:"companyName"` - // An additional message. - Message SuggestProductSuggestProductGetMessageAttributeType `json:"message,omitempty"` - // The suggested product name. - // REQUIRED - Name SuggestProductSuggestProductGetNameAttributeType `json:"name"` - // The suggested product's website URL. - // REQUIRED - Url SuggestProductSuggestProductGetUrlAttributeType `json:"url"` -} - -type _SuggestProductSuggestProduct SuggestProductSuggestProduct - -// NewSuggestProductSuggestProduct instantiates a new SuggestProductSuggestProduct 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 NewSuggestProductSuggestProduct(companyName SuggestProductSuggestProductGetCompanyNameArgType, name SuggestProductSuggestProductGetNameArgType, url SuggestProductSuggestProductGetUrlArgType) *SuggestProductSuggestProduct { - this := SuggestProductSuggestProduct{} - setSuggestProductSuggestProductGetCompanyNameAttributeType(&this.CompanyName, companyName) - setSuggestProductSuggestProductGetNameAttributeType(&this.Name, name) - setSuggestProductSuggestProductGetUrlAttributeType(&this.Url, url) - return &this -} - -// NewSuggestProductSuggestProductWithDefaults instantiates a new SuggestProductSuggestProduct 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 NewSuggestProductSuggestProductWithDefaults() *SuggestProductSuggestProduct { - this := SuggestProductSuggestProduct{} - return &this -} - -// GetCompanyName returns the CompanyName field value -func (o *SuggestProductSuggestProduct) GetCompanyName() (ret SuggestProductSuggestProductGetCompanyNameRetType) { - ret, _ = o.GetCompanyNameOk() - return ret -} - -// GetCompanyNameOk returns a tuple with the CompanyName field value -// and a boolean to check if the value has been set. -func (o *SuggestProductSuggestProduct) GetCompanyNameOk() (ret SuggestProductSuggestProductGetCompanyNameRetType, ok bool) { - return getSuggestProductSuggestProductGetCompanyNameAttributeTypeOk(o.CompanyName) -} - -// SetCompanyName sets field value -func (o *SuggestProductSuggestProduct) SetCompanyName(v SuggestProductSuggestProductGetCompanyNameRetType) { - setSuggestProductSuggestProductGetCompanyNameAttributeType(&o.CompanyName, v) -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *SuggestProductSuggestProduct) GetMessage() (res SuggestProductSuggestProductGetMessageRetType) { - 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 *SuggestProductSuggestProduct) GetMessageOk() (ret SuggestProductSuggestProductGetMessageRetType, ok bool) { - return getSuggestProductSuggestProductGetMessageAttributeTypeOk(o.Message) -} - -// HasMessage returns a boolean if a field has been set. -func (o *SuggestProductSuggestProduct) HasMessage() bool { - _, ok := o.GetMessageOk() - return ok -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *SuggestProductSuggestProduct) SetMessage(v SuggestProductSuggestProductGetMessageRetType) { - setSuggestProductSuggestProductGetMessageAttributeType(&o.Message, v) -} - -// GetName returns the Name field value -func (o *SuggestProductSuggestProduct) GetName() (ret SuggestProductSuggestProductGetNameRetType) { - 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. -func (o *SuggestProductSuggestProduct) GetNameOk() (ret SuggestProductSuggestProductGetNameRetType, ok bool) { - return getSuggestProductSuggestProductGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -func (o *SuggestProductSuggestProduct) SetName(v SuggestProductSuggestProductGetNameRetType) { - setSuggestProductSuggestProductGetNameAttributeType(&o.Name, v) -} - -// GetUrl returns the Url field value -func (o *SuggestProductSuggestProduct) GetUrl() (ret SuggestProductSuggestProductGetUrlRetType) { - ret, _ = o.GetUrlOk() - return ret -} - -// GetUrlOk returns a tuple with the Url field value -// and a boolean to check if the value has been set. -func (o *SuggestProductSuggestProduct) GetUrlOk() (ret SuggestProductSuggestProductGetUrlRetType, ok bool) { - return getSuggestProductSuggestProductGetUrlAttributeTypeOk(o.Url) -} - -// SetUrl sets field value -func (o *SuggestProductSuggestProduct) SetUrl(v SuggestProductSuggestProductGetUrlRetType) { - setSuggestProductSuggestProductGetUrlAttributeType(&o.Url, v) -} - -func (o SuggestProductSuggestProduct) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getSuggestProductSuggestProductGetCompanyNameAttributeTypeOk(o.CompanyName); ok { - toSerialize["CompanyName"] = val - } - if val, ok := getSuggestProductSuggestProductGetMessageAttributeTypeOk(o.Message); ok { - toSerialize["Message"] = val - } - if val, ok := getSuggestProductSuggestProductGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getSuggestProductSuggestProductGetUrlAttributeTypeOk(o.Url); ok { - toSerialize["Url"] = val - } - return toSerialize, nil -} - -type NullableSuggestProductSuggestProduct struct { - value *SuggestProductSuggestProduct - isSet bool -} - -func (v NullableSuggestProductSuggestProduct) Get() *SuggestProductSuggestProduct { - return v.value -} - -func (v *NullableSuggestProductSuggestProduct) Set(val *SuggestProductSuggestProduct) { - v.value = val - v.isSet = true -} - -func (v NullableSuggestProductSuggestProduct) IsSet() bool { - return v.isSet -} - -func (v *NullableSuggestProductSuggestProduct) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSuggestProductSuggestProduct(val *SuggestProductSuggestProduct) *NullableSuggestProductSuggestProduct { - return &NullableSuggestProductSuggestProduct{value: val, isSet: true} -} - -func (v NullableSuggestProductSuggestProduct) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSuggestProductSuggestProduct) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_vendor_id.go b/services/stackitmarketplace/model_vendor_id.go new file mode 100644 index 000000000..033d20c39 --- /dev/null +++ b/services/stackitmarketplace/model_vendor_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 VendorId type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VendorId{} + +// VendorId The vendor ID. +type VendorId struct { +} + +// NewVendorId instantiates a new VendorId 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 NewVendorId() *VendorId { + this := VendorId{} + return &this +} + +// NewVendorIdWithDefaults instantiates a new VendorId 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 NewVendorIdWithDefaults() *VendorId { + this := VendorId{} + return &this +} + +func (o VendorId) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + return toSerialize, nil +} + +type NullableVendorId struct { + value *VendorId + isSet bool +} + +func (v NullableVendorId) Get() *VendorId { + return v.value +} + +func (v *NullableVendorId) Set(val *VendorId) { + v.value = val + v.isSet = true +} + +func (v NullableVendorId) IsSet() bool { + return v.isSet +} + +func (v *NullableVendorId) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVendorId(val *VendorId) *NullableVendorId { + return &NullableVendorId{value: val, isSet: true} +} + +func (v NullableVendorId) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVendorId) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/model_vendor_subscription.go b/services/stackitmarketplace/model_vendor_subscription.go index 71346cb75..91365b7cf 100644 --- a/services/stackitmarketplace/model_vendor_subscription.go +++ b/services/stackitmarketplace/model_vendor_subscription.go @@ -22,9 +22,9 @@ var _ MappedNullable = &VendorSubscription{} */ // isEnumRef -type VendorSubscriptionGetLifecycleStateAttributeType = *string -type VendorSubscriptionGetLifecycleStateArgType = string -type VendorSubscriptionGetLifecycleStateRetType = string +type VendorSubscriptionGetLifecycleStateAttributeType = *SubscriptionLifecycleState +type VendorSubscriptionGetLifecycleStateArgType = SubscriptionLifecycleState +type VendorSubscriptionGetLifecycleStateRetType = SubscriptionLifecycleState func getVendorSubscriptionGetLifecycleStateAttributeTypeOk(arg VendorSubscriptionGetLifecycleStateAttributeType) (ret VendorSubscriptionGetLifecycleStateRetType, ok bool) { if arg == nil { @@ -61,8 +61,10 @@ func setVendorSubscriptionGetProductAttributeType(arg *VendorSubscriptionGetProd types and functions for projectId */ -// isNotNullableString -type VendorSubscriptionGetProjectIdAttributeType = *string +// isModel +type VendorSubscriptionGetProjectIdAttributeType = *ProjectId +type VendorSubscriptionGetProjectIdArgType = ProjectId +type VendorSubscriptionGetProjectIdRetType = ProjectId func getVendorSubscriptionGetProjectIdAttributeTypeOk(arg VendorSubscriptionGetProjectIdAttributeType) (ret VendorSubscriptionGetProjectIdRetType, ok bool) { if arg == nil { @@ -75,15 +77,14 @@ func setVendorSubscriptionGetProjectIdAttributeType(arg *VendorSubscriptionGetPr *arg = &val } -type VendorSubscriptionGetProjectIdArgType = string -type VendorSubscriptionGetProjectIdRetType = string - /* types and functions for subscriptionId */ -// isNotNullableString -type VendorSubscriptionGetSubscriptionIdAttributeType = *string +// isModel +type VendorSubscriptionGetSubscriptionIdAttributeType = *SubscriptionId +type VendorSubscriptionGetSubscriptionIdArgType = SubscriptionId +type VendorSubscriptionGetSubscriptionIdRetType = SubscriptionId func getVendorSubscriptionGetSubscriptionIdAttributeTypeOk(arg VendorSubscriptionGetSubscriptionIdAttributeType) (ret VendorSubscriptionGetSubscriptionIdRetType, ok bool) { if arg == nil { @@ -96,20 +97,14 @@ func setVendorSubscriptionGetSubscriptionIdAttributeType(arg *VendorSubscription *arg = &val } -type VendorSubscriptionGetSubscriptionIdArgType = string -type VendorSubscriptionGetSubscriptionIdRetType = string - // VendorSubscription struct for VendorSubscription type VendorSubscription struct { - // Lifecycle state of the subscription. // REQUIRED LifecycleState VendorSubscriptionGetLifecycleStateAttributeType `json:"lifecycleState"` // REQUIRED Product VendorSubscriptionGetProductAttributeType `json:"product"` - // The associated consumer project ID. // REQUIRED ProjectId VendorSubscriptionGetProjectIdAttributeType `json:"projectId"` - // The subscription ID. // REQUIRED SubscriptionId VendorSubscriptionGetSubscriptionIdAttributeType `json:"subscriptionId"` } From 7d3c81d34b9ab96ebf1c787f10e328b8c6a814a2 Mon Sep 17 00:00:00 2001 From: Alexander Dahmen Date: Fri, 11 Apr 2025 08:47:44 +0200 Subject: [PATCH 2/2] Add changelog Signed-off-by: Alexander Dahmen --- CHANGELOG.md | 2 ++ services/stackitmarketplace/CHANGELOG.md | 3 +++ services/stackitmarketplace/go.mod | 2 +- services/stackitmarketplace/go.sum | 4 ++-- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88a088677..a2a9b07d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## Release (2025-XX-YY) - `core`: [v0.17.1](core/CHANGELOG.md#v0171-2025-04-09) - **Improvement:** Improve error message for key flow authentication +- `stackitmarketplace`: [v0.5.0](services/stackitmarketplace/CHANGELOG.md#v050-2025-04-11) + - **Feature:** Add new `InquiryContactSales`, `InquirySuggestProduct`, `PriceType`, `PricingOption` and `DeliveryMethod` ## Release (2025-04-09) - `cdn`: [v0.3.0](services/cdn/CHANGELOG.md#v030-2025-04-04) diff --git a/services/stackitmarketplace/CHANGELOG.md b/services/stackitmarketplace/CHANGELOG.md index 4370170d9..7ab1362f2 100644 --- a/services/stackitmarketplace/CHANGELOG.md +++ b/services/stackitmarketplace/CHANGELOG.md @@ -1,3 +1,6 @@ +## v0.5.0 (2025-04-11) +- **Feature:** Add new `InquiryContactSales`, `InquirySuggestProduct`, `PriceType`, `PricingOption` and `DeliveryMethod` + ## v0.4.0 (2025-04-04) - **Feature:** Add new `VendorProductId` attribute for subscription products diff --git a/services/stackitmarketplace/go.mod b/services/stackitmarketplace/go.mod index 01b15bd01..3df74c64c 100644 --- a/services/stackitmarketplace/go.mod +++ b/services/stackitmarketplace/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/google/uuid v1.6.0 - github.com/stackitcloud/stackit-sdk-go/core v0.16.2 + github.com/stackitcloud/stackit-sdk-go/core v0.17.1 ) require github.com/golang-jwt/jwt/v5 v5.2.2 // indirect diff --git a/services/stackitmarketplace/go.sum b/services/stackitmarketplace/go.sum index 93bc53c57..2b714ffcc 100644 --- a/services/stackitmarketplace/go.sum +++ b/services/stackitmarketplace/go.sum @@ -4,5 +4,5 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/stackitcloud/stackit-sdk-go/core v0.16.2 h1:F8A4P/LLlQSbz0S0+G3m8rb3BUOK6EcR/CKx5UQY5jQ= -github.com/stackitcloud/stackit-sdk-go/core v0.16.2/go.mod h1:8KIw3czdNJ9sdil9QQimxjR6vHjeINFrRv0iZ67wfn0= +github.com/stackitcloud/stackit-sdk-go/core v0.17.1 h1:TTrVoB1lERd/qfWzpe6HpwCJSjtaGnUI7UE7ITb5IT0= +github.com/stackitcloud/stackit-sdk-go/core v0.17.1/go.mod h1:8KIw3czdNJ9sdil9QQimxjR6vHjeINFrRv0iZ67wfn0=