From 5d6c2bec1110c03b0d1f85e26d6c16e01c446d61 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Tue, 17 Jun 2025 13:43:59 +0000 Subject: [PATCH] Generate stackitmarketplace --- .../stackitmarketplace/model_become_vendor.go | 4 +- .../model_catalog_product_detail.go | 91 ++++++++++---- .../model_catalog_product_details_vendor.go | 12 +- ...odel_catalog_product_facets_value_inner.go | 4 +- .../model_catalog_product_overview.go | 12 +- .../model_catalog_product_overview_vendor.go | 6 +- .../model_catalog_product_pricing_option.go | 12 +- .../model_catalog_product_vendor_terms.go | 6 +- .../stackitmarketplace/model_contact_sales.go | 4 +- .../model_error_response.go | 10 +- .../model_inquiry_become_vendor.go | 4 +- .../model_inquiry_contact_sales.go | 10 +- .../model_inquiry_register_testing.go | 6 +- .../model_inquiry_suggest_product.go | 6 +- .../model_list_catalog_products_response.go | 6 +- ...odel_list_vendor_subscriptions_response.go | 6 +- .../stackitmarketplace/model_offer_type.go | 115 ++++++++++++++++++ .../model_offer_type_test.go | 11 ++ .../model_register_testing.go | 4 +- .../model_resolve_customer_payload.go | 2 +- .../model_subscription_product.go | 16 +-- .../model_suggest_product.go | 4 +- .../model_vendor_subscription.go | 10 +- 23 files changed, 267 insertions(+), 94 deletions(-) create mode 100644 services/stackitmarketplace/model_offer_type.go create mode 100644 services/stackitmarketplace/model_offer_type_test.go diff --git a/services/stackitmarketplace/model_become_vendor.go b/services/stackitmarketplace/model_become_vendor.go index f4e4de868..8e0412783 100644 --- a/services/stackitmarketplace/model_become_vendor.go +++ b/services/stackitmarketplace/model_become_vendor.go @@ -60,9 +60,9 @@ func setBecomeVendorGetTypeAttributeType(arg *BecomeVendorGetTypeAttributeType, // BecomeVendor Become a Vendor. type BecomeVendor struct { // REQUIRED - BecomeVendor BecomeVendorGetBecomeVendorAttributeType `json:"becomeVendor"` + BecomeVendor BecomeVendorGetBecomeVendorAttributeType `json:"becomeVendor" required:"true"` // REQUIRED - Type BecomeVendorGetTypeAttributeType `json:"type"` + Type BecomeVendorGetTypeAttributeType `json:"type" required:"true"` } type _BecomeVendor BecomeVendor diff --git a/services/stackitmarketplace/model_catalog_product_detail.go b/services/stackitmarketplace/model_catalog_product_detail.go index 01819416f..8e53c09e4 100644 --- a/services/stackitmarketplace/model_catalog_product_detail.go +++ b/services/stackitmarketplace/model_catalog_product_detail.go @@ -241,6 +241,26 @@ func setCatalogProductDetailGetNameAttributeType(arg *CatalogProductDetailGetNam type CatalogProductDetailGetNameArgType = string type CatalogProductDetailGetNameRetType = string +/* + types and functions for offerType +*/ + +// isEnumRef +type CatalogProductDetailGetOfferTypeAttributeType = *OfferType +type CatalogProductDetailGetOfferTypeArgType = OfferType +type CatalogProductDetailGetOfferTypeRetType = OfferType + +func getCatalogProductDetailGetOfferTypeAttributeTypeOk(arg CatalogProductDetailGetOfferTypeAttributeType) (ret CatalogProductDetailGetOfferTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCatalogProductDetailGetOfferTypeAttributeType(arg *CatalogProductDetailGetOfferTypeAttributeType, val CatalogProductDetailGetOfferTypeRetType) { + *arg = &val +} + /* types and functions for pricingOptions */ @@ -431,40 +451,41 @@ type CatalogProductDetail struct { // The list of categories associated to the product. Categories CatalogProductDetailGetCategoriesAttributeType `json:"categories,omitempty"` // REQUIRED - DeliveryMethod CatalogProductDetailGetDeliveryMethodAttributeType `json:"deliveryMethod"` + DeliveryMethod CatalogProductDetailGetDeliveryMethodAttributeType `json:"deliveryMethod" required:"true"` // The product description. // REQUIRED - Description CatalogProductDetailGetDescriptionAttributeType `json:"description"` + Description CatalogProductDetailGetDescriptionAttributeType `json:"description" required:"true"` // Uniform Resource Locator. // REQUIRED - DocumentationUrl CatalogProductDetailGetDocumentationUrlAttributeType `json:"documentationUrl"` + DocumentationUrl CatalogProductDetailGetDocumentationUrlAttributeType `json:"documentationUrl" required:"true"` // A e-mail address. Email CatalogProductDetailGetEmailAttributeType `json:"email,omitempty"` // The list of highlights. // REQUIRED - Highlights CatalogProductDetailGetHighlightsAttributeType `json:"highlights"` + Highlights CatalogProductDetailGetHighlightsAttributeType `json:"highlights" required:"true"` // The list of industries associated to the product. Industries CatalogProductDetailGetIndustriesAttributeType `json:"industries,omitempty"` // Boolean data type. + IsProductListing CatalogProductDetailgetIsProductListingAttributeType `json:"isProductListing,omitempty"` // REQUIRED - IsProductListing CatalogProductDetailgetIsProductListingAttributeType `json:"isProductListing"` - // REQUIRED - LifecycleState CatalogProductDetailGetLifecycleStateAttributeType `json:"lifecycleState"` + LifecycleState CatalogProductDetailGetLifecycleStateAttributeType `json:"lifecycleState" required:"true"` // The logo base64 encoded. // REQUIRED - Logo CatalogProductDetailGetLogoAttributeType `json:"logo"` + Logo CatalogProductDetailGetLogoAttributeType `json:"logo" required:"true"` // The name of the product. // REQUIRED - Name CatalogProductDetailGetNameAttributeType `json:"name"` + Name CatalogProductDetailGetNameAttributeType `json:"name" required:"true"` + // REQUIRED + OfferType CatalogProductDetailGetOfferTypeAttributeType `json:"offerType" required:"true"` // The list of pricing options. // REQUIRED - PricingOptions CatalogProductDetailGetPricingOptionsAttributeType `json:"pricingOptions"` + PricingOptions CatalogProductDetailGetPricingOptionsAttributeType `json:"pricingOptions" required:"true"` // The user-readable product ID. // REQUIRED - ProductId CatalogProductDetailGetProductIdAttributeType `json:"productId"` + ProductId CatalogProductDetailGetProductIdAttributeType `json:"productId" required:"true"` // The short summary of the product. // REQUIRED - Summary CatalogProductDetailGetSummaryAttributeType `json:"summary"` + Summary CatalogProductDetailGetSummaryAttributeType `json:"summary" required:"true"` // Uniform Resource Locator. SupportFaq CatalogProductDetailGetSupportFaqAttributeType `json:"supportFaq,omitempty"` // The phone number for support inquiries. @@ -472,12 +493,12 @@ type CatalogProductDetail struct { // The list of support resources. SupportResources CatalogProductDetailGetSupportResourcesAttributeType `json:"supportResources,omitempty"` // REQUIRED - Vendor CatalogProductDetailGetVendorAttributeType `json:"vendor"` + Vendor CatalogProductDetailGetVendorAttributeType `json:"vendor" required:"true"` // The list of terms of use. VendorTerms CatalogProductDetailGetVendorTermsAttributeType `json:"vendorTerms,omitempty"` // Uniform Resource Locator. // REQUIRED - VideoUrl CatalogProductDetailGetVideoUrlAttributeType `json:"videoUrl"` + VideoUrl CatalogProductDetailGetVideoUrlAttributeType `json:"videoUrl" required:"true"` } type _CatalogProductDetail CatalogProductDetail @@ -486,16 +507,16 @@ type _CatalogProductDetail CatalogProductDetail // 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 NewCatalogProductDetail(deliveryMethod CatalogProductDetailGetDeliveryMethodArgType, description CatalogProductDetailGetDescriptionArgType, documentationUrl CatalogProductDetailGetDocumentationUrlArgType, highlights CatalogProductDetailGetHighlightsArgType, isProductListing CatalogProductDetailgetIsProductListingArgType, lifecycleState CatalogProductDetailGetLifecycleStateArgType, logo CatalogProductDetailGetLogoArgType, name CatalogProductDetailGetNameArgType, pricingOptions CatalogProductDetailGetPricingOptionsArgType, productId CatalogProductDetailGetProductIdArgType, summary CatalogProductDetailGetSummaryArgType, vendor CatalogProductDetailGetVendorArgType, videoUrl CatalogProductDetailGetVideoUrlArgType) *CatalogProductDetail { +func NewCatalogProductDetail(deliveryMethod CatalogProductDetailGetDeliveryMethodArgType, description CatalogProductDetailGetDescriptionArgType, documentationUrl CatalogProductDetailGetDocumentationUrlArgType, highlights CatalogProductDetailGetHighlightsArgType, lifecycleState CatalogProductDetailGetLifecycleStateArgType, logo CatalogProductDetailGetLogoArgType, name CatalogProductDetailGetNameArgType, offerType CatalogProductDetailGetOfferTypeArgType, pricingOptions CatalogProductDetailGetPricingOptionsArgType, productId CatalogProductDetailGetProductIdArgType, summary CatalogProductDetailGetSummaryArgType, vendor CatalogProductDetailGetVendorArgType, videoUrl CatalogProductDetailGetVideoUrlArgType) *CatalogProductDetail { this := CatalogProductDetail{} setCatalogProductDetailGetDeliveryMethodAttributeType(&this.DeliveryMethod, deliveryMethod) setCatalogProductDetailGetDescriptionAttributeType(&this.Description, description) setCatalogProductDetailGetDocumentationUrlAttributeType(&this.DocumentationUrl, documentationUrl) setCatalogProductDetailGetHighlightsAttributeType(&this.Highlights, highlights) - setCatalogProductDetailgetIsProductListingAttributeType(&this.IsProductListing, isProductListing) setCatalogProductDetailGetLifecycleStateAttributeType(&this.LifecycleState, lifecycleState) setCatalogProductDetailGetLogoAttributeType(&this.Logo, logo) setCatalogProductDetailGetNameAttributeType(&this.Name, name) + setCatalogProductDetailGetOfferTypeAttributeType(&this.OfferType, offerType) setCatalogProductDetailGetPricingOptionsAttributeType(&this.PricingOptions, pricingOptions) setCatalogProductDetailGetProductIdAttributeType(&this.ProductId, productId) setCatalogProductDetailGetSummaryAttributeType(&this.Summary, summary) @@ -649,19 +670,25 @@ func (o *CatalogProductDetail) SetIndustries(v CatalogProductDetailGetIndustries setCatalogProductDetailGetIndustriesAttributeType(&o.Industries, v) } -// GetIsProductListing returns the IsProductListing field value -func (o *CatalogProductDetail) GetIsProductListing() (ret CatalogProductDetailgetIsProductListingRetType) { - ret, _ = o.GetIsProductListingOk() - return ret +// GetIsProductListing returns the IsProductListing field value if set, zero value otherwise. +func (o *CatalogProductDetail) GetIsProductListing() (res CatalogProductDetailgetIsProductListingRetType) { + res, _ = o.GetIsProductListingOk() + return } -// GetIsProductListingOk returns a tuple with the IsProductListing field value +// GetIsProductListingOk returns a tuple with the IsProductListing field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CatalogProductDetail) GetIsProductListingOk() (ret CatalogProductDetailgetIsProductListingRetType, ok bool) { return getCatalogProductDetailgetIsProductListingAttributeTypeOk(o.IsProductListing) } -// SetIsProductListing sets field value +// HasIsProductListing returns a boolean if a field has been set. +func (o *CatalogProductDetail) HasIsProductListing() bool { + _, ok := o.GetIsProductListingOk() + return ok +} + +// SetIsProductListing gets a reference to the given bool and assigns it to the IsProductListing field. func (o *CatalogProductDetail) SetIsProductListing(v CatalogProductDetailgetIsProductListingRetType) { setCatalogProductDetailgetIsProductListingAttributeType(&o.IsProductListing, v) } @@ -717,6 +744,23 @@ func (o *CatalogProductDetail) SetName(v CatalogProductDetailGetNameRetType) { setCatalogProductDetailGetNameAttributeType(&o.Name, v) } +// GetOfferType returns the OfferType field value +func (o *CatalogProductDetail) GetOfferType() (ret CatalogProductDetailGetOfferTypeRetType) { + ret, _ = o.GetOfferTypeOk() + return ret +} + +// GetOfferTypeOk returns a tuple with the OfferType field value +// and a boolean to check if the value has been set. +func (o *CatalogProductDetail) GetOfferTypeOk() (ret CatalogProductDetailGetOfferTypeRetType, ok bool) { + return getCatalogProductDetailGetOfferTypeAttributeTypeOk(o.OfferType) +} + +// SetOfferType sets field value +func (o *CatalogProductDetail) SetOfferType(v CatalogProductDetailGetOfferTypeRetType) { + setCatalogProductDetailGetOfferTypeAttributeType(&o.OfferType, v) +} + // GetPricingOptions returns the PricingOptions field value func (o *CatalogProductDetail) GetPricingOptions() (ret CatalogProductDetailGetPricingOptionsRetType) { ret, _ = o.GetPricingOptionsOk() @@ -929,6 +973,9 @@ func (o CatalogProductDetail) ToMap() (map[string]interface{}, error) { if val, ok := getCatalogProductDetailGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } + if val, ok := getCatalogProductDetailGetOfferTypeAttributeTypeOk(o.OfferType); ok { + toSerialize["OfferType"] = val + } if val, ok := getCatalogProductDetailGetPricingOptionsAttributeTypeOk(o.PricingOptions); ok { toSerialize["PricingOptions"] = val } diff --git a/services/stackitmarketplace/model_catalog_product_details_vendor.go b/services/stackitmarketplace/model_catalog_product_details_vendor.go index 55652eb66..ec8fe18cc 100644 --- a/services/stackitmarketplace/model_catalog_product_details_vendor.go +++ b/services/stackitmarketplace/model_catalog_product_details_vendor.go @@ -146,22 +146,22 @@ type CatalogProductDetailsVendorGetWebsiteUrlRetType = string type CatalogProductDetailsVendor struct { // The vendor description. // REQUIRED - Description CatalogProductDetailsVendorGetDescriptionAttributeType `json:"description"` + Description CatalogProductDetailsVendorGetDescriptionAttributeType `json:"description" required:"true"` // The logo base64 encoded. // REQUIRED - Logo CatalogProductDetailsVendorGetLogoAttributeType `json:"logo"` + Logo CatalogProductDetailsVendorGetLogoAttributeType `json:"logo" required:"true"` // The product's vendor name. // REQUIRED - Name CatalogProductDetailsVendorGetNameAttributeType `json:"name"` + Name CatalogProductDetailsVendorGetNameAttributeType `json:"name" required:"true"` // Universally Unique Identifier (UUID). // REQUIRED - VendorId CatalogProductDetailsVendorGetVendorIdAttributeType `json:"vendorId"` + VendorId CatalogProductDetailsVendorGetVendorIdAttributeType `json:"vendorId" required:"true"` // Uniform Resource Locator. // REQUIRED - VideoUrl CatalogProductDetailsVendorGetVideoUrlAttributeType `json:"videoUrl"` + VideoUrl CatalogProductDetailsVendorGetVideoUrlAttributeType `json:"videoUrl" required:"true"` // Uniform Resource Locator. // REQUIRED - WebsiteUrl CatalogProductDetailsVendorGetWebsiteUrlAttributeType `json:"websiteUrl"` + WebsiteUrl CatalogProductDetailsVendorGetWebsiteUrlAttributeType `json:"websiteUrl" required:"true"` } type _CatalogProductDetailsVendor CatalogProductDetailsVendor diff --git a/services/stackitmarketplace/model_catalog_product_facets_value_inner.go b/services/stackitmarketplace/model_catalog_product_facets_value_inner.go index 21926fc61..ec1f25d16 100644 --- a/services/stackitmarketplace/model_catalog_product_facets_value_inner.go +++ b/services/stackitmarketplace/model_catalog_product_facets_value_inner.go @@ -63,10 +63,10 @@ type CatalogProductFacetsValueInner struct { // The number of items associated with this facet value. // Can be cast to int32 without loss of precision. // REQUIRED - Count CatalogProductFacetsValueInnerGetCountAttributeType `json:"count"` + Count CatalogProductFacetsValueInnerGetCountAttributeType `json:"count" required:"true"` // The value of the facet. // REQUIRED - Value CatalogProductFacetsValueInnerGetValueAttributeType `json:"value"` + Value CatalogProductFacetsValueInnerGetValueAttributeType `json:"value" required:"true"` } type _CatalogProductFacetsValueInner CatalogProductFacetsValueInner diff --git a/services/stackitmarketplace/model_catalog_product_overview.go b/services/stackitmarketplace/model_catalog_product_overview.go index 2f34dd3db..2cf10ecfe 100644 --- a/services/stackitmarketplace/model_catalog_product_overview.go +++ b/services/stackitmarketplace/model_catalog_product_overview.go @@ -163,22 +163,22 @@ func setCatalogProductOverviewGetVendorAttributeType(arg *CatalogProductOverview // CatalogProductOverview struct for CatalogProductOverview type CatalogProductOverview struct { // REQUIRED - DeliveryMethod CatalogProductOverviewGetDeliveryMethodAttributeType `json:"deliveryMethod"` + DeliveryMethod CatalogProductOverviewGetDeliveryMethodAttributeType `json:"deliveryMethod" required:"true"` // REQUIRED - LifecycleState CatalogProductOverviewGetLifecycleStateAttributeType `json:"lifecycleState"` + LifecycleState CatalogProductOverviewGetLifecycleStateAttributeType `json:"lifecycleState" required:"true"` // The logo base64 encoded. Logo CatalogProductOverviewGetLogoAttributeType `json:"logo,omitempty"` // The name of the product. // REQUIRED - Name CatalogProductOverviewGetNameAttributeType `json:"name"` + Name CatalogProductOverviewGetNameAttributeType `json:"name" required:"true"` // The user-readable product ID. // REQUIRED - ProductId CatalogProductOverviewGetProductIdAttributeType `json:"productId"` + ProductId CatalogProductOverviewGetProductIdAttributeType `json:"productId" required:"true"` // A custom message. // REQUIRED - Summary CatalogProductOverviewGetSummaryAttributeType `json:"summary"` + Summary CatalogProductOverviewGetSummaryAttributeType `json:"summary" required:"true"` // REQUIRED - Vendor CatalogProductOverviewGetVendorAttributeType `json:"vendor"` + Vendor CatalogProductOverviewGetVendorAttributeType `json:"vendor" required:"true"` } type _CatalogProductOverview CatalogProductOverview diff --git a/services/stackitmarketplace/model_catalog_product_overview_vendor.go b/services/stackitmarketplace/model_catalog_product_overview_vendor.go index 0445607d3..507d5d115 100644 --- a/services/stackitmarketplace/model_catalog_product_overview_vendor.go +++ b/services/stackitmarketplace/model_catalog_product_overview_vendor.go @@ -84,13 +84,13 @@ type CatalogProductOverviewVendorGetWebsiteUrlRetType = string type CatalogProductOverviewVendor struct { // The product's vendor name. // REQUIRED - Name CatalogProductOverviewVendorGetNameAttributeType `json:"name"` + Name CatalogProductOverviewVendorGetNameAttributeType `json:"name" required:"true"` // Universally Unique Identifier (UUID). // REQUIRED - VendorId CatalogProductOverviewVendorGetVendorIdAttributeType `json:"vendorId"` + VendorId CatalogProductOverviewVendorGetVendorIdAttributeType `json:"vendorId" required:"true"` // Uniform Resource Locator. // REQUIRED - WebsiteUrl CatalogProductOverviewVendorGetWebsiteUrlAttributeType `json:"websiteUrl"` + WebsiteUrl CatalogProductOverviewVendorGetWebsiteUrlAttributeType `json:"websiteUrl" required:"true"` } type _CatalogProductOverviewVendor CatalogProductOverviewVendor diff --git a/services/stackitmarketplace/model_catalog_product_pricing_option.go b/services/stackitmarketplace/model_catalog_product_pricing_option.go index b84b0aeba..ed2f3a65d 100644 --- a/services/stackitmarketplace/model_catalog_product_pricing_option.go +++ b/services/stackitmarketplace/model_catalog_product_pricing_option.go @@ -228,13 +228,13 @@ func setCatalogProductPricingOptionGetUnitAttributeType(arg *CatalogProductPrici type CatalogProductPricingOption struct { // The pricing option description. // REQUIRED - Description CatalogProductPricingOptionGetDescriptionAttributeType `json:"description"` + Description CatalogProductPricingOptionGetDescriptionAttributeType `json:"description" required:"true"` // The list of highlights. // REQUIRED - Highlights CatalogProductPricingOptionGetHighlightsAttributeType `json:"highlights"` + Highlights CatalogProductPricingOptionGetHighlightsAttributeType `json:"highlights" required:"true"` // The pricing option name. // REQUIRED - Name CatalogProductPricingOptionGetNameAttributeType `json:"name"` + Name CatalogProductPricingOptionGetNameAttributeType `json:"name" required:"true"` PriceType CatalogProductPricingOptionGetPriceTypeAttributeType `json:"priceType,omitempty"` // Additional price type information. PricingPlan CatalogProductPricingOptionGetPricingPlanAttributeType `json:"pricingPlan,omitempty"` @@ -242,13 +242,13 @@ type CatalogProductPricingOption struct { Rate CatalogProductPricingOptionGetRateAttributeType `json:"rate,omitempty"` // The concrete variant of the product. // REQUIRED - Sku CatalogProductPricingOptionGetSkuAttributeType `json:"sku"` + Sku CatalogProductPricingOptionGetSkuAttributeType `json:"sku" required:"true"` // Short description of this offering. // REQUIRED - SkuInfo CatalogProductPricingOptionGetSkuInfoAttributeType `json:"skuInfo"` + SkuInfo CatalogProductPricingOptionGetSkuInfoAttributeType `json:"skuInfo" required:"true"` // More details about what this offering entails. // REQUIRED - SkuInfoDetails CatalogProductPricingOptionGetSkuInfoDetailsAttributeType `json:"skuInfoDetails"` + SkuInfoDetails CatalogProductPricingOptionGetSkuInfoDetailsAttributeType `json:"skuInfoDetails" required:"true"` Unit CatalogProductPricingOptionGetUnitAttributeType `json:"unit,omitempty"` } diff --git a/services/stackitmarketplace/model_catalog_product_vendor_terms.go b/services/stackitmarketplace/model_catalog_product_vendor_terms.go index 531ae53a1..71e18880f 100644 --- a/services/stackitmarketplace/model_catalog_product_vendor_terms.go +++ b/services/stackitmarketplace/model_catalog_product_vendor_terms.go @@ -84,13 +84,13 @@ type CatalogProductVendorTermsGetUrlRetType = string type CatalogProductVendorTerms struct { // The terms of service description. // REQUIRED - Description CatalogProductVendorTermsGetDescriptionAttributeType `json:"description"` + Description CatalogProductVendorTermsGetDescriptionAttributeType `json:"description" required:"true"` // The terms of service title. // REQUIRED - Title CatalogProductVendorTermsGetTitleAttributeType `json:"title"` + Title CatalogProductVendorTermsGetTitleAttributeType `json:"title" required:"true"` // Uniform Resource Locator. // REQUIRED - Url CatalogProductVendorTermsGetUrlAttributeType `json:"url"` + Url CatalogProductVendorTermsGetUrlAttributeType `json:"url" required:"true"` } type _CatalogProductVendorTerms CatalogProductVendorTerms diff --git a/services/stackitmarketplace/model_contact_sales.go b/services/stackitmarketplace/model_contact_sales.go index da213a791..c3babbd65 100644 --- a/services/stackitmarketplace/model_contact_sales.go +++ b/services/stackitmarketplace/model_contact_sales.go @@ -60,9 +60,9 @@ func setContactSalesGetTypeAttributeType(arg *ContactSalesGetTypeAttributeType, // ContactSales Contact sales. type ContactSales struct { // REQUIRED - ContactSales ContactSalesGetContactSalesAttributeType `json:"contactSales"` + ContactSales ContactSalesGetContactSalesAttributeType `json:"contactSales" required:"true"` // REQUIRED - Type ContactSalesGetTypeAttributeType `json:"type"` + Type ContactSalesGetTypeAttributeType `json:"type" required:"true"` } type _ContactSales ContactSales diff --git a/services/stackitmarketplace/model_error_response.go b/services/stackitmarketplace/model_error_response.go index 58c9a9dae..d508b56b6 100644 --- a/services/stackitmarketplace/model_error_response.go +++ b/services/stackitmarketplace/model_error_response.go @@ -125,20 +125,20 @@ func setErrorResponseGetTimeStampAttributeType(arg *ErrorResponseGetTimeStampAtt type ErrorResponse struct { // Reason phrase of the status code. // REQUIRED - Error ErrorResponseGetErrorAttributeType `json:"error"` + Error ErrorResponseGetErrorAttributeType `json:"error" required:"true"` // Description of the error. // REQUIRED - Message ErrorResponseGetMessageAttributeType `json:"message"` + Message ErrorResponseGetMessageAttributeType `json:"message" required:"true"` // Path which was called. // REQUIRED - Path ErrorResponseGetPathAttributeType `json:"path"` + Path ErrorResponseGetPathAttributeType `json:"path" required:"true"` // HTTP response status code. // Can be cast to int32 without loss of precision. // REQUIRED - Status ErrorResponseGetStatusAttributeType `json:"status"` + Status ErrorResponseGetStatusAttributeType `json:"status" required:"true"` // Timestamp at which the error occurred. // REQUIRED - TimeStamp ErrorResponseGetTimeStampAttributeType `json:"timeStamp"` + TimeStamp ErrorResponseGetTimeStampAttributeType `json:"timeStamp" required:"true"` } type _ErrorResponse ErrorResponse diff --git a/services/stackitmarketplace/model_inquiry_become_vendor.go b/services/stackitmarketplace/model_inquiry_become_vendor.go index e23420f07..0852cbdf3 100644 --- a/services/stackitmarketplace/model_inquiry_become_vendor.go +++ b/services/stackitmarketplace/model_inquiry_become_vendor.go @@ -63,10 +63,10 @@ type InquiryBecomeVendorGetMessageRetType = string type InquiryBecomeVendor struct { // A e-mail address. // REQUIRED - ContactEmail InquiryBecomeVendorGetContactEmailAttributeType `json:"contactEmail"` + ContactEmail InquiryBecomeVendorGetContactEmailAttributeType `json:"contactEmail" required:"true"` // A custom message. // REQUIRED - Message InquiryBecomeVendorGetMessageAttributeType `json:"message"` + Message InquiryBecomeVendorGetMessageAttributeType `json:"message" required:"true"` } type _InquiryBecomeVendor InquiryBecomeVendor diff --git a/services/stackitmarketplace/model_inquiry_contact_sales.go b/services/stackitmarketplace/model_inquiry_contact_sales.go index 98a6847eb..8a3d8c9aa 100644 --- a/services/stackitmarketplace/model_inquiry_contact_sales.go +++ b/services/stackitmarketplace/model_inquiry_contact_sales.go @@ -126,19 +126,19 @@ type InquiryContactSalesGetProductIdRetType = string type InquiryContactSales struct { // The product's vendor name. // REQUIRED - CompanyName InquiryContactSalesGetCompanyNameAttributeType `json:"companyName"` + CompanyName InquiryContactSalesGetCompanyNameAttributeType `json:"companyName" required:"true"` // A e-mail address. // REQUIRED - ContactEmail InquiryContactSalesGetContactEmailAttributeType `json:"contactEmail"` + ContactEmail InquiryContactSalesGetContactEmailAttributeType `json:"contactEmail" required:"true"` // The full name of the contact person. // REQUIRED - FullName InquiryContactSalesGetFullNameAttributeType `json:"fullName"` + FullName InquiryContactSalesGetFullNameAttributeType `json:"fullName" required:"true"` // A custom message. // REQUIRED - Message InquiryContactSalesGetMessageAttributeType `json:"message"` + Message InquiryContactSalesGetMessageAttributeType `json:"message" required:"true"` // The user-readable product ID. // REQUIRED - ProductId InquiryContactSalesGetProductIdAttributeType `json:"productId"` + ProductId InquiryContactSalesGetProductIdAttributeType `json:"productId" required:"true"` } type _InquiryContactSales InquiryContactSales diff --git a/services/stackitmarketplace/model_inquiry_register_testing.go b/services/stackitmarketplace/model_inquiry_register_testing.go index ba4b0204d..ee0312189 100644 --- a/services/stackitmarketplace/model_inquiry_register_testing.go +++ b/services/stackitmarketplace/model_inquiry_register_testing.go @@ -84,13 +84,13 @@ type InquiryRegisterTestingGetMessageRetType = string type InquiryRegisterTesting struct { // A e-mail address. // REQUIRED - ContactEmail InquiryRegisterTestingGetContactEmailAttributeType `json:"contactEmail"` + ContactEmail InquiryRegisterTestingGetContactEmailAttributeType `json:"contactEmail" required:"true"` // The full name of the contact person. // REQUIRED - FullName InquiryRegisterTestingGetFullNameAttributeType `json:"fullName"` + FullName InquiryRegisterTestingGetFullNameAttributeType `json:"fullName" required:"true"` // A custom message. // REQUIRED - Message InquiryRegisterTestingGetMessageAttributeType `json:"message"` + Message InquiryRegisterTestingGetMessageAttributeType `json:"message" required:"true"` } type _InquiryRegisterTesting InquiryRegisterTesting diff --git a/services/stackitmarketplace/model_inquiry_suggest_product.go b/services/stackitmarketplace/model_inquiry_suggest_product.go index 21f74fcc3..7a65690f8 100644 --- a/services/stackitmarketplace/model_inquiry_suggest_product.go +++ b/services/stackitmarketplace/model_inquiry_suggest_product.go @@ -105,15 +105,15 @@ type InquirySuggestProductGetUrlRetType = string type InquirySuggestProduct struct { // The product's vendor name. // REQUIRED - CompanyName InquirySuggestProductGetCompanyNameAttributeType `json:"companyName"` + CompanyName InquirySuggestProductGetCompanyNameAttributeType `json:"companyName" required:"true"` // A custom message. Message InquirySuggestProductGetMessageAttributeType `json:"message,omitempty"` // The name of the product. // REQUIRED - Name InquirySuggestProductGetNameAttributeType `json:"name"` + Name InquirySuggestProductGetNameAttributeType `json:"name" required:"true"` // Uniform Resource Locator. // REQUIRED - Url InquirySuggestProductGetUrlAttributeType `json:"url"` + Url InquirySuggestProductGetUrlAttributeType `json:"url" required:"true"` } type _InquirySuggestProduct InquirySuggestProduct diff --git a/services/stackitmarketplace/model_list_catalog_products_response.go b/services/stackitmarketplace/model_list_catalog_products_response.go index 95275e81e..e2aaf0751 100644 --- a/services/stackitmarketplace/model_list_catalog_products_response.go +++ b/services/stackitmarketplace/model_list_catalog_products_response.go @@ -102,14 +102,14 @@ func setListCatalogProductsResponseGetLimitAttributeType(arg *ListCatalogProduct type ListCatalogProductsResponse struct { // 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"` + Cursor ListCatalogProductsResponseGetCursorAttributeType `json:"cursor" required:"true"` // A collection of facets, where each key represents a facet category. Facets ListCatalogProductsResponseGetFacetsAttributeType `json:"facets,omitempty"` // REQUIRED - Items ListCatalogProductsResponseGetItemsAttributeType `json:"items"` + Items ListCatalogProductsResponseGetItemsAttributeType `json:"items" required:"true"` // Limit for returned Objects. // REQUIRED - Limit ListCatalogProductsResponseGetLimitAttributeType `json:"limit"` + Limit ListCatalogProductsResponseGetLimitAttributeType `json:"limit" required:"true"` } type _ListCatalogProductsResponse ListCatalogProductsResponse diff --git a/services/stackitmarketplace/model_list_vendor_subscriptions_response.go b/services/stackitmarketplace/model_list_vendor_subscriptions_response.go index 3c112cfcc..938876a99 100644 --- a/services/stackitmarketplace/model_list_vendor_subscriptions_response.go +++ b/services/stackitmarketplace/model_list_vendor_subscriptions_response.go @@ -82,13 +82,13 @@ func setListVendorSubscriptionsResponseGetLimitAttributeType(arg *ListVendorSubs type ListVendorSubscriptionsResponse struct { // 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"` + Cursor ListVendorSubscriptionsResponseGetCursorAttributeType `json:"cursor" required:"true"` // List of subscriptions. // REQUIRED - Items ListVendorSubscriptionsResponseGetItemsAttributeType `json:"items"` + Items ListVendorSubscriptionsResponseGetItemsAttributeType `json:"items" required:"true"` // Limit for returned Objects. // REQUIRED - Limit ListVendorSubscriptionsResponseGetLimitAttributeType `json:"limit"` + Limit ListVendorSubscriptionsResponseGetLimitAttributeType `json:"limit" required:"true"` } type _ListVendorSubscriptionsResponse ListVendorSubscriptionsResponse diff --git a/services/stackitmarketplace/model_offer_type.go b/services/stackitmarketplace/model_offer_type.go new file mode 100644 index 000000000..4cce94f56 --- /dev/null +++ b/services/stackitmarketplace/model_offer_type.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" +) + +// OfferType The offer type of a product reflecting the business model. +type OfferType string + +// List of offerType +const ( + OFFERTYPE_LISTING OfferType = "OFFER_LISTING" + OFFERTYPE_RESELLING OfferType = "OFFER_RESELLING" +) + +// All allowed values of OfferType enum +var AllowedOfferTypeEnumValues = []OfferType{ + "OFFER_LISTING", + "OFFER_RESELLING", +} + +func (v *OfferType) 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 := OfferType(value) + for _, existing := range AllowedOfferTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid OfferType", value) +} + +// NewOfferTypeFromValue returns a pointer to a valid OfferType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewOfferTypeFromValue(v string) (*OfferType, error) { + ev := OfferType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for OfferType: valid values are %v", v, AllowedOfferTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v OfferType) IsValid() bool { + for _, existing := range AllowedOfferTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to offerType value +func (v OfferType) Ptr() *OfferType { + return &v +} + +type NullableOfferType struct { + value *OfferType + isSet bool +} + +func (v NullableOfferType) Get() *OfferType { + return v.value +} + +func (v *NullableOfferType) Set(val *OfferType) { + v.value = val + v.isSet = true +} + +func (v NullableOfferType) IsSet() bool { + return v.isSet +} + +func (v *NullableOfferType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOfferType(val *OfferType) *NullableOfferType { + return &NullableOfferType{value: val, isSet: true} +} + +func (v NullableOfferType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOfferType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/model_offer_type_test.go b/services/stackitmarketplace/model_offer_type_test.go new file mode 100644 index 000000000..8d52b2c3c --- /dev/null +++ b/services/stackitmarketplace/model_offer_type_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackitmarketplace diff --git a/services/stackitmarketplace/model_register_testing.go b/services/stackitmarketplace/model_register_testing.go index 7b3efbfd7..58953e1d0 100644 --- a/services/stackitmarketplace/model_register_testing.go +++ b/services/stackitmarketplace/model_register_testing.go @@ -60,9 +60,9 @@ func setRegisterTestingGetTypeAttributeType(arg *RegisterTestingGetTypeAttribute // RegisterTesting Register for testing. type RegisterTesting struct { // REQUIRED - RegisterTesting RegisterTestingGetRegisterTestingAttributeType `json:"registerTesting"` + RegisterTesting RegisterTestingGetRegisterTestingAttributeType `json:"registerTesting" required:"true"` // REQUIRED - Type RegisterTestingGetTypeAttributeType `json:"type"` + Type RegisterTestingGetTypeAttributeType `json:"type" required:"true"` } type _RegisterTesting RegisterTesting diff --git a/services/stackitmarketplace/model_resolve_customer_payload.go b/services/stackitmarketplace/model_resolve_customer_payload.go index 07a050c82..2ad8bf522 100644 --- a/services/stackitmarketplace/model_resolve_customer_payload.go +++ b/services/stackitmarketplace/model_resolve_customer_payload.go @@ -42,7 +42,7 @@ type ResolveCustomerPayloadGetTokenRetType = string type ResolveCustomerPayload struct { // Opaque token exchangeable for subscription details. // REQUIRED - Token ResolveCustomerPayloadGetTokenAttributeType `json:"token"` + Token ResolveCustomerPayloadGetTokenAttributeType `json:"token" required:"true"` } type _ResolveCustomerPayload ResolveCustomerPayload diff --git a/services/stackitmarketplace/model_subscription_product.go b/services/stackitmarketplace/model_subscription_product.go index 145be8ef6..873fb9507 100644 --- a/services/stackitmarketplace/model_subscription_product.go +++ b/services/stackitmarketplace/model_subscription_product.go @@ -227,30 +227,30 @@ type SubscriptionProductGetVendorWebsiteUrlRetType = string // SubscriptionProduct The product of a subscription type SubscriptionProduct struct { // REQUIRED - DeliveryMethod SubscriptionProductGetDeliveryMethodAttributeType `json:"deliveryMethod"` + DeliveryMethod SubscriptionProductGetDeliveryMethodAttributeType `json:"deliveryMethod" required:"true"` // REQUIRED - LifecycleState SubscriptionProductGetLifecycleStateAttributeType `json:"lifecycleState"` + LifecycleState SubscriptionProductGetLifecycleStateAttributeType `json:"lifecycleState" required:"true"` // REQUIRED - PriceType SubscriptionProductGetPriceTypeAttributeType `json:"priceType"` + PriceType SubscriptionProductGetPriceTypeAttributeType `json:"priceType" required:"true"` // Additional price type information. // REQUIRED - PricingPlan SubscriptionProductGetPricingPlanAttributeType `json:"pricingPlan"` + PricingPlan SubscriptionProductGetPricingPlanAttributeType `json:"pricingPlan" required:"true"` // The user-readable product ID. // REQUIRED - ProductId SubscriptionProductGetProductIdAttributeType `json:"productId"` + ProductId SubscriptionProductGetProductIdAttributeType `json:"productId" required:"true"` // The name of the product. // REQUIRED - ProductName SubscriptionProductGetProductNameAttributeType `json:"productName"` + ProductName SubscriptionProductGetProductNameAttributeType `json:"productName" required:"true"` // The product's vendor name. // REQUIRED - VendorName SubscriptionProductGetVendorNameAttributeType `json:"vendorName"` + VendorName SubscriptionProductGetVendorNameAttributeType `json:"vendorName" required:"true"` // The vendor provided plan ID. VendorPlanId SubscriptionProductGetVendorPlanIdAttributeType `json:"vendorPlanId,omitempty"` // The vendor provided product ID. VendorProductId SubscriptionProductGetVendorProductIdAttributeType `json:"vendorProductId,omitempty"` // Uniform Resource Locator. // REQUIRED - VendorWebsiteUrl SubscriptionProductGetVendorWebsiteUrlAttributeType `json:"vendorWebsiteUrl"` + VendorWebsiteUrl SubscriptionProductGetVendorWebsiteUrlAttributeType `json:"vendorWebsiteUrl" required:"true"` } type _SubscriptionProduct SubscriptionProduct diff --git a/services/stackitmarketplace/model_suggest_product.go b/services/stackitmarketplace/model_suggest_product.go index e878a3c2c..38ee46bf7 100644 --- a/services/stackitmarketplace/model_suggest_product.go +++ b/services/stackitmarketplace/model_suggest_product.go @@ -60,9 +60,9 @@ func setSuggestProductGetTypeAttributeType(arg *SuggestProductGetTypeAttributeTy // SuggestProduct Suggest a product. type SuggestProduct struct { // REQUIRED - SuggestProduct SuggestProductGetSuggestProductAttributeType `json:"suggestProduct"` + SuggestProduct SuggestProductGetSuggestProductAttributeType `json:"suggestProduct" required:"true"` // REQUIRED - Type SuggestProductGetTypeAttributeType `json:"type"` + Type SuggestProductGetTypeAttributeType `json:"type" required:"true"` } type _SuggestProduct SuggestProduct diff --git a/services/stackitmarketplace/model_vendor_subscription.go b/services/stackitmarketplace/model_vendor_subscription.go index 11b0c055d..fb7f0af55 100644 --- a/services/stackitmarketplace/model_vendor_subscription.go +++ b/services/stackitmarketplace/model_vendor_subscription.go @@ -123,18 +123,18 @@ type VendorSubscriptionGetSubscriptionIdRetType = string // VendorSubscription struct for VendorSubscription type VendorSubscription struct { // REQUIRED - LifecycleState VendorSubscriptionGetLifecycleStateAttributeType `json:"lifecycleState"` + LifecycleState VendorSubscriptionGetLifecycleStateAttributeType `json:"lifecycleState" required:"true"` // Universally Unique Identifier (UUID). // REQUIRED - OrganizationId VendorSubscriptionGetOrganizationIdAttributeType `json:"organizationId"` + OrganizationId VendorSubscriptionGetOrganizationIdAttributeType `json:"organizationId" required:"true"` // REQUIRED - Product VendorSubscriptionGetProductAttributeType `json:"product"` + Product VendorSubscriptionGetProductAttributeType `json:"product" required:"true"` // Universally Unique Identifier (UUID). // REQUIRED - ProjectId VendorSubscriptionGetProjectIdAttributeType `json:"projectId"` + ProjectId VendorSubscriptionGetProjectIdAttributeType `json:"projectId" required:"true"` // Universally Unique Identifier (UUID). // REQUIRED - SubscriptionId VendorSubscriptionGetSubscriptionIdAttributeType `json:"subscriptionId"` + SubscriptionId VendorSubscriptionGetSubscriptionIdAttributeType `json:"subscriptionId" required:"true"` } type _VendorSubscription VendorSubscription