From 28d801145daf1cb67557e4e8a179f8ca48b2c29a Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Wed, 10 Sep 2025 08:15:20 +0000 Subject: [PATCH 1/5] Generate cdn --- services/cdn/api_default.go | 217 +++++++++++++++++- services/cdn/api_default_test.go | 56 +++++ services/cdn/model_config_patch.go | 58 +++++ services/cdn/model_config_patch_log_sink.go | 128 +++++++++++ .../cdn/model_config_patch_log_sink_test.go | 11 + .../cdn/model_create_distribution_payload.go | 48 ++++ .../model_get_logs_search_filters_response.go | 125 ++++++++++ ...l_get_logs_search_filters_response_test.go | 11 + services/cdn/model_http_backend.go | 46 +++- services/cdn/model_http_backend_patch.go | 48 ++++ ...el_put_custom_domain_custom_certificate.go | 4 +- 11 files changed, 747 insertions(+), 5 deletions(-) create mode 100644 services/cdn/model_config_patch_log_sink.go create mode 100644 services/cdn/model_config_patch_log_sink_test.go create mode 100644 services/cdn/model_get_logs_search_filters_response.go create mode 100644 services/cdn/model_get_logs_search_filters_response_test.go diff --git a/services/cdn/api_default.go b/services/cdn/api_default.go index 0abb6b4ce..995063910 100644 --- a/services/cdn/api_default.go +++ b/services/cdn/api_default.go @@ -207,6 +207,25 @@ type DefaultApi interface { */ GetLogsExecute(ctx context.Context, projectId string, distributionId string) (*GetLogsResponse, error) + /* + GetLogsSearchFilters Get relevant search filters for this distribution based on user input + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Your STACKIT Project ID + @param distributionId Your CDN distribution ID + @return ApiGetLogsSearchFiltersRequest + */ + GetLogsSearchFilters(ctx context.Context, projectId string, distributionId string) ApiGetLogsSearchFiltersRequest + /* + GetLogsSearchFiltersExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Your STACKIT Project ID + @param distributionId Your CDN distribution ID + @return GetLogsSearchFiltersResponse + + */ + GetLogsSearchFiltersExecute(ctx context.Context, projectId string, distributionId string) (*GetLogsSearchFiltersResponse, error) /* GetStatistics Retrieve the statistics of a distribution Returns the statistics of the distribution in the given @@ -369,7 +388,7 @@ type ApiGetLogsRequest interface { PageSize(pageSize int32) ApiGetLogsRequest // Identifier is returned by the previous response and is used to request the next page. As the `pageIdentifier` encodes an element, inserts during pagination will *not* shift the result. So a scenario like: - Start listing first page - Insert new element - Start listing second page will *never* result in an element from the first page to get \"pushed\" to the second page, like it could occur with basic limit + offset pagination. The identifier should be treated as an opaque string and never modified. Only pass values returned by the API. PageIdentifier(pageIdentifier string) ApiGetLogsRequest - // The following sort options exist. We default to `timestamp` - `timestamp` - Sort by log message time stamp. + // Sorts the log messages by a specific field. Defaults to `timestamp`. Supported sort options: - `timestamp` - `dataCenterRegion` - `requestCountryCode` - `statusCode` - `cacheHit` - `size` - `path` - `host` SortBy(sortBy string) ApiGetLogsRequest SortOrder(sortOrder string) ApiGetLogsRequest // Filters by the CDN data center region that served the request. Can be combined with other filters @@ -383,6 +402,12 @@ type ApiGetLogsRequest interface { Execute() (*GetLogsResponse, error) } +type ApiGetLogsSearchFiltersRequest interface { + // Required filter for search suggestions (e.g., status=4, requestCountry, cacheHit=tru, dataCenterRegion). The filter query cannot be empty. + Filter(filter string) ApiGetLogsSearchFiltersRequest + Execute() (*GetLogsSearchFiltersResponse, error) +} + type ApiGetStatisticsRequest interface { // the start of the time range for which statistics should be returned From(from time.Time) ApiGetStatisticsRequest @@ -1748,7 +1773,7 @@ func (r GetLogsRequest) PageIdentifier(pageIdentifier string) ApiGetLogsRequest return r } -// The following sort options exist. We default to `timestamp` - `timestamp` - Sort by log message time stamp. +// Sorts the log messages by a specific field. Defaults to `timestamp`. Supported sort options: - `timestamp` - `dataCenterRegion` - `requestCountryCode` - `statusCode` - `cacheHit` - `size` - `path` - `host` func (r GetLogsRequest) SortBy(sortBy string) ApiGetLogsRequest { r.sortBy = &sortBy @@ -1976,6 +2001,194 @@ func (a *APIClient) GetLogsExecute(ctx context.Context, projectId string, distri return r.Execute() } +type GetLogsSearchFiltersRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + distributionId string + filter *string +} + +// Required filter for search suggestions (e.g., status=4, requestCountry, cacheHit=tru, dataCenterRegion). The filter query cannot be empty. + +func (r GetLogsSearchFiltersRequest) Filter(filter string) ApiGetLogsSearchFiltersRequest { + r.filter = &filter + return r +} + +func (r GetLogsSearchFiltersRequest) Execute() (*GetLogsSearchFiltersResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetLogsSearchFiltersResponse + ) + a := r.apiService + client, ok := a.client.(*APIClient) + if !ok { + return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") + } + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetLogsSearchFilters") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/distributions/{distributionId}/logs/searchFilters" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.filter == nil { + return localVarReturnValue, fmt.Errorf("filter is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "filter", r.filter, "") + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GenericJSONResponse + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v GenericJSONResponse + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GenericJSONResponse + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + var v GenericJSONResponse + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +/* +GetLogsSearchFilters: Get relevant search filters for this distribution based on user input + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Your STACKIT Project ID + @param distributionId Your CDN distribution ID + @return ApiGetLogsSearchFiltersRequest +*/ +func (a *APIClient) GetLogsSearchFilters(ctx context.Context, projectId string, distributionId string) ApiGetLogsSearchFiltersRequest { + return GetLogsSearchFiltersRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + distributionId: distributionId, + } +} + +func (a *APIClient) GetLogsSearchFiltersExecute(ctx context.Context, projectId string, distributionId string) (*GetLogsSearchFiltersResponse, error) { + r := GetLogsSearchFiltersRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + distributionId: distributionId, + } + return r.Execute() +} + type GetStatisticsRequest struct { ctx context.Context apiService *DefaultApiService diff --git a/services/cdn/api_default_test.go b/services/cdn/api_default_test.go index 2d78f0fbd..4872a1784 100644 --- a/services/cdn/api_default_test.go +++ b/services/cdn/api_default_test.go @@ -470,6 +470,62 @@ func Test_cdn_DefaultApiService(t *testing.T) { } }) + t.Run("Test DefaultApiService GetLogsSearchFilters", func(t *testing.T) { + _apiUrlPath := "/v1beta/projects/{projectId}/distributions/{distributionId}/logs/searchFilters" + projectIdValue := "projectId-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + distributionIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(distributionIdValue, "distributionId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := GetLogsSearchFiltersResponse{} + w.Header().Add("Content-Type", "application/json") + json.NewEncoder(w).Encode(data) + }) + testServer := httptest.NewServer(testDefaultApiServeMux) + defer testServer.Close() + + configuration := &config.Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Region: "test_region", + Servers: config.ServerConfigurations{ + { + URL: testServer.URL, + Description: "Localhost for cdn_DefaultApi", + Variables: map[string]config.ServerVariable{ + "region": { + DefaultValue: "test_region.", + EnumValues: []string{ + "test_region.", + }, + }, + }, + }, + }, + OperationServers: map[string]config.ServerConfigurations{}, + } + apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) + if err != nil { + t.Fatalf("creating API client: %v", err) + } + + projectId := projectIdValue + distributionId := distributionIdValue + var filter string + + resp, reqErr := apiClient.GetLogsSearchFilters(context.Background(), projectId, distributionId).Filter(filter).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + t.Run("Test DefaultApiService GetStatistics", func(t *testing.T) { _apiUrlPath := "/v1beta/projects/{projectId}/distributions/{distributionId}/statistics" projectIdValue := "projectId-value" diff --git a/services/cdn/model_config_patch.go b/services/cdn/model_config_patch.go index 4ded2f960..27689ab14 100644 --- a/services/cdn/model_config_patch.go +++ b/services/cdn/model_config_patch.go @@ -102,6 +102,26 @@ func setConfigPatchGetDefaultCacheDurationAttributeType(arg *ConfigPatchGetDefau type ConfigPatchGetDefaultCacheDurationArgType = *string type ConfigPatchGetDefaultCacheDurationRetType = *string +/* + types and functions for logSink +*/ + +// isModel +type ConfigPatchGetLogSinkAttributeType = *NullableConfigPatchLogSink +type ConfigPatchGetLogSinkArgType = *NullableConfigPatchLogSink +type ConfigPatchGetLogSinkRetType = *NullableConfigPatchLogSink + +func getConfigPatchGetLogSinkAttributeTypeOk(arg ConfigPatchGetLogSinkAttributeType) (ret ConfigPatchGetLogSinkRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setConfigPatchGetLogSinkAttributeType(arg *ConfigPatchGetLogSinkAttributeType, val ConfigPatchGetLogSinkRetType) { + *arg = val +} + /* types and functions for monthlyLimitBytes */ @@ -171,6 +191,7 @@ type ConfigPatch struct { BlockedIPs ConfigPatchGetBlockedIPsAttributeType `json:"blockedIPs,omitempty"` // Sets the default cache duration for the distribution. The default cache duration is applied when a 'Cache-Control' header is not presented in the origin's response. We use ISO8601 duration format for cache duration (e.g. P1DT2H30M) DefaultCacheDuration ConfigPatchGetDefaultCacheDurationAttributeType `json:"defaultCacheDuration,omitempty"` + LogSink ConfigPatchGetLogSinkAttributeType `json:"logSink,omitempty"` // Sets the monthly limit of bandwidth in bytes that the pullzone is allowed to use. MonthlyLimitBytes ConfigPatchGetMonthlyLimitBytesAttributeType `json:"monthlyLimitBytes,omitempty"` Optimizer ConfigPatchGetOptimizerAttributeType `json:"optimizer,omitempty"` @@ -297,6 +318,40 @@ func (o *ConfigPatch) UnsetDefaultCacheDuration() { o.DefaultCacheDuration = nil } +// GetLogSink returns the LogSink field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ConfigPatch) GetLogSink() (res ConfigPatchGetLogSinkRetType) { + res, _ = o.GetLogSinkOk() + return +} + +// GetLogSinkOk returns a tuple with the LogSink field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ConfigPatch) GetLogSinkOk() (ret ConfigPatchGetLogSinkRetType, ok bool) { + return getConfigPatchGetLogSinkAttributeTypeOk(o.LogSink) +} + +// HasLogSink returns a boolean if a field has been set. +func (o *ConfigPatch) HasLogSink() bool { + _, ok := o.GetLogSinkOk() + return ok +} + +// SetLogSink gets a reference to the given ConfigPatchLogSink and assigns it to the LogSink field. +func (o *ConfigPatch) SetLogSink(v ConfigPatchGetLogSinkRetType) { + setConfigPatchGetLogSinkAttributeType(&o.LogSink, v) +} + +// SetLogSinkNil sets the value for LogSink to be an explicit nil +func (o *ConfigPatch) SetLogSinkNil() { + o.LogSink = nil +} + +// UnsetLogSink ensures that no value is present for LogSink, not even an explicit nil +func (o *ConfigPatch) UnsetLogSink() { + o.LogSink = nil +} + // GetMonthlyLimitBytes returns the MonthlyLimitBytes field value if set, zero value otherwise (both if not set or set to explicit null). func (o *ConfigPatch) GetMonthlyLimitBytes() (res ConfigPatchGetMonthlyLimitBytesRetType) { res, _ = o.GetMonthlyLimitBytesOk() @@ -391,6 +446,9 @@ func (o ConfigPatch) ToMap() (map[string]interface{}, error) { if val, ok := getConfigPatchGetDefaultCacheDurationAttributeTypeOk(o.DefaultCacheDuration); ok { toSerialize["DefaultCacheDuration"] = val } + if val, ok := getConfigPatchGetLogSinkAttributeTypeOk(o.LogSink); ok { + toSerialize["LogSink"] = val + } if val, ok := getConfigPatchGetMonthlyLimitBytesAttributeTypeOk(o.MonthlyLimitBytes); ok { toSerialize["MonthlyLimitBytes"] = val } diff --git a/services/cdn/model_config_patch_log_sink.go b/services/cdn/model_config_patch_log_sink.go new file mode 100644 index 000000000..470c5e8c6 --- /dev/null +++ b/services/cdn/model_config_patch_log_sink.go @@ -0,0 +1,128 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" + "fmt" +) + +// ConfigPatchLogSink - struct for ConfigPatchLogSink +type ConfigPatchLogSink struct { + PatchLokiLogSink *PatchLokiLogSink +} + +// PatchLokiLogSinkAsConfigPatchLogSink is a convenience function that returns PatchLokiLogSink wrapped in ConfigPatchLogSink +func PatchLokiLogSinkAsConfigPatchLogSink(v *PatchLokiLogSink) ConfigPatchLogSink { + return ConfigPatchLogSink{ + PatchLokiLogSink: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *ConfigPatchLogSink) UnmarshalJSON(data []byte) error { + var err error + // this object is nullable so check if the payload is null or empty string + if string(data) == "" || string(data) == "{}" { + return nil + } + + // use discriminator value to speed up the lookup + var jsonDict map[string]interface{} + err = newStrictDecoder(data).Decode(&jsonDict) + if err != nil { + return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") + } + + // check if the discriminator value is 'PatchLokiLogSink' + if jsonDict["type"] == "PatchLokiLogSink" { + // try to unmarshal JSON data into PatchLokiLogSink + err = json.Unmarshal(data, &dst.PatchLokiLogSink) + if err == nil { + return nil // data stored in dst.PatchLokiLogSink, return on the first match + } else { + dst.PatchLokiLogSink = nil + return fmt.Errorf("failed to unmarshal ConfigPatchLogSink as PatchLokiLogSink: %s", err.Error()) + } + } + + // check if the discriminator value is 'loki' + if jsonDict["type"] == "loki" { + // try to unmarshal JSON data into PatchLokiLogSink + err = json.Unmarshal(data, &dst.PatchLokiLogSink) + if err == nil { + return nil // data stored in dst.PatchLokiLogSink, return on the first match + } else { + dst.PatchLokiLogSink = nil + return fmt.Errorf("failed to unmarshal ConfigPatchLogSink as PatchLokiLogSink: %s", err.Error()) + } + } + + return nil +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ConfigPatchLogSink) MarshalJSON() ([]byte, error) { + if src.PatchLokiLogSink != nil { + return json.Marshal(&src.PatchLokiLogSink) + } + + return []byte("{}"), nil // no data in oneOf schemas => empty JSON object +} + +// Get the actual instance +func (obj *ConfigPatchLogSink) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.PatchLokiLogSink != nil { + return obj.PatchLokiLogSink + } + + // all schemas are nil + return nil +} + +type NullableConfigPatchLogSink struct { + value *ConfigPatchLogSink + isSet bool +} + +func (v NullableConfigPatchLogSink) Get() *ConfigPatchLogSink { + return v.value +} + +func (v *NullableConfigPatchLogSink) Set(val *ConfigPatchLogSink) { + v.value = val + v.isSet = true +} + +func (v NullableConfigPatchLogSink) IsSet() bool { + return v.isSet +} + +func (v *NullableConfigPatchLogSink) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConfigPatchLogSink(val *ConfigPatchLogSink) *NullableConfigPatchLogSink { + return &NullableConfigPatchLogSink{value: val, isSet: true} +} + +func (v NullableConfigPatchLogSink) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConfigPatchLogSink) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_config_patch_log_sink_test.go b/services/cdn/model_config_patch_log_sink_test.go new file mode 100644 index 000000000..51fc7c9ea --- /dev/null +++ b/services/cdn/model_config_patch_log_sink_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_create_distribution_payload.go b/services/cdn/model_create_distribution_payload.go index 0f12f141b..143a84304 100644 --- a/services/cdn/model_create_distribution_payload.go +++ b/services/cdn/model_create_distribution_payload.go @@ -78,6 +78,26 @@ func setCreateDistributionPayloadGetDefaultCacheDurationAttributeType(arg *Creat type CreateDistributionPayloadGetDefaultCacheDurationArgType = string type CreateDistributionPayloadGetDefaultCacheDurationRetType = string +/* + types and functions for geofencing +*/ + +// isContainer +type CreateDistributionPayloadGetGeofencingAttributeType = *map[string][]string +type CreateDistributionPayloadGetGeofencingArgType = map[string][]string +type CreateDistributionPayloadGetGeofencingRetType = map[string][]string + +func getCreateDistributionPayloadGetGeofencingAttributeTypeOk(arg CreateDistributionPayloadGetGeofencingAttributeType) (ret CreateDistributionPayloadGetGeofencingRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateDistributionPayloadGetGeofencingAttributeType(arg *CreateDistributionPayloadGetGeofencingAttributeType, val CreateDistributionPayloadGetGeofencingRetType) { + *arg = &val +} + /* types and functions for intentId */ @@ -228,6 +248,8 @@ type CreateDistributionPayload struct { BlockedIPs CreateDistributionPayloadGetBlockedIPsAttributeType `json:"blockedIPs,omitempty"` // Sets the default cache duration for the distribution. The default cache duration is applied when a 'Cache-Control' header is not presented in the origin's response. We use ISO8601 duration format for cache duration (e.g. P1DT2H30M) DefaultCacheDuration CreateDistributionPayloadGetDefaultCacheDurationAttributeType `json:"defaultCacheDuration,omitempty"` + // An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You can not have a country be assigned to multiple alternative origins. + Geofencing CreateDistributionPayloadGetGeofencingAttributeType `json:"geofencing,omitempty"` // While optional, it is greatly encouraged to provide an `intentId`. This is used to deduplicate requests. If multiple POST-Requests with the same `intentId` for a given `projectId` are received, all but the first request are dropped. IntentId CreateDistributionPayloadGetIntentIdAttributeType `json:"intentId,omitempty"` LogSink CreateDistributionPayloadGetLogSinkAttributeType `json:"logSink,omitempty"` @@ -334,6 +356,29 @@ func (o *CreateDistributionPayload) SetDefaultCacheDuration(v CreateDistribution setCreateDistributionPayloadGetDefaultCacheDurationAttributeType(&o.DefaultCacheDuration, v) } +// GetGeofencing returns the Geofencing field value if set, zero value otherwise. +func (o *CreateDistributionPayload) GetGeofencing() (res CreateDistributionPayloadGetGeofencingRetType) { + res, _ = o.GetGeofencingOk() + return +} + +// GetGeofencingOk returns a tuple with the Geofencing field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDistributionPayload) GetGeofencingOk() (ret CreateDistributionPayloadGetGeofencingRetType, ok bool) { + return getCreateDistributionPayloadGetGeofencingAttributeTypeOk(o.Geofencing) +} + +// HasGeofencing returns a boolean if a field has been set. +func (o *CreateDistributionPayload) HasGeofencing() bool { + _, ok := o.GetGeofencingOk() + return ok +} + +// SetGeofencing gets a reference to the given map[string][]string and assigns it to the Geofencing field. +func (o *CreateDistributionPayload) SetGeofencing(v CreateDistributionPayloadGetGeofencingRetType) { + setCreateDistributionPayloadGetGeofencingAttributeType(&o.Geofencing, v) +} + // GetIntentId returns the IntentId field value if set, zero value otherwise. func (o *CreateDistributionPayload) GetIntentId() (res CreateDistributionPayloadGetIntentIdRetType) { res, _ = o.GetIntentIdOk() @@ -494,6 +539,9 @@ func (o CreateDistributionPayload) ToMap() (map[string]interface{}, error) { if val, ok := getCreateDistributionPayloadGetDefaultCacheDurationAttributeTypeOk(o.DefaultCacheDuration); ok { toSerialize["DefaultCacheDuration"] = val } + if val, ok := getCreateDistributionPayloadGetGeofencingAttributeTypeOk(o.Geofencing); ok { + toSerialize["Geofencing"] = val + } if val, ok := getCreateDistributionPayloadGetIntentIdAttributeTypeOk(o.IntentId); ok { toSerialize["IntentId"] = val } diff --git a/services/cdn/model_get_logs_search_filters_response.go b/services/cdn/model_get_logs_search_filters_response.go new file mode 100644 index 000000000..f702a90b7 --- /dev/null +++ b/services/cdn/model_get_logs_search_filters_response.go @@ -0,0 +1,125 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the GetLogsSearchFiltersResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetLogsSearchFiltersResponse{} + +/* + types and functions for filters +*/ + +// isArray +type GetLogsSearchFiltersResponseGetFiltersAttributeType = *[]string +type GetLogsSearchFiltersResponseGetFiltersArgType = []string +type GetLogsSearchFiltersResponseGetFiltersRetType = []string + +func getGetLogsSearchFiltersResponseGetFiltersAttributeTypeOk(arg GetLogsSearchFiltersResponseGetFiltersAttributeType) (ret GetLogsSearchFiltersResponseGetFiltersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetLogsSearchFiltersResponseGetFiltersAttributeType(arg *GetLogsSearchFiltersResponseGetFiltersAttributeType, val GetLogsSearchFiltersResponseGetFiltersRetType) { + *arg = &val +} + +// GetLogsSearchFiltersResponse struct for GetLogsSearchFiltersResponse +type GetLogsSearchFiltersResponse struct { + // REQUIRED + Filters GetLogsSearchFiltersResponseGetFiltersAttributeType `json:"filters" required:"true"` +} + +type _GetLogsSearchFiltersResponse GetLogsSearchFiltersResponse + +// NewGetLogsSearchFiltersResponse instantiates a new GetLogsSearchFiltersResponse 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 NewGetLogsSearchFiltersResponse(filters GetLogsSearchFiltersResponseGetFiltersArgType) *GetLogsSearchFiltersResponse { + this := GetLogsSearchFiltersResponse{} + setGetLogsSearchFiltersResponseGetFiltersAttributeType(&this.Filters, filters) + return &this +} + +// NewGetLogsSearchFiltersResponseWithDefaults instantiates a new GetLogsSearchFiltersResponse 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 NewGetLogsSearchFiltersResponseWithDefaults() *GetLogsSearchFiltersResponse { + this := GetLogsSearchFiltersResponse{} + return &this +} + +// GetFilters returns the Filters field value +func (o *GetLogsSearchFiltersResponse) GetFilters() (ret GetLogsSearchFiltersResponseGetFiltersRetType) { + ret, _ = o.GetFiltersOk() + return ret +} + +// GetFiltersOk returns a tuple with the Filters field value +// and a boolean to check if the value has been set. +func (o *GetLogsSearchFiltersResponse) GetFiltersOk() (ret GetLogsSearchFiltersResponseGetFiltersRetType, ok bool) { + return getGetLogsSearchFiltersResponseGetFiltersAttributeTypeOk(o.Filters) +} + +// SetFilters sets field value +func (o *GetLogsSearchFiltersResponse) SetFilters(v GetLogsSearchFiltersResponseGetFiltersRetType) { + setGetLogsSearchFiltersResponseGetFiltersAttributeType(&o.Filters, v) +} + +func (o GetLogsSearchFiltersResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getGetLogsSearchFiltersResponseGetFiltersAttributeTypeOk(o.Filters); ok { + toSerialize["Filters"] = val + } + return toSerialize, nil +} + +type NullableGetLogsSearchFiltersResponse struct { + value *GetLogsSearchFiltersResponse + isSet bool +} + +func (v NullableGetLogsSearchFiltersResponse) Get() *GetLogsSearchFiltersResponse { + return v.value +} + +func (v *NullableGetLogsSearchFiltersResponse) Set(val *GetLogsSearchFiltersResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetLogsSearchFiltersResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetLogsSearchFiltersResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetLogsSearchFiltersResponse(val *GetLogsSearchFiltersResponse) *NullableGetLogsSearchFiltersResponse { + return &NullableGetLogsSearchFiltersResponse{value: val, isSet: true} +} + +func (v NullableGetLogsSearchFiltersResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetLogsSearchFiltersResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_get_logs_search_filters_response_test.go b/services/cdn/model_get_logs_search_filters_response_test.go new file mode 100644 index 000000000..51fc7c9ea --- /dev/null +++ b/services/cdn/model_get_logs_search_filters_response_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_http_backend.go b/services/cdn/model_http_backend.go index e52e582a7..12ed7bd0d 100644 --- a/services/cdn/model_http_backend.go +++ b/services/cdn/model_http_backend.go @@ -17,6 +17,26 @@ import ( // checks if the HttpBackend type satisfies the MappedNullable interface at compile time var _ MappedNullable = &HttpBackend{} +/* + types and functions for geofencing +*/ + +// isContainer +type HttpBackendGetGeofencingAttributeType = *map[string][]string +type HttpBackendGetGeofencingArgType = map[string][]string +type HttpBackendGetGeofencingRetType = map[string][]string + +func getHttpBackendGetGeofencingAttributeTypeOk(arg HttpBackendGetGeofencingAttributeType) (ret HttpBackendGetGeofencingRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setHttpBackendGetGeofencingAttributeType(arg *HttpBackendGetGeofencingAttributeType, val HttpBackendGetGeofencingRetType) { + *arg = &val +} + /* types and functions for originRequestHeaders */ @@ -81,6 +101,9 @@ type HttpBackendGetTypeRetType = string // HttpBackend struct for HttpBackend type HttpBackend struct { + // An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You cannot have a country be assigned to multiple alternative origins. + // REQUIRED + Geofencing HttpBackendGetGeofencingAttributeType `json:"geofencing" required:"true"` // Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text. // REQUIRED OriginRequestHeaders HttpBackendGetOriginRequestHeadersAttributeType `json:"originRequestHeaders" required:"true"` @@ -96,8 +119,9 @@ type _HttpBackend HttpBackend // 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 NewHttpBackend(originRequestHeaders HttpBackendGetOriginRequestHeadersArgType, originUrl HttpBackendGetOriginUrlArgType, types HttpBackendGetTypeArgType) *HttpBackend { +func NewHttpBackend(geofencing HttpBackendGetGeofencingArgType, originRequestHeaders HttpBackendGetOriginRequestHeadersArgType, originUrl HttpBackendGetOriginUrlArgType, types HttpBackendGetTypeArgType) *HttpBackend { this := HttpBackend{} + setHttpBackendGetGeofencingAttributeType(&this.Geofencing, geofencing) setHttpBackendGetOriginRequestHeadersAttributeType(&this.OriginRequestHeaders, originRequestHeaders) setHttpBackendGetOriginUrlAttributeType(&this.OriginUrl, originUrl) setHttpBackendGetTypeAttributeType(&this.Type, types) @@ -112,6 +136,23 @@ func NewHttpBackendWithDefaults() *HttpBackend { return &this } +// GetGeofencing returns the Geofencing field value +func (o *HttpBackend) GetGeofencing() (ret HttpBackendGetGeofencingRetType) { + ret, _ = o.GetGeofencingOk() + return ret +} + +// GetGeofencingOk returns a tuple with the Geofencing field value +// and a boolean to check if the value has been set. +func (o *HttpBackend) GetGeofencingOk() (ret HttpBackendGetGeofencingRetType, ok bool) { + return getHttpBackendGetGeofencingAttributeTypeOk(o.Geofencing) +} + +// SetGeofencing sets field value +func (o *HttpBackend) SetGeofencing(v HttpBackendGetGeofencingRetType) { + setHttpBackendGetGeofencingAttributeType(&o.Geofencing, v) +} + // GetOriginRequestHeaders returns the OriginRequestHeaders field value func (o *HttpBackend) GetOriginRequestHeaders() (ret HttpBackendGetOriginRequestHeadersRetType) { ret, _ = o.GetOriginRequestHeadersOk() @@ -165,6 +206,9 @@ func (o *HttpBackend) SetType(v HttpBackendGetTypeRetType) { func (o HttpBackend) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getHttpBackendGetGeofencingAttributeTypeOk(o.Geofencing); ok { + toSerialize["Geofencing"] = val + } if val, ok := getHttpBackendGetOriginRequestHeadersAttributeTypeOk(o.OriginRequestHeaders); ok { toSerialize["OriginRequestHeaders"] = val } diff --git a/services/cdn/model_http_backend_patch.go b/services/cdn/model_http_backend_patch.go index 4bd4ba015..f3f6a7bc4 100644 --- a/services/cdn/model_http_backend_patch.go +++ b/services/cdn/model_http_backend_patch.go @@ -17,6 +17,26 @@ import ( // checks if the HttpBackendPatch type satisfies the MappedNullable interface at compile time var _ MappedNullable = &HttpBackendPatch{} +/* + types and functions for geofencing +*/ + +// isContainer +type HttpBackendPatchGetGeofencingAttributeType = *map[string][]string +type HttpBackendPatchGetGeofencingArgType = map[string][]string +type HttpBackendPatchGetGeofencingRetType = map[string][]string + +func getHttpBackendPatchGetGeofencingAttributeTypeOk(arg HttpBackendPatchGetGeofencingAttributeType) (ret HttpBackendPatchGetGeofencingRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setHttpBackendPatchGetGeofencingAttributeType(arg *HttpBackendPatchGetGeofencingAttributeType, val HttpBackendPatchGetGeofencingRetType) { + *arg = &val +} + /* types and functions for originRequestHeaders */ @@ -81,6 +101,8 @@ type HttpBackendPatchGetTypeRetType = string // HttpBackendPatch A partial HTTP Backend type HttpBackendPatch struct { + // An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You cannot have a country be assigned to multiple alternative origins. + Geofencing HttpBackendPatchGetGeofencingAttributeType `json:"geofencing,omitempty"` // Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text. OriginRequestHeaders HttpBackendPatchGetOriginRequestHeadersAttributeType `json:"originRequestHeaders,omitempty"` OriginUrl HttpBackendPatchGetOriginUrlAttributeType `json:"originUrl,omitempty"` @@ -109,6 +131,29 @@ func NewHttpBackendPatchWithDefaults() *HttpBackendPatch { return &this } +// GetGeofencing returns the Geofencing field value if set, zero value otherwise. +func (o *HttpBackendPatch) GetGeofencing() (res HttpBackendPatchGetGeofencingRetType) { + res, _ = o.GetGeofencingOk() + return +} + +// GetGeofencingOk returns a tuple with the Geofencing field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HttpBackendPatch) GetGeofencingOk() (ret HttpBackendPatchGetGeofencingRetType, ok bool) { + return getHttpBackendPatchGetGeofencingAttributeTypeOk(o.Geofencing) +} + +// HasGeofencing returns a boolean if a field has been set. +func (o *HttpBackendPatch) HasGeofencing() bool { + _, ok := o.GetGeofencingOk() + return ok +} + +// SetGeofencing gets a reference to the given map[string][]string and assigns it to the Geofencing field. +func (o *HttpBackendPatch) SetGeofencing(v HttpBackendPatchGetGeofencingRetType) { + setHttpBackendPatchGetGeofencingAttributeType(&o.Geofencing, v) +} + // GetOriginRequestHeaders returns the OriginRequestHeaders field value if set, zero value otherwise. func (o *HttpBackendPatch) GetOriginRequestHeaders() (res HttpBackendPatchGetOriginRequestHeadersRetType) { res, _ = o.GetOriginRequestHeadersOk() @@ -174,6 +219,9 @@ func (o *HttpBackendPatch) SetType(v HttpBackendPatchGetTypeRetType) { func (o HttpBackendPatch) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getHttpBackendPatchGetGeofencingAttributeTypeOk(o.Geofencing); ok { + toSerialize["Geofencing"] = val + } if val, ok := getHttpBackendPatchGetOriginRequestHeadersAttributeTypeOk(o.OriginRequestHeaders); ok { toSerialize["OriginRequestHeaders"] = val } diff --git a/services/cdn/model_put_custom_domain_custom_certificate.go b/services/cdn/model_put_custom_domain_custom_certificate.go index ece790529..918688495 100644 --- a/services/cdn/model_put_custom_domain_custom_certificate.go +++ b/services/cdn/model_put_custom_domain_custom_certificate.go @@ -82,10 +82,10 @@ type PutCustomDomainCustomCertificateGetTypeRetType = string // PutCustomDomainCustomCertificate Returned if a custom certificate is used. Response does not contain the certificate or key. type PutCustomDomainCustomCertificate struct { - // base64-encoded certificate + // base64-encoded PEM-encoded certificate // REQUIRED Certificate PutCustomDomainCustomCertificateGetCertificateAttributeType `json:"certificate" required:"true"` - // base64-encoded key + // base64-encoded PEM encoded key // REQUIRED Key PutCustomDomainCustomCertificateGetKeyAttributeType `json:"key" required:"true"` // REQUIRED From b0fd41a070c79cb58cc19736e80e26742ac7f4c3 Mon Sep 17 00:00:00 2001 From: Alexander Dahmen Date: Thu, 11 Sep 2025 08:15:09 +0200 Subject: [PATCH 2/5] Add changelog Signed-off-by: Alexander Dahmen --- CHANGELOG.md | 4 ++++ services/cdn/CHANGELOG.md | 5 +++++ services/cdn/VERSION | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bbcb2b65..c23022a06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ ## Release (2025-MM-DD) +- `cdn`: [v1.5.0](services/cdn/CHANGELOG.md#v150) + - **Feature:** Added Attribute `LogSink` to `ConfigPatch` + - **Feature:** Added Attribute `Geofencing` to `DistributionPayload` + - **Feature:** Added new function `GetLogsSearchFilters` - `intake`: - [v0.1.2](services/intake/CHANGELOG.md#v012) - **Feature:** Add new field `Partitioning` to `IntakeCatalog` model diff --git a/services/cdn/CHANGELOG.md b/services/cdn/CHANGELOG.md index 5505844fc..c362a4b32 100644 --- a/services/cdn/CHANGELOG.md +++ b/services/cdn/CHANGELOG.md @@ -1,3 +1,8 @@ +## v1.5.0 +- **Feature:** Added Attribute `LogSink` to `ConfigPatch` +- **Feature:** Added Attribute `Geofencing` to `DistributionPayload` +- **Feature:** Added new function `GetLogsSearchFilters` + ## v1.4.0 - **Feature:** Added new filter functions `DataCenterRegion`, `RequestCountryCode`, `StatusCode` and `CacheHit` - **Feature:** Added Attribute `LogSink` and `Certificate` diff --git a/services/cdn/VERSION b/services/cdn/VERSION index ec7b96782..76864c1c2 100644 --- a/services/cdn/VERSION +++ b/services/cdn/VERSION @@ -1 +1 @@ -v1.4.0 \ No newline at end of file +v1.5.0 \ No newline at end of file From 11f3413b58c4764d9142a1a0351b390be120d644 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Wed, 10 Sep 2025 08:15:30 +0000 Subject: [PATCH 3/5] Generate stackitmarketplace --- services/stackitmarketplace/api_default.go | 4 +- .../model_inquiries_create_inquiry_payload.go | 44 ++- .../model_inquiry_form_type.go | 10 +- .../model_inquiry_request_private_plan.go | 307 ++++++++++++++++++ ...model_inquiry_request_private_plan_test.go | 11 + .../model_request_private_plan.go | 168 ++++++++++ .../model_request_private_plan_test.go | 11 + 7 files changed, 541 insertions(+), 14 deletions(-) create mode 100644 services/stackitmarketplace/model_inquiry_request_private_plan.go create mode 100644 services/stackitmarketplace/model_inquiry_request_private_plan_test.go create mode 100644 services/stackitmarketplace/model_request_private_plan.go create mode 100644 services/stackitmarketplace/model_request_private_plan_test.go diff --git a/services/stackitmarketplace/api_default.go b/services/stackitmarketplace/api_default.go index f3540930f..63ffb4e73 100644 --- a/services/stackitmarketplace/api_default.go +++ b/services/stackitmarketplace/api_default.go @@ -79,7 +79,7 @@ type DefaultApi interface { GetVendorSubscriptionExecute(ctx context.Context, projectId string, subscriptionId string) (*VendorSubscription, error) /* InquiriesCreateInquiry Create inquiry - Create an inquiry to contact sales, become a vendor, or suggest a product. Requests are limited to 10 per 5 minutes. + Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiInquiriesCreateInquiryRequest @@ -894,7 +894,7 @@ func (r InquiriesCreateInquiryRequest) Execute() error { /* InquiriesCreateInquiry: Create inquiry -Create an inquiry to contact sales, become a vendor, or suggest a product. Requests are limited to 10 per 5 minutes. +Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiInquiriesCreateInquiryRequest diff --git a/services/stackitmarketplace/model_inquiries_create_inquiry_payload.go b/services/stackitmarketplace/model_inquiries_create_inquiry_payload.go index 5f83118f8..6fb462cb2 100644 --- a/services/stackitmarketplace/model_inquiries_create_inquiry_payload.go +++ b/services/stackitmarketplace/model_inquiries_create_inquiry_payload.go @@ -17,10 +17,11 @@ import ( // InquiriesCreateInquiryPayload - struct for InquiriesCreateInquiryPayload type InquiriesCreateInquiryPayload struct { - BecomeVendor *BecomeVendor - ContactSales *ContactSales - RegisterTesting *RegisterTesting - SuggestProduct *SuggestProduct + BecomeVendor *BecomeVendor + ContactSales *ContactSales + RegisterTesting *RegisterTesting + RequestPrivatePlan *RequestPrivatePlan + SuggestProduct *SuggestProduct } // BecomeVendorAsInquiriesCreateInquiryPayload is a convenience function that returns BecomeVendor wrapped in InquiriesCreateInquiryPayload @@ -44,6 +45,13 @@ func RegisterTestingAsInquiriesCreateInquiryPayload(v *RegisterTesting) Inquirie } } +// RequestPrivatePlanAsInquiriesCreateInquiryPayload is a convenience function that returns RequestPrivatePlan wrapped in InquiriesCreateInquiryPayload +func RequestPrivatePlanAsInquiriesCreateInquiryPayload(v *RequestPrivatePlan) InquiriesCreateInquiryPayload { + return InquiriesCreateInquiryPayload{ + RequestPrivatePlan: v, + } +} + // SuggestProductAsInquiriesCreateInquiryPayload is a convenience function that returns SuggestProduct wrapped in InquiriesCreateInquiryPayload func SuggestProductAsInquiriesCreateInquiryPayload(v *SuggestProduct) InquiriesCreateInquiryPayload { return InquiriesCreateInquiryPayload{ @@ -91,13 +99,24 @@ func (dst *InquiriesCreateInquiryPayload) UnmarshalJSON(data []byte) error { } } - // try to unmarshal data into RegisterTesting + // try to unmarshal data into RequestPrivatePlan dstInquiriesCreateInquiryPayload4 := &InquiriesCreateInquiryPayload{} - err = json.Unmarshal(data, &dstInquiriesCreateInquiryPayload4.RegisterTesting) + err = json.Unmarshal(data, &dstInquiriesCreateInquiryPayload4.RequestPrivatePlan) if err == nil { - jsonRegisterTesting, _ := json.Marshal(&dstInquiriesCreateInquiryPayload4.RegisterTesting) + jsonRequestPrivatePlan, _ := json.Marshal(&dstInquiriesCreateInquiryPayload4.RequestPrivatePlan) + if string(jsonRequestPrivatePlan) != "{}" { // empty struct + dst.RequestPrivatePlan = dstInquiriesCreateInquiryPayload4.RequestPrivatePlan + match++ + } + } + + // try to unmarshal data into RegisterTesting + dstInquiriesCreateInquiryPayload5 := &InquiriesCreateInquiryPayload{} + err = json.Unmarshal(data, &dstInquiriesCreateInquiryPayload5.RegisterTesting) + if err == nil { + jsonRegisterTesting, _ := json.Marshal(&dstInquiriesCreateInquiryPayload5.RegisterTesting) if string(jsonRegisterTesting) != "{}" { // empty struct - dst.RegisterTesting = dstInquiriesCreateInquiryPayload4.RegisterTesting + dst.RegisterTesting = dstInquiriesCreateInquiryPayload5.RegisterTesting match++ } } @@ -107,6 +126,7 @@ func (dst *InquiriesCreateInquiryPayload) UnmarshalJSON(data []byte) error { dst.BecomeVendor = nil dst.ContactSales = nil dst.RegisterTesting = nil + dst.RequestPrivatePlan = nil dst.SuggestProduct = nil return fmt.Errorf("data matches more than one schema in oneOf(InquiriesCreateInquiryPayload)") @@ -131,6 +151,10 @@ func (src InquiriesCreateInquiryPayload) MarshalJSON() ([]byte, error) { return json.Marshal(&src.RegisterTesting) } + if src.RequestPrivatePlan != nil { + return json.Marshal(&src.RequestPrivatePlan) + } + if src.SuggestProduct != nil { return json.Marshal(&src.SuggestProduct) } @@ -155,6 +179,10 @@ func (obj *InquiriesCreateInquiryPayload) GetActualInstance() interface{} { return obj.RegisterTesting } + if obj.RequestPrivatePlan != nil { + return obj.RequestPrivatePlan + } + if obj.SuggestProduct != nil { return obj.SuggestProduct } diff --git a/services/stackitmarketplace/model_inquiry_form_type.go b/services/stackitmarketplace/model_inquiry_form_type.go index 2f19d59fd..53dcf09e6 100644 --- a/services/stackitmarketplace/model_inquiry_form_type.go +++ b/services/stackitmarketplace/model_inquiry_form_type.go @@ -20,10 +20,11 @@ type InquiryFormType string // List of inquiryFormType const ( - INQUIRYFORMTYPE_SUGGEST_PRODUCT InquiryFormType = "SUGGEST_PRODUCT" - INQUIRYFORMTYPE_CONTACT_SALES InquiryFormType = "CONTACT_SALES" - INQUIRYFORMTYPE_BECOME_VENDOR InquiryFormType = "BECOME_VENDOR" - INQUIRYFORMTYPE_REGISTER_TESTING InquiryFormType = "REGISTER_TESTING" + INQUIRYFORMTYPE_SUGGEST_PRODUCT InquiryFormType = "SUGGEST_PRODUCT" + INQUIRYFORMTYPE_CONTACT_SALES InquiryFormType = "CONTACT_SALES" + INQUIRYFORMTYPE_BECOME_VENDOR InquiryFormType = "BECOME_VENDOR" + INQUIRYFORMTYPE_REGISTER_TESTING InquiryFormType = "REGISTER_TESTING" + INQUIRYFORMTYPE_REQUEST_PRIVATE_PLAN InquiryFormType = "REQUEST_PRIVATE_PLAN" ) // All allowed values of InquiryFormType enum @@ -32,6 +33,7 @@ var AllowedInquiryFormTypeEnumValues = []InquiryFormType{ "CONTACT_SALES", "BECOME_VENDOR", "REGISTER_TESTING", + "REQUEST_PRIVATE_PLAN", } func (v *InquiryFormType) UnmarshalJSON(src []byte) error { diff --git a/services/stackitmarketplace/model_inquiry_request_private_plan.go b/services/stackitmarketplace/model_inquiry_request_private_plan.go new file mode 100644 index 000000000..9008f4a90 --- /dev/null +++ b/services/stackitmarketplace/model_inquiry_request_private_plan.go @@ -0,0 +1,307 @@ +/* +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 InquiryRequestPrivatePlan type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InquiryRequestPrivatePlan{} + +/* + types and functions for companyName +*/ + +// isNotNullableString +type InquiryRequestPrivatePlanGetCompanyNameAttributeType = *string + +func getInquiryRequestPrivatePlanGetCompanyNameAttributeTypeOk(arg InquiryRequestPrivatePlanGetCompanyNameAttributeType) (ret InquiryRequestPrivatePlanGetCompanyNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquiryRequestPrivatePlanGetCompanyNameAttributeType(arg *InquiryRequestPrivatePlanGetCompanyNameAttributeType, val InquiryRequestPrivatePlanGetCompanyNameRetType) { + *arg = &val +} + +type InquiryRequestPrivatePlanGetCompanyNameArgType = string +type InquiryRequestPrivatePlanGetCompanyNameRetType = string + +/* + types and functions for contactEmail +*/ + +// isNotNullableString +type InquiryRequestPrivatePlanGetContactEmailAttributeType = *string + +func getInquiryRequestPrivatePlanGetContactEmailAttributeTypeOk(arg InquiryRequestPrivatePlanGetContactEmailAttributeType) (ret InquiryRequestPrivatePlanGetContactEmailRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquiryRequestPrivatePlanGetContactEmailAttributeType(arg *InquiryRequestPrivatePlanGetContactEmailAttributeType, val InquiryRequestPrivatePlanGetContactEmailRetType) { + *arg = &val +} + +type InquiryRequestPrivatePlanGetContactEmailArgType = string +type InquiryRequestPrivatePlanGetContactEmailRetType = string + +/* + types and functions for fullName +*/ + +// isNotNullableString +type InquiryRequestPrivatePlanGetFullNameAttributeType = *string + +func getInquiryRequestPrivatePlanGetFullNameAttributeTypeOk(arg InquiryRequestPrivatePlanGetFullNameAttributeType) (ret InquiryRequestPrivatePlanGetFullNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquiryRequestPrivatePlanGetFullNameAttributeType(arg *InquiryRequestPrivatePlanGetFullNameAttributeType, val InquiryRequestPrivatePlanGetFullNameRetType) { + *arg = &val +} + +type InquiryRequestPrivatePlanGetFullNameArgType = string +type InquiryRequestPrivatePlanGetFullNameRetType = string + +/* + types and functions for message +*/ + +// isNotNullableString +type InquiryRequestPrivatePlanGetMessageAttributeType = *string + +func getInquiryRequestPrivatePlanGetMessageAttributeTypeOk(arg InquiryRequestPrivatePlanGetMessageAttributeType) (ret InquiryRequestPrivatePlanGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquiryRequestPrivatePlanGetMessageAttributeType(arg *InquiryRequestPrivatePlanGetMessageAttributeType, val InquiryRequestPrivatePlanGetMessageRetType) { + *arg = &val +} + +type InquiryRequestPrivatePlanGetMessageArgType = string +type InquiryRequestPrivatePlanGetMessageRetType = string + +/* + types and functions for productId +*/ + +// isNotNullableString +type InquiryRequestPrivatePlanGetProductIdAttributeType = *string + +func getInquiryRequestPrivatePlanGetProductIdAttributeTypeOk(arg InquiryRequestPrivatePlanGetProductIdAttributeType) (ret InquiryRequestPrivatePlanGetProductIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInquiryRequestPrivatePlanGetProductIdAttributeType(arg *InquiryRequestPrivatePlanGetProductIdAttributeType, val InquiryRequestPrivatePlanGetProductIdRetType) { + *arg = &val +} + +type InquiryRequestPrivatePlanGetProductIdArgType = string +type InquiryRequestPrivatePlanGetProductIdRetType = string + +// InquiryRequestPrivatePlan Request a private plan. +type InquiryRequestPrivatePlan struct { + // The product's vendor name. + // REQUIRED + CompanyName InquiryRequestPrivatePlanGetCompanyNameAttributeType `json:"companyName" required:"true"` + // A e-mail address. + // REQUIRED + ContactEmail InquiryRequestPrivatePlanGetContactEmailAttributeType `json:"contactEmail" required:"true"` + // The full name of the contact person. + // REQUIRED + FullName InquiryRequestPrivatePlanGetFullNameAttributeType `json:"fullName" required:"true"` + // A custom message. + // REQUIRED + Message InquiryRequestPrivatePlanGetMessageAttributeType `json:"message" required:"true"` + // The user-readable product ID. + // REQUIRED + ProductId InquiryRequestPrivatePlanGetProductIdAttributeType `json:"productId" required:"true"` +} + +type _InquiryRequestPrivatePlan InquiryRequestPrivatePlan + +// NewInquiryRequestPrivatePlan instantiates a new InquiryRequestPrivatePlan 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 NewInquiryRequestPrivatePlan(companyName InquiryRequestPrivatePlanGetCompanyNameArgType, contactEmail InquiryRequestPrivatePlanGetContactEmailArgType, fullName InquiryRequestPrivatePlanGetFullNameArgType, message InquiryRequestPrivatePlanGetMessageArgType, productId InquiryRequestPrivatePlanGetProductIdArgType) *InquiryRequestPrivatePlan { + this := InquiryRequestPrivatePlan{} + setInquiryRequestPrivatePlanGetCompanyNameAttributeType(&this.CompanyName, companyName) + setInquiryRequestPrivatePlanGetContactEmailAttributeType(&this.ContactEmail, contactEmail) + setInquiryRequestPrivatePlanGetFullNameAttributeType(&this.FullName, fullName) + setInquiryRequestPrivatePlanGetMessageAttributeType(&this.Message, message) + setInquiryRequestPrivatePlanGetProductIdAttributeType(&this.ProductId, productId) + return &this +} + +// NewInquiryRequestPrivatePlanWithDefaults instantiates a new InquiryRequestPrivatePlan 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 NewInquiryRequestPrivatePlanWithDefaults() *InquiryRequestPrivatePlan { + this := InquiryRequestPrivatePlan{} + return &this +} + +// GetCompanyName returns the CompanyName field value +func (o *InquiryRequestPrivatePlan) GetCompanyName() (ret InquiryRequestPrivatePlanGetCompanyNameRetType) { + 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 *InquiryRequestPrivatePlan) GetCompanyNameOk() (ret InquiryRequestPrivatePlanGetCompanyNameRetType, ok bool) { + return getInquiryRequestPrivatePlanGetCompanyNameAttributeTypeOk(o.CompanyName) +} + +// SetCompanyName sets field value +func (o *InquiryRequestPrivatePlan) SetCompanyName(v InquiryRequestPrivatePlanGetCompanyNameRetType) { + setInquiryRequestPrivatePlanGetCompanyNameAttributeType(&o.CompanyName, v) +} + +// GetContactEmail returns the ContactEmail field value +func (o *InquiryRequestPrivatePlan) GetContactEmail() (ret InquiryRequestPrivatePlanGetContactEmailRetType) { + 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 *InquiryRequestPrivatePlan) GetContactEmailOk() (ret InquiryRequestPrivatePlanGetContactEmailRetType, ok bool) { + return getInquiryRequestPrivatePlanGetContactEmailAttributeTypeOk(o.ContactEmail) +} + +// SetContactEmail sets field value +func (o *InquiryRequestPrivatePlan) SetContactEmail(v InquiryRequestPrivatePlanGetContactEmailRetType) { + setInquiryRequestPrivatePlanGetContactEmailAttributeType(&o.ContactEmail, v) +} + +// GetFullName returns the FullName field value +func (o *InquiryRequestPrivatePlan) GetFullName() (ret InquiryRequestPrivatePlanGetFullNameRetType) { + 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 *InquiryRequestPrivatePlan) GetFullNameOk() (ret InquiryRequestPrivatePlanGetFullNameRetType, ok bool) { + return getInquiryRequestPrivatePlanGetFullNameAttributeTypeOk(o.FullName) +} + +// SetFullName sets field value +func (o *InquiryRequestPrivatePlan) SetFullName(v InquiryRequestPrivatePlanGetFullNameRetType) { + setInquiryRequestPrivatePlanGetFullNameAttributeType(&o.FullName, v) +} + +// GetMessage returns the Message field value +func (o *InquiryRequestPrivatePlan) GetMessage() (ret InquiryRequestPrivatePlanGetMessageRetType) { + 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 *InquiryRequestPrivatePlan) GetMessageOk() (ret InquiryRequestPrivatePlanGetMessageRetType, ok bool) { + return getInquiryRequestPrivatePlanGetMessageAttributeTypeOk(o.Message) +} + +// SetMessage sets field value +func (o *InquiryRequestPrivatePlan) SetMessage(v InquiryRequestPrivatePlanGetMessageRetType) { + setInquiryRequestPrivatePlanGetMessageAttributeType(&o.Message, v) +} + +// GetProductId returns the ProductId field value +func (o *InquiryRequestPrivatePlan) GetProductId() (ret InquiryRequestPrivatePlanGetProductIdRetType) { + 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 *InquiryRequestPrivatePlan) GetProductIdOk() (ret InquiryRequestPrivatePlanGetProductIdRetType, ok bool) { + return getInquiryRequestPrivatePlanGetProductIdAttributeTypeOk(o.ProductId) +} + +// SetProductId sets field value +func (o *InquiryRequestPrivatePlan) SetProductId(v InquiryRequestPrivatePlanGetProductIdRetType) { + setInquiryRequestPrivatePlanGetProductIdAttributeType(&o.ProductId, v) +} + +func (o InquiryRequestPrivatePlan) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getInquiryRequestPrivatePlanGetCompanyNameAttributeTypeOk(o.CompanyName); ok { + toSerialize["CompanyName"] = val + } + if val, ok := getInquiryRequestPrivatePlanGetContactEmailAttributeTypeOk(o.ContactEmail); ok { + toSerialize["ContactEmail"] = val + } + if val, ok := getInquiryRequestPrivatePlanGetFullNameAttributeTypeOk(o.FullName); ok { + toSerialize["FullName"] = val + } + if val, ok := getInquiryRequestPrivatePlanGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + if val, ok := getInquiryRequestPrivatePlanGetProductIdAttributeTypeOk(o.ProductId); ok { + toSerialize["ProductId"] = val + } + return toSerialize, nil +} + +type NullableInquiryRequestPrivatePlan struct { + value *InquiryRequestPrivatePlan + isSet bool +} + +func (v NullableInquiryRequestPrivatePlan) Get() *InquiryRequestPrivatePlan { + return v.value +} + +func (v *NullableInquiryRequestPrivatePlan) Set(val *InquiryRequestPrivatePlan) { + v.value = val + v.isSet = true +} + +func (v NullableInquiryRequestPrivatePlan) IsSet() bool { + return v.isSet +} + +func (v *NullableInquiryRequestPrivatePlan) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInquiryRequestPrivatePlan(val *InquiryRequestPrivatePlan) *NullableInquiryRequestPrivatePlan { + return &NullableInquiryRequestPrivatePlan{value: val, isSet: true} +} + +func (v NullableInquiryRequestPrivatePlan) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInquiryRequestPrivatePlan) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/model_inquiry_request_private_plan_test.go b/services/stackitmarketplace/model_inquiry_request_private_plan_test.go new file mode 100644 index 000000000..8d52b2c3c --- /dev/null +++ b/services/stackitmarketplace/model_inquiry_request_private_plan_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_request_private_plan.go b/services/stackitmarketplace/model_request_private_plan.go new file mode 100644 index 000000000..6e16df346 --- /dev/null +++ b/services/stackitmarketplace/model_request_private_plan.go @@ -0,0 +1,168 @@ +/* +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 RequestPrivatePlan type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RequestPrivatePlan{} + +/* + types and functions for requestPrivatePlan +*/ + +// isModel +type RequestPrivatePlanGetRequestPrivatePlanAttributeType = *InquiryRequestPrivatePlan +type RequestPrivatePlanGetRequestPrivatePlanArgType = InquiryRequestPrivatePlan +type RequestPrivatePlanGetRequestPrivatePlanRetType = InquiryRequestPrivatePlan + +func getRequestPrivatePlanGetRequestPrivatePlanAttributeTypeOk(arg RequestPrivatePlanGetRequestPrivatePlanAttributeType) (ret RequestPrivatePlanGetRequestPrivatePlanRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRequestPrivatePlanGetRequestPrivatePlanAttributeType(arg *RequestPrivatePlanGetRequestPrivatePlanAttributeType, val RequestPrivatePlanGetRequestPrivatePlanRetType) { + *arg = &val +} + +/* + types and functions for type +*/ + +// isEnumRef +type RequestPrivatePlanGetTypeAttributeType = *InquiryFormType +type RequestPrivatePlanGetTypeArgType = InquiryFormType +type RequestPrivatePlanGetTypeRetType = InquiryFormType + +func getRequestPrivatePlanGetTypeAttributeTypeOk(arg RequestPrivatePlanGetTypeAttributeType) (ret RequestPrivatePlanGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRequestPrivatePlanGetTypeAttributeType(arg *RequestPrivatePlanGetTypeAttributeType, val RequestPrivatePlanGetTypeRetType) { + *arg = &val +} + +// RequestPrivatePlan Request a private plan. +type RequestPrivatePlan struct { + // REQUIRED + RequestPrivatePlan RequestPrivatePlanGetRequestPrivatePlanAttributeType `json:"requestPrivatePlan" required:"true"` + // REQUIRED + Type RequestPrivatePlanGetTypeAttributeType `json:"type" required:"true"` +} + +type _RequestPrivatePlan RequestPrivatePlan + +// NewRequestPrivatePlan instantiates a new RequestPrivatePlan 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 NewRequestPrivatePlan(requestPrivatePlan RequestPrivatePlanGetRequestPrivatePlanArgType, types RequestPrivatePlanGetTypeArgType) *RequestPrivatePlan { + this := RequestPrivatePlan{} + setRequestPrivatePlanGetRequestPrivatePlanAttributeType(&this.RequestPrivatePlan, requestPrivatePlan) + setRequestPrivatePlanGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewRequestPrivatePlanWithDefaults instantiates a new RequestPrivatePlan 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 NewRequestPrivatePlanWithDefaults() *RequestPrivatePlan { + this := RequestPrivatePlan{} + return &this +} + +// GetRequestPrivatePlan returns the RequestPrivatePlan field value +func (o *RequestPrivatePlan) GetRequestPrivatePlan() (ret RequestPrivatePlanGetRequestPrivatePlanRetType) { + ret, _ = o.GetRequestPrivatePlanOk() + return ret +} + +// GetRequestPrivatePlanOk returns a tuple with the RequestPrivatePlan field value +// and a boolean to check if the value has been set. +func (o *RequestPrivatePlan) GetRequestPrivatePlanOk() (ret RequestPrivatePlanGetRequestPrivatePlanRetType, ok bool) { + return getRequestPrivatePlanGetRequestPrivatePlanAttributeTypeOk(o.RequestPrivatePlan) +} + +// SetRequestPrivatePlan sets field value +func (o *RequestPrivatePlan) SetRequestPrivatePlan(v RequestPrivatePlanGetRequestPrivatePlanRetType) { + setRequestPrivatePlanGetRequestPrivatePlanAttributeType(&o.RequestPrivatePlan, v) +} + +// GetType returns the Type field value +func (o *RequestPrivatePlan) GetType() (ret RequestPrivatePlanGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *RequestPrivatePlan) GetTypeOk() (ret RequestPrivatePlanGetTypeRetType, ok bool) { + return getRequestPrivatePlanGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +func (o *RequestPrivatePlan) SetType(v RequestPrivatePlanGetTypeRetType) { + setRequestPrivatePlanGetTypeAttributeType(&o.Type, v) +} + +func (o RequestPrivatePlan) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getRequestPrivatePlanGetRequestPrivatePlanAttributeTypeOk(o.RequestPrivatePlan); ok { + toSerialize["RequestPrivatePlan"] = val + } + if val, ok := getRequestPrivatePlanGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableRequestPrivatePlan struct { + value *RequestPrivatePlan + isSet bool +} + +func (v NullableRequestPrivatePlan) Get() *RequestPrivatePlan { + return v.value +} + +func (v *NullableRequestPrivatePlan) Set(val *RequestPrivatePlan) { + v.value = val + v.isSet = true +} + +func (v NullableRequestPrivatePlan) IsSet() bool { + return v.isSet +} + +func (v *NullableRequestPrivatePlan) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRequestPrivatePlan(val *RequestPrivatePlan) *NullableRequestPrivatePlan { + return &NullableRequestPrivatePlan{value: val, isSet: true} +} + +func (v NullableRequestPrivatePlan) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRequestPrivatePlan) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/model_request_private_plan_test.go b/services/stackitmarketplace/model_request_private_plan_test.go new file mode 100644 index 000000000..8d52b2c3c --- /dev/null +++ b/services/stackitmarketplace/model_request_private_plan_test.go @@ -0,0 +1,11 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackitmarketplace From 429cd2aadbb5451e74611564b5b8fe3aaac1122b Mon Sep 17 00:00:00 2001 From: Alexander Dahmen Date: Thu, 11 Sep 2025 08:50:15 +0200 Subject: [PATCH 4/5] Add changelog Signed-off-by: Alexander Dahmen --- CHANGELOG.md | 7 +++++-- services/stackitmarketplace/CHANGELOG.md | 3 +++ services/stackitmarketplace/VERSION | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c23022a06..7c7de8b5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,8 +33,11 @@ - **Feature:** Add new field `Kubernetes` to `Nodepool` model - `serviceaccount`: [v0.11.1](services/serviceaccount/CHANGELOG.md#v0111) - **Improvement:** Improve error handling for `CreateShortLivedAccessToken` -- `stackitmarketplace`: [v1.8.0](services/stackitmarketplace/CHANGELOG.md#v180) - - **Feature:** Add new field `FreeTrial` in `CatalogProductOverview` model +- `stackitmarketplace`: + - [v1.9.0](services/stackitmarketplace/CHANGELOG.md#v190) + - **Feature:** Added `RequestPrivatePlan` to `InquiriesCreateInquiryPayload` + - [v1.8.0](services/stackitmarketplace/CHANGELOG.md#v180) + - **Feature:** Add new field `FreeTrial` in `CatalogProductOverview` model ## Release (2025-08-29) - `observability`: diff --git a/services/stackitmarketplace/CHANGELOG.md b/services/stackitmarketplace/CHANGELOG.md index 058c0a4ab..57b1112f0 100644 --- a/services/stackitmarketplace/CHANGELOG.md +++ b/services/stackitmarketplace/CHANGELOG.md @@ -1,3 +1,6 @@ +## v1.9.0 +- **Feature:** Added `RequestPrivatePlan` to `InquiriesCreateInquiryPayload` + ## v1.8.0 - **Feature:** Add new field `FreeTrial` in `CatalogProductOverview` model diff --git a/services/stackitmarketplace/VERSION b/services/stackitmarketplace/VERSION index 4e2cea3bb..e2f650c40 100644 --- a/services/stackitmarketplace/VERSION +++ b/services/stackitmarketplace/VERSION @@ -1 +1 @@ -v1.8.0 \ No newline at end of file +v1.9.0 \ No newline at end of file From 296e9d5ea3d6b1c125a16baf3b9784cdc52e99e2 Mon Sep 17 00:00:00 2001 From: Alexander Dahmen Date: Thu, 11 Sep 2025 09:11:01 +0200 Subject: [PATCH 5/5] Update CHANGELOG.md Co-authored-by: Marcel Jacek <72880145+marceljk@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c7de8b5e..b235f9c01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ ## Release (2025-MM-DD) - `cdn`: [v1.5.0](services/cdn/CHANGELOG.md#v150) - **Feature:** Added Attribute `LogSink` to `ConfigPatch` - - **Feature:** Added Attribute `Geofencing` to `DistributionPayload` + - **Feature:** Added Attribute `Geofencing` to `DistributionPayload`, `HttpBackend` and `HttpBackendPatch` - **Feature:** Added new function `GetLogsSearchFilters` - `intake`: - [v0.1.2](services/intake/CHANGELOG.md#v012)