diff --git a/services/stackitmarketplace/.openapi-generator/VERSION b/services/stackitmarketplace/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec..000000000 --- a/services/stackitmarketplace/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/services/stackitmarketplace/api_default.go b/services/stackitmarketplace/api_default.go deleted file mode 100644 index 1a6c2a430..000000000 --- a/services/stackitmarketplace/api_default.go +++ /dev/null @@ -1,1673 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "bytes" - "context" - "fmt" - "io" - "net/http" - "net/url" - "strings" - - "github.com/stackitcloud/stackit-sdk-go/core/config" - "github.com/stackitcloud/stackit-sdk-go/core/oapierror" -) - -type DefaultApi interface { - /* - ApproveSubscription Approve a subscription - Approve a pending subscription. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The project ID. - @param subscriptionId The subscription ID. - @return ApiApproveSubscriptionRequest - */ - ApproveSubscription(ctx context.Context, projectId string, subscriptionId string) ApiApproveSubscriptionRequest - /* - ApproveSubscriptionExecute executes the request - - */ - ApproveSubscriptionExecute(ctx context.Context, projectId string, subscriptionId string) error - /* - GetCatalogProduct Get a product - Deprecated: Get a product. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param productId The product ID. - @return ApiGetCatalogProductRequest - */ - GetCatalogProduct(ctx context.Context, productId string) ApiGetCatalogProductRequest - /* - GetCatalogProductExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param productId The product ID. - @return CatalogProductDetail - - Deprecated: Get a product. - */ - GetCatalogProductExecute(ctx context.Context, productId string) (*CatalogProductDetail, error) - /* - GetVendorSubscription Get a subscription - Get a subscription. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The project ID. - @param subscriptionId The subscription ID. - @return ApiGetVendorSubscriptionRequest - */ - GetVendorSubscription(ctx context.Context, projectId string, subscriptionId string) ApiGetVendorSubscriptionRequest - /* - GetVendorSubscriptionExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The project ID. - @param subscriptionId The subscription ID. - @return VendorSubscription - - */ - GetVendorSubscriptionExecute(ctx context.Context, projectId string, subscriptionId string) (*VendorSubscription, error) - /* - InquiriesCreateInquiry Create inquiry - Deprecated: Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiInquiriesCreateInquiryRequest - */ - InquiriesCreateInquiry(ctx context.Context) ApiInquiriesCreateInquiryRequest - /* - InquiriesCreateInquiryExecute executes the request - - Deprecated: Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes. - */ - InquiriesCreateInquiryExecute(ctx context.Context) error - /* - ListCatalogProducts List all products - Deprecated: List all products. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListCatalogProductsRequest - */ - ListCatalogProducts(ctx context.Context) ApiListCatalogProductsRequest - /* - ListCatalogProductsExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ListCatalogProductsResponse - - Deprecated: List all products. - */ - ListCatalogProductsExecute(ctx context.Context) (*ListCatalogProductsResponse, error) - /* - ListVendorSubscriptions List all subscriptions of a project. - List all subscriptions of a project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The project ID. - @return ApiListVendorSubscriptionsRequest - */ - ListVendorSubscriptions(ctx context.Context, projectId string) ApiListVendorSubscriptionsRequest - /* - ListVendorSubscriptionsExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The project ID. - @return ListVendorSubscriptionsResponse - - */ - ListVendorSubscriptionsExecute(ctx context.Context, projectId string) (*ListVendorSubscriptionsResponse, error) - /* - ResolveCustomer Resolve customer - Get details about the requested subscription. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The project ID. - @return ApiResolveCustomerRequest - */ - ResolveCustomer(ctx context.Context, projectId string) ApiResolveCustomerRequest - /* - ResolveCustomerExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The project ID. - @return VendorSubscription - - */ - ResolveCustomerExecute(ctx context.Context, projectId string) (*VendorSubscription, error) - /* - VendorsSubscriptionsReject Reject a subscription - Reject a subscription (in any lifecycle state). Only available for subscriptions to products with lifecycle state `PRODUCT_PREVIEW`. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The project ID. - @param subscriptionId The subscription ID. - @return ApiVendorsSubscriptionsRejectRequest - */ - VendorsSubscriptionsReject(ctx context.Context, projectId string, subscriptionId string) ApiVendorsSubscriptionsRejectRequest - /* - VendorsSubscriptionsRejectExecute executes the request - - */ - VendorsSubscriptionsRejectExecute(ctx context.Context, projectId string, subscriptionId string) error -} - -type ApiApproveSubscriptionRequest interface { - ApproveSubscriptionPayload(approveSubscriptionPayload ApproveSubscriptionPayload) ApiApproveSubscriptionRequest - Execute() error -} - -type ApiGetCatalogProductRequest interface { - // The language of the response. - Locale(locale string) ApiGetCatalogProductRequest - Execute() (*CatalogProductDetail, error) -} - -type ApiGetVendorSubscriptionRequest interface { - Execute() (*VendorSubscription, error) -} - -type ApiInquiriesCreateInquiryRequest interface { - InquiriesCreateInquiryPayload(inquiriesCreateInquiryPayload InquiriesCreateInquiryPayload) ApiInquiriesCreateInquiryRequest - Execute() error -} - -type ApiListCatalogProductsRequest interface { - // 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. - Cursor(cursor string) ApiListCatalogProductsRequest - // The maximum number of items to return in the response. If maximum is exceeded, maximum is used. - Limit(limit float32) ApiListCatalogProductsRequest - // The language of the response. - Locale(locale string) ApiListCatalogProductsRequest - // Filter the products based on attributes, e.g., `deliveryMethod eq \"SAAS\"`. The supported operators are: - `PR` (present; `name pr`) - `EQ` (equal) - `NE` (not equal) - `CO` (contains; `text co \"searching\"`) - `SW` (starts with) - `EW` (ends with) - `GT` (greater than) - `LT` (less than) - `GE` (greater than or equal) - `LE` (less than or equal). These expressions can be logically linked with `AND` and `OR`. All attributes (and the special `text` attribute) can be used as filters, if the attribute type allows the operator. - Filter(filter string) ApiListCatalogProductsRequest - // Sort the products based on attributes and order e.g. `name:asc`. Attributes with scalar types (`createdAt`, `isProductListing`) or keywords (`name`, `deliveryMethod`, `lifecycleState`, `vendor.name`) can be used as sort criteria. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name:asc,price:desc`. - Sort(sort string) ApiListCatalogProductsRequest - Execute() (*ListCatalogProductsResponse, error) -} - -type ApiListVendorSubscriptionsRequest interface { - // 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. - Cursor(cursor string) ApiListVendorSubscriptionsRequest - // The maximum number of items to return in the response. If maximum is exceeded, maximum is used. - Limit(limit float32) ApiListVendorSubscriptionsRequest - // The product ID. - ProductId(productId string) ApiListVendorSubscriptionsRequest - Execute() (*ListVendorSubscriptionsResponse, error) -} - -type ApiResolveCustomerRequest interface { - ResolveCustomerPayload(resolveCustomerPayload ResolveCustomerPayload) ApiResolveCustomerRequest - Execute() (*VendorSubscription, error) -} - -type ApiVendorsSubscriptionsRejectRequest interface { - Execute() error -} - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApproveSubscriptionRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - subscriptionId string - approveSubscriptionPayload *ApproveSubscriptionPayload -} - -func (r ApproveSubscriptionRequest) ApproveSubscriptionPayload(approveSubscriptionPayload ApproveSubscriptionPayload) ApiApproveSubscriptionRequest { - r.approveSubscriptionPayload = &approveSubscriptionPayload - return r -} - -func (r ApproveSubscriptionRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ApproveSubscription") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/vendors/projects/{projectId}/subscriptions/{subscriptionId}/approve" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", url.PathEscape(ParameterValueToString(r.subscriptionId, "subscriptionId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.subscriptionId) < 36 { - return fmt.Errorf("subscriptionId must have at least 36 elements") - } - if strlen(r.subscriptionId) > 36 { - return fmt.Errorf("subscriptionId must have less than 36 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.approveSubscriptionPayload - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return 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 err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return newErr - } - - return nil -} - -/* -ApproveSubscription: Approve a subscription - -Approve a pending subscription. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The project ID. - @param subscriptionId The subscription ID. - @return ApiApproveSubscriptionRequest -*/ -func (a *APIClient) ApproveSubscription(ctx context.Context, projectId string, subscriptionId string) ApiApproveSubscriptionRequest { - return ApproveSubscriptionRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - subscriptionId: subscriptionId, - } -} - -func (a *APIClient) ApproveSubscriptionExecute(ctx context.Context, projectId string, subscriptionId string) error { - r := ApproveSubscriptionRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - subscriptionId: subscriptionId, - } - return r.Execute() -} - -type GetCatalogProductRequest struct { - ctx context.Context - apiService *DefaultApiService - productId string - locale *string -} - -// The language of the response. - -func (r GetCatalogProductRequest) Locale(locale string) ApiGetCatalogProductRequest { - r.locale = &locale - return r -} - -func (r GetCatalogProductRequest) Execute() (*CatalogProductDetail, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CatalogProductDetail - ) - 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.GetCatalogProduct") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/catalog/products/{productId}" - localVarPath = strings.Replace(localVarPath, "{"+"productId"+"}", url.PathEscape(ParameterValueToString(r.productId, "productId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.productId) < 10 { - return localVarReturnValue, fmt.Errorf("productId must have at least 10 elements") - } - if strlen(r.productId) > 29 { - return localVarReturnValue, fmt.Errorf("productId must have less than 29 elements") - } - - if r.locale != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "locale", r.locale, "") - } - // 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"} - - // 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 ErrorResponse - 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 ErrorResponse - 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 == 403 { - var v ErrorResponse - 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 == 404 { - var v ErrorResponse - 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 -} - -/* -GetCatalogProduct: Get a product - -Deprecated: Get a product. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param productId The product ID. - @return ApiGetCatalogProductRequest -*/ -func (a *APIClient) GetCatalogProduct(ctx context.Context, productId string) ApiGetCatalogProductRequest { - return GetCatalogProductRequest{ - apiService: a.defaultApi, - ctx: ctx, - productId: productId, - } -} - -/* -Deprecated: Get a product. -*/ -func (a *APIClient) GetCatalogProductExecute(ctx context.Context, productId string) (*CatalogProductDetail, error) { - r := GetCatalogProductRequest{ - apiService: a.defaultApi, - ctx: ctx, - productId: productId, - } - return r.Execute() -} - -type GetVendorSubscriptionRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - subscriptionId string -} - -func (r GetVendorSubscriptionRequest) Execute() (*VendorSubscription, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VendorSubscription - ) - 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.GetVendorSubscription") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/vendors/projects/{projectId}/subscriptions/{subscriptionId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", url.PathEscape(ParameterValueToString(r.subscriptionId, "subscriptionId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.subscriptionId) < 36 { - return localVarReturnValue, fmt.Errorf("subscriptionId must have at least 36 elements") - } - if strlen(r.subscriptionId) > 36 { - return localVarReturnValue, fmt.Errorf("subscriptionId must have less than 36 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // 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 ErrorResponse - 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 ErrorResponse - 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 == 403 { - var v ErrorResponse - 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 == 404 { - var v ErrorResponse - 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 -} - -/* -GetVendorSubscription: Get a subscription - -Get a subscription. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The project ID. - @param subscriptionId The subscription ID. - @return ApiGetVendorSubscriptionRequest -*/ -func (a *APIClient) GetVendorSubscription(ctx context.Context, projectId string, subscriptionId string) ApiGetVendorSubscriptionRequest { - return GetVendorSubscriptionRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - subscriptionId: subscriptionId, - } -} - -func (a *APIClient) GetVendorSubscriptionExecute(ctx context.Context, projectId string, subscriptionId string) (*VendorSubscription, error) { - r := GetVendorSubscriptionRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - subscriptionId: subscriptionId, - } - return r.Execute() -} - -type InquiriesCreateInquiryRequest struct { - ctx context.Context - apiService *DefaultApiService - inquiriesCreateInquiryPayload *InquiriesCreateInquiryPayload -} - -func (r InquiriesCreateInquiryRequest) InquiriesCreateInquiryPayload(inquiriesCreateInquiryPayload InquiriesCreateInquiryPayload) ApiInquiriesCreateInquiryRequest { - r.inquiriesCreateInquiryPayload = &inquiriesCreateInquiryPayload - return r -} - -func (r InquiriesCreateInquiryRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.InquiriesCreateInquiry") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/inquiries" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.inquiriesCreateInquiryPayload == nil { - return fmt.Errorf("inquiriesCreateInquiryPayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.inquiriesCreateInquiryPayload - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return 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 err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return newErr - } - - return nil -} - -/* -InquiriesCreateInquiry: Create inquiry - -Deprecated: Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiInquiriesCreateInquiryRequest -*/ -func (a *APIClient) InquiriesCreateInquiry(ctx context.Context) ApiInquiriesCreateInquiryRequest { - return InquiriesCreateInquiryRequest{ - apiService: a.defaultApi, - ctx: ctx, - } -} - -/* -Deprecated: Create an inquiry to contact sales, become a vendor, request a private plan, register for testing, or suggest a product. Requests are limited to 10 per 5 minutes. -*/ -func (a *APIClient) InquiriesCreateInquiryExecute(ctx context.Context) error { - r := InquiriesCreateInquiryRequest{ - apiService: a.defaultApi, - ctx: ctx, - } - return r.Execute() -} - -type ListCatalogProductsRequest struct { - ctx context.Context - apiService *DefaultApiService - cursor *string - limit *float32 - locale *string - filter *string - sort *string -} - -// 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. - -func (r ListCatalogProductsRequest) Cursor(cursor string) ApiListCatalogProductsRequest { - r.cursor = &cursor - return r -} - -// The maximum number of items to return in the response. If maximum is exceeded, maximum is used. - -func (r ListCatalogProductsRequest) Limit(limit float32) ApiListCatalogProductsRequest { - r.limit = &limit - return r -} - -// The language of the response. - -func (r ListCatalogProductsRequest) Locale(locale string) ApiListCatalogProductsRequest { - r.locale = &locale - return r -} - -// Filter the products based on attributes, e.g., `deliveryMethod eq \"SAAS\"`. The supported operators are: - `PR` (present; `name pr`) - `EQ` (equal) - `NE` (not equal) - `CO` (contains; `text co \"searching\"`) - `SW` (starts with) - `EW` (ends with) - `GT` (greater than) - `LT` (less than) - `GE` (greater than or equal) - `LE` (less than or equal). These expressions can be logically linked with `AND` and `OR`. All attributes (and the special `text` attribute) can be used as filters, if the attribute type allows the operator. - -func (r ListCatalogProductsRequest) Filter(filter string) ApiListCatalogProductsRequest { - r.filter = &filter - return r -} - -// Sort the products based on attributes and order e.g. `name:asc`. Attributes with scalar types (`createdAt`, `isProductListing`) or keywords (`name`, `deliveryMethod`, `lifecycleState`, `vendor.name`) can be used as sort criteria. To set the sort order, append `asc` (ascending) or `desc` (descending) to the attribute, e.g. `name:asc`. To sort by multiple attributes, separate them with a comma. E.g `name:asc,price:desc`. - -func (r ListCatalogProductsRequest) Sort(sort string) ApiListCatalogProductsRequest { - r.sort = &sort - return r -} - -func (r ListCatalogProductsRequest) Execute() (*ListCatalogProductsResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListCatalogProductsResponse - ) - 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.ListCatalogProducts") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/catalog/products" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "") - } - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") - } - if r.locale != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "locale", r.locale, "") - } - if r.filter != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "filter", r.filter, "") - } - if r.sort != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "") - } - // 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"} - - // 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 ErrorResponse - 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 ErrorResponse - 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 == 403 { - var v ErrorResponse - 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 -} - -/* -ListCatalogProducts: List all products - -Deprecated: List all products. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListCatalogProductsRequest -*/ -func (a *APIClient) ListCatalogProducts(ctx context.Context) ApiListCatalogProductsRequest { - return ListCatalogProductsRequest{ - apiService: a.defaultApi, - ctx: ctx, - } -} - -/* -Deprecated: List all products. -*/ -func (a *APIClient) ListCatalogProductsExecute(ctx context.Context) (*ListCatalogProductsResponse, error) { - r := ListCatalogProductsRequest{ - apiService: a.defaultApi, - ctx: ctx, - } - return r.Execute() -} - -type ListVendorSubscriptionsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - cursor *string - limit *float32 - productId *string -} - -// 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. - -func (r ListVendorSubscriptionsRequest) Cursor(cursor string) ApiListVendorSubscriptionsRequest { - r.cursor = &cursor - return r -} - -// The maximum number of items to return in the response. If maximum is exceeded, maximum is used. - -func (r ListVendorSubscriptionsRequest) Limit(limit float32) ApiListVendorSubscriptionsRequest { - r.limit = &limit - return r -} - -// The product ID. - -func (r ListVendorSubscriptionsRequest) ProductId(productId string) ApiListVendorSubscriptionsRequest { - r.productId = &productId - return r -} - -func (r ListVendorSubscriptionsRequest) Execute() (*ListVendorSubscriptionsResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListVendorSubscriptionsResponse - ) - 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.ListVendorSubscriptions") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/vendors/projects/{projectId}/subscriptions" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "") - } - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") - } - if r.productId != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "productId", r.productId, "") - } - // 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"} - - // 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 ErrorResponse - 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 ErrorResponse - 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 == 403 { - var v ErrorResponse - 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 -} - -/* -ListVendorSubscriptions: List all subscriptions of a project. - -List all subscriptions of a project. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The project ID. - @return ApiListVendorSubscriptionsRequest -*/ -func (a *APIClient) ListVendorSubscriptions(ctx context.Context, projectId string) ApiListVendorSubscriptionsRequest { - return ListVendorSubscriptionsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } -} - -func (a *APIClient) ListVendorSubscriptionsExecute(ctx context.Context, projectId string) (*ListVendorSubscriptionsResponse, error) { - r := ListVendorSubscriptionsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } - return r.Execute() -} - -type ResolveCustomerRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - resolveCustomerPayload *ResolveCustomerPayload -} - -func (r ResolveCustomerRequest) ResolveCustomerPayload(resolveCustomerPayload ResolveCustomerPayload) ApiResolveCustomerRequest { - r.resolveCustomerPayload = &resolveCustomerPayload - return r -} - -func (r ResolveCustomerRequest) Execute() (*VendorSubscription, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VendorSubscription - ) - 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.ResolveCustomer") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/vendors/projects/{projectId}/resolve-customer" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return localVarReturnValue, fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return localVarReturnValue, fmt.Errorf("projectId must have less than 36 elements") - } - if r.resolveCustomerPayload == nil { - return localVarReturnValue, fmt.Errorf("resolveCustomerPayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.resolveCustomerPayload - 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 ErrorResponse - 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 ErrorResponse - 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 == 403 { - var v ErrorResponse - 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 == 404 { - var v ErrorResponse - 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 -} - -/* -ResolveCustomer: Resolve customer - -Get details about the requested subscription. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The project ID. - @return ApiResolveCustomerRequest -*/ -func (a *APIClient) ResolveCustomer(ctx context.Context, projectId string) ApiResolveCustomerRequest { - return ResolveCustomerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } -} - -func (a *APIClient) ResolveCustomerExecute(ctx context.Context, projectId string) (*VendorSubscription, error) { - r := ResolveCustomerRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } - return r.Execute() -} - -type VendorsSubscriptionsRejectRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - subscriptionId string -} - -func (r VendorsSubscriptionsRejectRequest) Execute() error { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.VendorsSubscriptionsReject") - if err != nil { - return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/vendors/projects/{projectId}/subscriptions/{subscriptionId}/reject" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", url.PathEscape(ParameterValueToString(r.subscriptionId, "subscriptionId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.projectId) < 36 { - return fmt.Errorf("projectId must have at least 36 elements") - } - if strlen(r.projectId) > 36 { - return fmt.Errorf("projectId must have less than 36 elements") - } - if strlen(r.subscriptionId) < 36 { - return fmt.Errorf("subscriptionId must have at least 36 elements") - } - if strlen(r.subscriptionId) > 36 { - return fmt.Errorf("subscriptionId must have less than 36 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // 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 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 err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return newErr - } - - return nil -} - -/* -VendorsSubscriptionsReject: Reject a subscription - -Reject a subscription (in any lifecycle state). Only available for subscriptions to products with lifecycle state `PRODUCT_PREVIEW`. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The project ID. - @param subscriptionId The subscription ID. - @return ApiVendorsSubscriptionsRejectRequest -*/ -func (a *APIClient) VendorsSubscriptionsReject(ctx context.Context, projectId string, subscriptionId string) ApiVendorsSubscriptionsRejectRequest { - return VendorsSubscriptionsRejectRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - subscriptionId: subscriptionId, - } -} - -func (a *APIClient) VendorsSubscriptionsRejectExecute(ctx context.Context, projectId string, subscriptionId string) error { - r := VendorsSubscriptionsRejectRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - subscriptionId: subscriptionId, - } - return r.Execute() -} diff --git a/services/stackitmarketplace/api_default_test.go b/services/stackitmarketplace/api_default_test.go deleted file mode 100644 index 94fc01716..000000000 --- a/services/stackitmarketplace/api_default_test.go +++ /dev/null @@ -1,428 +0,0 @@ -/* -STACKIT Marketplace API - -Testing DefaultApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package stackitmarketplace - -import ( - "context" - "encoding/json" - "net/http" - "net/http/httptest" - "net/url" - "strings" - "testing" - - "github.com/stackitcloud/stackit-sdk-go/core/config" -) - -func Test_stackitmarketplace_DefaultApiService(t *testing.T) { - - t.Run("Test DefaultApiService ApproveSubscription", func(t *testing.T) { - _apiUrlPath := "/v1/vendors/projects/{projectId}/subscriptions/{subscriptionId}/approve" - projectIdValue := randString(36) - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - subscriptionIdValue := randString(36) - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"subscriptionId"+"}", url.PathEscape(ParameterValueToString(subscriptionIdValue, "subscriptionId")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - }) - 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 stackitmarketplace_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 - subscriptionId := subscriptionIdValue - - reqErr := apiClient.ApproveSubscription(context.Background(), projectId, subscriptionId).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - }) - - t.Run("Test DefaultApiService GetCatalogProduct", func(t *testing.T) { - _apiUrlPath := "/v1/catalog/products/{productId}" - productIdValue := randString(10) - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"productId"+"}", url.PathEscape(ParameterValueToString(productIdValue, "productId")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := CatalogProductDetail{} - 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 stackitmarketplace_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) - } - - productId := productIdValue - - resp, reqErr := apiClient.GetCatalogProduct(context.Background(), productId).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - - t.Run("Test DefaultApiService GetVendorSubscription", func(t *testing.T) { - _apiUrlPath := "/v1/vendors/projects/{projectId}/subscriptions/{subscriptionId}" - projectIdValue := randString(36) - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - subscriptionIdValue := randString(36) - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"subscriptionId"+"}", url.PathEscape(ParameterValueToString(subscriptionIdValue, "subscriptionId")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := VendorSubscription{} - 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 stackitmarketplace_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 - subscriptionId := subscriptionIdValue - - resp, reqErr := apiClient.GetVendorSubscription(context.Background(), projectId, subscriptionId).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - - t.Run("Test DefaultApiService InquiriesCreateInquiry", func(t *testing.T) { - _apiUrlPath := "/v1/inquiries" - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - }) - 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 stackitmarketplace_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) - } - - inquiriesCreateInquiryPayload := InquiriesCreateInquiryPayload{} - - reqErr := apiClient.InquiriesCreateInquiry(context.Background()).InquiriesCreateInquiryPayload(inquiriesCreateInquiryPayload).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - }) - - t.Run("Test DefaultApiService ListCatalogProducts", func(t *testing.T) { - _apiUrlPath := "/v1/catalog/products" - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := ListCatalogProductsResponse{} - 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 stackitmarketplace_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) - } - - resp, reqErr := apiClient.ListCatalogProducts(context.Background()).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - - t.Run("Test DefaultApiService ListVendorSubscriptions", func(t *testing.T) { - _apiUrlPath := "/v1/vendors/projects/{projectId}/subscriptions" - projectIdValue := randString(36) - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := ListVendorSubscriptionsResponse{} - 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 stackitmarketplace_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 - - resp, reqErr := apiClient.ListVendorSubscriptions(context.Background(), projectId).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - - t.Run("Test DefaultApiService ResolveCustomer", func(t *testing.T) { - _apiUrlPath := "/v1/vendors/projects/{projectId}/resolve-customer" - projectIdValue := randString(36) - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := VendorSubscription{} - 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 stackitmarketplace_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 - resolveCustomerPayload := ResolveCustomerPayload{} - - resp, reqErr := apiClient.ResolveCustomer(context.Background(), projectId).ResolveCustomerPayload(resolveCustomerPayload).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - - t.Run("Test DefaultApiService VendorsSubscriptionsReject", func(t *testing.T) { - _apiUrlPath := "/v1/vendors/projects/{projectId}/subscriptions/{subscriptionId}/reject" - projectIdValue := randString(36) - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - subscriptionIdValue := randString(36) - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"subscriptionId"+"}", url.PathEscape(ParameterValueToString(subscriptionIdValue, "subscriptionId")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - }) - 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 stackitmarketplace_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 - subscriptionId := subscriptionIdValue - - reqErr := apiClient.VendorsSubscriptionsReject(context.Background(), projectId, subscriptionId).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - }) - -} diff --git a/services/stackitmarketplace/model_approve_subscription_payload_test.go b/services/stackitmarketplace/model_approve_subscription_payload_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_approve_subscription_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_assets.go b/services/stackitmarketplace/model_assets.go deleted file mode 100644 index 3051ba58c..000000000 --- a/services/stackitmarketplace/model_assets.go +++ /dev/null @@ -1,268 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the Assets type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Assets{} - -/* - types and functions for endUserLicenseAgreement -*/ - -// isModel -type AssetsGetEndUserLicenseAgreementAttributeType = *AssetsEndUserLicenseAgreement -type AssetsGetEndUserLicenseAgreementArgType = AssetsEndUserLicenseAgreement -type AssetsGetEndUserLicenseAgreementRetType = AssetsEndUserLicenseAgreement - -func getAssetsGetEndUserLicenseAgreementAttributeTypeOk(arg AssetsGetEndUserLicenseAgreementAttributeType) (ret AssetsGetEndUserLicenseAgreementRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setAssetsGetEndUserLicenseAgreementAttributeType(arg *AssetsGetEndUserLicenseAgreementAttributeType, val AssetsGetEndUserLicenseAgreementRetType) { - *arg = &val -} - -/* - types and functions for productDescription -*/ - -// isModel -type AssetsGetProductDescriptionAttributeType = *AssetsProductDescription -type AssetsGetProductDescriptionArgType = AssetsProductDescription -type AssetsGetProductDescriptionRetType = AssetsProductDescription - -func getAssetsGetProductDescriptionAttributeTypeOk(arg AssetsGetProductDescriptionAttributeType) (ret AssetsGetProductDescriptionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setAssetsGetProductDescriptionAttributeType(arg *AssetsGetProductDescriptionAttributeType, val AssetsGetProductDescriptionRetType) { - *arg = &val -} - -/* - types and functions for serviceCertificate -*/ - -// isModel -type AssetsGetServiceCertificateAttributeType = *ServiceCertificate -type AssetsGetServiceCertificateArgType = ServiceCertificate -type AssetsGetServiceCertificateRetType = ServiceCertificate - -func getAssetsGetServiceCertificateAttributeTypeOk(arg AssetsGetServiceCertificateAttributeType) (ret AssetsGetServiceCertificateRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setAssetsGetServiceCertificateAttributeType(arg *AssetsGetServiceCertificateAttributeType, val AssetsGetServiceCertificateRetType) { - *arg = &val -} - -/* - types and functions for serviceLevelAgreement -*/ - -// isModel -type AssetsGetServiceLevelAgreementAttributeType = *AssetsServiceLevelAgreement -type AssetsGetServiceLevelAgreementArgType = AssetsServiceLevelAgreement -type AssetsGetServiceLevelAgreementRetType = AssetsServiceLevelAgreement - -func getAssetsGetServiceLevelAgreementAttributeTypeOk(arg AssetsGetServiceLevelAgreementAttributeType) (ret AssetsGetServiceLevelAgreementRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setAssetsGetServiceLevelAgreementAttributeType(arg *AssetsGetServiceLevelAgreementAttributeType, val AssetsGetServiceLevelAgreementRetType) { - *arg = &val -} - -// Assets The assets associated with the product. -type Assets struct { - EndUserLicenseAgreement AssetsGetEndUserLicenseAgreementAttributeType `json:"endUserLicenseAgreement,omitempty"` - ProductDescription AssetsGetProductDescriptionAttributeType `json:"productDescription,omitempty"` - ServiceCertificate AssetsGetServiceCertificateAttributeType `json:"serviceCertificate,omitempty"` - ServiceLevelAgreement AssetsGetServiceLevelAgreementAttributeType `json:"serviceLevelAgreement,omitempty"` -} - -// NewAssets instantiates a new Assets 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 NewAssets() *Assets { - this := Assets{} - return &this -} - -// NewAssetsWithDefaults instantiates a new Assets 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 NewAssetsWithDefaults() *Assets { - this := Assets{} - return &this -} - -// GetEndUserLicenseAgreement returns the EndUserLicenseAgreement field value if set, zero value otherwise. -func (o *Assets) GetEndUserLicenseAgreement() (res AssetsGetEndUserLicenseAgreementRetType) { - res, _ = o.GetEndUserLicenseAgreementOk() - return -} - -// GetEndUserLicenseAgreementOk returns a tuple with the EndUserLicenseAgreement field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Assets) GetEndUserLicenseAgreementOk() (ret AssetsGetEndUserLicenseAgreementRetType, ok bool) { - return getAssetsGetEndUserLicenseAgreementAttributeTypeOk(o.EndUserLicenseAgreement) -} - -// HasEndUserLicenseAgreement returns a boolean if a field has been set. -func (o *Assets) HasEndUserLicenseAgreement() bool { - _, ok := o.GetEndUserLicenseAgreementOk() - return ok -} - -// SetEndUserLicenseAgreement gets a reference to the given AssetsEndUserLicenseAgreement and assigns it to the EndUserLicenseAgreement field. -func (o *Assets) SetEndUserLicenseAgreement(v AssetsGetEndUserLicenseAgreementRetType) { - setAssetsGetEndUserLicenseAgreementAttributeType(&o.EndUserLicenseAgreement, v) -} - -// GetProductDescription returns the ProductDescription field value if set, zero value otherwise. -func (o *Assets) GetProductDescription() (res AssetsGetProductDescriptionRetType) { - res, _ = o.GetProductDescriptionOk() - return -} - -// GetProductDescriptionOk returns a tuple with the ProductDescription field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Assets) GetProductDescriptionOk() (ret AssetsGetProductDescriptionRetType, ok bool) { - return getAssetsGetProductDescriptionAttributeTypeOk(o.ProductDescription) -} - -// HasProductDescription returns a boolean if a field has been set. -func (o *Assets) HasProductDescription() bool { - _, ok := o.GetProductDescriptionOk() - return ok -} - -// SetProductDescription gets a reference to the given AssetsProductDescription and assigns it to the ProductDescription field. -func (o *Assets) SetProductDescription(v AssetsGetProductDescriptionRetType) { - setAssetsGetProductDescriptionAttributeType(&o.ProductDescription, v) -} - -// GetServiceCertificate returns the ServiceCertificate field value if set, zero value otherwise. -func (o *Assets) GetServiceCertificate() (res AssetsGetServiceCertificateRetType) { - res, _ = o.GetServiceCertificateOk() - return -} - -// GetServiceCertificateOk returns a tuple with the ServiceCertificate field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Assets) GetServiceCertificateOk() (ret AssetsGetServiceCertificateRetType, ok bool) { - return getAssetsGetServiceCertificateAttributeTypeOk(o.ServiceCertificate) -} - -// HasServiceCertificate returns a boolean if a field has been set. -func (o *Assets) HasServiceCertificate() bool { - _, ok := o.GetServiceCertificateOk() - return ok -} - -// SetServiceCertificate gets a reference to the given ServiceCertificate and assigns it to the ServiceCertificate field. -func (o *Assets) SetServiceCertificate(v AssetsGetServiceCertificateRetType) { - setAssetsGetServiceCertificateAttributeType(&o.ServiceCertificate, v) -} - -// GetServiceLevelAgreement returns the ServiceLevelAgreement field value if set, zero value otherwise. -func (o *Assets) GetServiceLevelAgreement() (res AssetsGetServiceLevelAgreementRetType) { - res, _ = o.GetServiceLevelAgreementOk() - return -} - -// GetServiceLevelAgreementOk returns a tuple with the ServiceLevelAgreement field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Assets) GetServiceLevelAgreementOk() (ret AssetsGetServiceLevelAgreementRetType, ok bool) { - return getAssetsGetServiceLevelAgreementAttributeTypeOk(o.ServiceLevelAgreement) -} - -// HasServiceLevelAgreement returns a boolean if a field has been set. -func (o *Assets) HasServiceLevelAgreement() bool { - _, ok := o.GetServiceLevelAgreementOk() - return ok -} - -// SetServiceLevelAgreement gets a reference to the given AssetsServiceLevelAgreement and assigns it to the ServiceLevelAgreement field. -func (o *Assets) SetServiceLevelAgreement(v AssetsGetServiceLevelAgreementRetType) { - setAssetsGetServiceLevelAgreementAttributeType(&o.ServiceLevelAgreement, v) -} - -func (o Assets) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getAssetsGetEndUserLicenseAgreementAttributeTypeOk(o.EndUserLicenseAgreement); ok { - toSerialize["EndUserLicenseAgreement"] = val - } - if val, ok := getAssetsGetProductDescriptionAttributeTypeOk(o.ProductDescription); ok { - toSerialize["ProductDescription"] = val - } - if val, ok := getAssetsGetServiceCertificateAttributeTypeOk(o.ServiceCertificate); ok { - toSerialize["ServiceCertificate"] = val - } - if val, ok := getAssetsGetServiceLevelAgreementAttributeTypeOk(o.ServiceLevelAgreement); ok { - toSerialize["ServiceLevelAgreement"] = val - } - return toSerialize, nil -} - -type NullableAssets struct { - value *Assets - isSet bool -} - -func (v NullableAssets) Get() *Assets { - return v.value -} - -func (v *NullableAssets) Set(val *Assets) { - v.value = val - v.isSet = true -} - -func (v NullableAssets) IsSet() bool { - return v.isSet -} - -func (v *NullableAssets) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAssets(val *Assets) *NullableAssets { - return &NullableAssets{value: val, isSet: true} -} - -func (v NullableAssets) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAssets) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_assets_end_user_license_agreement.go b/services/stackitmarketplace/model_assets_end_user_license_agreement.go deleted file mode 100644 index 185634792..000000000 --- a/services/stackitmarketplace/model_assets_end_user_license_agreement.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the AssetsEndUserLicenseAgreement type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AssetsEndUserLicenseAgreement{} - -/* - types and functions for version -*/ - -// isModel -type AssetsEndUserLicenseAgreementGetVersionAttributeType = *LocalizedVersion -type AssetsEndUserLicenseAgreementGetVersionArgType = LocalizedVersion -type AssetsEndUserLicenseAgreementGetVersionRetType = LocalizedVersion - -func getAssetsEndUserLicenseAgreementGetVersionAttributeTypeOk(arg AssetsEndUserLicenseAgreementGetVersionAttributeType) (ret AssetsEndUserLicenseAgreementGetVersionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setAssetsEndUserLicenseAgreementGetVersionAttributeType(arg *AssetsEndUserLicenseAgreementGetVersionAttributeType, val AssetsEndUserLicenseAgreementGetVersionRetType) { - *arg = &val -} - -// AssetsEndUserLicenseAgreement The related end user license agreement of the (subscription) product. -type AssetsEndUserLicenseAgreement struct { - Version AssetsEndUserLicenseAgreementGetVersionAttributeType `json:"version,omitempty"` -} - -// NewAssetsEndUserLicenseAgreement instantiates a new AssetsEndUserLicenseAgreement 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 NewAssetsEndUserLicenseAgreement() *AssetsEndUserLicenseAgreement { - this := AssetsEndUserLicenseAgreement{} - return &this -} - -// NewAssetsEndUserLicenseAgreementWithDefaults instantiates a new AssetsEndUserLicenseAgreement 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 NewAssetsEndUserLicenseAgreementWithDefaults() *AssetsEndUserLicenseAgreement { - this := AssetsEndUserLicenseAgreement{} - return &this -} - -// GetVersion returns the Version field value if set, zero value otherwise. -func (o *AssetsEndUserLicenseAgreement) GetVersion() (res AssetsEndUserLicenseAgreementGetVersionRetType) { - res, _ = o.GetVersionOk() - return -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AssetsEndUserLicenseAgreement) GetVersionOk() (ret AssetsEndUserLicenseAgreementGetVersionRetType, ok bool) { - return getAssetsEndUserLicenseAgreementGetVersionAttributeTypeOk(o.Version) -} - -// HasVersion returns a boolean if a field has been set. -func (o *AssetsEndUserLicenseAgreement) HasVersion() bool { - _, ok := o.GetVersionOk() - return ok -} - -// SetVersion gets a reference to the given LocalizedVersion and assigns it to the Version field. -func (o *AssetsEndUserLicenseAgreement) SetVersion(v AssetsEndUserLicenseAgreementGetVersionRetType) { - setAssetsEndUserLicenseAgreementGetVersionAttributeType(&o.Version, v) -} - -func (o AssetsEndUserLicenseAgreement) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getAssetsEndUserLicenseAgreementGetVersionAttributeTypeOk(o.Version); ok { - toSerialize["Version"] = val - } - return toSerialize, nil -} - -type NullableAssetsEndUserLicenseAgreement struct { - value *AssetsEndUserLicenseAgreement - isSet bool -} - -func (v NullableAssetsEndUserLicenseAgreement) Get() *AssetsEndUserLicenseAgreement { - return v.value -} - -func (v *NullableAssetsEndUserLicenseAgreement) Set(val *AssetsEndUserLicenseAgreement) { - v.value = val - v.isSet = true -} - -func (v NullableAssetsEndUserLicenseAgreement) IsSet() bool { - return v.isSet -} - -func (v *NullableAssetsEndUserLicenseAgreement) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAssetsEndUserLicenseAgreement(val *AssetsEndUserLicenseAgreement) *NullableAssetsEndUserLicenseAgreement { - return &NullableAssetsEndUserLicenseAgreement{value: val, isSet: true} -} - -func (v NullableAssetsEndUserLicenseAgreement) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAssetsEndUserLicenseAgreement) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_assets_end_user_license_agreement_test.go b/services/stackitmarketplace/model_assets_end_user_license_agreement_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_assets_end_user_license_agreement_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_assets_product_description.go b/services/stackitmarketplace/model_assets_product_description.go deleted file mode 100644 index 40e859f04..000000000 --- a/services/stackitmarketplace/model_assets_product_description.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the AssetsProductDescription type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AssetsProductDescription{} - -/* - types and functions for version -*/ - -// isModel -type AssetsProductDescriptionGetVersionAttributeType = *LocalizedVersion -type AssetsProductDescriptionGetVersionArgType = LocalizedVersion -type AssetsProductDescriptionGetVersionRetType = LocalizedVersion - -func getAssetsProductDescriptionGetVersionAttributeTypeOk(arg AssetsProductDescriptionGetVersionAttributeType) (ret AssetsProductDescriptionGetVersionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setAssetsProductDescriptionGetVersionAttributeType(arg *AssetsProductDescriptionGetVersionAttributeType, val AssetsProductDescriptionGetVersionRetType) { - *arg = &val -} - -// AssetsProductDescription The related product description of the (subscription) product. -type AssetsProductDescription struct { - Version AssetsProductDescriptionGetVersionAttributeType `json:"version,omitempty"` -} - -// NewAssetsProductDescription instantiates a new AssetsProductDescription 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 NewAssetsProductDescription() *AssetsProductDescription { - this := AssetsProductDescription{} - return &this -} - -// NewAssetsProductDescriptionWithDefaults instantiates a new AssetsProductDescription 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 NewAssetsProductDescriptionWithDefaults() *AssetsProductDescription { - this := AssetsProductDescription{} - return &this -} - -// GetVersion returns the Version field value if set, zero value otherwise. -func (o *AssetsProductDescription) GetVersion() (res AssetsProductDescriptionGetVersionRetType) { - res, _ = o.GetVersionOk() - return -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AssetsProductDescription) GetVersionOk() (ret AssetsProductDescriptionGetVersionRetType, ok bool) { - return getAssetsProductDescriptionGetVersionAttributeTypeOk(o.Version) -} - -// HasVersion returns a boolean if a field has been set. -func (o *AssetsProductDescription) HasVersion() bool { - _, ok := o.GetVersionOk() - return ok -} - -// SetVersion gets a reference to the given LocalizedVersion and assigns it to the Version field. -func (o *AssetsProductDescription) SetVersion(v AssetsProductDescriptionGetVersionRetType) { - setAssetsProductDescriptionGetVersionAttributeType(&o.Version, v) -} - -func (o AssetsProductDescription) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getAssetsProductDescriptionGetVersionAttributeTypeOk(o.Version); ok { - toSerialize["Version"] = val - } - return toSerialize, nil -} - -type NullableAssetsProductDescription struct { - value *AssetsProductDescription - isSet bool -} - -func (v NullableAssetsProductDescription) Get() *AssetsProductDescription { - return v.value -} - -func (v *NullableAssetsProductDescription) Set(val *AssetsProductDescription) { - v.value = val - v.isSet = true -} - -func (v NullableAssetsProductDescription) IsSet() bool { - return v.isSet -} - -func (v *NullableAssetsProductDescription) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAssetsProductDescription(val *AssetsProductDescription) *NullableAssetsProductDescription { - return &NullableAssetsProductDescription{value: val, isSet: true} -} - -func (v NullableAssetsProductDescription) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAssetsProductDescription) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_assets_product_description_test.go b/services/stackitmarketplace/model_assets_product_description_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_assets_product_description_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_assets_service_level_agreement.go b/services/stackitmarketplace/model_assets_service_level_agreement.go deleted file mode 100644 index ffb33d522..000000000 --- a/services/stackitmarketplace/model_assets_service_level_agreement.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the AssetsServiceLevelAgreement type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AssetsServiceLevelAgreement{} - -/* - types and functions for version -*/ - -// isModel -type AssetsServiceLevelAgreementGetVersionAttributeType = *LocalizedVersion -type AssetsServiceLevelAgreementGetVersionArgType = LocalizedVersion -type AssetsServiceLevelAgreementGetVersionRetType = LocalizedVersion - -func getAssetsServiceLevelAgreementGetVersionAttributeTypeOk(arg AssetsServiceLevelAgreementGetVersionAttributeType) (ret AssetsServiceLevelAgreementGetVersionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setAssetsServiceLevelAgreementGetVersionAttributeType(arg *AssetsServiceLevelAgreementGetVersionAttributeType, val AssetsServiceLevelAgreementGetVersionRetType) { - *arg = &val -} - -// AssetsServiceLevelAgreement The related service level agreement of the (subscription) product. -type AssetsServiceLevelAgreement struct { - Version AssetsServiceLevelAgreementGetVersionAttributeType `json:"version,omitempty"` -} - -// NewAssetsServiceLevelAgreement instantiates a new AssetsServiceLevelAgreement 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 NewAssetsServiceLevelAgreement() *AssetsServiceLevelAgreement { - this := AssetsServiceLevelAgreement{} - return &this -} - -// NewAssetsServiceLevelAgreementWithDefaults instantiates a new AssetsServiceLevelAgreement 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 NewAssetsServiceLevelAgreementWithDefaults() *AssetsServiceLevelAgreement { - this := AssetsServiceLevelAgreement{} - return &this -} - -// GetVersion returns the Version field value if set, zero value otherwise. -func (o *AssetsServiceLevelAgreement) GetVersion() (res AssetsServiceLevelAgreementGetVersionRetType) { - res, _ = o.GetVersionOk() - return -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AssetsServiceLevelAgreement) GetVersionOk() (ret AssetsServiceLevelAgreementGetVersionRetType, ok bool) { - return getAssetsServiceLevelAgreementGetVersionAttributeTypeOk(o.Version) -} - -// HasVersion returns a boolean if a field has been set. -func (o *AssetsServiceLevelAgreement) HasVersion() bool { - _, ok := o.GetVersionOk() - return ok -} - -// SetVersion gets a reference to the given LocalizedVersion and assigns it to the Version field. -func (o *AssetsServiceLevelAgreement) SetVersion(v AssetsServiceLevelAgreementGetVersionRetType) { - setAssetsServiceLevelAgreementGetVersionAttributeType(&o.Version, v) -} - -func (o AssetsServiceLevelAgreement) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getAssetsServiceLevelAgreementGetVersionAttributeTypeOk(o.Version); ok { - toSerialize["Version"] = val - } - return toSerialize, nil -} - -type NullableAssetsServiceLevelAgreement struct { - value *AssetsServiceLevelAgreement - isSet bool -} - -func (v NullableAssetsServiceLevelAgreement) Get() *AssetsServiceLevelAgreement { - return v.value -} - -func (v *NullableAssetsServiceLevelAgreement) Set(val *AssetsServiceLevelAgreement) { - v.value = val - v.isSet = true -} - -func (v NullableAssetsServiceLevelAgreement) IsSet() bool { - return v.isSet -} - -func (v *NullableAssetsServiceLevelAgreement) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAssetsServiceLevelAgreement(val *AssetsServiceLevelAgreement) *NullableAssetsServiceLevelAgreement { - return &NullableAssetsServiceLevelAgreement{value: val, isSet: true} -} - -func (v NullableAssetsServiceLevelAgreement) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAssetsServiceLevelAgreement) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_assets_service_level_agreement_test.go b/services/stackitmarketplace/model_assets_service_level_agreement_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_assets_service_level_agreement_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_assets_test.go b/services/stackitmarketplace/model_assets_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_assets_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_become_vendor.go b/services/stackitmarketplace/model_become_vendor.go deleted file mode 100644 index 8e0412783..000000000 --- a/services/stackitmarketplace/model_become_vendor.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the BecomeVendor type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BecomeVendor{} - -/* - types and functions for becomeVendor -*/ - -// isModel -type BecomeVendorGetBecomeVendorAttributeType = *InquiryBecomeVendor -type BecomeVendorGetBecomeVendorArgType = InquiryBecomeVendor -type BecomeVendorGetBecomeVendorRetType = InquiryBecomeVendor - -func getBecomeVendorGetBecomeVendorAttributeTypeOk(arg BecomeVendorGetBecomeVendorAttributeType) (ret BecomeVendorGetBecomeVendorRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setBecomeVendorGetBecomeVendorAttributeType(arg *BecomeVendorGetBecomeVendorAttributeType, val BecomeVendorGetBecomeVendorRetType) { - *arg = &val -} - -/* - types and functions for type -*/ - -// isEnumRef -type BecomeVendorGetTypeAttributeType = *InquiryFormType -type BecomeVendorGetTypeArgType = InquiryFormType -type BecomeVendorGetTypeRetType = InquiryFormType - -func getBecomeVendorGetTypeAttributeTypeOk(arg BecomeVendorGetTypeAttributeType) (ret BecomeVendorGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setBecomeVendorGetTypeAttributeType(arg *BecomeVendorGetTypeAttributeType, val BecomeVendorGetTypeRetType) { - *arg = &val -} - -// BecomeVendor Become a Vendor. -type BecomeVendor struct { - // REQUIRED - BecomeVendor BecomeVendorGetBecomeVendorAttributeType `json:"becomeVendor" required:"true"` - // REQUIRED - Type BecomeVendorGetTypeAttributeType `json:"type" required:"true"` -} - -type _BecomeVendor BecomeVendor - -// NewBecomeVendor instantiates a new BecomeVendor 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 NewBecomeVendor(becomeVendor BecomeVendorGetBecomeVendorArgType, types BecomeVendorGetTypeArgType) *BecomeVendor { - this := BecomeVendor{} - setBecomeVendorGetBecomeVendorAttributeType(&this.BecomeVendor, becomeVendor) - setBecomeVendorGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewBecomeVendorWithDefaults instantiates a new BecomeVendor 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 NewBecomeVendorWithDefaults() *BecomeVendor { - this := BecomeVendor{} - return &this -} - -// GetBecomeVendor returns the BecomeVendor field value -func (o *BecomeVendor) GetBecomeVendor() (ret BecomeVendorGetBecomeVendorRetType) { - ret, _ = o.GetBecomeVendorOk() - return ret -} - -// GetBecomeVendorOk returns a tuple with the BecomeVendor field value -// and a boolean to check if the value has been set. -func (o *BecomeVendor) GetBecomeVendorOk() (ret BecomeVendorGetBecomeVendorRetType, ok bool) { - return getBecomeVendorGetBecomeVendorAttributeTypeOk(o.BecomeVendor) -} - -// SetBecomeVendor sets field value -func (o *BecomeVendor) SetBecomeVendor(v BecomeVendorGetBecomeVendorRetType) { - setBecomeVendorGetBecomeVendorAttributeType(&o.BecomeVendor, v) -} - -// GetType returns the Type field value -func (o *BecomeVendor) GetType() (ret BecomeVendorGetTypeRetType) { - 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 *BecomeVendor) GetTypeOk() (ret BecomeVendorGetTypeRetType, ok bool) { - return getBecomeVendorGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -func (o *BecomeVendor) SetType(v BecomeVendorGetTypeRetType) { - setBecomeVendorGetTypeAttributeType(&o.Type, v) -} - -func (o BecomeVendor) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getBecomeVendorGetBecomeVendorAttributeTypeOk(o.BecomeVendor); ok { - toSerialize["BecomeVendor"] = val - } - if val, ok := getBecomeVendorGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -type NullableBecomeVendor struct { - value *BecomeVendor - isSet bool -} - -func (v NullableBecomeVendor) Get() *BecomeVendor { - return v.value -} - -func (v *NullableBecomeVendor) Set(val *BecomeVendor) { - v.value = val - v.isSet = true -} - -func (v NullableBecomeVendor) IsSet() bool { - return v.isSet -} - -func (v *NullableBecomeVendor) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBecomeVendor(val *BecomeVendor) *NullableBecomeVendor { - return &NullableBecomeVendor{value: val, isSet: true} -} - -func (v NullableBecomeVendor) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBecomeVendor) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_become_vendor_test.go b/services/stackitmarketplace/model_become_vendor_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_become_vendor_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_catalog_pricing_option_highlight.go b/services/stackitmarketplace/model_catalog_pricing_option_highlight.go deleted file mode 100644 index 2fb8a589b..000000000 --- a/services/stackitmarketplace/model_catalog_pricing_option_highlight.go +++ /dev/null @@ -1,129 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the CatalogPricingOptionHighlight type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CatalogPricingOptionHighlight{} - -/* - types and functions for highlightContent -*/ - -// isNotNullableString -type CatalogPricingOptionHighlightGetHighlightContentAttributeType = *string - -func getCatalogPricingOptionHighlightGetHighlightContentAttributeTypeOk(arg CatalogPricingOptionHighlightGetHighlightContentAttributeType) (ret CatalogPricingOptionHighlightGetHighlightContentRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogPricingOptionHighlightGetHighlightContentAttributeType(arg *CatalogPricingOptionHighlightGetHighlightContentAttributeType, val CatalogPricingOptionHighlightGetHighlightContentRetType) { - *arg = &val -} - -type CatalogPricingOptionHighlightGetHighlightContentArgType = string -type CatalogPricingOptionHighlightGetHighlightContentRetType = string - -// CatalogPricingOptionHighlight struct for CatalogPricingOptionHighlight -type CatalogPricingOptionHighlight struct { - // The highlight content. - HighlightContent CatalogPricingOptionHighlightGetHighlightContentAttributeType `json:"highlightContent,omitempty"` -} - -// NewCatalogPricingOptionHighlight instantiates a new CatalogPricingOptionHighlight 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 NewCatalogPricingOptionHighlight() *CatalogPricingOptionHighlight { - this := CatalogPricingOptionHighlight{} - return &this -} - -// NewCatalogPricingOptionHighlightWithDefaults instantiates a new CatalogPricingOptionHighlight 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 NewCatalogPricingOptionHighlightWithDefaults() *CatalogPricingOptionHighlight { - this := CatalogPricingOptionHighlight{} - return &this -} - -// GetHighlightContent returns the HighlightContent field value if set, zero value otherwise. -func (o *CatalogPricingOptionHighlight) GetHighlightContent() (res CatalogPricingOptionHighlightGetHighlightContentRetType) { - res, _ = o.GetHighlightContentOk() - return -} - -// GetHighlightContentOk returns a tuple with the HighlightContent field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogPricingOptionHighlight) GetHighlightContentOk() (ret CatalogPricingOptionHighlightGetHighlightContentRetType, ok bool) { - return getCatalogPricingOptionHighlightGetHighlightContentAttributeTypeOk(o.HighlightContent) -} - -// HasHighlightContent returns a boolean if a field has been set. -func (o *CatalogPricingOptionHighlight) HasHighlightContent() bool { - _, ok := o.GetHighlightContentOk() - return ok -} - -// SetHighlightContent gets a reference to the given string and assigns it to the HighlightContent field. -func (o *CatalogPricingOptionHighlight) SetHighlightContent(v CatalogPricingOptionHighlightGetHighlightContentRetType) { - setCatalogPricingOptionHighlightGetHighlightContentAttributeType(&o.HighlightContent, v) -} - -func (o CatalogPricingOptionHighlight) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCatalogPricingOptionHighlightGetHighlightContentAttributeTypeOk(o.HighlightContent); ok { - toSerialize["HighlightContent"] = val - } - return toSerialize, nil -} - -type NullableCatalogPricingOptionHighlight struct { - value *CatalogPricingOptionHighlight - isSet bool -} - -func (v NullableCatalogPricingOptionHighlight) Get() *CatalogPricingOptionHighlight { - return v.value -} - -func (v *NullableCatalogPricingOptionHighlight) Set(val *CatalogPricingOptionHighlight) { - v.value = val - v.isSet = true -} - -func (v NullableCatalogPricingOptionHighlight) IsSet() bool { - return v.isSet -} - -func (v *NullableCatalogPricingOptionHighlight) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCatalogPricingOptionHighlight(val *CatalogPricingOptionHighlight) *NullableCatalogPricingOptionHighlight { - return &NullableCatalogPricingOptionHighlight{value: val, isSet: true} -} - -func (v NullableCatalogPricingOptionHighlight) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCatalogPricingOptionHighlight) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_catalog_pricing_option_highlight_test.go b/services/stackitmarketplace/model_catalog_pricing_option_highlight_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_catalog_pricing_option_highlight_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_catalog_product_detail.go b/services/stackitmarketplace/model_catalog_product_detail.go deleted file mode 100644 index 2e3c6da10..000000000 --- a/services/stackitmarketplace/model_catalog_product_detail.go +++ /dev/null @@ -1,1236 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the CatalogProductDetail type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CatalogProductDetail{} - -/* - types and functions for assets -*/ - -// isModel -type CatalogProductDetailGetAssetsAttributeType = *Assets -type CatalogProductDetailGetAssetsArgType = Assets -type CatalogProductDetailGetAssetsRetType = Assets - -func getCatalogProductDetailGetAssetsAttributeTypeOk(arg CatalogProductDetailGetAssetsAttributeType) (ret CatalogProductDetailGetAssetsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetAssetsAttributeType(arg *CatalogProductDetailGetAssetsAttributeType, val CatalogProductDetailGetAssetsRetType) { - *arg = &val -} - -/* - types and functions for categories -*/ - -// isArray -type CatalogProductDetailGetCategoriesAttributeType = *[]string -type CatalogProductDetailGetCategoriesArgType = []string -type CatalogProductDetailGetCategoriesRetType = []string - -func getCatalogProductDetailGetCategoriesAttributeTypeOk(arg CatalogProductDetailGetCategoriesAttributeType) (ret CatalogProductDetailGetCategoriesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetCategoriesAttributeType(arg *CatalogProductDetailGetCategoriesAttributeType, val CatalogProductDetailGetCategoriesRetType) { - *arg = &val -} - -/* - types and functions for deliveryMethod -*/ - -// isEnumRef -type CatalogProductDetailGetDeliveryMethodAttributeType = *DeliveryMethod -type CatalogProductDetailGetDeliveryMethodArgType = DeliveryMethod -type CatalogProductDetailGetDeliveryMethodRetType = DeliveryMethod - -func getCatalogProductDetailGetDeliveryMethodAttributeTypeOk(arg CatalogProductDetailGetDeliveryMethodAttributeType) (ret CatalogProductDetailGetDeliveryMethodRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetDeliveryMethodAttributeType(arg *CatalogProductDetailGetDeliveryMethodAttributeType, val CatalogProductDetailGetDeliveryMethodRetType) { - *arg = &val -} - -/* - types and functions for demoUrl -*/ - -// isNotNullableString -type CatalogProductDetailGetDemoUrlAttributeType = *string - -func getCatalogProductDetailGetDemoUrlAttributeTypeOk(arg CatalogProductDetailGetDemoUrlAttributeType) (ret CatalogProductDetailGetDemoUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetDemoUrlAttributeType(arg *CatalogProductDetailGetDemoUrlAttributeType, val CatalogProductDetailGetDemoUrlRetType) { - *arg = &val -} - -type CatalogProductDetailGetDemoUrlArgType = string -type CatalogProductDetailGetDemoUrlRetType = string - -/* - types and functions for description -*/ - -// isNotNullableString -type CatalogProductDetailGetDescriptionAttributeType = *string - -func getCatalogProductDetailGetDescriptionAttributeTypeOk(arg CatalogProductDetailGetDescriptionAttributeType) (ret CatalogProductDetailGetDescriptionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetDescriptionAttributeType(arg *CatalogProductDetailGetDescriptionAttributeType, val CatalogProductDetailGetDescriptionRetType) { - *arg = &val -} - -type CatalogProductDetailGetDescriptionArgType = string -type CatalogProductDetailGetDescriptionRetType = string - -/* - types and functions for documentationUrl -*/ - -// isNotNullableString -type CatalogProductDetailGetDocumentationUrlAttributeType = *string - -func getCatalogProductDetailGetDocumentationUrlAttributeTypeOk(arg CatalogProductDetailGetDocumentationUrlAttributeType) (ret CatalogProductDetailGetDocumentationUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetDocumentationUrlAttributeType(arg *CatalogProductDetailGetDocumentationUrlAttributeType, val CatalogProductDetailGetDocumentationUrlRetType) { - *arg = &val -} - -type CatalogProductDetailGetDocumentationUrlArgType = string -type CatalogProductDetailGetDocumentationUrlRetType = string - -/* - types and functions for email -*/ - -// isNotNullableString -type CatalogProductDetailGetEmailAttributeType = *string - -func getCatalogProductDetailGetEmailAttributeTypeOk(arg CatalogProductDetailGetEmailAttributeType) (ret CatalogProductDetailGetEmailRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetEmailAttributeType(arg *CatalogProductDetailGetEmailAttributeType, val CatalogProductDetailGetEmailRetType) { - *arg = &val -} - -type CatalogProductDetailGetEmailArgType = string -type CatalogProductDetailGetEmailRetType = string - -/* - types and functions for hasDemo -*/ - -// isBoolean -type CatalogProductDetailgetHasDemoAttributeType = *bool -type CatalogProductDetailgetHasDemoArgType = bool -type CatalogProductDetailgetHasDemoRetType = bool - -func getCatalogProductDetailgetHasDemoAttributeTypeOk(arg CatalogProductDetailgetHasDemoAttributeType) (ret CatalogProductDetailgetHasDemoRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailgetHasDemoAttributeType(arg *CatalogProductDetailgetHasDemoAttributeType, val CatalogProductDetailgetHasDemoRetType) { - *arg = &val -} - -/* - types and functions for hasPrivatePlanOption -*/ - -// isBoolean -type CatalogProductDetailgetHasPrivatePlanOptionAttributeType = *bool -type CatalogProductDetailgetHasPrivatePlanOptionArgType = bool -type CatalogProductDetailgetHasPrivatePlanOptionRetType = bool - -func getCatalogProductDetailgetHasPrivatePlanOptionAttributeTypeOk(arg CatalogProductDetailgetHasPrivatePlanOptionAttributeType) (ret CatalogProductDetailgetHasPrivatePlanOptionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailgetHasPrivatePlanOptionAttributeType(arg *CatalogProductDetailgetHasPrivatePlanOptionAttributeType, val CatalogProductDetailgetHasPrivatePlanOptionRetType) { - *arg = &val -} - -/* - types and functions for highlights -*/ - -// isArray -type CatalogProductDetailGetHighlightsAttributeType = *[]CatalogProductHighlight -type CatalogProductDetailGetHighlightsArgType = []CatalogProductHighlight -type CatalogProductDetailGetHighlightsRetType = []CatalogProductHighlight - -func getCatalogProductDetailGetHighlightsAttributeTypeOk(arg CatalogProductDetailGetHighlightsAttributeType) (ret CatalogProductDetailGetHighlightsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetHighlightsAttributeType(arg *CatalogProductDetailGetHighlightsAttributeType, val CatalogProductDetailGetHighlightsRetType) { - *arg = &val -} - -/* - types and functions for industries -*/ - -// isArray -type CatalogProductDetailGetIndustriesAttributeType = *[]string -type CatalogProductDetailGetIndustriesArgType = []string -type CatalogProductDetailGetIndustriesRetType = []string - -func getCatalogProductDetailGetIndustriesAttributeTypeOk(arg CatalogProductDetailGetIndustriesAttributeType) (ret CatalogProductDetailGetIndustriesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetIndustriesAttributeType(arg *CatalogProductDetailGetIndustriesAttributeType, val CatalogProductDetailGetIndustriesRetType) { - *arg = &val -} - -/* - types and functions for isProductListing -*/ - -// isBoolean -type CatalogProductDetailgetIsProductListingAttributeType = *bool -type CatalogProductDetailgetIsProductListingArgType = bool -type CatalogProductDetailgetIsProductListingRetType = bool - -func getCatalogProductDetailgetIsProductListingAttributeTypeOk(arg CatalogProductDetailgetIsProductListingAttributeType) (ret CatalogProductDetailgetIsProductListingRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailgetIsProductListingAttributeType(arg *CatalogProductDetailgetIsProductListingAttributeType, val CatalogProductDetailgetIsProductListingRetType) { - *arg = &val -} - -/* - types and functions for lifecycleState -*/ - -// isEnumRef -type CatalogProductDetailGetLifecycleStateAttributeType = *ProductLifecycleState -type CatalogProductDetailGetLifecycleStateArgType = ProductLifecycleState -type CatalogProductDetailGetLifecycleStateRetType = ProductLifecycleState - -func getCatalogProductDetailGetLifecycleStateAttributeTypeOk(arg CatalogProductDetailGetLifecycleStateAttributeType) (ret CatalogProductDetailGetLifecycleStateRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetLifecycleStateAttributeType(arg *CatalogProductDetailGetLifecycleStateAttributeType, val CatalogProductDetailGetLifecycleStateRetType) { - *arg = &val -} - -/* - types and functions for logo -*/ - -// isNotNullableString -type CatalogProductDetailGetLogoAttributeType = *string - -func getCatalogProductDetailGetLogoAttributeTypeOk(arg CatalogProductDetailGetLogoAttributeType) (ret CatalogProductDetailGetLogoRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetLogoAttributeType(arg *CatalogProductDetailGetLogoAttributeType, val CatalogProductDetailGetLogoRetType) { - *arg = &val -} - -type CatalogProductDetailGetLogoArgType = string -type CatalogProductDetailGetLogoRetType = string - -/* - types and functions for name -*/ - -// isNotNullableString -type CatalogProductDetailGetNameAttributeType = *string - -func getCatalogProductDetailGetNameAttributeTypeOk(arg CatalogProductDetailGetNameAttributeType) (ret CatalogProductDetailGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetNameAttributeType(arg *CatalogProductDetailGetNameAttributeType, val CatalogProductDetailGetNameRetType) { - *arg = &val -} - -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 -*/ - -// isArray -type CatalogProductDetailGetPricingOptionsAttributeType = *[]CatalogProductPricingOption -type CatalogProductDetailGetPricingOptionsArgType = []CatalogProductPricingOption -type CatalogProductDetailGetPricingOptionsRetType = []CatalogProductPricingOption - -func getCatalogProductDetailGetPricingOptionsAttributeTypeOk(arg CatalogProductDetailGetPricingOptionsAttributeType) (ret CatalogProductDetailGetPricingOptionsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetPricingOptionsAttributeType(arg *CatalogProductDetailGetPricingOptionsAttributeType, val CatalogProductDetailGetPricingOptionsRetType) { - *arg = &val -} - -/* - types and functions for productId -*/ - -// isNotNullableString -type CatalogProductDetailGetProductIdAttributeType = *string - -func getCatalogProductDetailGetProductIdAttributeTypeOk(arg CatalogProductDetailGetProductIdAttributeType) (ret CatalogProductDetailGetProductIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetProductIdAttributeType(arg *CatalogProductDetailGetProductIdAttributeType, val CatalogProductDetailGetProductIdRetType) { - *arg = &val -} - -type CatalogProductDetailGetProductIdArgType = string -type CatalogProductDetailGetProductIdRetType = string - -/* - types and functions for summary -*/ - -// isNotNullableString -type CatalogProductDetailGetSummaryAttributeType = *string - -func getCatalogProductDetailGetSummaryAttributeTypeOk(arg CatalogProductDetailGetSummaryAttributeType) (ret CatalogProductDetailGetSummaryRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetSummaryAttributeType(arg *CatalogProductDetailGetSummaryAttributeType, val CatalogProductDetailGetSummaryRetType) { - *arg = &val -} - -type CatalogProductDetailGetSummaryArgType = string -type CatalogProductDetailGetSummaryRetType = string - -/* - types and functions for supportFaq -*/ - -// isNotNullableString -type CatalogProductDetailGetSupportFaqAttributeType = *string - -func getCatalogProductDetailGetSupportFaqAttributeTypeOk(arg CatalogProductDetailGetSupportFaqAttributeType) (ret CatalogProductDetailGetSupportFaqRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetSupportFaqAttributeType(arg *CatalogProductDetailGetSupportFaqAttributeType, val CatalogProductDetailGetSupportFaqRetType) { - *arg = &val -} - -type CatalogProductDetailGetSupportFaqArgType = string -type CatalogProductDetailGetSupportFaqRetType = string - -/* - types and functions for supportPhone -*/ - -// isNotNullableString -type CatalogProductDetailGetSupportPhoneAttributeType = *string - -func getCatalogProductDetailGetSupportPhoneAttributeTypeOk(arg CatalogProductDetailGetSupportPhoneAttributeType) (ret CatalogProductDetailGetSupportPhoneRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetSupportPhoneAttributeType(arg *CatalogProductDetailGetSupportPhoneAttributeType, val CatalogProductDetailGetSupportPhoneRetType) { - *arg = &val -} - -type CatalogProductDetailGetSupportPhoneArgType = string -type CatalogProductDetailGetSupportPhoneRetType = string - -/* - types and functions for supportResources -*/ - -// isArray -type CatalogProductDetailGetSupportResourcesAttributeType = *[]CatalogProductSupportResource -type CatalogProductDetailGetSupportResourcesArgType = []CatalogProductSupportResource -type CatalogProductDetailGetSupportResourcesRetType = []CatalogProductSupportResource - -func getCatalogProductDetailGetSupportResourcesAttributeTypeOk(arg CatalogProductDetailGetSupportResourcesAttributeType) (ret CatalogProductDetailGetSupportResourcesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetSupportResourcesAttributeType(arg *CatalogProductDetailGetSupportResourcesAttributeType, val CatalogProductDetailGetSupportResourcesRetType) { - *arg = &val -} - -/* - types and functions for vendor -*/ - -// isModel -type CatalogProductDetailGetVendorAttributeType = *CatalogProductDetailsVendor -type CatalogProductDetailGetVendorArgType = CatalogProductDetailsVendor -type CatalogProductDetailGetVendorRetType = CatalogProductDetailsVendor - -func getCatalogProductDetailGetVendorAttributeTypeOk(arg CatalogProductDetailGetVendorAttributeType) (ret CatalogProductDetailGetVendorRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetVendorAttributeType(arg *CatalogProductDetailGetVendorAttributeType, val CatalogProductDetailGetVendorRetType) { - *arg = &val -} - -/* - types and functions for vendorTerms -*/ - -// isArray -type CatalogProductDetailGetVendorTermsAttributeType = *[]CatalogProductVendorTerms -type CatalogProductDetailGetVendorTermsArgType = []CatalogProductVendorTerms -type CatalogProductDetailGetVendorTermsRetType = []CatalogProductVendorTerms - -func getCatalogProductDetailGetVendorTermsAttributeTypeOk(arg CatalogProductDetailGetVendorTermsAttributeType) (ret CatalogProductDetailGetVendorTermsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetVendorTermsAttributeType(arg *CatalogProductDetailGetVendorTermsAttributeType, val CatalogProductDetailGetVendorTermsRetType) { - *arg = &val -} - -/* - types and functions for videoUrl -*/ - -// isNotNullableString -type CatalogProductDetailGetVideoUrlAttributeType = *string - -func getCatalogProductDetailGetVideoUrlAttributeTypeOk(arg CatalogProductDetailGetVideoUrlAttributeType) (ret CatalogProductDetailGetVideoUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailGetVideoUrlAttributeType(arg *CatalogProductDetailGetVideoUrlAttributeType, val CatalogProductDetailGetVideoUrlRetType) { - *arg = &val -} - -type CatalogProductDetailGetVideoUrlArgType = string -type CatalogProductDetailGetVideoUrlRetType = string - -// CatalogProductDetail struct for CatalogProductDetail -type CatalogProductDetail struct { - Assets CatalogProductDetailGetAssetsAttributeType `json:"assets,omitempty"` - // The list of categories associated to the product. - Categories CatalogProductDetailGetCategoriesAttributeType `json:"categories,omitempty"` - // REQUIRED - DeliveryMethod CatalogProductDetailGetDeliveryMethodAttributeType `json:"deliveryMethod" required:"true"` - // Uniform Resource Locator. - DemoUrl CatalogProductDetailGetDemoUrlAttributeType `json:"demoUrl,omitempty"` - // The product description. - // REQUIRED - Description CatalogProductDetailGetDescriptionAttributeType `json:"description" required:"true"` - // Uniform Resource Locator. - // REQUIRED - DocumentationUrl CatalogProductDetailGetDocumentationUrlAttributeType `json:"documentationUrl" required:"true"` - // A e-mail address. - Email CatalogProductDetailGetEmailAttributeType `json:"email,omitempty"` - // Boolean data type. - HasDemo CatalogProductDetailgetHasDemoAttributeType `json:"hasDemo,omitempty"` - // Boolean data type. - HasPrivatePlanOption CatalogProductDetailgetHasPrivatePlanOptionAttributeType `json:"hasPrivatePlanOption,omitempty"` - // The list of highlights. - // REQUIRED - 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 - LifecycleState CatalogProductDetailGetLifecycleStateAttributeType `json:"lifecycleState" required:"true"` - // The logo information. - // REQUIRED - Logo CatalogProductDetailGetLogoAttributeType `json:"logo" required:"true"` - // The name of the product. - // REQUIRED - Name CatalogProductDetailGetNameAttributeType `json:"name" required:"true"` - // REQUIRED - OfferType CatalogProductDetailGetOfferTypeAttributeType `json:"offerType" required:"true"` - // The list of pricing options. - // REQUIRED - PricingOptions CatalogProductDetailGetPricingOptionsAttributeType `json:"pricingOptions" required:"true"` - // The user-readable product ID. - // REQUIRED - ProductId CatalogProductDetailGetProductIdAttributeType `json:"productId" required:"true"` - // The short summary of the product. - // REQUIRED - Summary CatalogProductDetailGetSummaryAttributeType `json:"summary" required:"true"` - // Uniform Resource Locator. - SupportFaq CatalogProductDetailGetSupportFaqAttributeType `json:"supportFaq,omitempty"` - // The phone number for support inquiries. - SupportPhone CatalogProductDetailGetSupportPhoneAttributeType `json:"supportPhone,omitempty"` - // The list of support resources. - SupportResources CatalogProductDetailGetSupportResourcesAttributeType `json:"supportResources,omitempty"` - // REQUIRED - 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" required:"true"` -} - -type _CatalogProductDetail CatalogProductDetail - -// NewCatalogProductDetail instantiates a new CatalogProductDetail 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 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) - 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) - setCatalogProductDetailGetVendorAttributeType(&this.Vendor, vendor) - setCatalogProductDetailGetVideoUrlAttributeType(&this.VideoUrl, videoUrl) - return &this -} - -// NewCatalogProductDetailWithDefaults instantiates a new CatalogProductDetail 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 NewCatalogProductDetailWithDefaults() *CatalogProductDetail { - this := CatalogProductDetail{} - return &this -} - -// GetAssets returns the Assets field value if set, zero value otherwise. -func (o *CatalogProductDetail) GetAssets() (res CatalogProductDetailGetAssetsRetType) { - res, _ = o.GetAssetsOk() - return -} - -// GetAssetsOk returns a tuple with the Assets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetAssetsOk() (ret CatalogProductDetailGetAssetsRetType, ok bool) { - return getCatalogProductDetailGetAssetsAttributeTypeOk(o.Assets) -} - -// HasAssets returns a boolean if a field has been set. -func (o *CatalogProductDetail) HasAssets() bool { - _, ok := o.GetAssetsOk() - return ok -} - -// SetAssets gets a reference to the given Assets and assigns it to the Assets field. -func (o *CatalogProductDetail) SetAssets(v CatalogProductDetailGetAssetsRetType) { - setCatalogProductDetailGetAssetsAttributeType(&o.Assets, v) -} - -// GetCategories returns the Categories field value if set, zero value otherwise. -func (o *CatalogProductDetail) GetCategories() (res CatalogProductDetailGetCategoriesRetType) { - res, _ = o.GetCategoriesOk() - return -} - -// GetCategoriesOk returns a tuple with the Categories field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetCategoriesOk() (ret CatalogProductDetailGetCategoriesRetType, ok bool) { - return getCatalogProductDetailGetCategoriesAttributeTypeOk(o.Categories) -} - -// HasCategories returns a boolean if a field has been set. -func (o *CatalogProductDetail) HasCategories() bool { - _, ok := o.GetCategoriesOk() - return ok -} - -// SetCategories gets a reference to the given []string and assigns it to the Categories field. -func (o *CatalogProductDetail) SetCategories(v CatalogProductDetailGetCategoriesRetType) { - setCatalogProductDetailGetCategoriesAttributeType(&o.Categories, v) -} - -// GetDeliveryMethod returns the DeliveryMethod field value -func (o *CatalogProductDetail) GetDeliveryMethod() (ret CatalogProductDetailGetDeliveryMethodRetType) { - ret, _ = o.GetDeliveryMethodOk() - return ret -} - -// GetDeliveryMethodOk returns a tuple with the DeliveryMethod field value -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetDeliveryMethodOk() (ret CatalogProductDetailGetDeliveryMethodRetType, ok bool) { - return getCatalogProductDetailGetDeliveryMethodAttributeTypeOk(o.DeliveryMethod) -} - -// SetDeliveryMethod sets field value -func (o *CatalogProductDetail) SetDeliveryMethod(v CatalogProductDetailGetDeliveryMethodRetType) { - setCatalogProductDetailGetDeliveryMethodAttributeType(&o.DeliveryMethod, v) -} - -// GetDemoUrl returns the DemoUrl field value if set, zero value otherwise. -func (o *CatalogProductDetail) GetDemoUrl() (res CatalogProductDetailGetDemoUrlRetType) { - res, _ = o.GetDemoUrlOk() - return -} - -// GetDemoUrlOk returns a tuple with the DemoUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetDemoUrlOk() (ret CatalogProductDetailGetDemoUrlRetType, ok bool) { - return getCatalogProductDetailGetDemoUrlAttributeTypeOk(o.DemoUrl) -} - -// HasDemoUrl returns a boolean if a field has been set. -func (o *CatalogProductDetail) HasDemoUrl() bool { - _, ok := o.GetDemoUrlOk() - return ok -} - -// SetDemoUrl gets a reference to the given string and assigns it to the DemoUrl field. -func (o *CatalogProductDetail) SetDemoUrl(v CatalogProductDetailGetDemoUrlRetType) { - setCatalogProductDetailGetDemoUrlAttributeType(&o.DemoUrl, v) -} - -// GetDescription returns the Description field value -func (o *CatalogProductDetail) GetDescription() (ret CatalogProductDetailGetDescriptionRetType) { - ret, _ = o.GetDescriptionOk() - return ret -} - -// GetDescriptionOk returns a tuple with the Description field value -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetDescriptionOk() (ret CatalogProductDetailGetDescriptionRetType, ok bool) { - return getCatalogProductDetailGetDescriptionAttributeTypeOk(o.Description) -} - -// SetDescription sets field value -func (o *CatalogProductDetail) SetDescription(v CatalogProductDetailGetDescriptionRetType) { - setCatalogProductDetailGetDescriptionAttributeType(&o.Description, v) -} - -// GetDocumentationUrl returns the DocumentationUrl field value -func (o *CatalogProductDetail) GetDocumentationUrl() (ret CatalogProductDetailGetDocumentationUrlRetType) { - ret, _ = o.GetDocumentationUrlOk() - return ret -} - -// GetDocumentationUrlOk returns a tuple with the DocumentationUrl field value -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetDocumentationUrlOk() (ret CatalogProductDetailGetDocumentationUrlRetType, ok bool) { - return getCatalogProductDetailGetDocumentationUrlAttributeTypeOk(o.DocumentationUrl) -} - -// SetDocumentationUrl sets field value -func (o *CatalogProductDetail) SetDocumentationUrl(v CatalogProductDetailGetDocumentationUrlRetType) { - setCatalogProductDetailGetDocumentationUrlAttributeType(&o.DocumentationUrl, v) -} - -// GetEmail returns the Email field value if set, zero value otherwise. -func (o *CatalogProductDetail) GetEmail() (res CatalogProductDetailGetEmailRetType) { - res, _ = o.GetEmailOk() - return -} - -// GetEmailOk returns a tuple with the Email field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetEmailOk() (ret CatalogProductDetailGetEmailRetType, ok bool) { - return getCatalogProductDetailGetEmailAttributeTypeOk(o.Email) -} - -// HasEmail returns a boolean if a field has been set. -func (o *CatalogProductDetail) HasEmail() bool { - _, ok := o.GetEmailOk() - return ok -} - -// SetEmail gets a reference to the given string and assigns it to the Email field. -func (o *CatalogProductDetail) SetEmail(v CatalogProductDetailGetEmailRetType) { - setCatalogProductDetailGetEmailAttributeType(&o.Email, v) -} - -// GetHasDemo returns the HasDemo field value if set, zero value otherwise. -func (o *CatalogProductDetail) GetHasDemo() (res CatalogProductDetailgetHasDemoRetType) { - res, _ = o.GetHasDemoOk() - return -} - -// GetHasDemoOk returns a tuple with the HasDemo field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetHasDemoOk() (ret CatalogProductDetailgetHasDemoRetType, ok bool) { - return getCatalogProductDetailgetHasDemoAttributeTypeOk(o.HasDemo) -} - -// HasHasDemo returns a boolean if a field has been set. -func (o *CatalogProductDetail) HasHasDemo() bool { - _, ok := o.GetHasDemoOk() - return ok -} - -// SetHasDemo gets a reference to the given bool and assigns it to the HasDemo field. -func (o *CatalogProductDetail) SetHasDemo(v CatalogProductDetailgetHasDemoRetType) { - setCatalogProductDetailgetHasDemoAttributeType(&o.HasDemo, v) -} - -// GetHasPrivatePlanOption returns the HasPrivatePlanOption field value if set, zero value otherwise. -func (o *CatalogProductDetail) GetHasPrivatePlanOption() (res CatalogProductDetailgetHasPrivatePlanOptionRetType) { - res, _ = o.GetHasPrivatePlanOptionOk() - return -} - -// GetHasPrivatePlanOptionOk returns a tuple with the HasPrivatePlanOption field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetHasPrivatePlanOptionOk() (ret CatalogProductDetailgetHasPrivatePlanOptionRetType, ok bool) { - return getCatalogProductDetailgetHasPrivatePlanOptionAttributeTypeOk(o.HasPrivatePlanOption) -} - -// HasHasPrivatePlanOption returns a boolean if a field has been set. -func (o *CatalogProductDetail) HasHasPrivatePlanOption() bool { - _, ok := o.GetHasPrivatePlanOptionOk() - return ok -} - -// SetHasPrivatePlanOption gets a reference to the given bool and assigns it to the HasPrivatePlanOption field. -func (o *CatalogProductDetail) SetHasPrivatePlanOption(v CatalogProductDetailgetHasPrivatePlanOptionRetType) { - setCatalogProductDetailgetHasPrivatePlanOptionAttributeType(&o.HasPrivatePlanOption, v) -} - -// GetHighlights returns the Highlights field value -func (o *CatalogProductDetail) GetHighlights() (ret CatalogProductDetailGetHighlightsRetType) { - ret, _ = o.GetHighlightsOk() - return ret -} - -// GetHighlightsOk returns a tuple with the Highlights field value -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetHighlightsOk() (ret CatalogProductDetailGetHighlightsRetType, ok bool) { - return getCatalogProductDetailGetHighlightsAttributeTypeOk(o.Highlights) -} - -// SetHighlights sets field value -func (o *CatalogProductDetail) SetHighlights(v CatalogProductDetailGetHighlightsRetType) { - setCatalogProductDetailGetHighlightsAttributeType(&o.Highlights, v) -} - -// GetIndustries returns the Industries field value if set, zero value otherwise. -func (o *CatalogProductDetail) GetIndustries() (res CatalogProductDetailGetIndustriesRetType) { - res, _ = o.GetIndustriesOk() - return -} - -// GetIndustriesOk returns a tuple with the Industries field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetIndustriesOk() (ret CatalogProductDetailGetIndustriesRetType, ok bool) { - return getCatalogProductDetailGetIndustriesAttributeTypeOk(o.Industries) -} - -// HasIndustries returns a boolean if a field has been set. -func (o *CatalogProductDetail) HasIndustries() bool { - _, ok := o.GetIndustriesOk() - return ok -} - -// SetIndustries gets a reference to the given []string and assigns it to the Industries field. -func (o *CatalogProductDetail) SetIndustries(v CatalogProductDetailGetIndustriesRetType) { - setCatalogProductDetailGetIndustriesAttributeType(&o.Industries, v) -} - -// 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 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) -} - -// 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) -} - -// GetLifecycleState returns the LifecycleState field value -func (o *CatalogProductDetail) GetLifecycleState() (ret CatalogProductDetailGetLifecycleStateRetType) { - ret, _ = o.GetLifecycleStateOk() - return ret -} - -// GetLifecycleStateOk returns a tuple with the LifecycleState field value -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetLifecycleStateOk() (ret CatalogProductDetailGetLifecycleStateRetType, ok bool) { - return getCatalogProductDetailGetLifecycleStateAttributeTypeOk(o.LifecycleState) -} - -// SetLifecycleState sets field value -func (o *CatalogProductDetail) SetLifecycleState(v CatalogProductDetailGetLifecycleStateRetType) { - setCatalogProductDetailGetLifecycleStateAttributeType(&o.LifecycleState, v) -} - -// GetLogo returns the Logo field value -func (o *CatalogProductDetail) GetLogo() (ret CatalogProductDetailGetLogoRetType) { - ret, _ = o.GetLogoOk() - return ret -} - -// GetLogoOk returns a tuple with the Logo field value -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetLogoOk() (ret CatalogProductDetailGetLogoRetType, ok bool) { - return getCatalogProductDetailGetLogoAttributeTypeOk(o.Logo) -} - -// SetLogo sets field value -func (o *CatalogProductDetail) SetLogo(v CatalogProductDetailGetLogoRetType) { - setCatalogProductDetailGetLogoAttributeType(&o.Logo, v) -} - -// GetName returns the Name field value -func (o *CatalogProductDetail) GetName() (ret CatalogProductDetailGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetNameOk() (ret CatalogProductDetailGetNameRetType, ok bool) { - return getCatalogProductDetailGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -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() - return ret -} - -// GetPricingOptionsOk returns a tuple with the PricingOptions field value -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetPricingOptionsOk() (ret CatalogProductDetailGetPricingOptionsRetType, ok bool) { - return getCatalogProductDetailGetPricingOptionsAttributeTypeOk(o.PricingOptions) -} - -// SetPricingOptions sets field value -func (o *CatalogProductDetail) SetPricingOptions(v CatalogProductDetailGetPricingOptionsRetType) { - setCatalogProductDetailGetPricingOptionsAttributeType(&o.PricingOptions, v) -} - -// GetProductId returns the ProductId field value -func (o *CatalogProductDetail) GetProductId() (ret CatalogProductDetailGetProductIdRetType) { - 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 *CatalogProductDetail) GetProductIdOk() (ret CatalogProductDetailGetProductIdRetType, ok bool) { - return getCatalogProductDetailGetProductIdAttributeTypeOk(o.ProductId) -} - -// SetProductId sets field value -func (o *CatalogProductDetail) SetProductId(v CatalogProductDetailGetProductIdRetType) { - setCatalogProductDetailGetProductIdAttributeType(&o.ProductId, v) -} - -// GetSummary returns the Summary field value -func (o *CatalogProductDetail) GetSummary() (ret CatalogProductDetailGetSummaryRetType) { - ret, _ = o.GetSummaryOk() - return ret -} - -// GetSummaryOk returns a tuple with the Summary field value -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetSummaryOk() (ret CatalogProductDetailGetSummaryRetType, ok bool) { - return getCatalogProductDetailGetSummaryAttributeTypeOk(o.Summary) -} - -// SetSummary sets field value -func (o *CatalogProductDetail) SetSummary(v CatalogProductDetailGetSummaryRetType) { - setCatalogProductDetailGetSummaryAttributeType(&o.Summary, v) -} - -// GetSupportFaq returns the SupportFaq field value if set, zero value otherwise. -func (o *CatalogProductDetail) GetSupportFaq() (res CatalogProductDetailGetSupportFaqRetType) { - res, _ = o.GetSupportFaqOk() - return -} - -// GetSupportFaqOk returns a tuple with the SupportFaq field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetSupportFaqOk() (ret CatalogProductDetailGetSupportFaqRetType, ok bool) { - return getCatalogProductDetailGetSupportFaqAttributeTypeOk(o.SupportFaq) -} - -// HasSupportFaq returns a boolean if a field has been set. -func (o *CatalogProductDetail) HasSupportFaq() bool { - _, ok := o.GetSupportFaqOk() - return ok -} - -// SetSupportFaq gets a reference to the given string and assigns it to the SupportFaq field. -func (o *CatalogProductDetail) SetSupportFaq(v CatalogProductDetailGetSupportFaqRetType) { - setCatalogProductDetailGetSupportFaqAttributeType(&o.SupportFaq, v) -} - -// GetSupportPhone returns the SupportPhone field value if set, zero value otherwise. -func (o *CatalogProductDetail) GetSupportPhone() (res CatalogProductDetailGetSupportPhoneRetType) { - res, _ = o.GetSupportPhoneOk() - return -} - -// GetSupportPhoneOk returns a tuple with the SupportPhone field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetSupportPhoneOk() (ret CatalogProductDetailGetSupportPhoneRetType, ok bool) { - return getCatalogProductDetailGetSupportPhoneAttributeTypeOk(o.SupportPhone) -} - -// HasSupportPhone returns a boolean if a field has been set. -func (o *CatalogProductDetail) HasSupportPhone() bool { - _, ok := o.GetSupportPhoneOk() - return ok -} - -// SetSupportPhone gets a reference to the given string and assigns it to the SupportPhone field. -func (o *CatalogProductDetail) SetSupportPhone(v CatalogProductDetailGetSupportPhoneRetType) { - setCatalogProductDetailGetSupportPhoneAttributeType(&o.SupportPhone, v) -} - -// GetSupportResources returns the SupportResources field value if set, zero value otherwise. -func (o *CatalogProductDetail) GetSupportResources() (res CatalogProductDetailGetSupportResourcesRetType) { - res, _ = o.GetSupportResourcesOk() - return -} - -// GetSupportResourcesOk returns a tuple with the SupportResources field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetSupportResourcesOk() (ret CatalogProductDetailGetSupportResourcesRetType, ok bool) { - return getCatalogProductDetailGetSupportResourcesAttributeTypeOk(o.SupportResources) -} - -// HasSupportResources returns a boolean if a field has been set. -func (o *CatalogProductDetail) HasSupportResources() bool { - _, ok := o.GetSupportResourcesOk() - return ok -} - -// SetSupportResources gets a reference to the given []CatalogProductSupportResource and assigns it to the SupportResources field. -func (o *CatalogProductDetail) SetSupportResources(v CatalogProductDetailGetSupportResourcesRetType) { - setCatalogProductDetailGetSupportResourcesAttributeType(&o.SupportResources, v) -} - -// GetVendor returns the Vendor field value -func (o *CatalogProductDetail) GetVendor() (ret CatalogProductDetailGetVendorRetType) { - ret, _ = o.GetVendorOk() - return ret -} - -// GetVendorOk returns a tuple with the Vendor field value -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetVendorOk() (ret CatalogProductDetailGetVendorRetType, ok bool) { - return getCatalogProductDetailGetVendorAttributeTypeOk(o.Vendor) -} - -// SetVendor sets field value -func (o *CatalogProductDetail) SetVendor(v CatalogProductDetailGetVendorRetType) { - setCatalogProductDetailGetVendorAttributeType(&o.Vendor, v) -} - -// GetVendorTerms returns the VendorTerms field value if set, zero value otherwise. -func (o *CatalogProductDetail) GetVendorTerms() (res CatalogProductDetailGetVendorTermsRetType) { - res, _ = o.GetVendorTermsOk() - return -} - -// GetVendorTermsOk returns a tuple with the VendorTerms field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetVendorTermsOk() (ret CatalogProductDetailGetVendorTermsRetType, ok bool) { - return getCatalogProductDetailGetVendorTermsAttributeTypeOk(o.VendorTerms) -} - -// HasVendorTerms returns a boolean if a field has been set. -func (o *CatalogProductDetail) HasVendorTerms() bool { - _, ok := o.GetVendorTermsOk() - return ok -} - -// SetVendorTerms gets a reference to the given []CatalogProductVendorTerms and assigns it to the VendorTerms field. -func (o *CatalogProductDetail) SetVendorTerms(v CatalogProductDetailGetVendorTermsRetType) { - setCatalogProductDetailGetVendorTermsAttributeType(&o.VendorTerms, v) -} - -// GetVideoUrl returns the VideoUrl field value -func (o *CatalogProductDetail) GetVideoUrl() (ret CatalogProductDetailGetVideoUrlRetType) { - ret, _ = o.GetVideoUrlOk() - return ret -} - -// GetVideoUrlOk returns a tuple with the VideoUrl field value -// and a boolean to check if the value has been set. -func (o *CatalogProductDetail) GetVideoUrlOk() (ret CatalogProductDetailGetVideoUrlRetType, ok bool) { - return getCatalogProductDetailGetVideoUrlAttributeTypeOk(o.VideoUrl) -} - -// SetVideoUrl sets field value -func (o *CatalogProductDetail) SetVideoUrl(v CatalogProductDetailGetVideoUrlRetType) { - setCatalogProductDetailGetVideoUrlAttributeType(&o.VideoUrl, v) -} - -func (o CatalogProductDetail) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCatalogProductDetailGetAssetsAttributeTypeOk(o.Assets); ok { - toSerialize["Assets"] = val - } - if val, ok := getCatalogProductDetailGetCategoriesAttributeTypeOk(o.Categories); ok { - toSerialize["Categories"] = val - } - if val, ok := getCatalogProductDetailGetDeliveryMethodAttributeTypeOk(o.DeliveryMethod); ok { - toSerialize["DeliveryMethod"] = val - } - if val, ok := getCatalogProductDetailGetDemoUrlAttributeTypeOk(o.DemoUrl); ok { - toSerialize["DemoUrl"] = val - } - if val, ok := getCatalogProductDetailGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getCatalogProductDetailGetDocumentationUrlAttributeTypeOk(o.DocumentationUrl); ok { - toSerialize["DocumentationUrl"] = val - } - if val, ok := getCatalogProductDetailGetEmailAttributeTypeOk(o.Email); ok { - toSerialize["Email"] = val - } - if val, ok := getCatalogProductDetailgetHasDemoAttributeTypeOk(o.HasDemo); ok { - toSerialize["HasDemo"] = val - } - if val, ok := getCatalogProductDetailgetHasPrivatePlanOptionAttributeTypeOk(o.HasPrivatePlanOption); ok { - toSerialize["HasPrivatePlanOption"] = val - } - if val, ok := getCatalogProductDetailGetHighlightsAttributeTypeOk(o.Highlights); ok { - toSerialize["Highlights"] = val - } - if val, ok := getCatalogProductDetailGetIndustriesAttributeTypeOk(o.Industries); ok { - toSerialize["Industries"] = val - } - if val, ok := getCatalogProductDetailgetIsProductListingAttributeTypeOk(o.IsProductListing); ok { - toSerialize["IsProductListing"] = val - } - if val, ok := getCatalogProductDetailGetLifecycleStateAttributeTypeOk(o.LifecycleState); ok { - toSerialize["LifecycleState"] = val - } - if val, ok := getCatalogProductDetailGetLogoAttributeTypeOk(o.Logo); ok { - toSerialize["Logo"] = val - } - 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 - } - if val, ok := getCatalogProductDetailGetProductIdAttributeTypeOk(o.ProductId); ok { - toSerialize["ProductId"] = val - } - if val, ok := getCatalogProductDetailGetSummaryAttributeTypeOk(o.Summary); ok { - toSerialize["Summary"] = val - } - if val, ok := getCatalogProductDetailGetSupportFaqAttributeTypeOk(o.SupportFaq); ok { - toSerialize["SupportFaq"] = val - } - if val, ok := getCatalogProductDetailGetSupportPhoneAttributeTypeOk(o.SupportPhone); ok { - toSerialize["SupportPhone"] = val - } - if val, ok := getCatalogProductDetailGetSupportResourcesAttributeTypeOk(o.SupportResources); ok { - toSerialize["SupportResources"] = val - } - if val, ok := getCatalogProductDetailGetVendorAttributeTypeOk(o.Vendor); ok { - toSerialize["Vendor"] = val - } - if val, ok := getCatalogProductDetailGetVendorTermsAttributeTypeOk(o.VendorTerms); ok { - toSerialize["VendorTerms"] = val - } - if val, ok := getCatalogProductDetailGetVideoUrlAttributeTypeOk(o.VideoUrl); ok { - toSerialize["VideoUrl"] = val - } - return toSerialize, nil -} - -type NullableCatalogProductDetail struct { - value *CatalogProductDetail - isSet bool -} - -func (v NullableCatalogProductDetail) Get() *CatalogProductDetail { - return v.value -} - -func (v *NullableCatalogProductDetail) Set(val *CatalogProductDetail) { - v.value = val - v.isSet = true -} - -func (v NullableCatalogProductDetail) IsSet() bool { - return v.isSet -} - -func (v *NullableCatalogProductDetail) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCatalogProductDetail(val *CatalogProductDetail) *NullableCatalogProductDetail { - return &NullableCatalogProductDetail{value: val, isSet: true} -} - -func (v NullableCatalogProductDetail) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCatalogProductDetail) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_catalog_product_detail_test.go b/services/stackitmarketplace/model_catalog_product_detail_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_catalog_product_detail_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_catalog_product_details_vendor.go b/services/stackitmarketplace/model_catalog_product_details_vendor.go deleted file mode 100644 index 329657050..000000000 --- a/services/stackitmarketplace/model_catalog_product_details_vendor.go +++ /dev/null @@ -1,352 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the CatalogProductDetailsVendor type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CatalogProductDetailsVendor{} - -/* - types and functions for description -*/ - -// isNotNullableString -type CatalogProductDetailsVendorGetDescriptionAttributeType = *string - -func getCatalogProductDetailsVendorGetDescriptionAttributeTypeOk(arg CatalogProductDetailsVendorGetDescriptionAttributeType) (ret CatalogProductDetailsVendorGetDescriptionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailsVendorGetDescriptionAttributeType(arg *CatalogProductDetailsVendorGetDescriptionAttributeType, val CatalogProductDetailsVendorGetDescriptionRetType) { - *arg = &val -} - -type CatalogProductDetailsVendorGetDescriptionArgType = string -type CatalogProductDetailsVendorGetDescriptionRetType = string - -/* - types and functions for logo -*/ - -// isNotNullableString -type CatalogProductDetailsVendorGetLogoAttributeType = *string - -func getCatalogProductDetailsVendorGetLogoAttributeTypeOk(arg CatalogProductDetailsVendorGetLogoAttributeType) (ret CatalogProductDetailsVendorGetLogoRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailsVendorGetLogoAttributeType(arg *CatalogProductDetailsVendorGetLogoAttributeType, val CatalogProductDetailsVendorGetLogoRetType) { - *arg = &val -} - -type CatalogProductDetailsVendorGetLogoArgType = string -type CatalogProductDetailsVendorGetLogoRetType = string - -/* - types and functions for name -*/ - -// isNotNullableString -type CatalogProductDetailsVendorGetNameAttributeType = *string - -func getCatalogProductDetailsVendorGetNameAttributeTypeOk(arg CatalogProductDetailsVendorGetNameAttributeType) (ret CatalogProductDetailsVendorGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailsVendorGetNameAttributeType(arg *CatalogProductDetailsVendorGetNameAttributeType, val CatalogProductDetailsVendorGetNameRetType) { - *arg = &val -} - -type CatalogProductDetailsVendorGetNameArgType = string -type CatalogProductDetailsVendorGetNameRetType = string - -/* - types and functions for vendorId -*/ - -// isNotNullableString -type CatalogProductDetailsVendorGetVendorIdAttributeType = *string - -func getCatalogProductDetailsVendorGetVendorIdAttributeTypeOk(arg CatalogProductDetailsVendorGetVendorIdAttributeType) (ret CatalogProductDetailsVendorGetVendorIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailsVendorGetVendorIdAttributeType(arg *CatalogProductDetailsVendorGetVendorIdAttributeType, val CatalogProductDetailsVendorGetVendorIdRetType) { - *arg = &val -} - -type CatalogProductDetailsVendorGetVendorIdArgType = string -type CatalogProductDetailsVendorGetVendorIdRetType = string - -/* - types and functions for videoUrl -*/ - -// isNotNullableString -type CatalogProductDetailsVendorGetVideoUrlAttributeType = *string - -func getCatalogProductDetailsVendorGetVideoUrlAttributeTypeOk(arg CatalogProductDetailsVendorGetVideoUrlAttributeType) (ret CatalogProductDetailsVendorGetVideoUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailsVendorGetVideoUrlAttributeType(arg *CatalogProductDetailsVendorGetVideoUrlAttributeType, val CatalogProductDetailsVendorGetVideoUrlRetType) { - *arg = &val -} - -type CatalogProductDetailsVendorGetVideoUrlArgType = string -type CatalogProductDetailsVendorGetVideoUrlRetType = string - -/* - types and functions for websiteUrl -*/ - -// isNotNullableString -type CatalogProductDetailsVendorGetWebsiteUrlAttributeType = *string - -func getCatalogProductDetailsVendorGetWebsiteUrlAttributeTypeOk(arg CatalogProductDetailsVendorGetWebsiteUrlAttributeType) (ret CatalogProductDetailsVendorGetWebsiteUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductDetailsVendorGetWebsiteUrlAttributeType(arg *CatalogProductDetailsVendorGetWebsiteUrlAttributeType, val CatalogProductDetailsVendorGetWebsiteUrlRetType) { - *arg = &val -} - -type CatalogProductDetailsVendorGetWebsiteUrlArgType = string -type CatalogProductDetailsVendorGetWebsiteUrlRetType = string - -// CatalogProductDetailsVendor struct for CatalogProductDetailsVendor -type CatalogProductDetailsVendor struct { - // The vendor description. - // REQUIRED - Description CatalogProductDetailsVendorGetDescriptionAttributeType `json:"description" required:"true"` - // The logo information. - // REQUIRED - Logo CatalogProductDetailsVendorGetLogoAttributeType `json:"logo" required:"true"` - // The product's vendor name. - // REQUIRED - Name CatalogProductDetailsVendorGetNameAttributeType `json:"name" required:"true"` - // Universally Unique Identifier (UUID). - // REQUIRED - VendorId CatalogProductDetailsVendorGetVendorIdAttributeType `json:"vendorId" required:"true"` - // Uniform Resource Locator. - // REQUIRED - VideoUrl CatalogProductDetailsVendorGetVideoUrlAttributeType `json:"videoUrl" required:"true"` - // Uniform Resource Locator. - // REQUIRED - WebsiteUrl CatalogProductDetailsVendorGetWebsiteUrlAttributeType `json:"websiteUrl" required:"true"` -} - -type _CatalogProductDetailsVendor CatalogProductDetailsVendor - -// NewCatalogProductDetailsVendor instantiates a new CatalogProductDetailsVendor 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 NewCatalogProductDetailsVendor(description CatalogProductDetailsVendorGetDescriptionArgType, logo CatalogProductDetailsVendorGetLogoArgType, name CatalogProductDetailsVendorGetNameArgType, vendorId CatalogProductDetailsVendorGetVendorIdArgType, videoUrl CatalogProductDetailsVendorGetVideoUrlArgType, websiteUrl CatalogProductDetailsVendorGetWebsiteUrlArgType) *CatalogProductDetailsVendor { - this := CatalogProductDetailsVendor{} - setCatalogProductDetailsVendorGetDescriptionAttributeType(&this.Description, description) - setCatalogProductDetailsVendorGetLogoAttributeType(&this.Logo, logo) - setCatalogProductDetailsVendorGetNameAttributeType(&this.Name, name) - setCatalogProductDetailsVendorGetVendorIdAttributeType(&this.VendorId, vendorId) - setCatalogProductDetailsVendorGetVideoUrlAttributeType(&this.VideoUrl, videoUrl) - setCatalogProductDetailsVendorGetWebsiteUrlAttributeType(&this.WebsiteUrl, websiteUrl) - return &this -} - -// NewCatalogProductDetailsVendorWithDefaults instantiates a new CatalogProductDetailsVendor 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 NewCatalogProductDetailsVendorWithDefaults() *CatalogProductDetailsVendor { - this := CatalogProductDetailsVendor{} - return &this -} - -// GetDescription returns the Description field value -func (o *CatalogProductDetailsVendor) GetDescription() (ret CatalogProductDetailsVendorGetDescriptionRetType) { - ret, _ = o.GetDescriptionOk() - return ret -} - -// GetDescriptionOk returns a tuple with the Description field value -// and a boolean to check if the value has been set. -func (o *CatalogProductDetailsVendor) GetDescriptionOk() (ret CatalogProductDetailsVendorGetDescriptionRetType, ok bool) { - return getCatalogProductDetailsVendorGetDescriptionAttributeTypeOk(o.Description) -} - -// SetDescription sets field value -func (o *CatalogProductDetailsVendor) SetDescription(v CatalogProductDetailsVendorGetDescriptionRetType) { - setCatalogProductDetailsVendorGetDescriptionAttributeType(&o.Description, v) -} - -// GetLogo returns the Logo field value -func (o *CatalogProductDetailsVendor) GetLogo() (ret CatalogProductDetailsVendorGetLogoRetType) { - ret, _ = o.GetLogoOk() - return ret -} - -// GetLogoOk returns a tuple with the Logo field value -// and a boolean to check if the value has been set. -func (o *CatalogProductDetailsVendor) GetLogoOk() (ret CatalogProductDetailsVendorGetLogoRetType, ok bool) { - return getCatalogProductDetailsVendorGetLogoAttributeTypeOk(o.Logo) -} - -// SetLogo sets field value -func (o *CatalogProductDetailsVendor) SetLogo(v CatalogProductDetailsVendorGetLogoRetType) { - setCatalogProductDetailsVendorGetLogoAttributeType(&o.Logo, v) -} - -// GetName returns the Name field value -func (o *CatalogProductDetailsVendor) GetName() (ret CatalogProductDetailsVendorGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CatalogProductDetailsVendor) GetNameOk() (ret CatalogProductDetailsVendorGetNameRetType, ok bool) { - return getCatalogProductDetailsVendorGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -func (o *CatalogProductDetailsVendor) SetName(v CatalogProductDetailsVendorGetNameRetType) { - setCatalogProductDetailsVendorGetNameAttributeType(&o.Name, v) -} - -// GetVendorId returns the VendorId field value -func (o *CatalogProductDetailsVendor) GetVendorId() (ret CatalogProductDetailsVendorGetVendorIdRetType) { - ret, _ = o.GetVendorIdOk() - return ret -} - -// GetVendorIdOk returns a tuple with the VendorId field value -// and a boolean to check if the value has been set. -func (o *CatalogProductDetailsVendor) GetVendorIdOk() (ret CatalogProductDetailsVendorGetVendorIdRetType, ok bool) { - return getCatalogProductDetailsVendorGetVendorIdAttributeTypeOk(o.VendorId) -} - -// SetVendorId sets field value -func (o *CatalogProductDetailsVendor) SetVendorId(v CatalogProductDetailsVendorGetVendorIdRetType) { - setCatalogProductDetailsVendorGetVendorIdAttributeType(&o.VendorId, v) -} - -// GetVideoUrl returns the VideoUrl field value -func (o *CatalogProductDetailsVendor) GetVideoUrl() (ret CatalogProductDetailsVendorGetVideoUrlRetType) { - ret, _ = o.GetVideoUrlOk() - return ret -} - -// GetVideoUrlOk returns a tuple with the VideoUrl field value -// and a boolean to check if the value has been set. -func (o *CatalogProductDetailsVendor) GetVideoUrlOk() (ret CatalogProductDetailsVendorGetVideoUrlRetType, ok bool) { - return getCatalogProductDetailsVendorGetVideoUrlAttributeTypeOk(o.VideoUrl) -} - -// SetVideoUrl sets field value -func (o *CatalogProductDetailsVendor) SetVideoUrl(v CatalogProductDetailsVendorGetVideoUrlRetType) { - setCatalogProductDetailsVendorGetVideoUrlAttributeType(&o.VideoUrl, v) -} - -// GetWebsiteUrl returns the WebsiteUrl field value -func (o *CatalogProductDetailsVendor) GetWebsiteUrl() (ret CatalogProductDetailsVendorGetWebsiteUrlRetType) { - ret, _ = o.GetWebsiteUrlOk() - return ret -} - -// GetWebsiteUrlOk returns a tuple with the WebsiteUrl field value -// and a boolean to check if the value has been set. -func (o *CatalogProductDetailsVendor) GetWebsiteUrlOk() (ret CatalogProductDetailsVendorGetWebsiteUrlRetType, ok bool) { - return getCatalogProductDetailsVendorGetWebsiteUrlAttributeTypeOk(o.WebsiteUrl) -} - -// SetWebsiteUrl sets field value -func (o *CatalogProductDetailsVendor) SetWebsiteUrl(v CatalogProductDetailsVendorGetWebsiteUrlRetType) { - setCatalogProductDetailsVendorGetWebsiteUrlAttributeType(&o.WebsiteUrl, v) -} - -func (o CatalogProductDetailsVendor) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCatalogProductDetailsVendorGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getCatalogProductDetailsVendorGetLogoAttributeTypeOk(o.Logo); ok { - toSerialize["Logo"] = val - } - if val, ok := getCatalogProductDetailsVendorGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getCatalogProductDetailsVendorGetVendorIdAttributeTypeOk(o.VendorId); ok { - toSerialize["VendorId"] = val - } - if val, ok := getCatalogProductDetailsVendorGetVideoUrlAttributeTypeOk(o.VideoUrl); ok { - toSerialize["VideoUrl"] = val - } - if val, ok := getCatalogProductDetailsVendorGetWebsiteUrlAttributeTypeOk(o.WebsiteUrl); ok { - toSerialize["WebsiteUrl"] = val - } - return toSerialize, nil -} - -type NullableCatalogProductDetailsVendor struct { - value *CatalogProductDetailsVendor - isSet bool -} - -func (v NullableCatalogProductDetailsVendor) Get() *CatalogProductDetailsVendor { - return v.value -} - -func (v *NullableCatalogProductDetailsVendor) Set(val *CatalogProductDetailsVendor) { - v.value = val - v.isSet = true -} - -func (v NullableCatalogProductDetailsVendor) IsSet() bool { - return v.isSet -} - -func (v *NullableCatalogProductDetailsVendor) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCatalogProductDetailsVendor(val *CatalogProductDetailsVendor) *NullableCatalogProductDetailsVendor { - return &NullableCatalogProductDetailsVendor{value: val, isSet: true} -} - -func (v NullableCatalogProductDetailsVendor) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCatalogProductDetailsVendor) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_catalog_product_details_vendor_test.go b/services/stackitmarketplace/model_catalog_product_details_vendor_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_catalog_product_details_vendor_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_catalog_product_facets_value_inner.go b/services/stackitmarketplace/model_catalog_product_facets_value_inner.go deleted file mode 100644 index ec1f25d16..000000000 --- a/services/stackitmarketplace/model_catalog_product_facets_value_inner.go +++ /dev/null @@ -1,172 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the CatalogProductFacetsValueInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CatalogProductFacetsValueInner{} - -/* - types and functions for count -*/ - -// isInteger -type CatalogProductFacetsValueInnerGetCountAttributeType = *int64 -type CatalogProductFacetsValueInnerGetCountArgType = int64 -type CatalogProductFacetsValueInnerGetCountRetType = int64 - -func getCatalogProductFacetsValueInnerGetCountAttributeTypeOk(arg CatalogProductFacetsValueInnerGetCountAttributeType) (ret CatalogProductFacetsValueInnerGetCountRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductFacetsValueInnerGetCountAttributeType(arg *CatalogProductFacetsValueInnerGetCountAttributeType, val CatalogProductFacetsValueInnerGetCountRetType) { - *arg = &val -} - -/* - types and functions for value -*/ - -// isNotNullableString -type CatalogProductFacetsValueInnerGetValueAttributeType = *string - -func getCatalogProductFacetsValueInnerGetValueAttributeTypeOk(arg CatalogProductFacetsValueInnerGetValueAttributeType) (ret CatalogProductFacetsValueInnerGetValueRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductFacetsValueInnerGetValueAttributeType(arg *CatalogProductFacetsValueInnerGetValueAttributeType, val CatalogProductFacetsValueInnerGetValueRetType) { - *arg = &val -} - -type CatalogProductFacetsValueInnerGetValueArgType = string -type CatalogProductFacetsValueInnerGetValueRetType = string - -// CatalogProductFacetsValueInner struct for CatalogProductFacetsValueInner -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" required:"true"` - // The value of the facet. - // REQUIRED - Value CatalogProductFacetsValueInnerGetValueAttributeType `json:"value" required:"true"` -} - -type _CatalogProductFacetsValueInner CatalogProductFacetsValueInner - -// NewCatalogProductFacetsValueInner instantiates a new CatalogProductFacetsValueInner 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 NewCatalogProductFacetsValueInner(count CatalogProductFacetsValueInnerGetCountArgType, value CatalogProductFacetsValueInnerGetValueArgType) *CatalogProductFacetsValueInner { - this := CatalogProductFacetsValueInner{} - setCatalogProductFacetsValueInnerGetCountAttributeType(&this.Count, count) - setCatalogProductFacetsValueInnerGetValueAttributeType(&this.Value, value) - return &this -} - -// NewCatalogProductFacetsValueInnerWithDefaults instantiates a new CatalogProductFacetsValueInner 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 NewCatalogProductFacetsValueInnerWithDefaults() *CatalogProductFacetsValueInner { - this := CatalogProductFacetsValueInner{} - return &this -} - -// GetCount returns the Count field value -func (o *CatalogProductFacetsValueInner) GetCount() (ret CatalogProductFacetsValueInnerGetCountRetType) { - ret, _ = o.GetCountOk() - return ret -} - -// GetCountOk returns a tuple with the Count field value -// and a boolean to check if the value has been set. -func (o *CatalogProductFacetsValueInner) GetCountOk() (ret CatalogProductFacetsValueInnerGetCountRetType, ok bool) { - return getCatalogProductFacetsValueInnerGetCountAttributeTypeOk(o.Count) -} - -// SetCount sets field value -func (o *CatalogProductFacetsValueInner) SetCount(v CatalogProductFacetsValueInnerGetCountRetType) { - setCatalogProductFacetsValueInnerGetCountAttributeType(&o.Count, v) -} - -// GetValue returns the Value field value -func (o *CatalogProductFacetsValueInner) GetValue() (ret CatalogProductFacetsValueInnerGetValueRetType) { - ret, _ = o.GetValueOk() - return ret -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *CatalogProductFacetsValueInner) GetValueOk() (ret CatalogProductFacetsValueInnerGetValueRetType, ok bool) { - return getCatalogProductFacetsValueInnerGetValueAttributeTypeOk(o.Value) -} - -// SetValue sets field value -func (o *CatalogProductFacetsValueInner) SetValue(v CatalogProductFacetsValueInnerGetValueRetType) { - setCatalogProductFacetsValueInnerGetValueAttributeType(&o.Value, v) -} - -func (o CatalogProductFacetsValueInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCatalogProductFacetsValueInnerGetCountAttributeTypeOk(o.Count); ok { - toSerialize["Count"] = val - } - if val, ok := getCatalogProductFacetsValueInnerGetValueAttributeTypeOk(o.Value); ok { - toSerialize["Value"] = val - } - return toSerialize, nil -} - -type NullableCatalogProductFacetsValueInner struct { - value *CatalogProductFacetsValueInner - isSet bool -} - -func (v NullableCatalogProductFacetsValueInner) Get() *CatalogProductFacetsValueInner { - return v.value -} - -func (v *NullableCatalogProductFacetsValueInner) Set(val *CatalogProductFacetsValueInner) { - v.value = val - v.isSet = true -} - -func (v NullableCatalogProductFacetsValueInner) IsSet() bool { - return v.isSet -} - -func (v *NullableCatalogProductFacetsValueInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCatalogProductFacetsValueInner(val *CatalogProductFacetsValueInner) *NullableCatalogProductFacetsValueInner { - return &NullableCatalogProductFacetsValueInner{value: val, isSet: true} -} - -func (v NullableCatalogProductFacetsValueInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCatalogProductFacetsValueInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_catalog_product_facets_value_inner_test.go b/services/stackitmarketplace/model_catalog_product_facets_value_inner_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_catalog_product_facets_value_inner_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_catalog_product_highlight.go b/services/stackitmarketplace/model_catalog_product_highlight.go deleted file mode 100644 index 0d4793640..000000000 --- a/services/stackitmarketplace/model_catalog_product_highlight.go +++ /dev/null @@ -1,227 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the CatalogProductHighlight type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CatalogProductHighlight{} - -/* - types and functions for highlightContent -*/ - -// isNotNullableString -type CatalogProductHighlightGetHighlightContentAttributeType = *string - -func getCatalogProductHighlightGetHighlightContentAttributeTypeOk(arg CatalogProductHighlightGetHighlightContentAttributeType) (ret CatalogProductHighlightGetHighlightContentRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductHighlightGetHighlightContentAttributeType(arg *CatalogProductHighlightGetHighlightContentAttributeType, val CatalogProductHighlightGetHighlightContentRetType) { - *arg = &val -} - -type CatalogProductHighlightGetHighlightContentArgType = string -type CatalogProductHighlightGetHighlightContentRetType = string - -/* - types and functions for highlightIcon -*/ - -// isNotNullableString -type CatalogProductHighlightGetHighlightIconAttributeType = *string - -func getCatalogProductHighlightGetHighlightIconAttributeTypeOk(arg CatalogProductHighlightGetHighlightIconAttributeType) (ret CatalogProductHighlightGetHighlightIconRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductHighlightGetHighlightIconAttributeType(arg *CatalogProductHighlightGetHighlightIconAttributeType, val CatalogProductHighlightGetHighlightIconRetType) { - *arg = &val -} - -type CatalogProductHighlightGetHighlightIconArgType = string -type CatalogProductHighlightGetHighlightIconRetType = string - -/* - types and functions for highlightTitle -*/ - -// isNotNullableString -type CatalogProductHighlightGetHighlightTitleAttributeType = *string - -func getCatalogProductHighlightGetHighlightTitleAttributeTypeOk(arg CatalogProductHighlightGetHighlightTitleAttributeType) (ret CatalogProductHighlightGetHighlightTitleRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductHighlightGetHighlightTitleAttributeType(arg *CatalogProductHighlightGetHighlightTitleAttributeType, val CatalogProductHighlightGetHighlightTitleRetType) { - *arg = &val -} - -type CatalogProductHighlightGetHighlightTitleArgType = string -type CatalogProductHighlightGetHighlightTitleRetType = string - -// CatalogProductHighlight struct for CatalogProductHighlight -type CatalogProductHighlight struct { - // The highlight content. - HighlightContent CatalogProductHighlightGetHighlightContentAttributeType `json:"highlightContent,omitempty"` - // The highlight icon. - HighlightIcon CatalogProductHighlightGetHighlightIconAttributeType `json:"highlightIcon,omitempty"` - // The highlight title. - HighlightTitle CatalogProductHighlightGetHighlightTitleAttributeType `json:"highlightTitle,omitempty"` -} - -// NewCatalogProductHighlight instantiates a new CatalogProductHighlight 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 NewCatalogProductHighlight() *CatalogProductHighlight { - this := CatalogProductHighlight{} - return &this -} - -// NewCatalogProductHighlightWithDefaults instantiates a new CatalogProductHighlight 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 NewCatalogProductHighlightWithDefaults() *CatalogProductHighlight { - this := CatalogProductHighlight{} - return &this -} - -// GetHighlightContent returns the HighlightContent field value if set, zero value otherwise. -func (o *CatalogProductHighlight) GetHighlightContent() (res CatalogProductHighlightGetHighlightContentRetType) { - res, _ = o.GetHighlightContentOk() - return -} - -// GetHighlightContentOk returns a tuple with the HighlightContent field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductHighlight) GetHighlightContentOk() (ret CatalogProductHighlightGetHighlightContentRetType, ok bool) { - return getCatalogProductHighlightGetHighlightContentAttributeTypeOk(o.HighlightContent) -} - -// HasHighlightContent returns a boolean if a field has been set. -func (o *CatalogProductHighlight) HasHighlightContent() bool { - _, ok := o.GetHighlightContentOk() - return ok -} - -// SetHighlightContent gets a reference to the given string and assigns it to the HighlightContent field. -func (o *CatalogProductHighlight) SetHighlightContent(v CatalogProductHighlightGetHighlightContentRetType) { - setCatalogProductHighlightGetHighlightContentAttributeType(&o.HighlightContent, v) -} - -// GetHighlightIcon returns the HighlightIcon field value if set, zero value otherwise. -func (o *CatalogProductHighlight) GetHighlightIcon() (res CatalogProductHighlightGetHighlightIconRetType) { - res, _ = o.GetHighlightIconOk() - return -} - -// GetHighlightIconOk returns a tuple with the HighlightIcon field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductHighlight) GetHighlightIconOk() (ret CatalogProductHighlightGetHighlightIconRetType, ok bool) { - return getCatalogProductHighlightGetHighlightIconAttributeTypeOk(o.HighlightIcon) -} - -// HasHighlightIcon returns a boolean if a field has been set. -func (o *CatalogProductHighlight) HasHighlightIcon() bool { - _, ok := o.GetHighlightIconOk() - return ok -} - -// SetHighlightIcon gets a reference to the given string and assigns it to the HighlightIcon field. -func (o *CatalogProductHighlight) SetHighlightIcon(v CatalogProductHighlightGetHighlightIconRetType) { - setCatalogProductHighlightGetHighlightIconAttributeType(&o.HighlightIcon, v) -} - -// GetHighlightTitle returns the HighlightTitle field value if set, zero value otherwise. -func (o *CatalogProductHighlight) GetHighlightTitle() (res CatalogProductHighlightGetHighlightTitleRetType) { - res, _ = o.GetHighlightTitleOk() - return -} - -// GetHighlightTitleOk returns a tuple with the HighlightTitle field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductHighlight) GetHighlightTitleOk() (ret CatalogProductHighlightGetHighlightTitleRetType, ok bool) { - return getCatalogProductHighlightGetHighlightTitleAttributeTypeOk(o.HighlightTitle) -} - -// HasHighlightTitle returns a boolean if a field has been set. -func (o *CatalogProductHighlight) HasHighlightTitle() bool { - _, ok := o.GetHighlightTitleOk() - return ok -} - -// SetHighlightTitle gets a reference to the given string and assigns it to the HighlightTitle field. -func (o *CatalogProductHighlight) SetHighlightTitle(v CatalogProductHighlightGetHighlightTitleRetType) { - setCatalogProductHighlightGetHighlightTitleAttributeType(&o.HighlightTitle, v) -} - -func (o CatalogProductHighlight) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCatalogProductHighlightGetHighlightContentAttributeTypeOk(o.HighlightContent); ok { - toSerialize["HighlightContent"] = val - } - if val, ok := getCatalogProductHighlightGetHighlightIconAttributeTypeOk(o.HighlightIcon); ok { - toSerialize["HighlightIcon"] = val - } - if val, ok := getCatalogProductHighlightGetHighlightTitleAttributeTypeOk(o.HighlightTitle); ok { - toSerialize["HighlightTitle"] = val - } - return toSerialize, nil -} - -type NullableCatalogProductHighlight struct { - value *CatalogProductHighlight - isSet bool -} - -func (v NullableCatalogProductHighlight) Get() *CatalogProductHighlight { - return v.value -} - -func (v *NullableCatalogProductHighlight) Set(val *CatalogProductHighlight) { - v.value = val - v.isSet = true -} - -func (v NullableCatalogProductHighlight) IsSet() bool { - return v.isSet -} - -func (v *NullableCatalogProductHighlight) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCatalogProductHighlight(val *CatalogProductHighlight) *NullableCatalogProductHighlight { - return &NullableCatalogProductHighlight{value: val, isSet: true} -} - -func (v NullableCatalogProductHighlight) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCatalogProductHighlight) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_catalog_product_highlight_test.go b/services/stackitmarketplace/model_catalog_product_highlight_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_catalog_product_highlight_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_catalog_product_overview.go b/services/stackitmarketplace/model_catalog_product_overview.go deleted file mode 100644 index dac15d5d9..000000000 --- a/services/stackitmarketplace/model_catalog_product_overview.go +++ /dev/null @@ -1,442 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the CatalogProductOverview type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CatalogProductOverview{} - -/* - types and functions for deliveryMethod -*/ - -// isEnumRef -type CatalogProductOverviewGetDeliveryMethodAttributeType = *DeliveryMethod -type CatalogProductOverviewGetDeliveryMethodArgType = DeliveryMethod -type CatalogProductOverviewGetDeliveryMethodRetType = DeliveryMethod - -func getCatalogProductOverviewGetDeliveryMethodAttributeTypeOk(arg CatalogProductOverviewGetDeliveryMethodAttributeType) (ret CatalogProductOverviewGetDeliveryMethodRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductOverviewGetDeliveryMethodAttributeType(arg *CatalogProductOverviewGetDeliveryMethodAttributeType, val CatalogProductOverviewGetDeliveryMethodRetType) { - *arg = &val -} - -/* - types and functions for freeTrial -*/ - -// isModel -type CatalogProductOverviewGetFreeTrialAttributeType = *FreeTrial -type CatalogProductOverviewGetFreeTrialArgType = FreeTrial -type CatalogProductOverviewGetFreeTrialRetType = FreeTrial - -func getCatalogProductOverviewGetFreeTrialAttributeTypeOk(arg CatalogProductOverviewGetFreeTrialAttributeType) (ret CatalogProductOverviewGetFreeTrialRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductOverviewGetFreeTrialAttributeType(arg *CatalogProductOverviewGetFreeTrialAttributeType, val CatalogProductOverviewGetFreeTrialRetType) { - *arg = &val -} - -/* - types and functions for lifecycleState -*/ - -// isEnumRef -type CatalogProductOverviewGetLifecycleStateAttributeType = *ProductLifecycleState -type CatalogProductOverviewGetLifecycleStateArgType = ProductLifecycleState -type CatalogProductOverviewGetLifecycleStateRetType = ProductLifecycleState - -func getCatalogProductOverviewGetLifecycleStateAttributeTypeOk(arg CatalogProductOverviewGetLifecycleStateAttributeType) (ret CatalogProductOverviewGetLifecycleStateRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductOverviewGetLifecycleStateAttributeType(arg *CatalogProductOverviewGetLifecycleStateAttributeType, val CatalogProductOverviewGetLifecycleStateRetType) { - *arg = &val -} - -/* - types and functions for logo -*/ - -// isNotNullableString -type CatalogProductOverviewGetLogoAttributeType = *string - -func getCatalogProductOverviewGetLogoAttributeTypeOk(arg CatalogProductOverviewGetLogoAttributeType) (ret CatalogProductOverviewGetLogoRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductOverviewGetLogoAttributeType(arg *CatalogProductOverviewGetLogoAttributeType, val CatalogProductOverviewGetLogoRetType) { - *arg = &val -} - -type CatalogProductOverviewGetLogoArgType = string -type CatalogProductOverviewGetLogoRetType = string - -/* - types and functions for name -*/ - -// isNotNullableString -type CatalogProductOverviewGetNameAttributeType = *string - -func getCatalogProductOverviewGetNameAttributeTypeOk(arg CatalogProductOverviewGetNameAttributeType) (ret CatalogProductOverviewGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductOverviewGetNameAttributeType(arg *CatalogProductOverviewGetNameAttributeType, val CatalogProductOverviewGetNameRetType) { - *arg = &val -} - -type CatalogProductOverviewGetNameArgType = string -type CatalogProductOverviewGetNameRetType = string - -/* - types and functions for productId -*/ - -// isNotNullableString -type CatalogProductOverviewGetProductIdAttributeType = *string - -func getCatalogProductOverviewGetProductIdAttributeTypeOk(arg CatalogProductOverviewGetProductIdAttributeType) (ret CatalogProductOverviewGetProductIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductOverviewGetProductIdAttributeType(arg *CatalogProductOverviewGetProductIdAttributeType, val CatalogProductOverviewGetProductIdRetType) { - *arg = &val -} - -type CatalogProductOverviewGetProductIdArgType = string -type CatalogProductOverviewGetProductIdRetType = string - -/* - types and functions for summary -*/ - -// isNotNullableString -type CatalogProductOverviewGetSummaryAttributeType = *string - -func getCatalogProductOverviewGetSummaryAttributeTypeOk(arg CatalogProductOverviewGetSummaryAttributeType) (ret CatalogProductOverviewGetSummaryRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductOverviewGetSummaryAttributeType(arg *CatalogProductOverviewGetSummaryAttributeType, val CatalogProductOverviewGetSummaryRetType) { - *arg = &val -} - -type CatalogProductOverviewGetSummaryArgType = string -type CatalogProductOverviewGetSummaryRetType = string - -/* - types and functions for vendor -*/ - -// isModel -type CatalogProductOverviewGetVendorAttributeType = *CatalogProductOverviewVendor -type CatalogProductOverviewGetVendorArgType = CatalogProductOverviewVendor -type CatalogProductOverviewGetVendorRetType = CatalogProductOverviewVendor - -func getCatalogProductOverviewGetVendorAttributeTypeOk(arg CatalogProductOverviewGetVendorAttributeType) (ret CatalogProductOverviewGetVendorRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductOverviewGetVendorAttributeType(arg *CatalogProductOverviewGetVendorAttributeType, val CatalogProductOverviewGetVendorRetType) { - *arg = &val -} - -// CatalogProductOverview struct for CatalogProductOverview -type CatalogProductOverview struct { - // REQUIRED - DeliveryMethod CatalogProductOverviewGetDeliveryMethodAttributeType `json:"deliveryMethod" required:"true"` - FreeTrial CatalogProductOverviewGetFreeTrialAttributeType `json:"freeTrial,omitempty"` - // REQUIRED - LifecycleState CatalogProductOverviewGetLifecycleStateAttributeType `json:"lifecycleState" required:"true"` - // The logo information. - Logo CatalogProductOverviewGetLogoAttributeType `json:"logo,omitempty"` - // The name of the product. - // REQUIRED - Name CatalogProductOverviewGetNameAttributeType `json:"name" required:"true"` - // The user-readable product ID. - // REQUIRED - ProductId CatalogProductOverviewGetProductIdAttributeType `json:"productId" required:"true"` - // A custom message. - // REQUIRED - Summary CatalogProductOverviewGetSummaryAttributeType `json:"summary" required:"true"` - // REQUIRED - Vendor CatalogProductOverviewGetVendorAttributeType `json:"vendor" required:"true"` -} - -type _CatalogProductOverview CatalogProductOverview - -// NewCatalogProductOverview instantiates a new CatalogProductOverview 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 NewCatalogProductOverview(deliveryMethod CatalogProductOverviewGetDeliveryMethodArgType, lifecycleState CatalogProductOverviewGetLifecycleStateArgType, name CatalogProductOverviewGetNameArgType, productId CatalogProductOverviewGetProductIdArgType, summary CatalogProductOverviewGetSummaryArgType, vendor CatalogProductOverviewGetVendorArgType) *CatalogProductOverview { - this := CatalogProductOverview{} - setCatalogProductOverviewGetDeliveryMethodAttributeType(&this.DeliveryMethod, deliveryMethod) - setCatalogProductOverviewGetLifecycleStateAttributeType(&this.LifecycleState, lifecycleState) - setCatalogProductOverviewGetNameAttributeType(&this.Name, name) - setCatalogProductOverviewGetProductIdAttributeType(&this.ProductId, productId) - setCatalogProductOverviewGetSummaryAttributeType(&this.Summary, summary) - setCatalogProductOverviewGetVendorAttributeType(&this.Vendor, vendor) - return &this -} - -// NewCatalogProductOverviewWithDefaults instantiates a new CatalogProductOverview 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 NewCatalogProductOverviewWithDefaults() *CatalogProductOverview { - this := CatalogProductOverview{} - return &this -} - -// GetDeliveryMethod returns the DeliveryMethod field value -func (o *CatalogProductOverview) GetDeliveryMethod() (ret CatalogProductOverviewGetDeliveryMethodRetType) { - ret, _ = o.GetDeliveryMethodOk() - return ret -} - -// GetDeliveryMethodOk returns a tuple with the DeliveryMethod field value -// and a boolean to check if the value has been set. -func (o *CatalogProductOverview) GetDeliveryMethodOk() (ret CatalogProductOverviewGetDeliveryMethodRetType, ok bool) { - return getCatalogProductOverviewGetDeliveryMethodAttributeTypeOk(o.DeliveryMethod) -} - -// SetDeliveryMethod sets field value -func (o *CatalogProductOverview) SetDeliveryMethod(v CatalogProductOverviewGetDeliveryMethodRetType) { - setCatalogProductOverviewGetDeliveryMethodAttributeType(&o.DeliveryMethod, v) -} - -// GetFreeTrial returns the FreeTrial field value if set, zero value otherwise. -func (o *CatalogProductOverview) GetFreeTrial() (res CatalogProductOverviewGetFreeTrialRetType) { - res, _ = o.GetFreeTrialOk() - return -} - -// GetFreeTrialOk returns a tuple with the FreeTrial field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductOverview) GetFreeTrialOk() (ret CatalogProductOverviewGetFreeTrialRetType, ok bool) { - return getCatalogProductOverviewGetFreeTrialAttributeTypeOk(o.FreeTrial) -} - -// HasFreeTrial returns a boolean if a field has been set. -func (o *CatalogProductOverview) HasFreeTrial() bool { - _, ok := o.GetFreeTrialOk() - return ok -} - -// SetFreeTrial gets a reference to the given FreeTrial and assigns it to the FreeTrial field. -func (o *CatalogProductOverview) SetFreeTrial(v CatalogProductOverviewGetFreeTrialRetType) { - setCatalogProductOverviewGetFreeTrialAttributeType(&o.FreeTrial, v) -} - -// GetLifecycleState returns the LifecycleState field value -func (o *CatalogProductOverview) GetLifecycleState() (ret CatalogProductOverviewGetLifecycleStateRetType) { - ret, _ = o.GetLifecycleStateOk() - return ret -} - -// GetLifecycleStateOk returns a tuple with the LifecycleState field value -// and a boolean to check if the value has been set. -func (o *CatalogProductOverview) GetLifecycleStateOk() (ret CatalogProductOverviewGetLifecycleStateRetType, ok bool) { - return getCatalogProductOverviewGetLifecycleStateAttributeTypeOk(o.LifecycleState) -} - -// SetLifecycleState sets field value -func (o *CatalogProductOverview) SetLifecycleState(v CatalogProductOverviewGetLifecycleStateRetType) { - setCatalogProductOverviewGetLifecycleStateAttributeType(&o.LifecycleState, v) -} - -// GetLogo returns the Logo field value if set, zero value otherwise. -func (o *CatalogProductOverview) GetLogo() (res CatalogProductOverviewGetLogoRetType) { - res, _ = o.GetLogoOk() - return -} - -// GetLogoOk returns a tuple with the Logo field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductOverview) GetLogoOk() (ret CatalogProductOverviewGetLogoRetType, ok bool) { - return getCatalogProductOverviewGetLogoAttributeTypeOk(o.Logo) -} - -// HasLogo returns a boolean if a field has been set. -func (o *CatalogProductOverview) HasLogo() bool { - _, ok := o.GetLogoOk() - return ok -} - -// SetLogo gets a reference to the given string and assigns it to the Logo field. -func (o *CatalogProductOverview) SetLogo(v CatalogProductOverviewGetLogoRetType) { - setCatalogProductOverviewGetLogoAttributeType(&o.Logo, v) -} - -// GetName returns the Name field value -func (o *CatalogProductOverview) GetName() (ret CatalogProductOverviewGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CatalogProductOverview) GetNameOk() (ret CatalogProductOverviewGetNameRetType, ok bool) { - return getCatalogProductOverviewGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -func (o *CatalogProductOverview) SetName(v CatalogProductOverviewGetNameRetType) { - setCatalogProductOverviewGetNameAttributeType(&o.Name, v) -} - -// GetProductId returns the ProductId field value -func (o *CatalogProductOverview) GetProductId() (ret CatalogProductOverviewGetProductIdRetType) { - 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 *CatalogProductOverview) GetProductIdOk() (ret CatalogProductOverviewGetProductIdRetType, ok bool) { - return getCatalogProductOverviewGetProductIdAttributeTypeOk(o.ProductId) -} - -// SetProductId sets field value -func (o *CatalogProductOverview) SetProductId(v CatalogProductOverviewGetProductIdRetType) { - setCatalogProductOverviewGetProductIdAttributeType(&o.ProductId, v) -} - -// GetSummary returns the Summary field value -func (o *CatalogProductOverview) GetSummary() (ret CatalogProductOverviewGetSummaryRetType) { - ret, _ = o.GetSummaryOk() - return ret -} - -// GetSummaryOk returns a tuple with the Summary field value -// and a boolean to check if the value has been set. -func (o *CatalogProductOverview) GetSummaryOk() (ret CatalogProductOverviewGetSummaryRetType, ok bool) { - return getCatalogProductOverviewGetSummaryAttributeTypeOk(o.Summary) -} - -// SetSummary sets field value -func (o *CatalogProductOverview) SetSummary(v CatalogProductOverviewGetSummaryRetType) { - setCatalogProductOverviewGetSummaryAttributeType(&o.Summary, v) -} - -// GetVendor returns the Vendor field value -func (o *CatalogProductOverview) GetVendor() (ret CatalogProductOverviewGetVendorRetType) { - ret, _ = o.GetVendorOk() - return ret -} - -// GetVendorOk returns a tuple with the Vendor field value -// and a boolean to check if the value has been set. -func (o *CatalogProductOverview) GetVendorOk() (ret CatalogProductOverviewGetVendorRetType, ok bool) { - return getCatalogProductOverviewGetVendorAttributeTypeOk(o.Vendor) -} - -// SetVendor sets field value -func (o *CatalogProductOverview) SetVendor(v CatalogProductOverviewGetVendorRetType) { - setCatalogProductOverviewGetVendorAttributeType(&o.Vendor, v) -} - -func (o CatalogProductOverview) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCatalogProductOverviewGetDeliveryMethodAttributeTypeOk(o.DeliveryMethod); ok { - toSerialize["DeliveryMethod"] = val - } - if val, ok := getCatalogProductOverviewGetFreeTrialAttributeTypeOk(o.FreeTrial); ok { - toSerialize["FreeTrial"] = val - } - if val, ok := getCatalogProductOverviewGetLifecycleStateAttributeTypeOk(o.LifecycleState); ok { - toSerialize["LifecycleState"] = val - } - if val, ok := getCatalogProductOverviewGetLogoAttributeTypeOk(o.Logo); ok { - toSerialize["Logo"] = val - } - if val, ok := getCatalogProductOverviewGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getCatalogProductOverviewGetProductIdAttributeTypeOk(o.ProductId); ok { - toSerialize["ProductId"] = val - } - if val, ok := getCatalogProductOverviewGetSummaryAttributeTypeOk(o.Summary); ok { - toSerialize["Summary"] = val - } - if val, ok := getCatalogProductOverviewGetVendorAttributeTypeOk(o.Vendor); ok { - toSerialize["Vendor"] = val - } - return toSerialize, nil -} - -type NullableCatalogProductOverview struct { - value *CatalogProductOverview - isSet bool -} - -func (v NullableCatalogProductOverview) Get() *CatalogProductOverview { - return v.value -} - -func (v *NullableCatalogProductOverview) Set(val *CatalogProductOverview) { - v.value = val - v.isSet = true -} - -func (v NullableCatalogProductOverview) IsSet() bool { - return v.isSet -} - -func (v *NullableCatalogProductOverview) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCatalogProductOverview(val *CatalogProductOverview) *NullableCatalogProductOverview { - return &NullableCatalogProductOverview{value: val, isSet: true} -} - -func (v NullableCatalogProductOverview) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCatalogProductOverview) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_catalog_product_overview_test.go b/services/stackitmarketplace/model_catalog_product_overview_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_catalog_product_overview_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_catalog_product_overview_vendor.go b/services/stackitmarketplace/model_catalog_product_overview_vendor.go deleted file mode 100644 index 507d5d115..000000000 --- a/services/stackitmarketplace/model_catalog_product_overview_vendor.go +++ /dev/null @@ -1,217 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the CatalogProductOverviewVendor type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CatalogProductOverviewVendor{} - -/* - types and functions for name -*/ - -// isNotNullableString -type CatalogProductOverviewVendorGetNameAttributeType = *string - -func getCatalogProductOverviewVendorGetNameAttributeTypeOk(arg CatalogProductOverviewVendorGetNameAttributeType) (ret CatalogProductOverviewVendorGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductOverviewVendorGetNameAttributeType(arg *CatalogProductOverviewVendorGetNameAttributeType, val CatalogProductOverviewVendorGetNameRetType) { - *arg = &val -} - -type CatalogProductOverviewVendorGetNameArgType = string -type CatalogProductOverviewVendorGetNameRetType = string - -/* - types and functions for vendorId -*/ - -// isNotNullableString -type CatalogProductOverviewVendorGetVendorIdAttributeType = *string - -func getCatalogProductOverviewVendorGetVendorIdAttributeTypeOk(arg CatalogProductOverviewVendorGetVendorIdAttributeType) (ret CatalogProductOverviewVendorGetVendorIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductOverviewVendorGetVendorIdAttributeType(arg *CatalogProductOverviewVendorGetVendorIdAttributeType, val CatalogProductOverviewVendorGetVendorIdRetType) { - *arg = &val -} - -type CatalogProductOverviewVendorGetVendorIdArgType = string -type CatalogProductOverviewVendorGetVendorIdRetType = string - -/* - types and functions for websiteUrl -*/ - -// isNotNullableString -type CatalogProductOverviewVendorGetWebsiteUrlAttributeType = *string - -func getCatalogProductOverviewVendorGetWebsiteUrlAttributeTypeOk(arg CatalogProductOverviewVendorGetWebsiteUrlAttributeType) (ret CatalogProductOverviewVendorGetWebsiteUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductOverviewVendorGetWebsiteUrlAttributeType(arg *CatalogProductOverviewVendorGetWebsiteUrlAttributeType, val CatalogProductOverviewVendorGetWebsiteUrlRetType) { - *arg = &val -} - -type CatalogProductOverviewVendorGetWebsiteUrlArgType = string -type CatalogProductOverviewVendorGetWebsiteUrlRetType = string - -// CatalogProductOverviewVendor struct for CatalogProductOverviewVendor -type CatalogProductOverviewVendor struct { - // The product's vendor name. - // REQUIRED - Name CatalogProductOverviewVendorGetNameAttributeType `json:"name" required:"true"` - // Universally Unique Identifier (UUID). - // REQUIRED - VendorId CatalogProductOverviewVendorGetVendorIdAttributeType `json:"vendorId" required:"true"` - // Uniform Resource Locator. - // REQUIRED - WebsiteUrl CatalogProductOverviewVendorGetWebsiteUrlAttributeType `json:"websiteUrl" required:"true"` -} - -type _CatalogProductOverviewVendor CatalogProductOverviewVendor - -// NewCatalogProductOverviewVendor instantiates a new CatalogProductOverviewVendor 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 NewCatalogProductOverviewVendor(name CatalogProductOverviewVendorGetNameArgType, vendorId CatalogProductOverviewVendorGetVendorIdArgType, websiteUrl CatalogProductOverviewVendorGetWebsiteUrlArgType) *CatalogProductOverviewVendor { - this := CatalogProductOverviewVendor{} - setCatalogProductOverviewVendorGetNameAttributeType(&this.Name, name) - setCatalogProductOverviewVendorGetVendorIdAttributeType(&this.VendorId, vendorId) - setCatalogProductOverviewVendorGetWebsiteUrlAttributeType(&this.WebsiteUrl, websiteUrl) - return &this -} - -// NewCatalogProductOverviewVendorWithDefaults instantiates a new CatalogProductOverviewVendor 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 NewCatalogProductOverviewVendorWithDefaults() *CatalogProductOverviewVendor { - this := CatalogProductOverviewVendor{} - return &this -} - -// GetName returns the Name field value -func (o *CatalogProductOverviewVendor) GetName() (ret CatalogProductOverviewVendorGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CatalogProductOverviewVendor) GetNameOk() (ret CatalogProductOverviewVendorGetNameRetType, ok bool) { - return getCatalogProductOverviewVendorGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -func (o *CatalogProductOverviewVendor) SetName(v CatalogProductOverviewVendorGetNameRetType) { - setCatalogProductOverviewVendorGetNameAttributeType(&o.Name, v) -} - -// GetVendorId returns the VendorId field value -func (o *CatalogProductOverviewVendor) GetVendorId() (ret CatalogProductOverviewVendorGetVendorIdRetType) { - ret, _ = o.GetVendorIdOk() - return ret -} - -// GetVendorIdOk returns a tuple with the VendorId field value -// and a boolean to check if the value has been set. -func (o *CatalogProductOverviewVendor) GetVendorIdOk() (ret CatalogProductOverviewVendorGetVendorIdRetType, ok bool) { - return getCatalogProductOverviewVendorGetVendorIdAttributeTypeOk(o.VendorId) -} - -// SetVendorId sets field value -func (o *CatalogProductOverviewVendor) SetVendorId(v CatalogProductOverviewVendorGetVendorIdRetType) { - setCatalogProductOverviewVendorGetVendorIdAttributeType(&o.VendorId, v) -} - -// GetWebsiteUrl returns the WebsiteUrl field value -func (o *CatalogProductOverviewVendor) GetWebsiteUrl() (ret CatalogProductOverviewVendorGetWebsiteUrlRetType) { - ret, _ = o.GetWebsiteUrlOk() - return ret -} - -// GetWebsiteUrlOk returns a tuple with the WebsiteUrl field value -// and a boolean to check if the value has been set. -func (o *CatalogProductOverviewVendor) GetWebsiteUrlOk() (ret CatalogProductOverviewVendorGetWebsiteUrlRetType, ok bool) { - return getCatalogProductOverviewVendorGetWebsiteUrlAttributeTypeOk(o.WebsiteUrl) -} - -// SetWebsiteUrl sets field value -func (o *CatalogProductOverviewVendor) SetWebsiteUrl(v CatalogProductOverviewVendorGetWebsiteUrlRetType) { - setCatalogProductOverviewVendorGetWebsiteUrlAttributeType(&o.WebsiteUrl, v) -} - -func (o CatalogProductOverviewVendor) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCatalogProductOverviewVendorGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getCatalogProductOverviewVendorGetVendorIdAttributeTypeOk(o.VendorId); ok { - toSerialize["VendorId"] = val - } - if val, ok := getCatalogProductOverviewVendorGetWebsiteUrlAttributeTypeOk(o.WebsiteUrl); ok { - toSerialize["WebsiteUrl"] = val - } - return toSerialize, nil -} - -type NullableCatalogProductOverviewVendor struct { - value *CatalogProductOverviewVendor - isSet bool -} - -func (v NullableCatalogProductOverviewVendor) Get() *CatalogProductOverviewVendor { - return v.value -} - -func (v *NullableCatalogProductOverviewVendor) Set(val *CatalogProductOverviewVendor) { - v.value = val - v.isSet = true -} - -func (v NullableCatalogProductOverviewVendor) IsSet() bool { - return v.isSet -} - -func (v *NullableCatalogProductOverviewVendor) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCatalogProductOverviewVendor(val *CatalogProductOverviewVendor) *NullableCatalogProductOverviewVendor { - return &NullableCatalogProductOverviewVendor{value: val, isSet: true} -} - -func (v NullableCatalogProductOverviewVendor) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCatalogProductOverviewVendor) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_catalog_product_overview_vendor_test.go b/services/stackitmarketplace/model_catalog_product_overview_vendor_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_catalog_product_overview_vendor_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_catalog_product_pricing_option.go b/services/stackitmarketplace/model_catalog_product_pricing_option.go deleted file mode 100644 index a9441da04..000000000 --- a/services/stackitmarketplace/model_catalog_product_pricing_option.go +++ /dev/null @@ -1,678 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the CatalogProductPricingOption type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CatalogProductPricingOption{} - -/* - types and functions for description -*/ - -// isNotNullableString -type CatalogProductPricingOptionGetDescriptionAttributeType = *string - -func getCatalogProductPricingOptionGetDescriptionAttributeTypeOk(arg CatalogProductPricingOptionGetDescriptionAttributeType) (ret CatalogProductPricingOptionGetDescriptionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductPricingOptionGetDescriptionAttributeType(arg *CatalogProductPricingOptionGetDescriptionAttributeType, val CatalogProductPricingOptionGetDescriptionRetType) { - *arg = &val -} - -type CatalogProductPricingOptionGetDescriptionArgType = string -type CatalogProductPricingOptionGetDescriptionRetType = string - -/* - types and functions for highlights -*/ - -// isArray -type CatalogProductPricingOptionGetHighlightsAttributeType = *[]CatalogPricingOptionHighlight -type CatalogProductPricingOptionGetHighlightsArgType = []CatalogPricingOptionHighlight -type CatalogProductPricingOptionGetHighlightsRetType = []CatalogPricingOptionHighlight - -func getCatalogProductPricingOptionGetHighlightsAttributeTypeOk(arg CatalogProductPricingOptionGetHighlightsAttributeType) (ret CatalogProductPricingOptionGetHighlightsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductPricingOptionGetHighlightsAttributeType(arg *CatalogProductPricingOptionGetHighlightsAttributeType, val CatalogProductPricingOptionGetHighlightsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -type CatalogProductPricingOptionGetNameAttributeType = *string - -func getCatalogProductPricingOptionGetNameAttributeTypeOk(arg CatalogProductPricingOptionGetNameAttributeType) (ret CatalogProductPricingOptionGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductPricingOptionGetNameAttributeType(arg *CatalogProductPricingOptionGetNameAttributeType, val CatalogProductPricingOptionGetNameRetType) { - *arg = &val -} - -type CatalogProductPricingOptionGetNameArgType = string -type CatalogProductPricingOptionGetNameRetType = string - -/* - types and functions for noticePeriod -*/ - -// isModel -type CatalogProductPricingOptionGetNoticePeriodAttributeType = *NoticePeriod -type CatalogProductPricingOptionGetNoticePeriodArgType = NoticePeriod -type CatalogProductPricingOptionGetNoticePeriodRetType = NoticePeriod - -func getCatalogProductPricingOptionGetNoticePeriodAttributeTypeOk(arg CatalogProductPricingOptionGetNoticePeriodAttributeType) (ret CatalogProductPricingOptionGetNoticePeriodRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductPricingOptionGetNoticePeriodAttributeType(arg *CatalogProductPricingOptionGetNoticePeriodAttributeType, val CatalogProductPricingOptionGetNoticePeriodRetType) { - *arg = &val -} - -/* - types and functions for planId -*/ - -// isNotNullableString -type CatalogProductPricingOptionGetPlanIdAttributeType = *string - -func getCatalogProductPricingOptionGetPlanIdAttributeTypeOk(arg CatalogProductPricingOptionGetPlanIdAttributeType) (ret CatalogProductPricingOptionGetPlanIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductPricingOptionGetPlanIdAttributeType(arg *CatalogProductPricingOptionGetPlanIdAttributeType, val CatalogProductPricingOptionGetPlanIdRetType) { - *arg = &val -} - -type CatalogProductPricingOptionGetPlanIdArgType = string -type CatalogProductPricingOptionGetPlanIdRetType = string - -/* - types and functions for priceType -*/ - -// isEnumRef -type CatalogProductPricingOptionGetPriceTypeAttributeType = *PriceType -type CatalogProductPricingOptionGetPriceTypeArgType = PriceType -type CatalogProductPricingOptionGetPriceTypeRetType = PriceType - -func getCatalogProductPricingOptionGetPriceTypeAttributeTypeOk(arg CatalogProductPricingOptionGetPriceTypeAttributeType) (ret CatalogProductPricingOptionGetPriceTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductPricingOptionGetPriceTypeAttributeType(arg *CatalogProductPricingOptionGetPriceTypeAttributeType, val CatalogProductPricingOptionGetPriceTypeRetType) { - *arg = &val -} - -/* - types and functions for pricingPlan -*/ - -// isNotNullableString -type CatalogProductPricingOptionGetPricingPlanAttributeType = *string - -func getCatalogProductPricingOptionGetPricingPlanAttributeTypeOk(arg CatalogProductPricingOptionGetPricingPlanAttributeType) (ret CatalogProductPricingOptionGetPricingPlanRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductPricingOptionGetPricingPlanAttributeType(arg *CatalogProductPricingOptionGetPricingPlanAttributeType, val CatalogProductPricingOptionGetPricingPlanRetType) { - *arg = &val -} - -type CatalogProductPricingOptionGetPricingPlanArgType = string -type CatalogProductPricingOptionGetPricingPlanRetType = string - -/* - types and functions for rate -*/ - -// isNotNullableString -type CatalogProductPricingOptionGetRateAttributeType = *string - -func getCatalogProductPricingOptionGetRateAttributeTypeOk(arg CatalogProductPricingOptionGetRateAttributeType) (ret CatalogProductPricingOptionGetRateRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductPricingOptionGetRateAttributeType(arg *CatalogProductPricingOptionGetRateAttributeType, val CatalogProductPricingOptionGetRateRetType) { - *arg = &val -} - -type CatalogProductPricingOptionGetRateArgType = string -type CatalogProductPricingOptionGetRateRetType = string - -/* - types and functions for scope -*/ - -// isEnumRef -type CatalogProductPricingOptionGetScopeAttributeType = *Scope -type CatalogProductPricingOptionGetScopeArgType = Scope -type CatalogProductPricingOptionGetScopeRetType = Scope - -func getCatalogProductPricingOptionGetScopeAttributeTypeOk(arg CatalogProductPricingOptionGetScopeAttributeType) (ret CatalogProductPricingOptionGetScopeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductPricingOptionGetScopeAttributeType(arg *CatalogProductPricingOptionGetScopeAttributeType, val CatalogProductPricingOptionGetScopeRetType) { - *arg = &val -} - -/* - types and functions for sku -*/ - -// isNotNullableString -type CatalogProductPricingOptionGetSkuAttributeType = *string - -func getCatalogProductPricingOptionGetSkuAttributeTypeOk(arg CatalogProductPricingOptionGetSkuAttributeType) (ret CatalogProductPricingOptionGetSkuRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductPricingOptionGetSkuAttributeType(arg *CatalogProductPricingOptionGetSkuAttributeType, val CatalogProductPricingOptionGetSkuRetType) { - *arg = &val -} - -type CatalogProductPricingOptionGetSkuArgType = string -type CatalogProductPricingOptionGetSkuRetType = string - -/* - types and functions for skuInfo -*/ - -// isNotNullableString -type CatalogProductPricingOptionGetSkuInfoAttributeType = *string - -func getCatalogProductPricingOptionGetSkuInfoAttributeTypeOk(arg CatalogProductPricingOptionGetSkuInfoAttributeType) (ret CatalogProductPricingOptionGetSkuInfoRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductPricingOptionGetSkuInfoAttributeType(arg *CatalogProductPricingOptionGetSkuInfoAttributeType, val CatalogProductPricingOptionGetSkuInfoRetType) { - *arg = &val -} - -type CatalogProductPricingOptionGetSkuInfoArgType = string -type CatalogProductPricingOptionGetSkuInfoRetType = string - -/* - types and functions for skuInfoDetails -*/ - -// isNotNullableString -type CatalogProductPricingOptionGetSkuInfoDetailsAttributeType = *string - -func getCatalogProductPricingOptionGetSkuInfoDetailsAttributeTypeOk(arg CatalogProductPricingOptionGetSkuInfoDetailsAttributeType) (ret CatalogProductPricingOptionGetSkuInfoDetailsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductPricingOptionGetSkuInfoDetailsAttributeType(arg *CatalogProductPricingOptionGetSkuInfoDetailsAttributeType, val CatalogProductPricingOptionGetSkuInfoDetailsRetType) { - *arg = &val -} - -type CatalogProductPricingOptionGetSkuInfoDetailsArgType = string -type CatalogProductPricingOptionGetSkuInfoDetailsRetType = string - -/* - types and functions for unit -*/ - -// isEnumRef -type CatalogProductPricingOptionGetUnitAttributeType = *PricingOptionUnit -type CatalogProductPricingOptionGetUnitArgType = PricingOptionUnit -type CatalogProductPricingOptionGetUnitRetType = PricingOptionUnit - -func getCatalogProductPricingOptionGetUnitAttributeTypeOk(arg CatalogProductPricingOptionGetUnitAttributeType) (ret CatalogProductPricingOptionGetUnitRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductPricingOptionGetUnitAttributeType(arg *CatalogProductPricingOptionGetUnitAttributeType, val CatalogProductPricingOptionGetUnitRetType) { - *arg = &val -} - -// CatalogProductPricingOption struct for CatalogProductPricingOption -type CatalogProductPricingOption struct { - // The pricing option description. - // REQUIRED - Description CatalogProductPricingOptionGetDescriptionAttributeType `json:"description" required:"true"` - // The list of highlights. - // REQUIRED - Highlights CatalogProductPricingOptionGetHighlightsAttributeType `json:"highlights" required:"true"` - // The pricing option name. - // REQUIRED - Name CatalogProductPricingOptionGetNameAttributeType `json:"name" required:"true"` - NoticePeriod CatalogProductPricingOptionGetNoticePeriodAttributeType `json:"noticePeriod,omitempty"` - // The user-readable plan ID of a pricing option. - // REQUIRED - PlanId CatalogProductPricingOptionGetPlanIdAttributeType `json:"planId" required:"true"` - PriceType CatalogProductPricingOptionGetPriceTypeAttributeType `json:"priceType,omitempty"` - // Additional price type information. - PricingPlan CatalogProductPricingOptionGetPricingPlanAttributeType `json:"pricingPlan,omitempty"` - // The price of the product (per unit). - Rate CatalogProductPricingOptionGetRateAttributeType `json:"rate,omitempty"` - // REQUIRED - Scope CatalogProductPricingOptionGetScopeAttributeType `json:"scope" required:"true"` - // The concrete variant of the product. - // REQUIRED - Sku CatalogProductPricingOptionGetSkuAttributeType `json:"sku" required:"true"` - // Short description of this offering. - // REQUIRED - SkuInfo CatalogProductPricingOptionGetSkuInfoAttributeType `json:"skuInfo" required:"true"` - // More details about what this offering entails. - // REQUIRED - SkuInfoDetails CatalogProductPricingOptionGetSkuInfoDetailsAttributeType `json:"skuInfoDetails" required:"true"` - Unit CatalogProductPricingOptionGetUnitAttributeType `json:"unit,omitempty"` -} - -type _CatalogProductPricingOption CatalogProductPricingOption - -// NewCatalogProductPricingOption instantiates a new CatalogProductPricingOption 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 NewCatalogProductPricingOption(description CatalogProductPricingOptionGetDescriptionArgType, highlights CatalogProductPricingOptionGetHighlightsArgType, name CatalogProductPricingOptionGetNameArgType, planId CatalogProductPricingOptionGetPlanIdArgType, scope CatalogProductPricingOptionGetScopeArgType, sku CatalogProductPricingOptionGetSkuArgType, skuInfo CatalogProductPricingOptionGetSkuInfoArgType, skuInfoDetails CatalogProductPricingOptionGetSkuInfoDetailsArgType) *CatalogProductPricingOption { - this := CatalogProductPricingOption{} - setCatalogProductPricingOptionGetDescriptionAttributeType(&this.Description, description) - setCatalogProductPricingOptionGetHighlightsAttributeType(&this.Highlights, highlights) - setCatalogProductPricingOptionGetNameAttributeType(&this.Name, name) - setCatalogProductPricingOptionGetPlanIdAttributeType(&this.PlanId, planId) - setCatalogProductPricingOptionGetScopeAttributeType(&this.Scope, scope) - setCatalogProductPricingOptionGetSkuAttributeType(&this.Sku, sku) - setCatalogProductPricingOptionGetSkuInfoAttributeType(&this.SkuInfo, skuInfo) - setCatalogProductPricingOptionGetSkuInfoDetailsAttributeType(&this.SkuInfoDetails, skuInfoDetails) - return &this -} - -// NewCatalogProductPricingOptionWithDefaults instantiates a new CatalogProductPricingOption 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 NewCatalogProductPricingOptionWithDefaults() *CatalogProductPricingOption { - this := CatalogProductPricingOption{} - return &this -} - -// GetDescription returns the Description field value -func (o *CatalogProductPricingOption) GetDescription() (ret CatalogProductPricingOptionGetDescriptionRetType) { - ret, _ = o.GetDescriptionOk() - return ret -} - -// GetDescriptionOk returns a tuple with the Description field value -// and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetDescriptionOk() (ret CatalogProductPricingOptionGetDescriptionRetType, ok bool) { - return getCatalogProductPricingOptionGetDescriptionAttributeTypeOk(o.Description) -} - -// SetDescription sets field value -func (o *CatalogProductPricingOption) SetDescription(v CatalogProductPricingOptionGetDescriptionRetType) { - setCatalogProductPricingOptionGetDescriptionAttributeType(&o.Description, v) -} - -// GetHighlights returns the Highlights field value -func (o *CatalogProductPricingOption) GetHighlights() (ret CatalogProductPricingOptionGetHighlightsRetType) { - ret, _ = o.GetHighlightsOk() - return ret -} - -// GetHighlightsOk returns a tuple with the Highlights field value -// and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetHighlightsOk() (ret CatalogProductPricingOptionGetHighlightsRetType, ok bool) { - return getCatalogProductPricingOptionGetHighlightsAttributeTypeOk(o.Highlights) -} - -// SetHighlights sets field value -func (o *CatalogProductPricingOption) SetHighlights(v CatalogProductPricingOptionGetHighlightsRetType) { - setCatalogProductPricingOptionGetHighlightsAttributeType(&o.Highlights, v) -} - -// GetName returns the Name field value -func (o *CatalogProductPricingOption) GetName() (ret CatalogProductPricingOptionGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetNameOk() (ret CatalogProductPricingOptionGetNameRetType, ok bool) { - return getCatalogProductPricingOptionGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -func (o *CatalogProductPricingOption) SetName(v CatalogProductPricingOptionGetNameRetType) { - setCatalogProductPricingOptionGetNameAttributeType(&o.Name, v) -} - -// GetNoticePeriod returns the NoticePeriod field value if set, zero value otherwise. -func (o *CatalogProductPricingOption) GetNoticePeriod() (res CatalogProductPricingOptionGetNoticePeriodRetType) { - res, _ = o.GetNoticePeriodOk() - return -} - -// GetNoticePeriodOk returns a tuple with the NoticePeriod field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetNoticePeriodOk() (ret CatalogProductPricingOptionGetNoticePeriodRetType, ok bool) { - return getCatalogProductPricingOptionGetNoticePeriodAttributeTypeOk(o.NoticePeriod) -} - -// HasNoticePeriod returns a boolean if a field has been set. -func (o *CatalogProductPricingOption) HasNoticePeriod() bool { - _, ok := o.GetNoticePeriodOk() - return ok -} - -// SetNoticePeriod gets a reference to the given NoticePeriod and assigns it to the NoticePeriod field. -func (o *CatalogProductPricingOption) SetNoticePeriod(v CatalogProductPricingOptionGetNoticePeriodRetType) { - setCatalogProductPricingOptionGetNoticePeriodAttributeType(&o.NoticePeriod, v) -} - -// GetPlanId returns the PlanId field value -func (o *CatalogProductPricingOption) GetPlanId() (ret CatalogProductPricingOptionGetPlanIdRetType) { - ret, _ = o.GetPlanIdOk() - return ret -} - -// GetPlanIdOk returns a tuple with the PlanId field value -// and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetPlanIdOk() (ret CatalogProductPricingOptionGetPlanIdRetType, ok bool) { - return getCatalogProductPricingOptionGetPlanIdAttributeTypeOk(o.PlanId) -} - -// SetPlanId sets field value -func (o *CatalogProductPricingOption) SetPlanId(v CatalogProductPricingOptionGetPlanIdRetType) { - setCatalogProductPricingOptionGetPlanIdAttributeType(&o.PlanId, v) -} - -// GetPriceType returns the PriceType field value if set, zero value otherwise. -func (o *CatalogProductPricingOption) GetPriceType() (res CatalogProductPricingOptionGetPriceTypeRetType) { - res, _ = o.GetPriceTypeOk() - return -} - -// GetPriceTypeOk returns a tuple with the PriceType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetPriceTypeOk() (ret CatalogProductPricingOptionGetPriceTypeRetType, ok bool) { - return getCatalogProductPricingOptionGetPriceTypeAttributeTypeOk(o.PriceType) -} - -// HasPriceType returns a boolean if a field has been set. -func (o *CatalogProductPricingOption) HasPriceType() bool { - _, ok := o.GetPriceTypeOk() - return ok -} - -// SetPriceType gets a reference to the given PriceType and assigns it to the PriceType field. -func (o *CatalogProductPricingOption) SetPriceType(v CatalogProductPricingOptionGetPriceTypeRetType) { - setCatalogProductPricingOptionGetPriceTypeAttributeType(&o.PriceType, v) -} - -// GetPricingPlan returns the PricingPlan field value if set, zero value otherwise. -func (o *CatalogProductPricingOption) GetPricingPlan() (res CatalogProductPricingOptionGetPricingPlanRetType) { - res, _ = o.GetPricingPlanOk() - return -} - -// GetPricingPlanOk returns a tuple with the PricingPlan field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetPricingPlanOk() (ret CatalogProductPricingOptionGetPricingPlanRetType, ok bool) { - return getCatalogProductPricingOptionGetPricingPlanAttributeTypeOk(o.PricingPlan) -} - -// HasPricingPlan returns a boolean if a field has been set. -func (o *CatalogProductPricingOption) HasPricingPlan() bool { - _, ok := o.GetPricingPlanOk() - return ok -} - -// SetPricingPlan gets a reference to the given string and assigns it to the PricingPlan field. -func (o *CatalogProductPricingOption) SetPricingPlan(v CatalogProductPricingOptionGetPricingPlanRetType) { - setCatalogProductPricingOptionGetPricingPlanAttributeType(&o.PricingPlan, v) -} - -// GetRate returns the Rate field value if set, zero value otherwise. -func (o *CatalogProductPricingOption) GetRate() (res CatalogProductPricingOptionGetRateRetType) { - res, _ = o.GetRateOk() - return -} - -// GetRateOk returns a tuple with the Rate field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetRateOk() (ret CatalogProductPricingOptionGetRateRetType, ok bool) { - return getCatalogProductPricingOptionGetRateAttributeTypeOk(o.Rate) -} - -// HasRate returns a boolean if a field has been set. -func (o *CatalogProductPricingOption) HasRate() bool { - _, ok := o.GetRateOk() - return ok -} - -// SetRate gets a reference to the given string and assigns it to the Rate field. -func (o *CatalogProductPricingOption) SetRate(v CatalogProductPricingOptionGetRateRetType) { - setCatalogProductPricingOptionGetRateAttributeType(&o.Rate, v) -} - -// GetScope returns the Scope field value -func (o *CatalogProductPricingOption) GetScope() (ret CatalogProductPricingOptionGetScopeRetType) { - ret, _ = o.GetScopeOk() - return ret -} - -// GetScopeOk returns a tuple with the Scope field value -// and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetScopeOk() (ret CatalogProductPricingOptionGetScopeRetType, ok bool) { - return getCatalogProductPricingOptionGetScopeAttributeTypeOk(o.Scope) -} - -// SetScope sets field value -func (o *CatalogProductPricingOption) SetScope(v CatalogProductPricingOptionGetScopeRetType) { - setCatalogProductPricingOptionGetScopeAttributeType(&o.Scope, v) -} - -// GetSku returns the Sku field value -func (o *CatalogProductPricingOption) GetSku() (ret CatalogProductPricingOptionGetSkuRetType) { - ret, _ = o.GetSkuOk() - return ret -} - -// GetSkuOk returns a tuple with the Sku field value -// and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetSkuOk() (ret CatalogProductPricingOptionGetSkuRetType, ok bool) { - return getCatalogProductPricingOptionGetSkuAttributeTypeOk(o.Sku) -} - -// SetSku sets field value -func (o *CatalogProductPricingOption) SetSku(v CatalogProductPricingOptionGetSkuRetType) { - setCatalogProductPricingOptionGetSkuAttributeType(&o.Sku, v) -} - -// GetSkuInfo returns the SkuInfo field value -func (o *CatalogProductPricingOption) GetSkuInfo() (ret CatalogProductPricingOptionGetSkuInfoRetType) { - ret, _ = o.GetSkuInfoOk() - return ret -} - -// GetSkuInfoOk returns a tuple with the SkuInfo field value -// and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetSkuInfoOk() (ret CatalogProductPricingOptionGetSkuInfoRetType, ok bool) { - return getCatalogProductPricingOptionGetSkuInfoAttributeTypeOk(o.SkuInfo) -} - -// SetSkuInfo sets field value -func (o *CatalogProductPricingOption) SetSkuInfo(v CatalogProductPricingOptionGetSkuInfoRetType) { - setCatalogProductPricingOptionGetSkuInfoAttributeType(&o.SkuInfo, v) -} - -// GetSkuInfoDetails returns the SkuInfoDetails field value -func (o *CatalogProductPricingOption) GetSkuInfoDetails() (ret CatalogProductPricingOptionGetSkuInfoDetailsRetType) { - ret, _ = o.GetSkuInfoDetailsOk() - return ret -} - -// GetSkuInfoDetailsOk returns a tuple with the SkuInfoDetails field value -// and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetSkuInfoDetailsOk() (ret CatalogProductPricingOptionGetSkuInfoDetailsRetType, ok bool) { - return getCatalogProductPricingOptionGetSkuInfoDetailsAttributeTypeOk(o.SkuInfoDetails) -} - -// SetSkuInfoDetails sets field value -func (o *CatalogProductPricingOption) SetSkuInfoDetails(v CatalogProductPricingOptionGetSkuInfoDetailsRetType) { - setCatalogProductPricingOptionGetSkuInfoDetailsAttributeType(&o.SkuInfoDetails, v) -} - -// GetUnit returns the Unit field value if set, zero value otherwise. -func (o *CatalogProductPricingOption) GetUnit() (res CatalogProductPricingOptionGetUnitRetType) { - res, _ = o.GetUnitOk() - return -} - -// GetUnitOk returns a tuple with the Unit field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductPricingOption) GetUnitOk() (ret CatalogProductPricingOptionGetUnitRetType, ok bool) { - return getCatalogProductPricingOptionGetUnitAttributeTypeOk(o.Unit) -} - -// HasUnit returns a boolean if a field has been set. -func (o *CatalogProductPricingOption) HasUnit() bool { - _, ok := o.GetUnitOk() - return ok -} - -// SetUnit gets a reference to the given PricingOptionUnit and assigns it to the Unit field. -func (o *CatalogProductPricingOption) SetUnit(v CatalogProductPricingOptionGetUnitRetType) { - setCatalogProductPricingOptionGetUnitAttributeType(&o.Unit, v) -} - -func (o CatalogProductPricingOption) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCatalogProductPricingOptionGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getCatalogProductPricingOptionGetHighlightsAttributeTypeOk(o.Highlights); ok { - toSerialize["Highlights"] = val - } - if val, ok := getCatalogProductPricingOptionGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getCatalogProductPricingOptionGetNoticePeriodAttributeTypeOk(o.NoticePeriod); ok { - toSerialize["NoticePeriod"] = val - } - if val, ok := getCatalogProductPricingOptionGetPlanIdAttributeTypeOk(o.PlanId); ok { - toSerialize["PlanId"] = val - } - if val, ok := getCatalogProductPricingOptionGetPriceTypeAttributeTypeOk(o.PriceType); ok { - toSerialize["PriceType"] = val - } - if val, ok := getCatalogProductPricingOptionGetPricingPlanAttributeTypeOk(o.PricingPlan); ok { - toSerialize["PricingPlan"] = val - } - if val, ok := getCatalogProductPricingOptionGetRateAttributeTypeOk(o.Rate); ok { - toSerialize["Rate"] = val - } - if val, ok := getCatalogProductPricingOptionGetScopeAttributeTypeOk(o.Scope); ok { - toSerialize["Scope"] = val - } - if val, ok := getCatalogProductPricingOptionGetSkuAttributeTypeOk(o.Sku); ok { - toSerialize["Sku"] = val - } - if val, ok := getCatalogProductPricingOptionGetSkuInfoAttributeTypeOk(o.SkuInfo); ok { - toSerialize["SkuInfo"] = val - } - if val, ok := getCatalogProductPricingOptionGetSkuInfoDetailsAttributeTypeOk(o.SkuInfoDetails); ok { - toSerialize["SkuInfoDetails"] = val - } - if val, ok := getCatalogProductPricingOptionGetUnitAttributeTypeOk(o.Unit); ok { - toSerialize["Unit"] = val - } - return toSerialize, nil -} - -type NullableCatalogProductPricingOption struct { - value *CatalogProductPricingOption - isSet bool -} - -func (v NullableCatalogProductPricingOption) Get() *CatalogProductPricingOption { - return v.value -} - -func (v *NullableCatalogProductPricingOption) Set(val *CatalogProductPricingOption) { - v.value = val - v.isSet = true -} - -func (v NullableCatalogProductPricingOption) IsSet() bool { - return v.isSet -} - -func (v *NullableCatalogProductPricingOption) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCatalogProductPricingOption(val *CatalogProductPricingOption) *NullableCatalogProductPricingOption { - return &NullableCatalogProductPricingOption{value: val, isSet: true} -} - -func (v NullableCatalogProductPricingOption) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCatalogProductPricingOption) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_catalog_product_pricing_option_test.go b/services/stackitmarketplace/model_catalog_product_pricing_option_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_catalog_product_pricing_option_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_catalog_product_support_resource.go b/services/stackitmarketplace/model_catalog_product_support_resource.go deleted file mode 100644 index f966bf4d3..000000000 --- a/services/stackitmarketplace/model_catalog_product_support_resource.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the CatalogProductSupportResource type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CatalogProductSupportResource{} - -/* - types and functions for supportLink -*/ - -// isNotNullableString -type CatalogProductSupportResourceGetSupportLinkAttributeType = *string - -func getCatalogProductSupportResourceGetSupportLinkAttributeTypeOk(arg CatalogProductSupportResourceGetSupportLinkAttributeType) (ret CatalogProductSupportResourceGetSupportLinkRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductSupportResourceGetSupportLinkAttributeType(arg *CatalogProductSupportResourceGetSupportLinkAttributeType, val CatalogProductSupportResourceGetSupportLinkRetType) { - *arg = &val -} - -type CatalogProductSupportResourceGetSupportLinkArgType = string -type CatalogProductSupportResourceGetSupportLinkRetType = string - -/* - types and functions for supportLinkTitle -*/ - -// isNotNullableString -type CatalogProductSupportResourceGetSupportLinkTitleAttributeType = *string - -func getCatalogProductSupportResourceGetSupportLinkTitleAttributeTypeOk(arg CatalogProductSupportResourceGetSupportLinkTitleAttributeType) (ret CatalogProductSupportResourceGetSupportLinkTitleRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductSupportResourceGetSupportLinkTitleAttributeType(arg *CatalogProductSupportResourceGetSupportLinkTitleAttributeType, val CatalogProductSupportResourceGetSupportLinkTitleRetType) { - *arg = &val -} - -type CatalogProductSupportResourceGetSupportLinkTitleArgType = string -type CatalogProductSupportResourceGetSupportLinkTitleRetType = string - -// CatalogProductSupportResource struct for CatalogProductSupportResource -type CatalogProductSupportResource struct { - // Uniform Resource Locator. - SupportLink CatalogProductSupportResourceGetSupportLinkAttributeType `json:"supportLink,omitempty"` - // The support resource link title. - SupportLinkTitle CatalogProductSupportResourceGetSupportLinkTitleAttributeType `json:"supportLinkTitle,omitempty"` -} - -// NewCatalogProductSupportResource instantiates a new CatalogProductSupportResource 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 NewCatalogProductSupportResource() *CatalogProductSupportResource { - this := CatalogProductSupportResource{} - return &this -} - -// NewCatalogProductSupportResourceWithDefaults instantiates a new CatalogProductSupportResource 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 NewCatalogProductSupportResourceWithDefaults() *CatalogProductSupportResource { - this := CatalogProductSupportResource{} - return &this -} - -// GetSupportLink returns the SupportLink field value if set, zero value otherwise. -func (o *CatalogProductSupportResource) GetSupportLink() (res CatalogProductSupportResourceGetSupportLinkRetType) { - res, _ = o.GetSupportLinkOk() - return -} - -// GetSupportLinkOk returns a tuple with the SupportLink field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductSupportResource) GetSupportLinkOk() (ret CatalogProductSupportResourceGetSupportLinkRetType, ok bool) { - return getCatalogProductSupportResourceGetSupportLinkAttributeTypeOk(o.SupportLink) -} - -// HasSupportLink returns a boolean if a field has been set. -func (o *CatalogProductSupportResource) HasSupportLink() bool { - _, ok := o.GetSupportLinkOk() - return ok -} - -// SetSupportLink gets a reference to the given string and assigns it to the SupportLink field. -func (o *CatalogProductSupportResource) SetSupportLink(v CatalogProductSupportResourceGetSupportLinkRetType) { - setCatalogProductSupportResourceGetSupportLinkAttributeType(&o.SupportLink, v) -} - -// GetSupportLinkTitle returns the SupportLinkTitle field value if set, zero value otherwise. -func (o *CatalogProductSupportResource) GetSupportLinkTitle() (res CatalogProductSupportResourceGetSupportLinkTitleRetType) { - res, _ = o.GetSupportLinkTitleOk() - return -} - -// GetSupportLinkTitleOk returns a tuple with the SupportLinkTitle field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatalogProductSupportResource) GetSupportLinkTitleOk() (ret CatalogProductSupportResourceGetSupportLinkTitleRetType, ok bool) { - return getCatalogProductSupportResourceGetSupportLinkTitleAttributeTypeOk(o.SupportLinkTitle) -} - -// HasSupportLinkTitle returns a boolean if a field has been set. -func (o *CatalogProductSupportResource) HasSupportLinkTitle() bool { - _, ok := o.GetSupportLinkTitleOk() - return ok -} - -// SetSupportLinkTitle gets a reference to the given string and assigns it to the SupportLinkTitle field. -func (o *CatalogProductSupportResource) SetSupportLinkTitle(v CatalogProductSupportResourceGetSupportLinkTitleRetType) { - setCatalogProductSupportResourceGetSupportLinkTitleAttributeType(&o.SupportLinkTitle, v) -} - -func (o CatalogProductSupportResource) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCatalogProductSupportResourceGetSupportLinkAttributeTypeOk(o.SupportLink); ok { - toSerialize["SupportLink"] = val - } - if val, ok := getCatalogProductSupportResourceGetSupportLinkTitleAttributeTypeOk(o.SupportLinkTitle); ok { - toSerialize["SupportLinkTitle"] = val - } - return toSerialize, nil -} - -type NullableCatalogProductSupportResource struct { - value *CatalogProductSupportResource - isSet bool -} - -func (v NullableCatalogProductSupportResource) Get() *CatalogProductSupportResource { - return v.value -} - -func (v *NullableCatalogProductSupportResource) Set(val *CatalogProductSupportResource) { - v.value = val - v.isSet = true -} - -func (v NullableCatalogProductSupportResource) IsSet() bool { - return v.isSet -} - -func (v *NullableCatalogProductSupportResource) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCatalogProductSupportResource(val *CatalogProductSupportResource) *NullableCatalogProductSupportResource { - return &NullableCatalogProductSupportResource{value: val, isSet: true} -} - -func (v NullableCatalogProductSupportResource) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCatalogProductSupportResource) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_catalog_product_support_resource_test.go b/services/stackitmarketplace/model_catalog_product_support_resource_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_catalog_product_support_resource_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_catalog_product_vendor_terms.go b/services/stackitmarketplace/model_catalog_product_vendor_terms.go deleted file mode 100644 index 71e18880f..000000000 --- a/services/stackitmarketplace/model_catalog_product_vendor_terms.go +++ /dev/null @@ -1,217 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the CatalogProductVendorTerms type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CatalogProductVendorTerms{} - -/* - types and functions for description -*/ - -// isNotNullableString -type CatalogProductVendorTermsGetDescriptionAttributeType = *string - -func getCatalogProductVendorTermsGetDescriptionAttributeTypeOk(arg CatalogProductVendorTermsGetDescriptionAttributeType) (ret CatalogProductVendorTermsGetDescriptionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductVendorTermsGetDescriptionAttributeType(arg *CatalogProductVendorTermsGetDescriptionAttributeType, val CatalogProductVendorTermsGetDescriptionRetType) { - *arg = &val -} - -type CatalogProductVendorTermsGetDescriptionArgType = string -type CatalogProductVendorTermsGetDescriptionRetType = string - -/* - types and functions for title -*/ - -// isNotNullableString -type CatalogProductVendorTermsGetTitleAttributeType = *string - -func getCatalogProductVendorTermsGetTitleAttributeTypeOk(arg CatalogProductVendorTermsGetTitleAttributeType) (ret CatalogProductVendorTermsGetTitleRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductVendorTermsGetTitleAttributeType(arg *CatalogProductVendorTermsGetTitleAttributeType, val CatalogProductVendorTermsGetTitleRetType) { - *arg = &val -} - -type CatalogProductVendorTermsGetTitleArgType = string -type CatalogProductVendorTermsGetTitleRetType = string - -/* - types and functions for url -*/ - -// isNotNullableString -type CatalogProductVendorTermsGetUrlAttributeType = *string - -func getCatalogProductVendorTermsGetUrlAttributeTypeOk(arg CatalogProductVendorTermsGetUrlAttributeType) (ret CatalogProductVendorTermsGetUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCatalogProductVendorTermsGetUrlAttributeType(arg *CatalogProductVendorTermsGetUrlAttributeType, val CatalogProductVendorTermsGetUrlRetType) { - *arg = &val -} - -type CatalogProductVendorTermsGetUrlArgType = string -type CatalogProductVendorTermsGetUrlRetType = string - -// CatalogProductVendorTerms struct for CatalogProductVendorTerms -type CatalogProductVendorTerms struct { - // The terms of service description. - // REQUIRED - Description CatalogProductVendorTermsGetDescriptionAttributeType `json:"description" required:"true"` - // The terms of service title. - // REQUIRED - Title CatalogProductVendorTermsGetTitleAttributeType `json:"title" required:"true"` - // Uniform Resource Locator. - // REQUIRED - Url CatalogProductVendorTermsGetUrlAttributeType `json:"url" required:"true"` -} - -type _CatalogProductVendorTerms CatalogProductVendorTerms - -// NewCatalogProductVendorTerms instantiates a new CatalogProductVendorTerms 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 NewCatalogProductVendorTerms(description CatalogProductVendorTermsGetDescriptionArgType, title CatalogProductVendorTermsGetTitleArgType, url CatalogProductVendorTermsGetUrlArgType) *CatalogProductVendorTerms { - this := CatalogProductVendorTerms{} - setCatalogProductVendorTermsGetDescriptionAttributeType(&this.Description, description) - setCatalogProductVendorTermsGetTitleAttributeType(&this.Title, title) - setCatalogProductVendorTermsGetUrlAttributeType(&this.Url, url) - return &this -} - -// NewCatalogProductVendorTermsWithDefaults instantiates a new CatalogProductVendorTerms 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 NewCatalogProductVendorTermsWithDefaults() *CatalogProductVendorTerms { - this := CatalogProductVendorTerms{} - return &this -} - -// GetDescription returns the Description field value -func (o *CatalogProductVendorTerms) GetDescription() (ret CatalogProductVendorTermsGetDescriptionRetType) { - ret, _ = o.GetDescriptionOk() - return ret -} - -// GetDescriptionOk returns a tuple with the Description field value -// and a boolean to check if the value has been set. -func (o *CatalogProductVendorTerms) GetDescriptionOk() (ret CatalogProductVendorTermsGetDescriptionRetType, ok bool) { - return getCatalogProductVendorTermsGetDescriptionAttributeTypeOk(o.Description) -} - -// SetDescription sets field value -func (o *CatalogProductVendorTerms) SetDescription(v CatalogProductVendorTermsGetDescriptionRetType) { - setCatalogProductVendorTermsGetDescriptionAttributeType(&o.Description, v) -} - -// GetTitle returns the Title field value -func (o *CatalogProductVendorTerms) GetTitle() (ret CatalogProductVendorTermsGetTitleRetType) { - ret, _ = o.GetTitleOk() - return ret -} - -// GetTitleOk returns a tuple with the Title field value -// and a boolean to check if the value has been set. -func (o *CatalogProductVendorTerms) GetTitleOk() (ret CatalogProductVendorTermsGetTitleRetType, ok bool) { - return getCatalogProductVendorTermsGetTitleAttributeTypeOk(o.Title) -} - -// SetTitle sets field value -func (o *CatalogProductVendorTerms) SetTitle(v CatalogProductVendorTermsGetTitleRetType) { - setCatalogProductVendorTermsGetTitleAttributeType(&o.Title, v) -} - -// GetUrl returns the Url field value -func (o *CatalogProductVendorTerms) GetUrl() (ret CatalogProductVendorTermsGetUrlRetType) { - ret, _ = o.GetUrlOk() - return ret -} - -// GetUrlOk returns a tuple with the Url field value -// and a boolean to check if the value has been set. -func (o *CatalogProductVendorTerms) GetUrlOk() (ret CatalogProductVendorTermsGetUrlRetType, ok bool) { - return getCatalogProductVendorTermsGetUrlAttributeTypeOk(o.Url) -} - -// SetUrl sets field value -func (o *CatalogProductVendorTerms) SetUrl(v CatalogProductVendorTermsGetUrlRetType) { - setCatalogProductVendorTermsGetUrlAttributeType(&o.Url, v) -} - -func (o CatalogProductVendorTerms) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCatalogProductVendorTermsGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getCatalogProductVendorTermsGetTitleAttributeTypeOk(o.Title); ok { - toSerialize["Title"] = val - } - if val, ok := getCatalogProductVendorTermsGetUrlAttributeTypeOk(o.Url); ok { - toSerialize["Url"] = val - } - return toSerialize, nil -} - -type NullableCatalogProductVendorTerms struct { - value *CatalogProductVendorTerms - isSet bool -} - -func (v NullableCatalogProductVendorTerms) Get() *CatalogProductVendorTerms { - return v.value -} - -func (v *NullableCatalogProductVendorTerms) Set(val *CatalogProductVendorTerms) { - v.value = val - v.isSet = true -} - -func (v NullableCatalogProductVendorTerms) IsSet() bool { - return v.isSet -} - -func (v *NullableCatalogProductVendorTerms) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCatalogProductVendorTerms(val *CatalogProductVendorTerms) *NullableCatalogProductVendorTerms { - return &NullableCatalogProductVendorTerms{value: val, isSet: true} -} - -func (v NullableCatalogProductVendorTerms) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCatalogProductVendorTerms) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_catalog_product_vendor_terms_test.go b/services/stackitmarketplace/model_catalog_product_vendor_terms_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_catalog_product_vendor_terms_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_contact_sales.go b/services/stackitmarketplace/model_contact_sales.go deleted file mode 100644 index c3babbd65..000000000 --- a/services/stackitmarketplace/model_contact_sales.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the ContactSales type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ContactSales{} - -/* - types and functions for contactSales -*/ - -// isModel -type ContactSalesGetContactSalesAttributeType = *InquiryContactSales -type ContactSalesGetContactSalesArgType = InquiryContactSales -type ContactSalesGetContactSalesRetType = InquiryContactSales - -func getContactSalesGetContactSalesAttributeTypeOk(arg ContactSalesGetContactSalesAttributeType) (ret ContactSalesGetContactSalesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setContactSalesGetContactSalesAttributeType(arg *ContactSalesGetContactSalesAttributeType, val ContactSalesGetContactSalesRetType) { - *arg = &val -} - -/* - types and functions for type -*/ - -// isEnumRef -type ContactSalesGetTypeAttributeType = *InquiryFormType -type ContactSalesGetTypeArgType = InquiryFormType -type ContactSalesGetTypeRetType = InquiryFormType - -func getContactSalesGetTypeAttributeTypeOk(arg ContactSalesGetTypeAttributeType) (ret ContactSalesGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setContactSalesGetTypeAttributeType(arg *ContactSalesGetTypeAttributeType, val ContactSalesGetTypeRetType) { - *arg = &val -} - -// ContactSales Contact sales. -type ContactSales struct { - // REQUIRED - ContactSales ContactSalesGetContactSalesAttributeType `json:"contactSales" required:"true"` - // REQUIRED - Type ContactSalesGetTypeAttributeType `json:"type" required:"true"` -} - -type _ContactSales ContactSales - -// NewContactSales instantiates a new ContactSales 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 NewContactSales(contactSales ContactSalesGetContactSalesArgType, types ContactSalesGetTypeArgType) *ContactSales { - this := ContactSales{} - setContactSalesGetContactSalesAttributeType(&this.ContactSales, contactSales) - setContactSalesGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewContactSalesWithDefaults instantiates a new ContactSales 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 NewContactSalesWithDefaults() *ContactSales { - this := ContactSales{} - return &this -} - -// GetContactSales returns the ContactSales field value -func (o *ContactSales) GetContactSales() (ret ContactSalesGetContactSalesRetType) { - ret, _ = o.GetContactSalesOk() - return ret -} - -// GetContactSalesOk returns a tuple with the ContactSales field value -// and a boolean to check if the value has been set. -func (o *ContactSales) GetContactSalesOk() (ret ContactSalesGetContactSalesRetType, ok bool) { - return getContactSalesGetContactSalesAttributeTypeOk(o.ContactSales) -} - -// SetContactSales sets field value -func (o *ContactSales) SetContactSales(v ContactSalesGetContactSalesRetType) { - setContactSalesGetContactSalesAttributeType(&o.ContactSales, v) -} - -// GetType returns the Type field value -func (o *ContactSales) GetType() (ret ContactSalesGetTypeRetType) { - 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 *ContactSales) GetTypeOk() (ret ContactSalesGetTypeRetType, ok bool) { - return getContactSalesGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -func (o *ContactSales) SetType(v ContactSalesGetTypeRetType) { - setContactSalesGetTypeAttributeType(&o.Type, v) -} - -func (o ContactSales) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getContactSalesGetContactSalesAttributeTypeOk(o.ContactSales); ok { - toSerialize["ContactSales"] = val - } - if val, ok := getContactSalesGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -type NullableContactSales struct { - value *ContactSales - isSet bool -} - -func (v NullableContactSales) Get() *ContactSales { - return v.value -} - -func (v *NullableContactSales) Set(val *ContactSales) { - v.value = val - v.isSet = true -} - -func (v NullableContactSales) IsSet() bool { - return v.isSet -} - -func (v *NullableContactSales) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableContactSales(val *ContactSales) *NullableContactSales { - return &NullableContactSales{value: val, isSet: true} -} - -func (v NullableContactSales) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableContactSales) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_contact_sales_test.go b/services/stackitmarketplace/model_contact_sales_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_contact_sales_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_delivery_method.go b/services/stackitmarketplace/model_delivery_method.go deleted file mode 100644 index ee72f2bd2..000000000 --- a/services/stackitmarketplace/model_delivery_method.go +++ /dev/null @@ -1,119 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" - "fmt" -) - -// DeliveryMethod The product delivery method/type. For reference: SAAS - Software as a Service, SAI - STACKIT Application Image -type DeliveryMethod string - -// List of deliveryMethod -const ( - DELIVERYMETHOD_SAAS DeliveryMethod = "SAAS" - DELIVERYMETHOD_KUBERNETES DeliveryMethod = "KUBERNETES" - DELIVERYMETHOD_SAI DeliveryMethod = "SAI" - DELIVERYMETHOD_PROFESSIONAL_SERVICE DeliveryMethod = "PROFESSIONAL_SERVICE" -) - -// All allowed values of DeliveryMethod enum -var AllowedDeliveryMethodEnumValues = []DeliveryMethod{ - "SAAS", - "KUBERNETES", - "SAI", - "PROFESSIONAL_SERVICE", -} - -func (v *DeliveryMethod) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue string - if value == zeroValue { - return nil - } - enumTypeValue := DeliveryMethod(value) - for _, existing := range AllowedDeliveryMethodEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid DeliveryMethod", value) -} - -// NewDeliveryMethodFromValue returns a pointer to a valid DeliveryMethod -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewDeliveryMethodFromValue(v string) (*DeliveryMethod, error) { - ev := DeliveryMethod(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for DeliveryMethod: valid values are %v", v, AllowedDeliveryMethodEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v DeliveryMethod) IsValid() bool { - for _, existing := range AllowedDeliveryMethodEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to deliveryMethod value -func (v DeliveryMethod) Ptr() *DeliveryMethod { - return &v -} - -type NullableDeliveryMethod struct { - value *DeliveryMethod - isSet bool -} - -func (v NullableDeliveryMethod) Get() *DeliveryMethod { - return v.value -} - -func (v *NullableDeliveryMethod) Set(val *DeliveryMethod) { - v.value = val - v.isSet = true -} - -func (v NullableDeliveryMethod) IsSet() bool { - return v.isSet -} - -func (v *NullableDeliveryMethod) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDeliveryMethod(val *DeliveryMethod) *NullableDeliveryMethod { - return &NullableDeliveryMethod{value: val, isSet: true} -} - -func (v NullableDeliveryMethod) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDeliveryMethod) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_delivery_method_test.go b/services/stackitmarketplace/model_delivery_method_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_delivery_method_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_error_response.go b/services/stackitmarketplace/model_error_response.go deleted file mode 100644 index d508b56b6..000000000 --- a/services/stackitmarketplace/model_error_response.go +++ /dev/null @@ -1,307 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" - "time" -) - -// checks if the ErrorResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ErrorResponse{} - -/* - types and functions for error -*/ - -// isNotNullableString -type ErrorResponseGetErrorAttributeType = *string - -func getErrorResponseGetErrorAttributeTypeOk(arg ErrorResponseGetErrorAttributeType) (ret ErrorResponseGetErrorRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setErrorResponseGetErrorAttributeType(arg *ErrorResponseGetErrorAttributeType, val ErrorResponseGetErrorRetType) { - *arg = &val -} - -type ErrorResponseGetErrorArgType = string -type ErrorResponseGetErrorRetType = string - -/* - types and functions for message -*/ - -// isNotNullableString -type ErrorResponseGetMessageAttributeType = *string - -func getErrorResponseGetMessageAttributeTypeOk(arg ErrorResponseGetMessageAttributeType) (ret ErrorResponseGetMessageRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setErrorResponseGetMessageAttributeType(arg *ErrorResponseGetMessageAttributeType, val ErrorResponseGetMessageRetType) { - *arg = &val -} - -type ErrorResponseGetMessageArgType = string -type ErrorResponseGetMessageRetType = string - -/* - types and functions for path -*/ - -// isNotNullableString -type ErrorResponseGetPathAttributeType = *string - -func getErrorResponseGetPathAttributeTypeOk(arg ErrorResponseGetPathAttributeType) (ret ErrorResponseGetPathRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setErrorResponseGetPathAttributeType(arg *ErrorResponseGetPathAttributeType, val ErrorResponseGetPathRetType) { - *arg = &val -} - -type ErrorResponseGetPathArgType = string -type ErrorResponseGetPathRetType = string - -/* - types and functions for status -*/ - -// isInteger -type ErrorResponseGetStatusAttributeType = *int64 -type ErrorResponseGetStatusArgType = int64 -type ErrorResponseGetStatusRetType = int64 - -func getErrorResponseGetStatusAttributeTypeOk(arg ErrorResponseGetStatusAttributeType) (ret ErrorResponseGetStatusRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setErrorResponseGetStatusAttributeType(arg *ErrorResponseGetStatusAttributeType, val ErrorResponseGetStatusRetType) { - *arg = &val -} - -/* - types and functions for timeStamp -*/ - -// isDateTime -type ErrorResponseGetTimeStampAttributeType = *time.Time -type ErrorResponseGetTimeStampArgType = time.Time -type ErrorResponseGetTimeStampRetType = time.Time - -func getErrorResponseGetTimeStampAttributeTypeOk(arg ErrorResponseGetTimeStampAttributeType) (ret ErrorResponseGetTimeStampRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setErrorResponseGetTimeStampAttributeType(arg *ErrorResponseGetTimeStampAttributeType, val ErrorResponseGetTimeStampRetType) { - *arg = &val -} - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - // Reason phrase of the status code. - // REQUIRED - Error ErrorResponseGetErrorAttributeType `json:"error" required:"true"` - // Description of the error. - // REQUIRED - Message ErrorResponseGetMessageAttributeType `json:"message" required:"true"` - // Path which was called. - // REQUIRED - Path ErrorResponseGetPathAttributeType `json:"path" required:"true"` - // HTTP response status code. - // Can be cast to int32 without loss of precision. - // REQUIRED - Status ErrorResponseGetStatusAttributeType `json:"status" required:"true"` - // Timestamp at which the error occurred. - // REQUIRED - TimeStamp ErrorResponseGetTimeStampAttributeType `json:"timeStamp" required:"true"` -} - -type _ErrorResponse ErrorResponse - -// NewErrorResponse instantiates a new ErrorResponse 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 NewErrorResponse(error_ ErrorResponseGetErrorArgType, message ErrorResponseGetMessageArgType, path ErrorResponseGetPathArgType, status ErrorResponseGetStatusArgType, timeStamp ErrorResponseGetTimeStampArgType) *ErrorResponse { - this := ErrorResponse{} - setErrorResponseGetErrorAttributeType(&this.Error, error_) - setErrorResponseGetMessageAttributeType(&this.Message, message) - setErrorResponseGetPathAttributeType(&this.Path, path) - setErrorResponseGetStatusAttributeType(&this.Status, status) - setErrorResponseGetTimeStampAttributeType(&this.TimeStamp, timeStamp) - return &this -} - -// NewErrorResponseWithDefaults instantiates a new ErrorResponse 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 NewErrorResponseWithDefaults() *ErrorResponse { - this := ErrorResponse{} - return &this -} - -// GetError returns the Error field value -func (o *ErrorResponse) GetError() (ret ErrorResponseGetErrorRetType) { - ret, _ = o.GetErrorOk() - return ret -} - -// GetErrorOk returns a tuple with the Error field value -// and a boolean to check if the value has been set. -func (o *ErrorResponse) GetErrorOk() (ret ErrorResponseGetErrorRetType, ok bool) { - return getErrorResponseGetErrorAttributeTypeOk(o.Error) -} - -// SetError sets field value -func (o *ErrorResponse) SetError(v ErrorResponseGetErrorRetType) { - setErrorResponseGetErrorAttributeType(&o.Error, v) -} - -// GetMessage returns the Message field value -func (o *ErrorResponse) GetMessage() (ret ErrorResponseGetMessageRetType) { - 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 *ErrorResponse) GetMessageOk() (ret ErrorResponseGetMessageRetType, ok bool) { - return getErrorResponseGetMessageAttributeTypeOk(o.Message) -} - -// SetMessage sets field value -func (o *ErrorResponse) SetMessage(v ErrorResponseGetMessageRetType) { - setErrorResponseGetMessageAttributeType(&o.Message, v) -} - -// GetPath returns the Path field value -func (o *ErrorResponse) GetPath() (ret ErrorResponseGetPathRetType) { - ret, _ = o.GetPathOk() - return ret -} - -// GetPathOk returns a tuple with the Path field value -// and a boolean to check if the value has been set. -func (o *ErrorResponse) GetPathOk() (ret ErrorResponseGetPathRetType, ok bool) { - return getErrorResponseGetPathAttributeTypeOk(o.Path) -} - -// SetPath sets field value -func (o *ErrorResponse) SetPath(v ErrorResponseGetPathRetType) { - setErrorResponseGetPathAttributeType(&o.Path, v) -} - -// GetStatus returns the Status field value -func (o *ErrorResponse) GetStatus() (ret ErrorResponseGetStatusRetType) { - ret, _ = o.GetStatusOk() - return ret -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *ErrorResponse) GetStatusOk() (ret ErrorResponseGetStatusRetType, ok bool) { - return getErrorResponseGetStatusAttributeTypeOk(o.Status) -} - -// SetStatus sets field value -func (o *ErrorResponse) SetStatus(v ErrorResponseGetStatusRetType) { - setErrorResponseGetStatusAttributeType(&o.Status, v) -} - -// GetTimeStamp returns the TimeStamp field value -func (o *ErrorResponse) GetTimeStamp() (ret ErrorResponseGetTimeStampRetType) { - ret, _ = o.GetTimeStampOk() - return ret -} - -// GetTimeStampOk returns a tuple with the TimeStamp field value -// and a boolean to check if the value has been set. -func (o *ErrorResponse) GetTimeStampOk() (ret ErrorResponseGetTimeStampRetType, ok bool) { - return getErrorResponseGetTimeStampAttributeTypeOk(o.TimeStamp) -} - -// SetTimeStamp sets field value -func (o *ErrorResponse) SetTimeStamp(v ErrorResponseGetTimeStampRetType) { - setErrorResponseGetTimeStampAttributeType(&o.TimeStamp, v) -} - -func (o ErrorResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getErrorResponseGetErrorAttributeTypeOk(o.Error); ok { - toSerialize["Error"] = val - } - if val, ok := getErrorResponseGetMessageAttributeTypeOk(o.Message); ok { - toSerialize["Message"] = val - } - if val, ok := getErrorResponseGetPathAttributeTypeOk(o.Path); ok { - toSerialize["Path"] = val - } - if val, ok := getErrorResponseGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getErrorResponseGetTimeStampAttributeTypeOk(o.TimeStamp); ok { - toSerialize["TimeStamp"] = val - } - return toSerialize, nil -} - -type NullableErrorResponse struct { - value *ErrorResponse - isSet bool -} - -func (v NullableErrorResponse) Get() *ErrorResponse { - return v.value -} - -func (v *NullableErrorResponse) Set(val *ErrorResponse) { - v.value = val - v.isSet = true -} - -func (v NullableErrorResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableErrorResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableErrorResponse(val *ErrorResponse) *NullableErrorResponse { - return &NullableErrorResponse{value: val, isSet: true} -} - -func (v NullableErrorResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableErrorResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_error_response_test.go b/services/stackitmarketplace/model_error_response_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_error_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_free_trial.go b/services/stackitmarketplace/model_free_trial.go deleted file mode 100644 index cd269368b..000000000 --- a/services/stackitmarketplace/model_free_trial.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the FreeTrial type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FreeTrial{} - -/* - types and functions for value -*/ - -// isInteger -type FreeTrialGetValueAttributeType = *int64 -type FreeTrialGetValueArgType = int64 -type FreeTrialGetValueRetType = int64 - -func getFreeTrialGetValueAttributeTypeOk(arg FreeTrialGetValueAttributeType) (ret FreeTrialGetValueRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setFreeTrialGetValueAttributeType(arg *FreeTrialGetValueAttributeType, val FreeTrialGetValueRetType) { - *arg = &val -} - -// FreeTrial The amount of days of free trial highlighted in the product card. -type FreeTrial struct { - Value FreeTrialGetValueAttributeType `json:"value,omitempty"` -} - -// NewFreeTrial instantiates a new FreeTrial 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 NewFreeTrial() *FreeTrial { - this := FreeTrial{} - return &this -} - -// NewFreeTrialWithDefaults instantiates a new FreeTrial 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 NewFreeTrialWithDefaults() *FreeTrial { - this := FreeTrial{} - return &this -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *FreeTrial) GetValue() (res FreeTrialGetValueRetType) { - res, _ = o.GetValueOk() - return -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FreeTrial) GetValueOk() (ret FreeTrialGetValueRetType, ok bool) { - return getFreeTrialGetValueAttributeTypeOk(o.Value) -} - -// HasValue returns a boolean if a field has been set. -func (o *FreeTrial) HasValue() bool { - _, ok := o.GetValueOk() - return ok -} - -// SetValue gets a reference to the given int64 and assigns it to the Value field. -func (o *FreeTrial) SetValue(v FreeTrialGetValueRetType) { - setFreeTrialGetValueAttributeType(&o.Value, v) -} - -func (o FreeTrial) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getFreeTrialGetValueAttributeTypeOk(o.Value); ok { - toSerialize["Value"] = val - } - return toSerialize, nil -} - -type NullableFreeTrial struct { - value *FreeTrial - isSet bool -} - -func (v NullableFreeTrial) Get() *FreeTrial { - return v.value -} - -func (v *NullableFreeTrial) Set(val *FreeTrial) { - v.value = val - v.isSet = true -} - -func (v NullableFreeTrial) IsSet() bool { - return v.isSet -} - -func (v *NullableFreeTrial) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFreeTrial(val *FreeTrial) *NullableFreeTrial { - return &NullableFreeTrial{value: val, isSet: true} -} - -func (v NullableFreeTrial) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFreeTrial) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_free_trial_test.go b/services/stackitmarketplace/model_free_trial_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_free_trial_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_inquiries_create_inquiry_payload.go b/services/stackitmarketplace/model_inquiries_create_inquiry_payload.go deleted file mode 100644 index 6fb462cb2..000000000 --- a/services/stackitmarketplace/model_inquiries_create_inquiry_payload.go +++ /dev/null @@ -1,228 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" - "fmt" -) - -// InquiriesCreateInquiryPayload - struct for InquiriesCreateInquiryPayload -type InquiriesCreateInquiryPayload struct { - BecomeVendor *BecomeVendor - ContactSales *ContactSales - RegisterTesting *RegisterTesting - RequestPrivatePlan *RequestPrivatePlan - SuggestProduct *SuggestProduct -} - -// BecomeVendorAsInquiriesCreateInquiryPayload is a convenience function that returns BecomeVendor wrapped in InquiriesCreateInquiryPayload -func BecomeVendorAsInquiriesCreateInquiryPayload(v *BecomeVendor) InquiriesCreateInquiryPayload { - return InquiriesCreateInquiryPayload{ - BecomeVendor: v, - } -} - -// ContactSalesAsInquiriesCreateInquiryPayload is a convenience function that returns ContactSales wrapped in InquiriesCreateInquiryPayload -func ContactSalesAsInquiriesCreateInquiryPayload(v *ContactSales) InquiriesCreateInquiryPayload { - return InquiriesCreateInquiryPayload{ - ContactSales: v, - } -} - -// RegisterTestingAsInquiriesCreateInquiryPayload is a convenience function that returns RegisterTesting wrapped in InquiriesCreateInquiryPayload -func RegisterTestingAsInquiriesCreateInquiryPayload(v *RegisterTesting) InquiriesCreateInquiryPayload { - return InquiriesCreateInquiryPayload{ - RegisterTesting: v, - } -} - -// 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{ - SuggestProduct: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *InquiriesCreateInquiryPayload) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // Workaround until upstream issue is fixed: - // https://github.com/OpenAPITools/openapi-generator/issues/21751 - // Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-226 - // try to unmarshal data into SuggestProduct - dstInquiriesCreateInquiryPayload1 := &InquiriesCreateInquiryPayload{} - err = json.Unmarshal(data, &dstInquiriesCreateInquiryPayload1.SuggestProduct) - if err == nil { - jsonSuggestProduct, _ := json.Marshal(&dstInquiriesCreateInquiryPayload1.SuggestProduct) - if string(jsonSuggestProduct) != "{}" { // empty struct - dst.SuggestProduct = dstInquiriesCreateInquiryPayload1.SuggestProduct - match++ - } - } - - // try to unmarshal data into ContactSales - dstInquiriesCreateInquiryPayload2 := &InquiriesCreateInquiryPayload{} - err = json.Unmarshal(data, &dstInquiriesCreateInquiryPayload2.ContactSales) - if err == nil { - jsonContactSales, _ := json.Marshal(&dstInquiriesCreateInquiryPayload2.ContactSales) - if string(jsonContactSales) != "{}" { // empty struct - dst.ContactSales = dstInquiriesCreateInquiryPayload2.ContactSales - match++ - } - } - - // try to unmarshal data into BecomeVendor - dstInquiriesCreateInquiryPayload3 := &InquiriesCreateInquiryPayload{} - err = json.Unmarshal(data, &dstInquiriesCreateInquiryPayload3.BecomeVendor) - if err == nil { - jsonBecomeVendor, _ := json.Marshal(&dstInquiriesCreateInquiryPayload3.BecomeVendor) - if string(jsonBecomeVendor) != "{}" { // empty struct - dst.BecomeVendor = dstInquiriesCreateInquiryPayload3.BecomeVendor - match++ - } - } - - // try to unmarshal data into RequestPrivatePlan - dstInquiriesCreateInquiryPayload4 := &InquiriesCreateInquiryPayload{} - err = json.Unmarshal(data, &dstInquiriesCreateInquiryPayload4.RequestPrivatePlan) - if err == nil { - 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 = dstInquiriesCreateInquiryPayload5.RegisterTesting - match++ - } - } - - if match > 1 { // more than 1 match - // reset to nil - 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)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(InquiriesCreateInquiryPayload)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src InquiriesCreateInquiryPayload) MarshalJSON() ([]byte, error) { - if src.BecomeVendor != nil { - return json.Marshal(&src.BecomeVendor) - } - - if src.ContactSales != nil { - return json.Marshal(&src.ContactSales) - } - - if src.RegisterTesting != nil { - return json.Marshal(&src.RegisterTesting) - } - - if src.RequestPrivatePlan != nil { - return json.Marshal(&src.RequestPrivatePlan) - } - - if src.SuggestProduct != nil { - return json.Marshal(&src.SuggestProduct) - } - - return []byte("{}"), nil // no data in oneOf schemas => empty JSON object -} - -// Get the actual instance -func (obj *InquiriesCreateInquiryPayload) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.BecomeVendor != nil { - return obj.BecomeVendor - } - - if obj.ContactSales != nil { - return obj.ContactSales - } - - if obj.RegisterTesting != nil { - return obj.RegisterTesting - } - - if obj.RequestPrivatePlan != nil { - return obj.RequestPrivatePlan - } - - if obj.SuggestProduct != nil { - return obj.SuggestProduct - } - - // all schemas are nil - return nil -} - -type NullableInquiriesCreateInquiryPayload struct { - value *InquiriesCreateInquiryPayload - isSet bool -} - -func (v NullableInquiriesCreateInquiryPayload) Get() *InquiriesCreateInquiryPayload { - return v.value -} - -func (v *NullableInquiriesCreateInquiryPayload) Set(val *InquiriesCreateInquiryPayload) { - v.value = val - v.isSet = true -} - -func (v NullableInquiriesCreateInquiryPayload) IsSet() bool { - return v.isSet -} - -func (v *NullableInquiriesCreateInquiryPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInquiriesCreateInquiryPayload(val *InquiriesCreateInquiryPayload) *NullableInquiriesCreateInquiryPayload { - return &NullableInquiriesCreateInquiryPayload{value: val, isSet: true} -} - -func (v NullableInquiriesCreateInquiryPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInquiriesCreateInquiryPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_inquiries_create_inquiry_payload_test.go b/services/stackitmarketplace/model_inquiries_create_inquiry_payload_test.go deleted file mode 100644 index 7d2cddb4d..000000000 --- a/services/stackitmarketplace/model_inquiries_create_inquiry_payload_test.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "testing" -) - -// isOneOf - -func TestInquiriesCreateInquiryPayload_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{} - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := &InquiriesCreateInquiryPayload{} - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - marshalJson, err := v.MarshalJSON() - if err != nil { - t.Fatalf("failed marshalling InquiriesCreateInquiryPayload: %v", err) - } - if string(marshalJson) != string(tt.args.src) { - t.Fatalf("wanted %s, get %s", tt.args.src, marshalJson) - } - }) - } -} diff --git a/services/stackitmarketplace/model_inquiry_become_vendor.go b/services/stackitmarketplace/model_inquiry_become_vendor.go deleted file mode 100644 index 0852cbdf3..000000000 --- a/services/stackitmarketplace/model_inquiry_become_vendor.go +++ /dev/null @@ -1,172 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the InquiryBecomeVendor type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InquiryBecomeVendor{} - -/* - types and functions for contactEmail -*/ - -// isNotNullableString -type InquiryBecomeVendorGetContactEmailAttributeType = *string - -func getInquiryBecomeVendorGetContactEmailAttributeTypeOk(arg InquiryBecomeVendorGetContactEmailAttributeType) (ret InquiryBecomeVendorGetContactEmailRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setInquiryBecomeVendorGetContactEmailAttributeType(arg *InquiryBecomeVendorGetContactEmailAttributeType, val InquiryBecomeVendorGetContactEmailRetType) { - *arg = &val -} - -type InquiryBecomeVendorGetContactEmailArgType = string -type InquiryBecomeVendorGetContactEmailRetType = string - -/* - types and functions for message -*/ - -// isNotNullableString -type InquiryBecomeVendorGetMessageAttributeType = *string - -func getInquiryBecomeVendorGetMessageAttributeTypeOk(arg InquiryBecomeVendorGetMessageAttributeType) (ret InquiryBecomeVendorGetMessageRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setInquiryBecomeVendorGetMessageAttributeType(arg *InquiryBecomeVendorGetMessageAttributeType, val InquiryBecomeVendorGetMessageRetType) { - *arg = &val -} - -type InquiryBecomeVendorGetMessageArgType = string -type InquiryBecomeVendorGetMessageRetType = string - -// InquiryBecomeVendor Become a vendor. -type InquiryBecomeVendor struct { - // A e-mail address. - // REQUIRED - ContactEmail InquiryBecomeVendorGetContactEmailAttributeType `json:"contactEmail" required:"true"` - // A custom message. - // REQUIRED - Message InquiryBecomeVendorGetMessageAttributeType `json:"message" required:"true"` -} - -type _InquiryBecomeVendor InquiryBecomeVendor - -// NewInquiryBecomeVendor instantiates a new InquiryBecomeVendor object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInquiryBecomeVendor(contactEmail InquiryBecomeVendorGetContactEmailArgType, message InquiryBecomeVendorGetMessageArgType) *InquiryBecomeVendor { - this := InquiryBecomeVendor{} - setInquiryBecomeVendorGetContactEmailAttributeType(&this.ContactEmail, contactEmail) - setInquiryBecomeVendorGetMessageAttributeType(&this.Message, message) - return &this -} - -// NewInquiryBecomeVendorWithDefaults instantiates a new InquiryBecomeVendor object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInquiryBecomeVendorWithDefaults() *InquiryBecomeVendor { - this := InquiryBecomeVendor{} - return &this -} - -// GetContactEmail returns the ContactEmail field value -func (o *InquiryBecomeVendor) GetContactEmail() (ret InquiryBecomeVendorGetContactEmailRetType) { - ret, _ = o.GetContactEmailOk() - return ret -} - -// GetContactEmailOk returns a tuple with the ContactEmail field value -// and a boolean to check if the value has been set. -func (o *InquiryBecomeVendor) GetContactEmailOk() (ret InquiryBecomeVendorGetContactEmailRetType, ok bool) { - return getInquiryBecomeVendorGetContactEmailAttributeTypeOk(o.ContactEmail) -} - -// SetContactEmail sets field value -func (o *InquiryBecomeVendor) SetContactEmail(v InquiryBecomeVendorGetContactEmailRetType) { - setInquiryBecomeVendorGetContactEmailAttributeType(&o.ContactEmail, v) -} - -// GetMessage returns the Message field value -func (o *InquiryBecomeVendor) GetMessage() (ret InquiryBecomeVendorGetMessageRetType) { - ret, _ = o.GetMessageOk() - return ret -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *InquiryBecomeVendor) GetMessageOk() (ret InquiryBecomeVendorGetMessageRetType, ok bool) { - return getInquiryBecomeVendorGetMessageAttributeTypeOk(o.Message) -} - -// SetMessage sets field value -func (o *InquiryBecomeVendor) SetMessage(v InquiryBecomeVendorGetMessageRetType) { - setInquiryBecomeVendorGetMessageAttributeType(&o.Message, v) -} - -func (o InquiryBecomeVendor) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getInquiryBecomeVendorGetContactEmailAttributeTypeOk(o.ContactEmail); ok { - toSerialize["ContactEmail"] = val - } - if val, ok := getInquiryBecomeVendorGetMessageAttributeTypeOk(o.Message); ok { - toSerialize["Message"] = val - } - return toSerialize, nil -} - -type NullableInquiryBecomeVendor struct { - value *InquiryBecomeVendor - isSet bool -} - -func (v NullableInquiryBecomeVendor) Get() *InquiryBecomeVendor { - return v.value -} - -func (v *NullableInquiryBecomeVendor) Set(val *InquiryBecomeVendor) { - v.value = val - v.isSet = true -} - -func (v NullableInquiryBecomeVendor) IsSet() bool { - return v.isSet -} - -func (v *NullableInquiryBecomeVendor) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInquiryBecomeVendor(val *InquiryBecomeVendor) *NullableInquiryBecomeVendor { - return &NullableInquiryBecomeVendor{value: val, isSet: true} -} - -func (v NullableInquiryBecomeVendor) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInquiryBecomeVendor) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_inquiry_become_vendor_test.go b/services/stackitmarketplace/model_inquiry_become_vendor_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_inquiry_become_vendor_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_inquiry_contact_sales.go b/services/stackitmarketplace/model_inquiry_contact_sales.go deleted file mode 100644 index 8a3d8c9aa..000000000 --- a/services/stackitmarketplace/model_inquiry_contact_sales.go +++ /dev/null @@ -1,307 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the InquiryContactSales type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InquiryContactSales{} - -/* - types and functions for companyName -*/ - -// isNotNullableString -type InquiryContactSalesGetCompanyNameAttributeType = *string - -func getInquiryContactSalesGetCompanyNameAttributeTypeOk(arg InquiryContactSalesGetCompanyNameAttributeType) (ret InquiryContactSalesGetCompanyNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setInquiryContactSalesGetCompanyNameAttributeType(arg *InquiryContactSalesGetCompanyNameAttributeType, val InquiryContactSalesGetCompanyNameRetType) { - *arg = &val -} - -type InquiryContactSalesGetCompanyNameArgType = string -type InquiryContactSalesGetCompanyNameRetType = string - -/* - types and functions for contactEmail -*/ - -// isNotNullableString -type InquiryContactSalesGetContactEmailAttributeType = *string - -func getInquiryContactSalesGetContactEmailAttributeTypeOk(arg InquiryContactSalesGetContactEmailAttributeType) (ret InquiryContactSalesGetContactEmailRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setInquiryContactSalesGetContactEmailAttributeType(arg *InquiryContactSalesGetContactEmailAttributeType, val InquiryContactSalesGetContactEmailRetType) { - *arg = &val -} - -type InquiryContactSalesGetContactEmailArgType = string -type InquiryContactSalesGetContactEmailRetType = string - -/* - types and functions for fullName -*/ - -// isNotNullableString -type InquiryContactSalesGetFullNameAttributeType = *string - -func getInquiryContactSalesGetFullNameAttributeTypeOk(arg InquiryContactSalesGetFullNameAttributeType) (ret InquiryContactSalesGetFullNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setInquiryContactSalesGetFullNameAttributeType(arg *InquiryContactSalesGetFullNameAttributeType, val InquiryContactSalesGetFullNameRetType) { - *arg = &val -} - -type InquiryContactSalesGetFullNameArgType = string -type InquiryContactSalesGetFullNameRetType = string - -/* - types and functions for message -*/ - -// isNotNullableString -type InquiryContactSalesGetMessageAttributeType = *string - -func getInquiryContactSalesGetMessageAttributeTypeOk(arg InquiryContactSalesGetMessageAttributeType) (ret InquiryContactSalesGetMessageRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setInquiryContactSalesGetMessageAttributeType(arg *InquiryContactSalesGetMessageAttributeType, val InquiryContactSalesGetMessageRetType) { - *arg = &val -} - -type InquiryContactSalesGetMessageArgType = string -type InquiryContactSalesGetMessageRetType = string - -/* - types and functions for productId -*/ - -// isNotNullableString -type InquiryContactSalesGetProductIdAttributeType = *string - -func getInquiryContactSalesGetProductIdAttributeTypeOk(arg InquiryContactSalesGetProductIdAttributeType) (ret InquiryContactSalesGetProductIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setInquiryContactSalesGetProductIdAttributeType(arg *InquiryContactSalesGetProductIdAttributeType, val InquiryContactSalesGetProductIdRetType) { - *arg = &val -} - -type InquiryContactSalesGetProductIdArgType = string -type InquiryContactSalesGetProductIdRetType = string - -// InquiryContactSales Contact sales. -type InquiryContactSales struct { - // The product's vendor name. - // REQUIRED - CompanyName InquiryContactSalesGetCompanyNameAttributeType `json:"companyName" required:"true"` - // A e-mail address. - // REQUIRED - ContactEmail InquiryContactSalesGetContactEmailAttributeType `json:"contactEmail" required:"true"` - // The full name of the contact person. - // REQUIRED - FullName InquiryContactSalesGetFullNameAttributeType `json:"fullName" required:"true"` - // A custom message. - // REQUIRED - Message InquiryContactSalesGetMessageAttributeType `json:"message" required:"true"` - // The user-readable product ID. - // REQUIRED - ProductId InquiryContactSalesGetProductIdAttributeType `json:"productId" required:"true"` -} - -type _InquiryContactSales InquiryContactSales - -// NewInquiryContactSales instantiates a new InquiryContactSales object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInquiryContactSales(companyName InquiryContactSalesGetCompanyNameArgType, contactEmail InquiryContactSalesGetContactEmailArgType, fullName InquiryContactSalesGetFullNameArgType, message InquiryContactSalesGetMessageArgType, productId InquiryContactSalesGetProductIdArgType) *InquiryContactSales { - this := InquiryContactSales{} - setInquiryContactSalesGetCompanyNameAttributeType(&this.CompanyName, companyName) - setInquiryContactSalesGetContactEmailAttributeType(&this.ContactEmail, contactEmail) - setInquiryContactSalesGetFullNameAttributeType(&this.FullName, fullName) - setInquiryContactSalesGetMessageAttributeType(&this.Message, message) - setInquiryContactSalesGetProductIdAttributeType(&this.ProductId, productId) - return &this -} - -// NewInquiryContactSalesWithDefaults instantiates a new InquiryContactSales object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInquiryContactSalesWithDefaults() *InquiryContactSales { - this := InquiryContactSales{} - return &this -} - -// GetCompanyName returns the CompanyName field value -func (o *InquiryContactSales) GetCompanyName() (ret InquiryContactSalesGetCompanyNameRetType) { - ret, _ = o.GetCompanyNameOk() - return ret -} - -// GetCompanyNameOk returns a tuple with the CompanyName field value -// and a boolean to check if the value has been set. -func (o *InquiryContactSales) GetCompanyNameOk() (ret InquiryContactSalesGetCompanyNameRetType, ok bool) { - return getInquiryContactSalesGetCompanyNameAttributeTypeOk(o.CompanyName) -} - -// SetCompanyName sets field value -func (o *InquiryContactSales) SetCompanyName(v InquiryContactSalesGetCompanyNameRetType) { - setInquiryContactSalesGetCompanyNameAttributeType(&o.CompanyName, v) -} - -// GetContactEmail returns the ContactEmail field value -func (o *InquiryContactSales) GetContactEmail() (ret InquiryContactSalesGetContactEmailRetType) { - ret, _ = o.GetContactEmailOk() - return ret -} - -// GetContactEmailOk returns a tuple with the ContactEmail field value -// and a boolean to check if the value has been set. -func (o *InquiryContactSales) GetContactEmailOk() (ret InquiryContactSalesGetContactEmailRetType, ok bool) { - return getInquiryContactSalesGetContactEmailAttributeTypeOk(o.ContactEmail) -} - -// SetContactEmail sets field value -func (o *InquiryContactSales) SetContactEmail(v InquiryContactSalesGetContactEmailRetType) { - setInquiryContactSalesGetContactEmailAttributeType(&o.ContactEmail, v) -} - -// GetFullName returns the FullName field value -func (o *InquiryContactSales) GetFullName() (ret InquiryContactSalesGetFullNameRetType) { - ret, _ = o.GetFullNameOk() - return ret -} - -// GetFullNameOk returns a tuple with the FullName field value -// and a boolean to check if the value has been set. -func (o *InquiryContactSales) GetFullNameOk() (ret InquiryContactSalesGetFullNameRetType, ok bool) { - return getInquiryContactSalesGetFullNameAttributeTypeOk(o.FullName) -} - -// SetFullName sets field value -func (o *InquiryContactSales) SetFullName(v InquiryContactSalesGetFullNameRetType) { - setInquiryContactSalesGetFullNameAttributeType(&o.FullName, v) -} - -// GetMessage returns the Message field value -func (o *InquiryContactSales) GetMessage() (ret InquiryContactSalesGetMessageRetType) { - ret, _ = o.GetMessageOk() - return ret -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *InquiryContactSales) GetMessageOk() (ret InquiryContactSalesGetMessageRetType, ok bool) { - return getInquiryContactSalesGetMessageAttributeTypeOk(o.Message) -} - -// SetMessage sets field value -func (o *InquiryContactSales) SetMessage(v InquiryContactSalesGetMessageRetType) { - setInquiryContactSalesGetMessageAttributeType(&o.Message, v) -} - -// GetProductId returns the ProductId field value -func (o *InquiryContactSales) GetProductId() (ret InquiryContactSalesGetProductIdRetType) { - ret, _ = o.GetProductIdOk() - return ret -} - -// GetProductIdOk returns a tuple with the ProductId field value -// and a boolean to check if the value has been set. -func (o *InquiryContactSales) GetProductIdOk() (ret InquiryContactSalesGetProductIdRetType, ok bool) { - return getInquiryContactSalesGetProductIdAttributeTypeOk(o.ProductId) -} - -// SetProductId sets field value -func (o *InquiryContactSales) SetProductId(v InquiryContactSalesGetProductIdRetType) { - setInquiryContactSalesGetProductIdAttributeType(&o.ProductId, v) -} - -func (o InquiryContactSales) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getInquiryContactSalesGetCompanyNameAttributeTypeOk(o.CompanyName); ok { - toSerialize["CompanyName"] = val - } - if val, ok := getInquiryContactSalesGetContactEmailAttributeTypeOk(o.ContactEmail); ok { - toSerialize["ContactEmail"] = val - } - if val, ok := getInquiryContactSalesGetFullNameAttributeTypeOk(o.FullName); ok { - toSerialize["FullName"] = val - } - if val, ok := getInquiryContactSalesGetMessageAttributeTypeOk(o.Message); ok { - toSerialize["Message"] = val - } - if val, ok := getInquiryContactSalesGetProductIdAttributeTypeOk(o.ProductId); ok { - toSerialize["ProductId"] = val - } - return toSerialize, nil -} - -type NullableInquiryContactSales struct { - value *InquiryContactSales - isSet bool -} - -func (v NullableInquiryContactSales) Get() *InquiryContactSales { - return v.value -} - -func (v *NullableInquiryContactSales) Set(val *InquiryContactSales) { - v.value = val - v.isSet = true -} - -func (v NullableInquiryContactSales) IsSet() bool { - return v.isSet -} - -func (v *NullableInquiryContactSales) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInquiryContactSales(val *InquiryContactSales) *NullableInquiryContactSales { - return &NullableInquiryContactSales{value: val, isSet: true} -} - -func (v NullableInquiryContactSales) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInquiryContactSales) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_inquiry_contact_sales_test.go b/services/stackitmarketplace/model_inquiry_contact_sales_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_inquiry_contact_sales_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_inquiry_form_type.go b/services/stackitmarketplace/model_inquiry_form_type.go deleted file mode 100644 index 53dcf09e6..000000000 --- a/services/stackitmarketplace/model_inquiry_form_type.go +++ /dev/null @@ -1,121 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" - "fmt" -) - -// InquiryFormType The form type. -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_REQUEST_PRIVATE_PLAN InquiryFormType = "REQUEST_PRIVATE_PLAN" -) - -// All allowed values of InquiryFormType enum -var AllowedInquiryFormTypeEnumValues = []InquiryFormType{ - "SUGGEST_PRODUCT", - "CONTACT_SALES", - "BECOME_VENDOR", - "REGISTER_TESTING", - "REQUEST_PRIVATE_PLAN", -} - -func (v *InquiryFormType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue string - if value == zeroValue { - return nil - } - enumTypeValue := InquiryFormType(value) - for _, existing := range AllowedInquiryFormTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid InquiryFormType", value) -} - -// NewInquiryFormTypeFromValue returns a pointer to a valid InquiryFormType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewInquiryFormTypeFromValue(v string) (*InquiryFormType, error) { - ev := InquiryFormType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for InquiryFormType: valid values are %v", v, AllowedInquiryFormTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v InquiryFormType) IsValid() bool { - for _, existing := range AllowedInquiryFormTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to inquiryFormType value -func (v InquiryFormType) Ptr() *InquiryFormType { - return &v -} - -type NullableInquiryFormType struct { - value *InquiryFormType - isSet bool -} - -func (v NullableInquiryFormType) Get() *InquiryFormType { - return v.value -} - -func (v *NullableInquiryFormType) Set(val *InquiryFormType) { - v.value = val - v.isSet = true -} - -func (v NullableInquiryFormType) IsSet() bool { - return v.isSet -} - -func (v *NullableInquiryFormType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInquiryFormType(val *InquiryFormType) *NullableInquiryFormType { - return &NullableInquiryFormType{value: val, isSet: true} -} - -func (v NullableInquiryFormType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInquiryFormType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_inquiry_form_type_test.go b/services/stackitmarketplace/model_inquiry_form_type_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_inquiry_form_type_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_inquiry_register_testing.go b/services/stackitmarketplace/model_inquiry_register_testing.go deleted file mode 100644 index ee0312189..000000000 --- a/services/stackitmarketplace/model_inquiry_register_testing.go +++ /dev/null @@ -1,217 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the InquiryRegisterTesting type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InquiryRegisterTesting{} - -/* - types and functions for contactEmail -*/ - -// isNotNullableString -type InquiryRegisterTestingGetContactEmailAttributeType = *string - -func getInquiryRegisterTestingGetContactEmailAttributeTypeOk(arg InquiryRegisterTestingGetContactEmailAttributeType) (ret InquiryRegisterTestingGetContactEmailRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setInquiryRegisterTestingGetContactEmailAttributeType(arg *InquiryRegisterTestingGetContactEmailAttributeType, val InquiryRegisterTestingGetContactEmailRetType) { - *arg = &val -} - -type InquiryRegisterTestingGetContactEmailArgType = string -type InquiryRegisterTestingGetContactEmailRetType = string - -/* - types and functions for fullName -*/ - -// isNotNullableString -type InquiryRegisterTestingGetFullNameAttributeType = *string - -func getInquiryRegisterTestingGetFullNameAttributeTypeOk(arg InquiryRegisterTestingGetFullNameAttributeType) (ret InquiryRegisterTestingGetFullNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setInquiryRegisterTestingGetFullNameAttributeType(arg *InquiryRegisterTestingGetFullNameAttributeType, val InquiryRegisterTestingGetFullNameRetType) { - *arg = &val -} - -type InquiryRegisterTestingGetFullNameArgType = string -type InquiryRegisterTestingGetFullNameRetType = string - -/* - types and functions for message -*/ - -// isNotNullableString -type InquiryRegisterTestingGetMessageAttributeType = *string - -func getInquiryRegisterTestingGetMessageAttributeTypeOk(arg InquiryRegisterTestingGetMessageAttributeType) (ret InquiryRegisterTestingGetMessageRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setInquiryRegisterTestingGetMessageAttributeType(arg *InquiryRegisterTestingGetMessageAttributeType, val InquiryRegisterTestingGetMessageRetType) { - *arg = &val -} - -type InquiryRegisterTestingGetMessageArgType = string -type InquiryRegisterTestingGetMessageRetType = string - -// InquiryRegisterTesting Register for testing. -type InquiryRegisterTesting struct { - // A e-mail address. - // REQUIRED - ContactEmail InquiryRegisterTestingGetContactEmailAttributeType `json:"contactEmail" required:"true"` - // The full name of the contact person. - // REQUIRED - FullName InquiryRegisterTestingGetFullNameAttributeType `json:"fullName" required:"true"` - // A custom message. - // REQUIRED - Message InquiryRegisterTestingGetMessageAttributeType `json:"message" required:"true"` -} - -type _InquiryRegisterTesting InquiryRegisterTesting - -// NewInquiryRegisterTesting instantiates a new InquiryRegisterTesting object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInquiryRegisterTesting(contactEmail InquiryRegisterTestingGetContactEmailArgType, fullName InquiryRegisterTestingGetFullNameArgType, message InquiryRegisterTestingGetMessageArgType) *InquiryRegisterTesting { - this := InquiryRegisterTesting{} - setInquiryRegisterTestingGetContactEmailAttributeType(&this.ContactEmail, contactEmail) - setInquiryRegisterTestingGetFullNameAttributeType(&this.FullName, fullName) - setInquiryRegisterTestingGetMessageAttributeType(&this.Message, message) - return &this -} - -// NewInquiryRegisterTestingWithDefaults instantiates a new InquiryRegisterTesting object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInquiryRegisterTestingWithDefaults() *InquiryRegisterTesting { - this := InquiryRegisterTesting{} - return &this -} - -// GetContactEmail returns the ContactEmail field value -func (o *InquiryRegisterTesting) GetContactEmail() (ret InquiryRegisterTestingGetContactEmailRetType) { - ret, _ = o.GetContactEmailOk() - return ret -} - -// GetContactEmailOk returns a tuple with the ContactEmail field value -// and a boolean to check if the value has been set. -func (o *InquiryRegisterTesting) GetContactEmailOk() (ret InquiryRegisterTestingGetContactEmailRetType, ok bool) { - return getInquiryRegisterTestingGetContactEmailAttributeTypeOk(o.ContactEmail) -} - -// SetContactEmail sets field value -func (o *InquiryRegisterTesting) SetContactEmail(v InquiryRegisterTestingGetContactEmailRetType) { - setInquiryRegisterTestingGetContactEmailAttributeType(&o.ContactEmail, v) -} - -// GetFullName returns the FullName field value -func (o *InquiryRegisterTesting) GetFullName() (ret InquiryRegisterTestingGetFullNameRetType) { - ret, _ = o.GetFullNameOk() - return ret -} - -// GetFullNameOk returns a tuple with the FullName field value -// and a boolean to check if the value has been set. -func (o *InquiryRegisterTesting) GetFullNameOk() (ret InquiryRegisterTestingGetFullNameRetType, ok bool) { - return getInquiryRegisterTestingGetFullNameAttributeTypeOk(o.FullName) -} - -// SetFullName sets field value -func (o *InquiryRegisterTesting) SetFullName(v InquiryRegisterTestingGetFullNameRetType) { - setInquiryRegisterTestingGetFullNameAttributeType(&o.FullName, v) -} - -// GetMessage returns the Message field value -func (o *InquiryRegisterTesting) GetMessage() (ret InquiryRegisterTestingGetMessageRetType) { - ret, _ = o.GetMessageOk() - return ret -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *InquiryRegisterTesting) GetMessageOk() (ret InquiryRegisterTestingGetMessageRetType, ok bool) { - return getInquiryRegisterTestingGetMessageAttributeTypeOk(o.Message) -} - -// SetMessage sets field value -func (o *InquiryRegisterTesting) SetMessage(v InquiryRegisterTestingGetMessageRetType) { - setInquiryRegisterTestingGetMessageAttributeType(&o.Message, v) -} - -func (o InquiryRegisterTesting) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getInquiryRegisterTestingGetContactEmailAttributeTypeOk(o.ContactEmail); ok { - toSerialize["ContactEmail"] = val - } - if val, ok := getInquiryRegisterTestingGetFullNameAttributeTypeOk(o.FullName); ok { - toSerialize["FullName"] = val - } - if val, ok := getInquiryRegisterTestingGetMessageAttributeTypeOk(o.Message); ok { - toSerialize["Message"] = val - } - return toSerialize, nil -} - -type NullableInquiryRegisterTesting struct { - value *InquiryRegisterTesting - isSet bool -} - -func (v NullableInquiryRegisterTesting) Get() *InquiryRegisterTesting { - return v.value -} - -func (v *NullableInquiryRegisterTesting) Set(val *InquiryRegisterTesting) { - v.value = val - v.isSet = true -} - -func (v NullableInquiryRegisterTesting) IsSet() bool { - return v.isSet -} - -func (v *NullableInquiryRegisterTesting) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInquiryRegisterTesting(val *InquiryRegisterTesting) *NullableInquiryRegisterTesting { - return &NullableInquiryRegisterTesting{value: val, isSet: true} -} - -func (v NullableInquiryRegisterTesting) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInquiryRegisterTesting) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_inquiry_register_testing_test.go b/services/stackitmarketplace/model_inquiry_register_testing_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_inquiry_register_testing_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_inquiry_request_private_plan.go b/services/stackitmarketplace/model_inquiry_request_private_plan.go deleted file mode 100644 index 9008f4a90..000000000 --- a/services/stackitmarketplace/model_inquiry_request_private_plan.go +++ /dev/null @@ -1,307 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the 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 deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_inquiry_request_private_plan_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_inquiry_suggest_product.go b/services/stackitmarketplace/model_inquiry_suggest_product.go deleted file mode 100644 index 7a65690f8..000000000 --- a/services/stackitmarketplace/model_inquiry_suggest_product.go +++ /dev/null @@ -1,266 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the InquirySuggestProduct type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InquirySuggestProduct{} - -/* - types and functions for companyName -*/ - -// isNotNullableString -type InquirySuggestProductGetCompanyNameAttributeType = *string - -func getInquirySuggestProductGetCompanyNameAttributeTypeOk(arg InquirySuggestProductGetCompanyNameAttributeType) (ret InquirySuggestProductGetCompanyNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setInquirySuggestProductGetCompanyNameAttributeType(arg *InquirySuggestProductGetCompanyNameAttributeType, val InquirySuggestProductGetCompanyNameRetType) { - *arg = &val -} - -type InquirySuggestProductGetCompanyNameArgType = string -type InquirySuggestProductGetCompanyNameRetType = string - -/* - types and functions for message -*/ - -// isNotNullableString -type InquirySuggestProductGetMessageAttributeType = *string - -func getInquirySuggestProductGetMessageAttributeTypeOk(arg InquirySuggestProductGetMessageAttributeType) (ret InquirySuggestProductGetMessageRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setInquirySuggestProductGetMessageAttributeType(arg *InquirySuggestProductGetMessageAttributeType, val InquirySuggestProductGetMessageRetType) { - *arg = &val -} - -type InquirySuggestProductGetMessageArgType = string -type InquirySuggestProductGetMessageRetType = string - -/* - types and functions for name -*/ - -// isNotNullableString -type InquirySuggestProductGetNameAttributeType = *string - -func getInquirySuggestProductGetNameAttributeTypeOk(arg InquirySuggestProductGetNameAttributeType) (ret InquirySuggestProductGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setInquirySuggestProductGetNameAttributeType(arg *InquirySuggestProductGetNameAttributeType, val InquirySuggestProductGetNameRetType) { - *arg = &val -} - -type InquirySuggestProductGetNameArgType = string -type InquirySuggestProductGetNameRetType = string - -/* - types and functions for url -*/ - -// isNotNullableString -type InquirySuggestProductGetUrlAttributeType = *string - -func getInquirySuggestProductGetUrlAttributeTypeOk(arg InquirySuggestProductGetUrlAttributeType) (ret InquirySuggestProductGetUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setInquirySuggestProductGetUrlAttributeType(arg *InquirySuggestProductGetUrlAttributeType, val InquirySuggestProductGetUrlRetType) { - *arg = &val -} - -type InquirySuggestProductGetUrlArgType = string -type InquirySuggestProductGetUrlRetType = string - -// InquirySuggestProduct Suggest a product. -type InquirySuggestProduct struct { - // The product's vendor name. - // REQUIRED - CompanyName InquirySuggestProductGetCompanyNameAttributeType `json:"companyName" required:"true"` - // A custom message. - Message InquirySuggestProductGetMessageAttributeType `json:"message,omitempty"` - // The name of the product. - // REQUIRED - Name InquirySuggestProductGetNameAttributeType `json:"name" required:"true"` - // Uniform Resource Locator. - // REQUIRED - Url InquirySuggestProductGetUrlAttributeType `json:"url" required:"true"` -} - -type _InquirySuggestProduct InquirySuggestProduct - -// NewInquirySuggestProduct instantiates a new InquirySuggestProduct object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInquirySuggestProduct(companyName InquirySuggestProductGetCompanyNameArgType, name InquirySuggestProductGetNameArgType, url InquirySuggestProductGetUrlArgType) *InquirySuggestProduct { - this := InquirySuggestProduct{} - setInquirySuggestProductGetCompanyNameAttributeType(&this.CompanyName, companyName) - setInquirySuggestProductGetNameAttributeType(&this.Name, name) - setInquirySuggestProductGetUrlAttributeType(&this.Url, url) - return &this -} - -// NewInquirySuggestProductWithDefaults instantiates a new InquirySuggestProduct object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInquirySuggestProductWithDefaults() *InquirySuggestProduct { - this := InquirySuggestProduct{} - return &this -} - -// GetCompanyName returns the CompanyName field value -func (o *InquirySuggestProduct) GetCompanyName() (ret InquirySuggestProductGetCompanyNameRetType) { - ret, _ = o.GetCompanyNameOk() - return ret -} - -// GetCompanyNameOk returns a tuple with the CompanyName field value -// and a boolean to check if the value has been set. -func (o *InquirySuggestProduct) GetCompanyNameOk() (ret InquirySuggestProductGetCompanyNameRetType, ok bool) { - return getInquirySuggestProductGetCompanyNameAttributeTypeOk(o.CompanyName) -} - -// SetCompanyName sets field value -func (o *InquirySuggestProduct) SetCompanyName(v InquirySuggestProductGetCompanyNameRetType) { - setInquirySuggestProductGetCompanyNameAttributeType(&o.CompanyName, v) -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *InquirySuggestProduct) GetMessage() (res InquirySuggestProductGetMessageRetType) { - res, _ = o.GetMessageOk() - return -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InquirySuggestProduct) GetMessageOk() (ret InquirySuggestProductGetMessageRetType, ok bool) { - return getInquirySuggestProductGetMessageAttributeTypeOk(o.Message) -} - -// HasMessage returns a boolean if a field has been set. -func (o *InquirySuggestProduct) HasMessage() bool { - _, ok := o.GetMessageOk() - return ok -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *InquirySuggestProduct) SetMessage(v InquirySuggestProductGetMessageRetType) { - setInquirySuggestProductGetMessageAttributeType(&o.Message, v) -} - -// GetName returns the Name field value -func (o *InquirySuggestProduct) GetName() (ret InquirySuggestProductGetNameRetType) { - ret, _ = o.GetNameOk() - return ret -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *InquirySuggestProduct) GetNameOk() (ret InquirySuggestProductGetNameRetType, ok bool) { - return getInquirySuggestProductGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -func (o *InquirySuggestProduct) SetName(v InquirySuggestProductGetNameRetType) { - setInquirySuggestProductGetNameAttributeType(&o.Name, v) -} - -// GetUrl returns the Url field value -func (o *InquirySuggestProduct) GetUrl() (ret InquirySuggestProductGetUrlRetType) { - ret, _ = o.GetUrlOk() - return ret -} - -// GetUrlOk returns a tuple with the Url field value -// and a boolean to check if the value has been set. -func (o *InquirySuggestProduct) GetUrlOk() (ret InquirySuggestProductGetUrlRetType, ok bool) { - return getInquirySuggestProductGetUrlAttributeTypeOk(o.Url) -} - -// SetUrl sets field value -func (o *InquirySuggestProduct) SetUrl(v InquirySuggestProductGetUrlRetType) { - setInquirySuggestProductGetUrlAttributeType(&o.Url, v) -} - -func (o InquirySuggestProduct) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getInquirySuggestProductGetCompanyNameAttributeTypeOk(o.CompanyName); ok { - toSerialize["CompanyName"] = val - } - if val, ok := getInquirySuggestProductGetMessageAttributeTypeOk(o.Message); ok { - toSerialize["Message"] = val - } - if val, ok := getInquirySuggestProductGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getInquirySuggestProductGetUrlAttributeTypeOk(o.Url); ok { - toSerialize["Url"] = val - } - return toSerialize, nil -} - -type NullableInquirySuggestProduct struct { - value *InquirySuggestProduct - isSet bool -} - -func (v NullableInquirySuggestProduct) Get() *InquirySuggestProduct { - return v.value -} - -func (v *NullableInquirySuggestProduct) Set(val *InquirySuggestProduct) { - v.value = val - v.isSet = true -} - -func (v NullableInquirySuggestProduct) IsSet() bool { - return v.isSet -} - -func (v *NullableInquirySuggestProduct) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInquirySuggestProduct(val *InquirySuggestProduct) *NullableInquirySuggestProduct { - return &NullableInquirySuggestProduct{value: val, isSet: true} -} - -func (v NullableInquirySuggestProduct) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInquirySuggestProduct) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_inquiry_suggest_product_test.go b/services/stackitmarketplace/model_inquiry_suggest_product_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_inquiry_suggest_product_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_list_catalog_products_response.go b/services/stackitmarketplace/model_list_catalog_products_response.go deleted file mode 100644 index e2aaf0751..000000000 --- a/services/stackitmarketplace/model_list_catalog_products_response.go +++ /dev/null @@ -1,264 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the ListCatalogProductsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListCatalogProductsResponse{} - -/* - types and functions for cursor -*/ - -// isNotNullableString -type ListCatalogProductsResponseGetCursorAttributeType = *string - -func getListCatalogProductsResponseGetCursorAttributeTypeOk(arg ListCatalogProductsResponseGetCursorAttributeType) (ret ListCatalogProductsResponseGetCursorRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setListCatalogProductsResponseGetCursorAttributeType(arg *ListCatalogProductsResponseGetCursorAttributeType, val ListCatalogProductsResponseGetCursorRetType) { - *arg = &val -} - -type ListCatalogProductsResponseGetCursorArgType = string -type ListCatalogProductsResponseGetCursorRetType = string - -/* - types and functions for facets -*/ - -// isContainer -type ListCatalogProductsResponseGetFacetsAttributeType = *map[string][]CatalogProductFacetsValueInner -type ListCatalogProductsResponseGetFacetsArgType = map[string][]CatalogProductFacetsValueInner -type ListCatalogProductsResponseGetFacetsRetType = map[string][]CatalogProductFacetsValueInner - -func getListCatalogProductsResponseGetFacetsAttributeTypeOk(arg ListCatalogProductsResponseGetFacetsAttributeType) (ret ListCatalogProductsResponseGetFacetsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setListCatalogProductsResponseGetFacetsAttributeType(arg *ListCatalogProductsResponseGetFacetsAttributeType, val ListCatalogProductsResponseGetFacetsRetType) { - *arg = &val -} - -/* - types and functions for items -*/ - -// isArray -type ListCatalogProductsResponseGetItemsAttributeType = *[]CatalogProductOverview -type ListCatalogProductsResponseGetItemsArgType = []CatalogProductOverview -type ListCatalogProductsResponseGetItemsRetType = []CatalogProductOverview - -func getListCatalogProductsResponseGetItemsAttributeTypeOk(arg ListCatalogProductsResponseGetItemsAttributeType) (ret ListCatalogProductsResponseGetItemsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setListCatalogProductsResponseGetItemsAttributeType(arg *ListCatalogProductsResponseGetItemsAttributeType, val ListCatalogProductsResponseGetItemsRetType) { - *arg = &val -} - -/* - types and functions for limit -*/ - -// isNumber -type ListCatalogProductsResponseGetLimitAttributeType = *float64 -type ListCatalogProductsResponseGetLimitArgType = float64 -type ListCatalogProductsResponseGetLimitRetType = float64 - -func getListCatalogProductsResponseGetLimitAttributeTypeOk(arg ListCatalogProductsResponseGetLimitAttributeType) (ret ListCatalogProductsResponseGetLimitRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setListCatalogProductsResponseGetLimitAttributeType(arg *ListCatalogProductsResponseGetLimitAttributeType, val ListCatalogProductsResponseGetLimitRetType) { - *arg = &val -} - -// ListCatalogProductsResponse struct for ListCatalogProductsResponse -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" required:"true"` - // A collection of facets, where each key represents a facet category. - Facets ListCatalogProductsResponseGetFacetsAttributeType `json:"facets,omitempty"` - // REQUIRED - Items ListCatalogProductsResponseGetItemsAttributeType `json:"items" required:"true"` - // Limit for returned Objects. - // REQUIRED - Limit ListCatalogProductsResponseGetLimitAttributeType `json:"limit" required:"true"` -} - -type _ListCatalogProductsResponse ListCatalogProductsResponse - -// NewListCatalogProductsResponse instantiates a new ListCatalogProductsResponse 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 NewListCatalogProductsResponse(cursor ListCatalogProductsResponseGetCursorArgType, items ListCatalogProductsResponseGetItemsArgType, limit ListCatalogProductsResponseGetLimitArgType) *ListCatalogProductsResponse { - this := ListCatalogProductsResponse{} - setListCatalogProductsResponseGetCursorAttributeType(&this.Cursor, cursor) - setListCatalogProductsResponseGetItemsAttributeType(&this.Items, items) - setListCatalogProductsResponseGetLimitAttributeType(&this.Limit, limit) - return &this -} - -// NewListCatalogProductsResponseWithDefaults instantiates a new ListCatalogProductsResponse 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 NewListCatalogProductsResponseWithDefaults() *ListCatalogProductsResponse { - this := ListCatalogProductsResponse{} - var limit float64 = 50 - this.Limit = &limit - return &this -} - -// GetCursor returns the Cursor field value -func (o *ListCatalogProductsResponse) GetCursor() (ret ListCatalogProductsResponseGetCursorRetType) { - ret, _ = o.GetCursorOk() - return ret -} - -// GetCursorOk returns a tuple with the Cursor field value -// and a boolean to check if the value has been set. -func (o *ListCatalogProductsResponse) GetCursorOk() (ret ListCatalogProductsResponseGetCursorRetType, ok bool) { - return getListCatalogProductsResponseGetCursorAttributeTypeOk(o.Cursor) -} - -// SetCursor sets field value -func (o *ListCatalogProductsResponse) SetCursor(v ListCatalogProductsResponseGetCursorRetType) { - setListCatalogProductsResponseGetCursorAttributeType(&o.Cursor, v) -} - -// GetFacets returns the Facets field value if set, zero value otherwise. -func (o *ListCatalogProductsResponse) GetFacets() (res ListCatalogProductsResponseGetFacetsRetType) { - res, _ = o.GetFacetsOk() - return -} - -// GetFacetsOk returns a tuple with the Facets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListCatalogProductsResponse) GetFacetsOk() (ret ListCatalogProductsResponseGetFacetsRetType, ok bool) { - return getListCatalogProductsResponseGetFacetsAttributeTypeOk(o.Facets) -} - -// HasFacets returns a boolean if a field has been set. -func (o *ListCatalogProductsResponse) HasFacets() bool { - _, ok := o.GetFacetsOk() - return ok -} - -// SetFacets gets a reference to the given map[string][]CatalogProductFacetsValueInner and assigns it to the Facets field. -func (o *ListCatalogProductsResponse) SetFacets(v ListCatalogProductsResponseGetFacetsRetType) { - setListCatalogProductsResponseGetFacetsAttributeType(&o.Facets, v) -} - -// GetItems returns the Items field value -func (o *ListCatalogProductsResponse) GetItems() (ret ListCatalogProductsResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *ListCatalogProductsResponse) GetItemsOk() (ret ListCatalogProductsResponseGetItemsRetType, ok bool) { - return getListCatalogProductsResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -func (o *ListCatalogProductsResponse) SetItems(v ListCatalogProductsResponseGetItemsRetType) { - setListCatalogProductsResponseGetItemsAttributeType(&o.Items, v) -} - -// GetLimit returns the Limit field value -func (o *ListCatalogProductsResponse) GetLimit() (ret ListCatalogProductsResponseGetLimitRetType) { - ret, _ = o.GetLimitOk() - return ret -} - -// GetLimitOk returns a tuple with the Limit field value -// and a boolean to check if the value has been set. -func (o *ListCatalogProductsResponse) GetLimitOk() (ret ListCatalogProductsResponseGetLimitRetType, ok bool) { - return getListCatalogProductsResponseGetLimitAttributeTypeOk(o.Limit) -} - -// SetLimit sets field value -func (o *ListCatalogProductsResponse) SetLimit(v ListCatalogProductsResponseGetLimitRetType) { - setListCatalogProductsResponseGetLimitAttributeType(&o.Limit, v) -} - -func (o ListCatalogProductsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getListCatalogProductsResponseGetCursorAttributeTypeOk(o.Cursor); ok { - toSerialize["Cursor"] = val - } - if val, ok := getListCatalogProductsResponseGetFacetsAttributeTypeOk(o.Facets); ok { - toSerialize["Facets"] = val - } - if val, ok := getListCatalogProductsResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - if val, ok := getListCatalogProductsResponseGetLimitAttributeTypeOk(o.Limit); ok { - toSerialize["Limit"] = val - } - return toSerialize, nil -} - -type NullableListCatalogProductsResponse struct { - value *ListCatalogProductsResponse - isSet bool -} - -func (v NullableListCatalogProductsResponse) Get() *ListCatalogProductsResponse { - return v.value -} - -func (v *NullableListCatalogProductsResponse) Set(val *ListCatalogProductsResponse) { - v.value = val - v.isSet = true -} - -func (v NullableListCatalogProductsResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableListCatalogProductsResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListCatalogProductsResponse(val *ListCatalogProductsResponse) *NullableListCatalogProductsResponse { - return &NullableListCatalogProductsResponse{value: val, isSet: true} -} - -func (v NullableListCatalogProductsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListCatalogProductsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_list_catalog_products_response_test.go b/services/stackitmarketplace/model_list_catalog_products_response_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_list_catalog_products_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_list_vendor_subscriptions_response.go b/services/stackitmarketplace/model_list_vendor_subscriptions_response.go deleted file mode 100644 index 938876a99..000000000 --- a/services/stackitmarketplace/model_list_vendor_subscriptions_response.go +++ /dev/null @@ -1,217 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the ListVendorSubscriptionsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListVendorSubscriptionsResponse{} - -/* - types and functions for cursor -*/ - -// isNotNullableString -type ListVendorSubscriptionsResponseGetCursorAttributeType = *string - -func getListVendorSubscriptionsResponseGetCursorAttributeTypeOk(arg ListVendorSubscriptionsResponseGetCursorAttributeType) (ret ListVendorSubscriptionsResponseGetCursorRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setListVendorSubscriptionsResponseGetCursorAttributeType(arg *ListVendorSubscriptionsResponseGetCursorAttributeType, val ListVendorSubscriptionsResponseGetCursorRetType) { - *arg = &val -} - -type ListVendorSubscriptionsResponseGetCursorArgType = string -type ListVendorSubscriptionsResponseGetCursorRetType = string - -/* - types and functions for items -*/ - -// isArray -type ListVendorSubscriptionsResponseGetItemsAttributeType = *[]VendorSubscription -type ListVendorSubscriptionsResponseGetItemsArgType = []VendorSubscription -type ListVendorSubscriptionsResponseGetItemsRetType = []VendorSubscription - -func getListVendorSubscriptionsResponseGetItemsAttributeTypeOk(arg ListVendorSubscriptionsResponseGetItemsAttributeType) (ret ListVendorSubscriptionsResponseGetItemsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setListVendorSubscriptionsResponseGetItemsAttributeType(arg *ListVendorSubscriptionsResponseGetItemsAttributeType, val ListVendorSubscriptionsResponseGetItemsRetType) { - *arg = &val -} - -/* - types and functions for limit -*/ - -// isNumber -type ListVendorSubscriptionsResponseGetLimitAttributeType = *float64 -type ListVendorSubscriptionsResponseGetLimitArgType = float64 -type ListVendorSubscriptionsResponseGetLimitRetType = float64 - -func getListVendorSubscriptionsResponseGetLimitAttributeTypeOk(arg ListVendorSubscriptionsResponseGetLimitAttributeType) (ret ListVendorSubscriptionsResponseGetLimitRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setListVendorSubscriptionsResponseGetLimitAttributeType(arg *ListVendorSubscriptionsResponseGetLimitAttributeType, val ListVendorSubscriptionsResponseGetLimitRetType) { - *arg = &val -} - -// ListVendorSubscriptionsResponse struct for ListVendorSubscriptionsResponse -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" required:"true"` - // List of subscriptions. - // REQUIRED - Items ListVendorSubscriptionsResponseGetItemsAttributeType `json:"items" required:"true"` - // Limit for returned Objects. - // REQUIRED - Limit ListVendorSubscriptionsResponseGetLimitAttributeType `json:"limit" required:"true"` -} - -type _ListVendorSubscriptionsResponse ListVendorSubscriptionsResponse - -// NewListVendorSubscriptionsResponse instantiates a new ListVendorSubscriptionsResponse 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 NewListVendorSubscriptionsResponse(cursor ListVendorSubscriptionsResponseGetCursorArgType, items ListVendorSubscriptionsResponseGetItemsArgType, limit ListVendorSubscriptionsResponseGetLimitArgType) *ListVendorSubscriptionsResponse { - this := ListVendorSubscriptionsResponse{} - setListVendorSubscriptionsResponseGetCursorAttributeType(&this.Cursor, cursor) - setListVendorSubscriptionsResponseGetItemsAttributeType(&this.Items, items) - setListVendorSubscriptionsResponseGetLimitAttributeType(&this.Limit, limit) - return &this -} - -// NewListVendorSubscriptionsResponseWithDefaults instantiates a new ListVendorSubscriptionsResponse 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 NewListVendorSubscriptionsResponseWithDefaults() *ListVendorSubscriptionsResponse { - this := ListVendorSubscriptionsResponse{} - var limit float64 = 50 - this.Limit = &limit - return &this -} - -// GetCursor returns the Cursor field value -func (o *ListVendorSubscriptionsResponse) GetCursor() (ret ListVendorSubscriptionsResponseGetCursorRetType) { - ret, _ = o.GetCursorOk() - return ret -} - -// GetCursorOk returns a tuple with the Cursor field value -// and a boolean to check if the value has been set. -func (o *ListVendorSubscriptionsResponse) GetCursorOk() (ret ListVendorSubscriptionsResponseGetCursorRetType, ok bool) { - return getListVendorSubscriptionsResponseGetCursorAttributeTypeOk(o.Cursor) -} - -// SetCursor sets field value -func (o *ListVendorSubscriptionsResponse) SetCursor(v ListVendorSubscriptionsResponseGetCursorRetType) { - setListVendorSubscriptionsResponseGetCursorAttributeType(&o.Cursor, v) -} - -// GetItems returns the Items field value -func (o *ListVendorSubscriptionsResponse) GetItems() (ret ListVendorSubscriptionsResponseGetItemsRetType) { - ret, _ = o.GetItemsOk() - return ret -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *ListVendorSubscriptionsResponse) GetItemsOk() (ret ListVendorSubscriptionsResponseGetItemsRetType, ok bool) { - return getListVendorSubscriptionsResponseGetItemsAttributeTypeOk(o.Items) -} - -// SetItems sets field value -func (o *ListVendorSubscriptionsResponse) SetItems(v ListVendorSubscriptionsResponseGetItemsRetType) { - setListVendorSubscriptionsResponseGetItemsAttributeType(&o.Items, v) -} - -// GetLimit returns the Limit field value -func (o *ListVendorSubscriptionsResponse) GetLimit() (ret ListVendorSubscriptionsResponseGetLimitRetType) { - ret, _ = o.GetLimitOk() - return ret -} - -// GetLimitOk returns a tuple with the Limit field value -// and a boolean to check if the value has been set. -func (o *ListVendorSubscriptionsResponse) GetLimitOk() (ret ListVendorSubscriptionsResponseGetLimitRetType, ok bool) { - return getListVendorSubscriptionsResponseGetLimitAttributeTypeOk(o.Limit) -} - -// SetLimit sets field value -func (o *ListVendorSubscriptionsResponse) SetLimit(v ListVendorSubscriptionsResponseGetLimitRetType) { - setListVendorSubscriptionsResponseGetLimitAttributeType(&o.Limit, v) -} - -func (o ListVendorSubscriptionsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getListVendorSubscriptionsResponseGetCursorAttributeTypeOk(o.Cursor); ok { - toSerialize["Cursor"] = val - } - if val, ok := getListVendorSubscriptionsResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - if val, ok := getListVendorSubscriptionsResponseGetLimitAttributeTypeOk(o.Limit); ok { - toSerialize["Limit"] = val - } - return toSerialize, nil -} - -type NullableListVendorSubscriptionsResponse struct { - value *ListVendorSubscriptionsResponse - isSet bool -} - -func (v NullableListVendorSubscriptionsResponse) Get() *ListVendorSubscriptionsResponse { - return v.value -} - -func (v *NullableListVendorSubscriptionsResponse) Set(val *ListVendorSubscriptionsResponse) { - v.value = val - v.isSet = true -} - -func (v NullableListVendorSubscriptionsResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableListVendorSubscriptionsResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListVendorSubscriptionsResponse(val *ListVendorSubscriptionsResponse) *NullableListVendorSubscriptionsResponse { - return &NullableListVendorSubscriptionsResponse{value: val, isSet: true} -} - -func (v NullableListVendorSubscriptionsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListVendorSubscriptionsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_list_vendor_subscriptions_response_test.go b/services/stackitmarketplace/model_list_vendor_subscriptions_response_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_list_vendor_subscriptions_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_localized_version.go b/services/stackitmarketplace/model_localized_version.go deleted file mode 100644 index 0bc2dfa9e..000000000 --- a/services/stackitmarketplace/model_localized_version.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the LocalizedVersion type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LocalizedVersion{} - -/* - types and functions for de -*/ - -// isNotNullableString -type LocalizedVersionGetDeAttributeType = *string - -func getLocalizedVersionGetDeAttributeTypeOk(arg LocalizedVersionGetDeAttributeType) (ret LocalizedVersionGetDeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLocalizedVersionGetDeAttributeType(arg *LocalizedVersionGetDeAttributeType, val LocalizedVersionGetDeRetType) { - *arg = &val -} - -type LocalizedVersionGetDeArgType = string -type LocalizedVersionGetDeRetType = string - -/* - types and functions for en -*/ - -// isNotNullableString -type LocalizedVersionGetEnAttributeType = *string - -func getLocalizedVersionGetEnAttributeTypeOk(arg LocalizedVersionGetEnAttributeType) (ret LocalizedVersionGetEnRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setLocalizedVersionGetEnAttributeType(arg *LocalizedVersionGetEnAttributeType, val LocalizedVersionGetEnRetType) { - *arg = &val -} - -type LocalizedVersionGetEnArgType = string -type LocalizedVersionGetEnRetType = string - -// LocalizedVersion The localized version (file name) of a file. -type LocalizedVersion struct { - // The file version matching the file name (localized). - De LocalizedVersionGetDeAttributeType `json:"de,omitempty"` - // The file version matching the file name (localized). - En LocalizedVersionGetEnAttributeType `json:"en,omitempty"` -} - -// NewLocalizedVersion instantiates a new LocalizedVersion 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 NewLocalizedVersion() *LocalizedVersion { - this := LocalizedVersion{} - return &this -} - -// NewLocalizedVersionWithDefaults instantiates a new LocalizedVersion 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 NewLocalizedVersionWithDefaults() *LocalizedVersion { - this := LocalizedVersion{} - return &this -} - -// GetDe returns the De field value if set, zero value otherwise. -func (o *LocalizedVersion) GetDe() (res LocalizedVersionGetDeRetType) { - res, _ = o.GetDeOk() - return -} - -// GetDeOk returns a tuple with the De field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LocalizedVersion) GetDeOk() (ret LocalizedVersionGetDeRetType, ok bool) { - return getLocalizedVersionGetDeAttributeTypeOk(o.De) -} - -// HasDe returns a boolean if a field has been set. -func (o *LocalizedVersion) HasDe() bool { - _, ok := o.GetDeOk() - return ok -} - -// SetDe gets a reference to the given string and assigns it to the De field. -func (o *LocalizedVersion) SetDe(v LocalizedVersionGetDeRetType) { - setLocalizedVersionGetDeAttributeType(&o.De, v) -} - -// GetEn returns the En field value if set, zero value otherwise. -func (o *LocalizedVersion) GetEn() (res LocalizedVersionGetEnRetType) { - res, _ = o.GetEnOk() - return -} - -// GetEnOk returns a tuple with the En field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LocalizedVersion) GetEnOk() (ret LocalizedVersionGetEnRetType, ok bool) { - return getLocalizedVersionGetEnAttributeTypeOk(o.En) -} - -// HasEn returns a boolean if a field has been set. -func (o *LocalizedVersion) HasEn() bool { - _, ok := o.GetEnOk() - return ok -} - -// SetEn gets a reference to the given string and assigns it to the En field. -func (o *LocalizedVersion) SetEn(v LocalizedVersionGetEnRetType) { - setLocalizedVersionGetEnAttributeType(&o.En, v) -} - -func (o LocalizedVersion) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getLocalizedVersionGetDeAttributeTypeOk(o.De); ok { - toSerialize["De"] = val - } - if val, ok := getLocalizedVersionGetEnAttributeTypeOk(o.En); ok { - toSerialize["En"] = val - } - return toSerialize, nil -} - -type NullableLocalizedVersion struct { - value *LocalizedVersion - isSet bool -} - -func (v NullableLocalizedVersion) Get() *LocalizedVersion { - return v.value -} - -func (v *NullableLocalizedVersion) Set(val *LocalizedVersion) { - v.value = val - v.isSet = true -} - -func (v NullableLocalizedVersion) IsSet() bool { - return v.isSet -} - -func (v *NullableLocalizedVersion) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLocalizedVersion(val *LocalizedVersion) *NullableLocalizedVersion { - return &NullableLocalizedVersion{value: val, isSet: true} -} - -func (v NullableLocalizedVersion) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLocalizedVersion) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_localized_version_test.go b/services/stackitmarketplace/model_localized_version_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_localized_version_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_notice_period.go b/services/stackitmarketplace/model_notice_period.go deleted file mode 100644 index 0ab35972f..000000000 --- a/services/stackitmarketplace/model_notice_period.go +++ /dev/null @@ -1,283 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" - "fmt" -) - -// checks if the NoticePeriod type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &NoticePeriod{} - -/* - types and functions for type -*/ - -// isEnum - -// NoticePeriodTypes The notice period type. -// value type for enums -type NoticePeriodTypes string - -// List of Type -const ( - NOTICEPERIODTYPE_SAME_DAY NoticePeriodTypes = "SAME_DAY" - NOTICEPERIODTYPE_DAYS NoticePeriodTypes = "DAYS" - NOTICEPERIODTYPE_MONTHS NoticePeriodTypes = "MONTHS" -) - -// All allowed values of NoticePeriod enum -var AllowedNoticePeriodTypesEnumValues = []NoticePeriodTypes{ - "SAME_DAY", - "DAYS", - "MONTHS", -} - -func (v *NoticePeriodTypes) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson NoticePeriodTypes - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := NoticePeriodTypes(value) - for _, existing := range AllowedNoticePeriodTypesEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid NoticePeriod", value) -} - -// NewNoticePeriodTypesFromValue returns a pointer to a valid NoticePeriodTypes -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewNoticePeriodTypesFromValue(v NoticePeriodTypes) (*NoticePeriodTypes, error) { - ev := NoticePeriodTypes(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for NoticePeriodTypes: valid values are %v", v, AllowedNoticePeriodTypesEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v NoticePeriodTypes) IsValid() bool { - for _, existing := range AllowedNoticePeriodTypesEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TypeTypes value -func (v NoticePeriodTypes) Ptr() *NoticePeriodTypes { - return &v -} - -type NullableNoticePeriodTypes struct { - value *NoticePeriodTypes - isSet bool -} - -func (v NullableNoticePeriodTypes) Get() *NoticePeriodTypes { - return v.value -} - -func (v *NullableNoticePeriodTypes) Set(val *NoticePeriodTypes) { - v.value = val - v.isSet = true -} - -func (v NullableNoticePeriodTypes) IsSet() bool { - return v.isSet -} - -func (v *NullableNoticePeriodTypes) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNoticePeriodTypes(val *NoticePeriodTypes) *NullableNoticePeriodTypes { - return &NullableNoticePeriodTypes{value: val, isSet: true} -} - -func (v NullableNoticePeriodTypes) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNoticePeriodTypes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NoticePeriodGetTypeAttributeType = *NoticePeriodTypes -type NoticePeriodGetTypeArgType = NoticePeriodTypes -type NoticePeriodGetTypeRetType = NoticePeriodTypes - -func getNoticePeriodGetTypeAttributeTypeOk(arg NoticePeriodGetTypeAttributeType) (ret NoticePeriodGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setNoticePeriodGetTypeAttributeType(arg *NoticePeriodGetTypeAttributeType, val NoticePeriodGetTypeRetType) { - *arg = &val -} - -/* - types and functions for value -*/ - -// isInteger -type NoticePeriodGetValueAttributeType = *int64 -type NoticePeriodGetValueArgType = int64 -type NoticePeriodGetValueRetType = int64 - -func getNoticePeriodGetValueAttributeTypeOk(arg NoticePeriodGetValueAttributeType) (ret NoticePeriodGetValueRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setNoticePeriodGetValueAttributeType(arg *NoticePeriodGetValueAttributeType, val NoticePeriodGetValueRetType) { - *arg = &val -} - -// NoticePeriod The notice period for a product and plan. -type NoticePeriod struct { - // The notice period type. - Type NoticePeriodGetTypeAttributeType `json:"type,omitempty"` - // The value of the corresponding type. Omitted for _SAME_DAY_. - Value NoticePeriodGetValueAttributeType `json:"value,omitempty"` -} - -// NewNoticePeriod instantiates a new NoticePeriod 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 NewNoticePeriod() *NoticePeriod { - this := NoticePeriod{} - return &this -} - -// NewNoticePeriodWithDefaults instantiates a new NoticePeriod 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 NewNoticePeriodWithDefaults() *NoticePeriod { - this := NoticePeriod{} - return &this -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *NoticePeriod) GetType() (res NoticePeriodGetTypeRetType) { - res, _ = o.GetTypeOk() - return -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NoticePeriod) GetTypeOk() (ret NoticePeriodGetTypeRetType, ok bool) { - return getNoticePeriodGetTypeAttributeTypeOk(o.Type) -} - -// HasType returns a boolean if a field has been set. -func (o *NoticePeriod) HasType() bool { - _, ok := o.GetTypeOk() - return ok -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *NoticePeriod) SetType(v NoticePeriodGetTypeRetType) { - setNoticePeriodGetTypeAttributeType(&o.Type, v) -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *NoticePeriod) GetValue() (res NoticePeriodGetValueRetType) { - res, _ = o.GetValueOk() - return -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *NoticePeriod) GetValueOk() (ret NoticePeriodGetValueRetType, ok bool) { - return getNoticePeriodGetValueAttributeTypeOk(o.Value) -} - -// HasValue returns a boolean if a field has been set. -func (o *NoticePeriod) HasValue() bool { - _, ok := o.GetValueOk() - return ok -} - -// SetValue gets a reference to the given int64 and assigns it to the Value field. -func (o *NoticePeriod) SetValue(v NoticePeriodGetValueRetType) { - setNoticePeriodGetValueAttributeType(&o.Value, v) -} - -func (o NoticePeriod) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getNoticePeriodGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - if val, ok := getNoticePeriodGetValueAttributeTypeOk(o.Value); ok { - toSerialize["Value"] = val - } - return toSerialize, nil -} - -type NullableNoticePeriod struct { - value *NoticePeriod - isSet bool -} - -func (v NullableNoticePeriod) Get() *NoticePeriod { - return v.value -} - -func (v *NullableNoticePeriod) Set(val *NoticePeriod) { - v.value = val - v.isSet = true -} - -func (v NullableNoticePeriod) IsSet() bool { - return v.isSet -} - -func (v *NullableNoticePeriod) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNoticePeriod(val *NoticePeriod) *NullableNoticePeriod { - return &NullableNoticePeriod{value: val, isSet: true} -} - -func (v NullableNoticePeriod) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNoticePeriod) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_notice_period_test.go b/services/stackitmarketplace/model_notice_period_test.go deleted file mode 100644 index 7353ba674..000000000 --- a/services/stackitmarketplace/model_notice_period_test.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "testing" -) - -// isEnum - -func TestNoticePeriodTypes_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"SAME_DAY"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"DAYS"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`"MONTHS"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := NoticePeriodTypes("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/stackitmarketplace/model_offer_type.go b/services/stackitmarketplace/model_offer_type.go deleted file mode 100644 index 4cce94f56..000000000 --- a/services/stackitmarketplace/model_offer_type.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" - "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 deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_offer_type_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_price_type.go b/services/stackitmarketplace/model_price_type.go deleted file mode 100644 index a212268e9..000000000 --- a/services/stackitmarketplace/model_price_type.go +++ /dev/null @@ -1,121 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" - "fmt" -) - -// PriceType The product's price type. -type PriceType string - -// List of priceType -const ( - PRICETYPE_CONTRACT PriceType = "CONTRACT" - PRICETYPE_FREE PriceType = "FREE" - PRICETYPE_FREE_TRIAL PriceType = "FREE_TRIAL" - PRICETYPE_BYOL PriceType = "BYOL" - PRICETYPE_PAYG PriceType = "PAYG" -) - -// All allowed values of PriceType enum -var AllowedPriceTypeEnumValues = []PriceType{ - "CONTRACT", - "FREE", - "FREE_TRIAL", - "BYOL", - "PAYG", -} - -func (v *PriceType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue string - if value == zeroValue { - return nil - } - enumTypeValue := PriceType(value) - for _, existing := range AllowedPriceTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid PriceType", value) -} - -// NewPriceTypeFromValue returns a pointer to a valid PriceType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewPriceTypeFromValue(v string) (*PriceType, error) { - ev := PriceType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for PriceType: valid values are %v", v, AllowedPriceTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v PriceType) IsValid() bool { - for _, existing := range AllowedPriceTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to priceType value -func (v PriceType) Ptr() *PriceType { - return &v -} - -type NullablePriceType struct { - value *PriceType - isSet bool -} - -func (v NullablePriceType) Get() *PriceType { - return v.value -} - -func (v *NullablePriceType) Set(val *PriceType) { - v.value = val - v.isSet = true -} - -func (v NullablePriceType) IsSet() bool { - return v.isSet -} - -func (v *NullablePriceType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePriceType(val *PriceType) *NullablePriceType { - return &NullablePriceType{value: val, isSet: true} -} - -func (v NullablePriceType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePriceType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_price_type_test.go b/services/stackitmarketplace/model_price_type_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_price_type_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_pricing_option_unit.go b/services/stackitmarketplace/model_pricing_option_unit.go deleted file mode 100644 index 21c482db1..000000000 --- a/services/stackitmarketplace/model_pricing_option_unit.go +++ /dev/null @@ -1,113 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" - "fmt" -) - -// PricingOptionUnit The interval to which the rate applies. -type PricingOptionUnit string - -// List of pricingOptionUnit -const ( - PRICINGOPTIONUNIT_MONTH PricingOptionUnit = "month" -) - -// All allowed values of PricingOptionUnit enum -var AllowedPricingOptionUnitEnumValues = []PricingOptionUnit{ - "month", -} - -func (v *PricingOptionUnit) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue string - if value == zeroValue { - return nil - } - enumTypeValue := PricingOptionUnit(value) - for _, existing := range AllowedPricingOptionUnitEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid PricingOptionUnit", value) -} - -// NewPricingOptionUnitFromValue returns a pointer to a valid PricingOptionUnit -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewPricingOptionUnitFromValue(v string) (*PricingOptionUnit, error) { - ev := PricingOptionUnit(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for PricingOptionUnit: valid values are %v", v, AllowedPricingOptionUnitEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v PricingOptionUnit) IsValid() bool { - for _, existing := range AllowedPricingOptionUnitEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to pricingOptionUnit value -func (v PricingOptionUnit) Ptr() *PricingOptionUnit { - return &v -} - -type NullablePricingOptionUnit struct { - value *PricingOptionUnit - isSet bool -} - -func (v NullablePricingOptionUnit) Get() *PricingOptionUnit { - return v.value -} - -func (v *NullablePricingOptionUnit) Set(val *PricingOptionUnit) { - v.value = val - v.isSet = true -} - -func (v NullablePricingOptionUnit) IsSet() bool { - return v.isSet -} - -func (v *NullablePricingOptionUnit) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePricingOptionUnit(val *PricingOptionUnit) *NullablePricingOptionUnit { - return &NullablePricingOptionUnit{value: val, isSet: true} -} - -func (v NullablePricingOptionUnit) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePricingOptionUnit) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_pricing_option_unit_test.go b/services/stackitmarketplace/model_pricing_option_unit_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_pricing_option_unit_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_product_lifecycle_state.go b/services/stackitmarketplace/model_product_lifecycle_state.go deleted file mode 100644 index 8d67cebea..000000000 --- a/services/stackitmarketplace/model_product_lifecycle_state.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" - "fmt" -) - -// ProductLifecycleState The lifecycle state of the product. -type ProductLifecycleState string - -// List of productLifecycleState -const ( - PRODUCTLIFECYCLESTATE_LIVE ProductLifecycleState = "PRODUCT_LIVE" - PRODUCTLIFECYCLESTATE_PREVIEW ProductLifecycleState = "PRODUCT_PREVIEW" -) - -// All allowed values of ProductLifecycleState enum -var AllowedProductLifecycleStateEnumValues = []ProductLifecycleState{ - "PRODUCT_LIVE", - "PRODUCT_PREVIEW", -} - -func (v *ProductLifecycleState) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue string - if value == zeroValue { - return nil - } - enumTypeValue := ProductLifecycleState(value) - for _, existing := range AllowedProductLifecycleStateEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid ProductLifecycleState", value) -} - -// NewProductLifecycleStateFromValue returns a pointer to a valid ProductLifecycleState -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewProductLifecycleStateFromValue(v string) (*ProductLifecycleState, error) { - ev := ProductLifecycleState(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for ProductLifecycleState: valid values are %v", v, AllowedProductLifecycleStateEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v ProductLifecycleState) IsValid() bool { - for _, existing := range AllowedProductLifecycleStateEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to productLifecycleState value -func (v ProductLifecycleState) Ptr() *ProductLifecycleState { - return &v -} - -type NullableProductLifecycleState struct { - value *ProductLifecycleState - isSet bool -} - -func (v NullableProductLifecycleState) Get() *ProductLifecycleState { - return v.value -} - -func (v *NullableProductLifecycleState) Set(val *ProductLifecycleState) { - v.value = val - v.isSet = true -} - -func (v NullableProductLifecycleState) IsSet() bool { - return v.isSet -} - -func (v *NullableProductLifecycleState) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableProductLifecycleState(val *ProductLifecycleState) *NullableProductLifecycleState { - return &NullableProductLifecycleState{value: val, isSet: true} -} - -func (v NullableProductLifecycleState) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableProductLifecycleState) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_product_lifecycle_state_test.go b/services/stackitmarketplace/model_product_lifecycle_state_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_product_lifecycle_state_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_register_testing.go b/services/stackitmarketplace/model_register_testing.go deleted file mode 100644 index 58953e1d0..000000000 --- a/services/stackitmarketplace/model_register_testing.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the RegisterTesting type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RegisterTesting{} - -/* - types and functions for registerTesting -*/ - -// isModel -type RegisterTestingGetRegisterTestingAttributeType = *InquiryRegisterTesting -type RegisterTestingGetRegisterTestingArgType = InquiryRegisterTesting -type RegisterTestingGetRegisterTestingRetType = InquiryRegisterTesting - -func getRegisterTestingGetRegisterTestingAttributeTypeOk(arg RegisterTestingGetRegisterTestingAttributeType) (ret RegisterTestingGetRegisterTestingRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setRegisterTestingGetRegisterTestingAttributeType(arg *RegisterTestingGetRegisterTestingAttributeType, val RegisterTestingGetRegisterTestingRetType) { - *arg = &val -} - -/* - types and functions for type -*/ - -// isEnumRef -type RegisterTestingGetTypeAttributeType = *InquiryFormType -type RegisterTestingGetTypeArgType = InquiryFormType -type RegisterTestingGetTypeRetType = InquiryFormType - -func getRegisterTestingGetTypeAttributeTypeOk(arg RegisterTestingGetTypeAttributeType) (ret RegisterTestingGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setRegisterTestingGetTypeAttributeType(arg *RegisterTestingGetTypeAttributeType, val RegisterTestingGetTypeRetType) { - *arg = &val -} - -// RegisterTesting Register for testing. -type RegisterTesting struct { - // REQUIRED - RegisterTesting RegisterTestingGetRegisterTestingAttributeType `json:"registerTesting" required:"true"` - // REQUIRED - Type RegisterTestingGetTypeAttributeType `json:"type" required:"true"` -} - -type _RegisterTesting RegisterTesting - -// NewRegisterTesting instantiates a new RegisterTesting 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 NewRegisterTesting(registerTesting RegisterTestingGetRegisterTestingArgType, types RegisterTestingGetTypeArgType) *RegisterTesting { - this := RegisterTesting{} - setRegisterTestingGetRegisterTestingAttributeType(&this.RegisterTesting, registerTesting) - setRegisterTestingGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewRegisterTestingWithDefaults instantiates a new RegisterTesting 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 NewRegisterTestingWithDefaults() *RegisterTesting { - this := RegisterTesting{} - return &this -} - -// GetRegisterTesting returns the RegisterTesting field value -func (o *RegisterTesting) GetRegisterTesting() (ret RegisterTestingGetRegisterTestingRetType) { - ret, _ = o.GetRegisterTestingOk() - return ret -} - -// GetRegisterTestingOk returns a tuple with the RegisterTesting field value -// and a boolean to check if the value has been set. -func (o *RegisterTesting) GetRegisterTestingOk() (ret RegisterTestingGetRegisterTestingRetType, ok bool) { - return getRegisterTestingGetRegisterTestingAttributeTypeOk(o.RegisterTesting) -} - -// SetRegisterTesting sets field value -func (o *RegisterTesting) SetRegisterTesting(v RegisterTestingGetRegisterTestingRetType) { - setRegisterTestingGetRegisterTestingAttributeType(&o.RegisterTesting, v) -} - -// GetType returns the Type field value -func (o *RegisterTesting) GetType() (ret RegisterTestingGetTypeRetType) { - 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 *RegisterTesting) GetTypeOk() (ret RegisterTestingGetTypeRetType, ok bool) { - return getRegisterTestingGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -func (o *RegisterTesting) SetType(v RegisterTestingGetTypeRetType) { - setRegisterTestingGetTypeAttributeType(&o.Type, v) -} - -func (o RegisterTesting) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getRegisterTestingGetRegisterTestingAttributeTypeOk(o.RegisterTesting); ok { - toSerialize["RegisterTesting"] = val - } - if val, ok := getRegisterTestingGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -type NullableRegisterTesting struct { - value *RegisterTesting - isSet bool -} - -func (v NullableRegisterTesting) Get() *RegisterTesting { - return v.value -} - -func (v *NullableRegisterTesting) Set(val *RegisterTesting) { - v.value = val - v.isSet = true -} - -func (v NullableRegisterTesting) IsSet() bool { - return v.isSet -} - -func (v *NullableRegisterTesting) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRegisterTesting(val *RegisterTesting) *NullableRegisterTesting { - return &NullableRegisterTesting{value: val, isSet: true} -} - -func (v NullableRegisterTesting) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRegisterTesting) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_register_testing_test.go b/services/stackitmarketplace/model_register_testing_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_register_testing_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_request_private_plan.go b/services/stackitmarketplace/model_request_private_plan.go deleted file mode 100644 index 6e16df346..000000000 --- a/services/stackitmarketplace/model_request_private_plan.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the 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 deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_request_private_plan_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_resolve_customer_payload_test.go b/services/stackitmarketplace/model_resolve_customer_payload_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_resolve_customer_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_scope.go b/services/stackitmarketplace/model_scope.go deleted file mode 100644 index 95aaab158..000000000 --- a/services/stackitmarketplace/model_scope.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" - "fmt" -) - -// Scope The (visibility) scope. -type Scope string - -// List of scope -const ( - SCOPE_PUBLIC Scope = "PUBLIC" - SCOPE_AUTHENTICATED Scope = "AUTHENTICATED" - SCOPE_PRIVATE_PROJECT Scope = "PRIVATE_PROJECT" -) - -// All allowed values of Scope enum -var AllowedScopeEnumValues = []Scope{ - "PUBLIC", - "AUTHENTICATED", - "PRIVATE_PROJECT", -} - -func (v *Scope) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue string - if value == zeroValue { - return nil - } - enumTypeValue := Scope(value) - for _, existing := range AllowedScopeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid Scope", value) -} - -// NewScopeFromValue returns a pointer to a valid Scope -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewScopeFromValue(v string) (*Scope, error) { - ev := Scope(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for Scope: valid values are %v", v, AllowedScopeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v Scope) IsValid() bool { - for _, existing := range AllowedScopeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to scope value -func (v Scope) Ptr() *Scope { - return &v -} - -type NullableScope struct { - value *Scope - isSet bool -} - -func (v NullableScope) Get() *Scope { - return v.value -} - -func (v *NullableScope) Set(val *Scope) { - v.value = val - v.isSet = true -} - -func (v NullableScope) IsSet() bool { - return v.isSet -} - -func (v *NullableScope) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableScope(val *Scope) *NullableScope { - return &NullableScope{value: val, isSet: true} -} - -func (v NullableScope) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableScope) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_scope_test.go b/services/stackitmarketplace/model_scope_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_scope_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_service_certificate.go b/services/stackitmarketplace/model_service_certificate.go deleted file mode 100644 index 51d499081..000000000 --- a/services/stackitmarketplace/model_service_certificate.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the ServiceCertificate type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ServiceCertificate{} - -/* - types and functions for version -*/ - -// isModel -type ServiceCertificateGetVersionAttributeType = *LocalizedVersion -type ServiceCertificateGetVersionArgType = LocalizedVersion -type ServiceCertificateGetVersionRetType = LocalizedVersion - -func getServiceCertificateGetVersionAttributeTypeOk(arg ServiceCertificateGetVersionAttributeType) (ret ServiceCertificateGetVersionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setServiceCertificateGetVersionAttributeType(arg *ServiceCertificateGetVersionAttributeType, val ServiceCertificateGetVersionRetType) { - *arg = &val -} - -// ServiceCertificate The related service certificate of the (subscription) product. -type ServiceCertificate struct { - Version ServiceCertificateGetVersionAttributeType `json:"version,omitempty"` -} - -// NewServiceCertificate instantiates a new ServiceCertificate 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 NewServiceCertificate() *ServiceCertificate { - this := ServiceCertificate{} - return &this -} - -// NewServiceCertificateWithDefaults instantiates a new ServiceCertificate 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 NewServiceCertificateWithDefaults() *ServiceCertificate { - this := ServiceCertificate{} - return &this -} - -// GetVersion returns the Version field value if set, zero value otherwise. -func (o *ServiceCertificate) GetVersion() (res ServiceCertificateGetVersionRetType) { - res, _ = o.GetVersionOk() - return -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ServiceCertificate) GetVersionOk() (ret ServiceCertificateGetVersionRetType, ok bool) { - return getServiceCertificateGetVersionAttributeTypeOk(o.Version) -} - -// HasVersion returns a boolean if a field has been set. -func (o *ServiceCertificate) HasVersion() bool { - _, ok := o.GetVersionOk() - return ok -} - -// SetVersion gets a reference to the given LocalizedVersion and assigns it to the Version field. -func (o *ServiceCertificate) SetVersion(v ServiceCertificateGetVersionRetType) { - setServiceCertificateGetVersionAttributeType(&o.Version, v) -} - -func (o ServiceCertificate) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getServiceCertificateGetVersionAttributeTypeOk(o.Version); ok { - toSerialize["Version"] = val - } - return toSerialize, nil -} - -type NullableServiceCertificate struct { - value *ServiceCertificate - isSet bool -} - -func (v NullableServiceCertificate) Get() *ServiceCertificate { - return v.value -} - -func (v *NullableServiceCertificate) Set(val *ServiceCertificate) { - v.value = val - v.isSet = true -} - -func (v NullableServiceCertificate) IsSet() bool { - return v.isSet -} - -func (v *NullableServiceCertificate) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableServiceCertificate(val *ServiceCertificate) *NullableServiceCertificate { - return &NullableServiceCertificate{value: val, isSet: true} -} - -func (v NullableServiceCertificate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableServiceCertificate) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_service_certificate_test.go b/services/stackitmarketplace/model_service_certificate_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_service_certificate_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_subscription_id.go b/services/stackitmarketplace/model_subscription_id.go deleted file mode 100644 index aa7a92652..000000000 --- a/services/stackitmarketplace/model_subscription_id.go +++ /dev/null @@ -1,80 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the SubscriptionId type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SubscriptionId{} - -// SubscriptionId The subscription ID. -type SubscriptionId struct { -} - -// NewSubscriptionId instantiates a new SubscriptionId object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSubscriptionId() *SubscriptionId { - this := SubscriptionId{} - return &this -} - -// NewSubscriptionIdWithDefaults instantiates a new SubscriptionId object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSubscriptionIdWithDefaults() *SubscriptionId { - this := SubscriptionId{} - return &this -} - -func (o SubscriptionId) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - return toSerialize, nil -} - -type NullableSubscriptionId struct { - value *SubscriptionId - isSet bool -} - -func (v NullableSubscriptionId) Get() *SubscriptionId { - return v.value -} - -func (v *NullableSubscriptionId) Set(val *SubscriptionId) { - v.value = val - v.isSet = true -} - -func (v NullableSubscriptionId) IsSet() bool { - return v.isSet -} - -func (v *NullableSubscriptionId) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSubscriptionId(val *SubscriptionId) *NullableSubscriptionId { - return &NullableSubscriptionId{value: val, isSet: true} -} - -func (v NullableSubscriptionId) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSubscriptionId) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_subscription_id_test.go b/services/stackitmarketplace/model_subscription_id_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_subscription_id_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_subscription_lifecycle_state.go b/services/stackitmarketplace/model_subscription_lifecycle_state.go deleted file mode 100644 index bb76b2643..000000000 --- a/services/stackitmarketplace/model_subscription_lifecycle_state.go +++ /dev/null @@ -1,123 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" - "fmt" -) - -// SubscriptionLifecycleState Lifecycle state of the subscription. -type SubscriptionLifecycleState string - -// List of subscriptionLifecycleState -const ( - SUBSCRIPTIONLIFECYCLESTATE_PENDING SubscriptionLifecycleState = "SUBSCRIPTION_PENDING" - SUBSCRIPTIONLIFECYCLESTATE_ACTIVE SubscriptionLifecycleState = "SUBSCRIPTION_ACTIVE" - SUBSCRIPTIONLIFECYCLESTATE_INACTIVE SubscriptionLifecycleState = "SUBSCRIPTION_INACTIVE" - SUBSCRIPTIONLIFECYCLESTATE_CANCELLING SubscriptionLifecycleState = "SUBSCRIPTION_CANCELLING" - SUBSCRIPTIONLIFECYCLESTATE_CANCELLED SubscriptionLifecycleState = "SUBSCRIPTION_CANCELLED" - SUBSCRIPTIONLIFECYCLESTATE_REJECTED SubscriptionLifecycleState = "SUBSCRIPTION_REJECTED" -) - -// All allowed values of SubscriptionLifecycleState enum -var AllowedSubscriptionLifecycleStateEnumValues = []SubscriptionLifecycleState{ - "SUBSCRIPTION_PENDING", - "SUBSCRIPTION_ACTIVE", - "SUBSCRIPTION_INACTIVE", - "SUBSCRIPTION_CANCELLING", - "SUBSCRIPTION_CANCELLED", - "SUBSCRIPTION_REJECTED", -} - -func (v *SubscriptionLifecycleState) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue string - if value == zeroValue { - return nil - } - enumTypeValue := SubscriptionLifecycleState(value) - for _, existing := range AllowedSubscriptionLifecycleStateEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid SubscriptionLifecycleState", value) -} - -// NewSubscriptionLifecycleStateFromValue returns a pointer to a valid SubscriptionLifecycleState -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewSubscriptionLifecycleStateFromValue(v string) (*SubscriptionLifecycleState, error) { - ev := SubscriptionLifecycleState(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for SubscriptionLifecycleState: valid values are %v", v, AllowedSubscriptionLifecycleStateEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v SubscriptionLifecycleState) IsValid() bool { - for _, existing := range AllowedSubscriptionLifecycleStateEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to subscriptionLifecycleState value -func (v SubscriptionLifecycleState) Ptr() *SubscriptionLifecycleState { - return &v -} - -type NullableSubscriptionLifecycleState struct { - value *SubscriptionLifecycleState - isSet bool -} - -func (v NullableSubscriptionLifecycleState) Get() *SubscriptionLifecycleState { - return v.value -} - -func (v *NullableSubscriptionLifecycleState) Set(val *SubscriptionLifecycleState) { - v.value = val - v.isSet = true -} - -func (v NullableSubscriptionLifecycleState) IsSet() bool { - return v.isSet -} - -func (v *NullableSubscriptionLifecycleState) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSubscriptionLifecycleState(val *SubscriptionLifecycleState) *NullableSubscriptionLifecycleState { - return &NullableSubscriptionLifecycleState{value: val, isSet: true} -} - -func (v NullableSubscriptionLifecycleState) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSubscriptionLifecycleState) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_subscription_lifecycle_state_test.go b/services/stackitmarketplace/model_subscription_lifecycle_state_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_subscription_lifecycle_state_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_subscription_product.go b/services/stackitmarketplace/model_subscription_product.go deleted file mode 100644 index 09983caf2..000000000 --- a/services/stackitmarketplace/model_subscription_product.go +++ /dev/null @@ -1,626 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the SubscriptionProduct type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SubscriptionProduct{} - -/* - types and functions for assets -*/ - -// isModel -type SubscriptionProductGetAssetsAttributeType = *Assets -type SubscriptionProductGetAssetsArgType = Assets -type SubscriptionProductGetAssetsRetType = Assets - -func getSubscriptionProductGetAssetsAttributeTypeOk(arg SubscriptionProductGetAssetsAttributeType) (ret SubscriptionProductGetAssetsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setSubscriptionProductGetAssetsAttributeType(arg *SubscriptionProductGetAssetsAttributeType, val SubscriptionProductGetAssetsRetType) { - *arg = &val -} - -/* - types and functions for deliveryMethod -*/ - -// isEnumRef -type SubscriptionProductGetDeliveryMethodAttributeType = *DeliveryMethod -type SubscriptionProductGetDeliveryMethodArgType = DeliveryMethod -type SubscriptionProductGetDeliveryMethodRetType = DeliveryMethod - -func getSubscriptionProductGetDeliveryMethodAttributeTypeOk(arg SubscriptionProductGetDeliveryMethodAttributeType) (ret SubscriptionProductGetDeliveryMethodRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setSubscriptionProductGetDeliveryMethodAttributeType(arg *SubscriptionProductGetDeliveryMethodAttributeType, val SubscriptionProductGetDeliveryMethodRetType) { - *arg = &val -} - -/* - types and functions for lifecycleState -*/ - -// isEnumRef -type SubscriptionProductGetLifecycleStateAttributeType = *ProductLifecycleState -type SubscriptionProductGetLifecycleStateArgType = ProductLifecycleState -type SubscriptionProductGetLifecycleStateRetType = ProductLifecycleState - -func getSubscriptionProductGetLifecycleStateAttributeTypeOk(arg SubscriptionProductGetLifecycleStateAttributeType) (ret SubscriptionProductGetLifecycleStateRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setSubscriptionProductGetLifecycleStateAttributeType(arg *SubscriptionProductGetLifecycleStateAttributeType, val SubscriptionProductGetLifecycleStateRetType) { - *arg = &val -} - -/* - types and functions for planId -*/ - -// isNotNullableString -type SubscriptionProductGetPlanIdAttributeType = *string - -func getSubscriptionProductGetPlanIdAttributeTypeOk(arg SubscriptionProductGetPlanIdAttributeType) (ret SubscriptionProductGetPlanIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setSubscriptionProductGetPlanIdAttributeType(arg *SubscriptionProductGetPlanIdAttributeType, val SubscriptionProductGetPlanIdRetType) { - *arg = &val -} - -type SubscriptionProductGetPlanIdArgType = string -type SubscriptionProductGetPlanIdRetType = string - -/* - types and functions for priceType -*/ - -// isEnumRef -type SubscriptionProductGetPriceTypeAttributeType = *PriceType -type SubscriptionProductGetPriceTypeArgType = PriceType -type SubscriptionProductGetPriceTypeRetType = PriceType - -func getSubscriptionProductGetPriceTypeAttributeTypeOk(arg SubscriptionProductGetPriceTypeAttributeType) (ret SubscriptionProductGetPriceTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setSubscriptionProductGetPriceTypeAttributeType(arg *SubscriptionProductGetPriceTypeAttributeType, val SubscriptionProductGetPriceTypeRetType) { - *arg = &val -} - -/* - types and functions for pricingPlan -*/ - -// isNotNullableString -type SubscriptionProductGetPricingPlanAttributeType = *string - -func getSubscriptionProductGetPricingPlanAttributeTypeOk(arg SubscriptionProductGetPricingPlanAttributeType) (ret SubscriptionProductGetPricingPlanRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setSubscriptionProductGetPricingPlanAttributeType(arg *SubscriptionProductGetPricingPlanAttributeType, val SubscriptionProductGetPricingPlanRetType) { - *arg = &val -} - -type SubscriptionProductGetPricingPlanArgType = string -type SubscriptionProductGetPricingPlanRetType = string - -/* - types and functions for productId -*/ - -// isNotNullableString -type SubscriptionProductGetProductIdAttributeType = *string - -func getSubscriptionProductGetProductIdAttributeTypeOk(arg SubscriptionProductGetProductIdAttributeType) (ret SubscriptionProductGetProductIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setSubscriptionProductGetProductIdAttributeType(arg *SubscriptionProductGetProductIdAttributeType, val SubscriptionProductGetProductIdRetType) { - *arg = &val -} - -type SubscriptionProductGetProductIdArgType = string -type SubscriptionProductGetProductIdRetType = string - -/* - types and functions for productName -*/ - -// isNotNullableString -type SubscriptionProductGetProductNameAttributeType = *string - -func getSubscriptionProductGetProductNameAttributeTypeOk(arg SubscriptionProductGetProductNameAttributeType) (ret SubscriptionProductGetProductNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setSubscriptionProductGetProductNameAttributeType(arg *SubscriptionProductGetProductNameAttributeType, val SubscriptionProductGetProductNameRetType) { - *arg = &val -} - -type SubscriptionProductGetProductNameArgType = string -type SubscriptionProductGetProductNameRetType = string - -/* - types and functions for vendorName -*/ - -// isNotNullableString -type SubscriptionProductGetVendorNameAttributeType = *string - -func getSubscriptionProductGetVendorNameAttributeTypeOk(arg SubscriptionProductGetVendorNameAttributeType) (ret SubscriptionProductGetVendorNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setSubscriptionProductGetVendorNameAttributeType(arg *SubscriptionProductGetVendorNameAttributeType, val SubscriptionProductGetVendorNameRetType) { - *arg = &val -} - -type SubscriptionProductGetVendorNameArgType = string -type SubscriptionProductGetVendorNameRetType = string - -/* - types and functions for vendorPlanId -*/ - -// isNotNullableString -type SubscriptionProductGetVendorPlanIdAttributeType = *string - -func getSubscriptionProductGetVendorPlanIdAttributeTypeOk(arg SubscriptionProductGetVendorPlanIdAttributeType) (ret SubscriptionProductGetVendorPlanIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setSubscriptionProductGetVendorPlanIdAttributeType(arg *SubscriptionProductGetVendorPlanIdAttributeType, val SubscriptionProductGetVendorPlanIdRetType) { - *arg = &val -} - -type SubscriptionProductGetVendorPlanIdArgType = string -type SubscriptionProductGetVendorPlanIdRetType = string - -/* - types and functions for vendorProductId -*/ - -// isNotNullableString -type SubscriptionProductGetVendorProductIdAttributeType = *string - -func getSubscriptionProductGetVendorProductIdAttributeTypeOk(arg SubscriptionProductGetVendorProductIdAttributeType) (ret SubscriptionProductGetVendorProductIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setSubscriptionProductGetVendorProductIdAttributeType(arg *SubscriptionProductGetVendorProductIdAttributeType, val SubscriptionProductGetVendorProductIdRetType) { - *arg = &val -} - -type SubscriptionProductGetVendorProductIdArgType = string -type SubscriptionProductGetVendorProductIdRetType = string - -/* - types and functions for vendorWebsiteUrl -*/ - -// isNotNullableString -type SubscriptionProductGetVendorWebsiteUrlAttributeType = *string - -func getSubscriptionProductGetVendorWebsiteUrlAttributeTypeOk(arg SubscriptionProductGetVendorWebsiteUrlAttributeType) (ret SubscriptionProductGetVendorWebsiteUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setSubscriptionProductGetVendorWebsiteUrlAttributeType(arg *SubscriptionProductGetVendorWebsiteUrlAttributeType, val SubscriptionProductGetVendorWebsiteUrlRetType) { - *arg = &val -} - -type SubscriptionProductGetVendorWebsiteUrlArgType = string -type SubscriptionProductGetVendorWebsiteUrlRetType = string - -// SubscriptionProduct The product of a subscription -type SubscriptionProduct struct { - Assets SubscriptionProductGetAssetsAttributeType `json:"assets,omitempty"` - // REQUIRED - DeliveryMethod SubscriptionProductGetDeliveryMethodAttributeType `json:"deliveryMethod" required:"true"` - // REQUIRED - LifecycleState SubscriptionProductGetLifecycleStateAttributeType `json:"lifecycleState" required:"true"` - // The user-readable plan ID of a pricing option. - // REQUIRED - PlanId SubscriptionProductGetPlanIdAttributeType `json:"planId" required:"true"` - // REQUIRED - PriceType SubscriptionProductGetPriceTypeAttributeType `json:"priceType" required:"true"` - // Additional price type information. - // REQUIRED - PricingPlan SubscriptionProductGetPricingPlanAttributeType `json:"pricingPlan" required:"true"` - // The user-readable product ID. - // REQUIRED - ProductId SubscriptionProductGetProductIdAttributeType `json:"productId" required:"true"` - // The name of the product. - // REQUIRED - ProductName SubscriptionProductGetProductNameAttributeType `json:"productName" required:"true"` - // The product's vendor name. - // REQUIRED - 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" required:"true"` -} - -type _SubscriptionProduct SubscriptionProduct - -// NewSubscriptionProduct instantiates a new SubscriptionProduct 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 NewSubscriptionProduct(deliveryMethod SubscriptionProductGetDeliveryMethodArgType, lifecycleState SubscriptionProductGetLifecycleStateArgType, planId SubscriptionProductGetPlanIdArgType, priceType SubscriptionProductGetPriceTypeArgType, pricingPlan SubscriptionProductGetPricingPlanArgType, productId SubscriptionProductGetProductIdArgType, productName SubscriptionProductGetProductNameArgType, vendorName SubscriptionProductGetVendorNameArgType, vendorWebsiteUrl SubscriptionProductGetVendorWebsiteUrlArgType) *SubscriptionProduct { - this := SubscriptionProduct{} - setSubscriptionProductGetDeliveryMethodAttributeType(&this.DeliveryMethod, deliveryMethod) - setSubscriptionProductGetLifecycleStateAttributeType(&this.LifecycleState, lifecycleState) - setSubscriptionProductGetPlanIdAttributeType(&this.PlanId, planId) - setSubscriptionProductGetPriceTypeAttributeType(&this.PriceType, priceType) - setSubscriptionProductGetPricingPlanAttributeType(&this.PricingPlan, pricingPlan) - setSubscriptionProductGetProductIdAttributeType(&this.ProductId, productId) - setSubscriptionProductGetProductNameAttributeType(&this.ProductName, productName) - setSubscriptionProductGetVendorNameAttributeType(&this.VendorName, vendorName) - setSubscriptionProductGetVendorWebsiteUrlAttributeType(&this.VendorWebsiteUrl, vendorWebsiteUrl) - return &this -} - -// NewSubscriptionProductWithDefaults instantiates a new SubscriptionProduct 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 NewSubscriptionProductWithDefaults() *SubscriptionProduct { - this := SubscriptionProduct{} - return &this -} - -// GetAssets returns the Assets field value if set, zero value otherwise. -func (o *SubscriptionProduct) GetAssets() (res SubscriptionProductGetAssetsRetType) { - res, _ = o.GetAssetsOk() - return -} - -// GetAssetsOk returns a tuple with the Assets field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SubscriptionProduct) GetAssetsOk() (ret SubscriptionProductGetAssetsRetType, ok bool) { - return getSubscriptionProductGetAssetsAttributeTypeOk(o.Assets) -} - -// HasAssets returns a boolean if a field has been set. -func (o *SubscriptionProduct) HasAssets() bool { - _, ok := o.GetAssetsOk() - return ok -} - -// SetAssets gets a reference to the given Assets and assigns it to the Assets field. -func (o *SubscriptionProduct) SetAssets(v SubscriptionProductGetAssetsRetType) { - setSubscriptionProductGetAssetsAttributeType(&o.Assets, v) -} - -// GetDeliveryMethod returns the DeliveryMethod field value -func (o *SubscriptionProduct) GetDeliveryMethod() (ret SubscriptionProductGetDeliveryMethodRetType) { - ret, _ = o.GetDeliveryMethodOk() - return ret -} - -// GetDeliveryMethodOk returns a tuple with the DeliveryMethod field value -// and a boolean to check if the value has been set. -func (o *SubscriptionProduct) GetDeliveryMethodOk() (ret SubscriptionProductGetDeliveryMethodRetType, ok bool) { - return getSubscriptionProductGetDeliveryMethodAttributeTypeOk(o.DeliveryMethod) -} - -// SetDeliveryMethod sets field value -func (o *SubscriptionProduct) SetDeliveryMethod(v SubscriptionProductGetDeliveryMethodRetType) { - setSubscriptionProductGetDeliveryMethodAttributeType(&o.DeliveryMethod, v) -} - -// GetLifecycleState returns the LifecycleState field value -func (o *SubscriptionProduct) GetLifecycleState() (ret SubscriptionProductGetLifecycleStateRetType) { - ret, _ = o.GetLifecycleStateOk() - return ret -} - -// GetLifecycleStateOk returns a tuple with the LifecycleState field value -// and a boolean to check if the value has been set. -func (o *SubscriptionProduct) GetLifecycleStateOk() (ret SubscriptionProductGetLifecycleStateRetType, ok bool) { - return getSubscriptionProductGetLifecycleStateAttributeTypeOk(o.LifecycleState) -} - -// SetLifecycleState sets field value -func (o *SubscriptionProduct) SetLifecycleState(v SubscriptionProductGetLifecycleStateRetType) { - setSubscriptionProductGetLifecycleStateAttributeType(&o.LifecycleState, v) -} - -// GetPlanId returns the PlanId field value -func (o *SubscriptionProduct) GetPlanId() (ret SubscriptionProductGetPlanIdRetType) { - ret, _ = o.GetPlanIdOk() - return ret -} - -// GetPlanIdOk returns a tuple with the PlanId field value -// and a boolean to check if the value has been set. -func (o *SubscriptionProduct) GetPlanIdOk() (ret SubscriptionProductGetPlanIdRetType, ok bool) { - return getSubscriptionProductGetPlanIdAttributeTypeOk(o.PlanId) -} - -// SetPlanId sets field value -func (o *SubscriptionProduct) SetPlanId(v SubscriptionProductGetPlanIdRetType) { - setSubscriptionProductGetPlanIdAttributeType(&o.PlanId, v) -} - -// GetPriceType returns the PriceType field value -func (o *SubscriptionProduct) GetPriceType() (ret SubscriptionProductGetPriceTypeRetType) { - ret, _ = o.GetPriceTypeOk() - return ret -} - -// GetPriceTypeOk returns a tuple with the PriceType field value -// and a boolean to check if the value has been set. -func (o *SubscriptionProduct) GetPriceTypeOk() (ret SubscriptionProductGetPriceTypeRetType, ok bool) { - return getSubscriptionProductGetPriceTypeAttributeTypeOk(o.PriceType) -} - -// SetPriceType sets field value -func (o *SubscriptionProduct) SetPriceType(v SubscriptionProductGetPriceTypeRetType) { - setSubscriptionProductGetPriceTypeAttributeType(&o.PriceType, v) -} - -// GetPricingPlan returns the PricingPlan field value -func (o *SubscriptionProduct) GetPricingPlan() (ret SubscriptionProductGetPricingPlanRetType) { - ret, _ = o.GetPricingPlanOk() - return ret -} - -// GetPricingPlanOk returns a tuple with the PricingPlan field value -// and a boolean to check if the value has been set. -func (o *SubscriptionProduct) GetPricingPlanOk() (ret SubscriptionProductGetPricingPlanRetType, ok bool) { - return getSubscriptionProductGetPricingPlanAttributeTypeOk(o.PricingPlan) -} - -// SetPricingPlan sets field value -func (o *SubscriptionProduct) SetPricingPlan(v SubscriptionProductGetPricingPlanRetType) { - setSubscriptionProductGetPricingPlanAttributeType(&o.PricingPlan, v) -} - -// GetProductId returns the ProductId field value -func (o *SubscriptionProduct) GetProductId() (ret SubscriptionProductGetProductIdRetType) { - 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 *SubscriptionProduct) GetProductIdOk() (ret SubscriptionProductGetProductIdRetType, ok bool) { - return getSubscriptionProductGetProductIdAttributeTypeOk(o.ProductId) -} - -// SetProductId sets field value -func (o *SubscriptionProduct) SetProductId(v SubscriptionProductGetProductIdRetType) { - setSubscriptionProductGetProductIdAttributeType(&o.ProductId, v) -} - -// GetProductName returns the ProductName field value -func (o *SubscriptionProduct) GetProductName() (ret SubscriptionProductGetProductNameRetType) { - ret, _ = o.GetProductNameOk() - return ret -} - -// GetProductNameOk returns a tuple with the ProductName field value -// and a boolean to check if the value has been set. -func (o *SubscriptionProduct) GetProductNameOk() (ret SubscriptionProductGetProductNameRetType, ok bool) { - return getSubscriptionProductGetProductNameAttributeTypeOk(o.ProductName) -} - -// SetProductName sets field value -func (o *SubscriptionProduct) SetProductName(v SubscriptionProductGetProductNameRetType) { - setSubscriptionProductGetProductNameAttributeType(&o.ProductName, v) -} - -// GetVendorName returns the VendorName field value -func (o *SubscriptionProduct) GetVendorName() (ret SubscriptionProductGetVendorNameRetType) { - ret, _ = o.GetVendorNameOk() - return ret -} - -// GetVendorNameOk returns a tuple with the VendorName field value -// and a boolean to check if the value has been set. -func (o *SubscriptionProduct) GetVendorNameOk() (ret SubscriptionProductGetVendorNameRetType, ok bool) { - return getSubscriptionProductGetVendorNameAttributeTypeOk(o.VendorName) -} - -// SetVendorName sets field value -func (o *SubscriptionProduct) SetVendorName(v SubscriptionProductGetVendorNameRetType) { - setSubscriptionProductGetVendorNameAttributeType(&o.VendorName, v) -} - -// GetVendorPlanId returns the VendorPlanId field value if set, zero value otherwise. -func (o *SubscriptionProduct) GetVendorPlanId() (res SubscriptionProductGetVendorPlanIdRetType) { - res, _ = o.GetVendorPlanIdOk() - return -} - -// GetVendorPlanIdOk returns a tuple with the VendorPlanId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SubscriptionProduct) GetVendorPlanIdOk() (ret SubscriptionProductGetVendorPlanIdRetType, ok bool) { - return getSubscriptionProductGetVendorPlanIdAttributeTypeOk(o.VendorPlanId) -} - -// HasVendorPlanId returns a boolean if a field has been set. -func (o *SubscriptionProduct) HasVendorPlanId() bool { - _, ok := o.GetVendorPlanIdOk() - return ok -} - -// SetVendorPlanId gets a reference to the given string and assigns it to the VendorPlanId field. -func (o *SubscriptionProduct) SetVendorPlanId(v SubscriptionProductGetVendorPlanIdRetType) { - setSubscriptionProductGetVendorPlanIdAttributeType(&o.VendorPlanId, v) -} - -// GetVendorProductId returns the VendorProductId field value if set, zero value otherwise. -func (o *SubscriptionProduct) GetVendorProductId() (res SubscriptionProductGetVendorProductIdRetType) { - res, _ = o.GetVendorProductIdOk() - return -} - -// GetVendorProductIdOk returns a tuple with the VendorProductId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SubscriptionProduct) GetVendorProductIdOk() (ret SubscriptionProductGetVendorProductIdRetType, ok bool) { - return getSubscriptionProductGetVendorProductIdAttributeTypeOk(o.VendorProductId) -} - -// HasVendorProductId returns a boolean if a field has been set. -func (o *SubscriptionProduct) HasVendorProductId() bool { - _, ok := o.GetVendorProductIdOk() - return ok -} - -// SetVendorProductId gets a reference to the given string and assigns it to the VendorProductId field. -func (o *SubscriptionProduct) SetVendorProductId(v SubscriptionProductGetVendorProductIdRetType) { - setSubscriptionProductGetVendorProductIdAttributeType(&o.VendorProductId, v) -} - -// GetVendorWebsiteUrl returns the VendorWebsiteUrl field value -func (o *SubscriptionProduct) GetVendorWebsiteUrl() (ret SubscriptionProductGetVendorWebsiteUrlRetType) { - ret, _ = o.GetVendorWebsiteUrlOk() - return ret -} - -// GetVendorWebsiteUrlOk returns a tuple with the VendorWebsiteUrl field value -// and a boolean to check if the value has been set. -func (o *SubscriptionProduct) GetVendorWebsiteUrlOk() (ret SubscriptionProductGetVendorWebsiteUrlRetType, ok bool) { - return getSubscriptionProductGetVendorWebsiteUrlAttributeTypeOk(o.VendorWebsiteUrl) -} - -// SetVendorWebsiteUrl sets field value -func (o *SubscriptionProduct) SetVendorWebsiteUrl(v SubscriptionProductGetVendorWebsiteUrlRetType) { - setSubscriptionProductGetVendorWebsiteUrlAttributeType(&o.VendorWebsiteUrl, v) -} - -func (o SubscriptionProduct) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getSubscriptionProductGetAssetsAttributeTypeOk(o.Assets); ok { - toSerialize["Assets"] = val - } - if val, ok := getSubscriptionProductGetDeliveryMethodAttributeTypeOk(o.DeliveryMethod); ok { - toSerialize["DeliveryMethod"] = val - } - if val, ok := getSubscriptionProductGetLifecycleStateAttributeTypeOk(o.LifecycleState); ok { - toSerialize["LifecycleState"] = val - } - if val, ok := getSubscriptionProductGetPlanIdAttributeTypeOk(o.PlanId); ok { - toSerialize["PlanId"] = val - } - if val, ok := getSubscriptionProductGetPriceTypeAttributeTypeOk(o.PriceType); ok { - toSerialize["PriceType"] = val - } - if val, ok := getSubscriptionProductGetPricingPlanAttributeTypeOk(o.PricingPlan); ok { - toSerialize["PricingPlan"] = val - } - if val, ok := getSubscriptionProductGetProductIdAttributeTypeOk(o.ProductId); ok { - toSerialize["ProductId"] = val - } - if val, ok := getSubscriptionProductGetProductNameAttributeTypeOk(o.ProductName); ok { - toSerialize["ProductName"] = val - } - if val, ok := getSubscriptionProductGetVendorNameAttributeTypeOk(o.VendorName); ok { - toSerialize["VendorName"] = val - } - if val, ok := getSubscriptionProductGetVendorPlanIdAttributeTypeOk(o.VendorPlanId); ok { - toSerialize["VendorPlanId"] = val - } - if val, ok := getSubscriptionProductGetVendorProductIdAttributeTypeOk(o.VendorProductId); ok { - toSerialize["VendorProductId"] = val - } - if val, ok := getSubscriptionProductGetVendorWebsiteUrlAttributeTypeOk(o.VendorWebsiteUrl); ok { - toSerialize["VendorWebsiteUrl"] = val - } - return toSerialize, nil -} - -type NullableSubscriptionProduct struct { - value *SubscriptionProduct - isSet bool -} - -func (v NullableSubscriptionProduct) Get() *SubscriptionProduct { - return v.value -} - -func (v *NullableSubscriptionProduct) Set(val *SubscriptionProduct) { - v.value = val - v.isSet = true -} - -func (v NullableSubscriptionProduct) IsSet() bool { - return v.isSet -} - -func (v *NullableSubscriptionProduct) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSubscriptionProduct(val *SubscriptionProduct) *NullableSubscriptionProduct { - return &NullableSubscriptionProduct{value: val, isSet: true} -} - -func (v NullableSubscriptionProduct) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSubscriptionProduct) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_subscription_product_test.go b/services/stackitmarketplace/model_subscription_product_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_subscription_product_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_suggest_product.go b/services/stackitmarketplace/model_suggest_product.go deleted file mode 100644 index 38ee46bf7..000000000 --- a/services/stackitmarketplace/model_suggest_product.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the SuggestProduct type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SuggestProduct{} - -/* - types and functions for suggestProduct -*/ - -// isModel -type SuggestProductGetSuggestProductAttributeType = *InquirySuggestProduct -type SuggestProductGetSuggestProductArgType = InquirySuggestProduct -type SuggestProductGetSuggestProductRetType = InquirySuggestProduct - -func getSuggestProductGetSuggestProductAttributeTypeOk(arg SuggestProductGetSuggestProductAttributeType) (ret SuggestProductGetSuggestProductRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setSuggestProductGetSuggestProductAttributeType(arg *SuggestProductGetSuggestProductAttributeType, val SuggestProductGetSuggestProductRetType) { - *arg = &val -} - -/* - types and functions for type -*/ - -// isEnumRef -type SuggestProductGetTypeAttributeType = *InquiryFormType -type SuggestProductGetTypeArgType = InquiryFormType -type SuggestProductGetTypeRetType = InquiryFormType - -func getSuggestProductGetTypeAttributeTypeOk(arg SuggestProductGetTypeAttributeType) (ret SuggestProductGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setSuggestProductGetTypeAttributeType(arg *SuggestProductGetTypeAttributeType, val SuggestProductGetTypeRetType) { - *arg = &val -} - -// SuggestProduct Suggest a product. -type SuggestProduct struct { - // REQUIRED - SuggestProduct SuggestProductGetSuggestProductAttributeType `json:"suggestProduct" required:"true"` - // REQUIRED - Type SuggestProductGetTypeAttributeType `json:"type" required:"true"` -} - -type _SuggestProduct SuggestProduct - -// NewSuggestProduct instantiates a new SuggestProduct 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 NewSuggestProduct(suggestProduct SuggestProductGetSuggestProductArgType, types SuggestProductGetTypeArgType) *SuggestProduct { - this := SuggestProduct{} - setSuggestProductGetSuggestProductAttributeType(&this.SuggestProduct, suggestProduct) - setSuggestProductGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewSuggestProductWithDefaults instantiates a new SuggestProduct 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 NewSuggestProductWithDefaults() *SuggestProduct { - this := SuggestProduct{} - return &this -} - -// GetSuggestProduct returns the SuggestProduct field value -func (o *SuggestProduct) GetSuggestProduct() (ret SuggestProductGetSuggestProductRetType) { - ret, _ = o.GetSuggestProductOk() - return ret -} - -// GetSuggestProductOk returns a tuple with the SuggestProduct field value -// and a boolean to check if the value has been set. -func (o *SuggestProduct) GetSuggestProductOk() (ret SuggestProductGetSuggestProductRetType, ok bool) { - return getSuggestProductGetSuggestProductAttributeTypeOk(o.SuggestProduct) -} - -// SetSuggestProduct sets field value -func (o *SuggestProduct) SetSuggestProduct(v SuggestProductGetSuggestProductRetType) { - setSuggestProductGetSuggestProductAttributeType(&o.SuggestProduct, v) -} - -// GetType returns the Type field value -func (o *SuggestProduct) GetType() (ret SuggestProductGetTypeRetType) { - 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 *SuggestProduct) GetTypeOk() (ret SuggestProductGetTypeRetType, ok bool) { - return getSuggestProductGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -func (o *SuggestProduct) SetType(v SuggestProductGetTypeRetType) { - setSuggestProductGetTypeAttributeType(&o.Type, v) -} - -func (o SuggestProduct) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getSuggestProductGetSuggestProductAttributeTypeOk(o.SuggestProduct); ok { - toSerialize["SuggestProduct"] = val - } - if val, ok := getSuggestProductGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -type NullableSuggestProduct struct { - value *SuggestProduct - isSet bool -} - -func (v NullableSuggestProduct) Get() *SuggestProduct { - return v.value -} - -func (v *NullableSuggestProduct) Set(val *SuggestProduct) { - v.value = val - v.isSet = true -} - -func (v NullableSuggestProduct) IsSet() bool { - return v.isSet -} - -func (v *NullableSuggestProduct) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSuggestProduct(val *SuggestProduct) *NullableSuggestProduct { - return &NullableSuggestProduct{value: val, isSet: true} -} - -func (v NullableSuggestProduct) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSuggestProduct) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_suggest_product_test.go b/services/stackitmarketplace/model_suggest_product_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_suggest_product_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_vendor_id.go b/services/stackitmarketplace/model_vendor_id.go deleted file mode 100644 index 033d20c39..000000000 --- a/services/stackitmarketplace/model_vendor_id.go +++ /dev/null @@ -1,80 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the VendorId type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VendorId{} - -// VendorId The vendor ID. -type VendorId struct { -} - -// NewVendorId instantiates a new VendorId object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewVendorId() *VendorId { - this := VendorId{} - return &this -} - -// NewVendorIdWithDefaults instantiates a new VendorId object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewVendorIdWithDefaults() *VendorId { - this := VendorId{} - return &this -} - -func (o VendorId) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - return toSerialize, nil -} - -type NullableVendorId struct { - value *VendorId - isSet bool -} - -func (v NullableVendorId) Get() *VendorId { - return v.value -} - -func (v *NullableVendorId) Set(val *VendorId) { - v.value = val - v.isSet = true -} - -func (v NullableVendorId) IsSet() bool { - return v.isSet -} - -func (v *NullableVendorId) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVendorId(val *VendorId) *NullableVendorId { - return &NullableVendorId{value: val, isSet: true} -} - -func (v NullableVendorId) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVendorId) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_vendor_id_test.go b/services/stackitmarketplace/model_vendor_id_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_vendor_id_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/model_vendor_subscription.go b/services/stackitmarketplace/model_vendor_subscription.go deleted file mode 100644 index fb7f0af55..000000000 --- a/services/stackitmarketplace/model_vendor_subscription.go +++ /dev/null @@ -1,303 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace - -import ( - "encoding/json" -) - -// checks if the VendorSubscription type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VendorSubscription{} - -/* - types and functions for lifecycleState -*/ - -// isEnumRef -type VendorSubscriptionGetLifecycleStateAttributeType = *SubscriptionLifecycleState -type VendorSubscriptionGetLifecycleStateArgType = SubscriptionLifecycleState -type VendorSubscriptionGetLifecycleStateRetType = SubscriptionLifecycleState - -func getVendorSubscriptionGetLifecycleStateAttributeTypeOk(arg VendorSubscriptionGetLifecycleStateAttributeType) (ret VendorSubscriptionGetLifecycleStateRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setVendorSubscriptionGetLifecycleStateAttributeType(arg *VendorSubscriptionGetLifecycleStateAttributeType, val VendorSubscriptionGetLifecycleStateRetType) { - *arg = &val -} - -/* - types and functions for organizationId -*/ - -// isNotNullableString -type VendorSubscriptionGetOrganizationIdAttributeType = *string - -func getVendorSubscriptionGetOrganizationIdAttributeTypeOk(arg VendorSubscriptionGetOrganizationIdAttributeType) (ret VendorSubscriptionGetOrganizationIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setVendorSubscriptionGetOrganizationIdAttributeType(arg *VendorSubscriptionGetOrganizationIdAttributeType, val VendorSubscriptionGetOrganizationIdRetType) { - *arg = &val -} - -type VendorSubscriptionGetOrganizationIdArgType = string -type VendorSubscriptionGetOrganizationIdRetType = string - -/* - types and functions for product -*/ - -// isModel -type VendorSubscriptionGetProductAttributeType = *SubscriptionProduct -type VendorSubscriptionGetProductArgType = SubscriptionProduct -type VendorSubscriptionGetProductRetType = SubscriptionProduct - -func getVendorSubscriptionGetProductAttributeTypeOk(arg VendorSubscriptionGetProductAttributeType) (ret VendorSubscriptionGetProductRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setVendorSubscriptionGetProductAttributeType(arg *VendorSubscriptionGetProductAttributeType, val VendorSubscriptionGetProductRetType) { - *arg = &val -} - -/* - types and functions for projectId -*/ - -// isNotNullableString -type VendorSubscriptionGetProjectIdAttributeType = *string - -func getVendorSubscriptionGetProjectIdAttributeTypeOk(arg VendorSubscriptionGetProjectIdAttributeType) (ret VendorSubscriptionGetProjectIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setVendorSubscriptionGetProjectIdAttributeType(arg *VendorSubscriptionGetProjectIdAttributeType, val VendorSubscriptionGetProjectIdRetType) { - *arg = &val -} - -type VendorSubscriptionGetProjectIdArgType = string -type VendorSubscriptionGetProjectIdRetType = string - -/* - types and functions for subscriptionId -*/ - -// isNotNullableString -type VendorSubscriptionGetSubscriptionIdAttributeType = *string - -func getVendorSubscriptionGetSubscriptionIdAttributeTypeOk(arg VendorSubscriptionGetSubscriptionIdAttributeType) (ret VendorSubscriptionGetSubscriptionIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setVendorSubscriptionGetSubscriptionIdAttributeType(arg *VendorSubscriptionGetSubscriptionIdAttributeType, val VendorSubscriptionGetSubscriptionIdRetType) { - *arg = &val -} - -type VendorSubscriptionGetSubscriptionIdArgType = string -type VendorSubscriptionGetSubscriptionIdRetType = string - -// VendorSubscription struct for VendorSubscription -type VendorSubscription struct { - // REQUIRED - LifecycleState VendorSubscriptionGetLifecycleStateAttributeType `json:"lifecycleState" required:"true"` - // Universally Unique Identifier (UUID). - // REQUIRED - OrganizationId VendorSubscriptionGetOrganizationIdAttributeType `json:"organizationId" required:"true"` - // REQUIRED - Product VendorSubscriptionGetProductAttributeType `json:"product" required:"true"` - // Universally Unique Identifier (UUID). - // REQUIRED - ProjectId VendorSubscriptionGetProjectIdAttributeType `json:"projectId" required:"true"` - // Universally Unique Identifier (UUID). - // REQUIRED - SubscriptionId VendorSubscriptionGetSubscriptionIdAttributeType `json:"subscriptionId" required:"true"` -} - -type _VendorSubscription VendorSubscription - -// NewVendorSubscription instantiates a new VendorSubscription 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 NewVendorSubscription(lifecycleState VendorSubscriptionGetLifecycleStateArgType, organizationId VendorSubscriptionGetOrganizationIdArgType, product VendorSubscriptionGetProductArgType, projectId VendorSubscriptionGetProjectIdArgType, subscriptionId VendorSubscriptionGetSubscriptionIdArgType) *VendorSubscription { - this := VendorSubscription{} - setVendorSubscriptionGetLifecycleStateAttributeType(&this.LifecycleState, lifecycleState) - setVendorSubscriptionGetOrganizationIdAttributeType(&this.OrganizationId, organizationId) - setVendorSubscriptionGetProductAttributeType(&this.Product, product) - setVendorSubscriptionGetProjectIdAttributeType(&this.ProjectId, projectId) - setVendorSubscriptionGetSubscriptionIdAttributeType(&this.SubscriptionId, subscriptionId) - return &this -} - -// NewVendorSubscriptionWithDefaults instantiates a new VendorSubscription 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 NewVendorSubscriptionWithDefaults() *VendorSubscription { - this := VendorSubscription{} - return &this -} - -// GetLifecycleState returns the LifecycleState field value -func (o *VendorSubscription) GetLifecycleState() (ret VendorSubscriptionGetLifecycleStateRetType) { - ret, _ = o.GetLifecycleStateOk() - return ret -} - -// GetLifecycleStateOk returns a tuple with the LifecycleState field value -// and a boolean to check if the value has been set. -func (o *VendorSubscription) GetLifecycleStateOk() (ret VendorSubscriptionGetLifecycleStateRetType, ok bool) { - return getVendorSubscriptionGetLifecycleStateAttributeTypeOk(o.LifecycleState) -} - -// SetLifecycleState sets field value -func (o *VendorSubscription) SetLifecycleState(v VendorSubscriptionGetLifecycleStateRetType) { - setVendorSubscriptionGetLifecycleStateAttributeType(&o.LifecycleState, v) -} - -// GetOrganizationId returns the OrganizationId field value -func (o *VendorSubscription) GetOrganizationId() (ret VendorSubscriptionGetOrganizationIdRetType) { - ret, _ = o.GetOrganizationIdOk() - return ret -} - -// GetOrganizationIdOk returns a tuple with the OrganizationId field value -// and a boolean to check if the value has been set. -func (o *VendorSubscription) GetOrganizationIdOk() (ret VendorSubscriptionGetOrganizationIdRetType, ok bool) { - return getVendorSubscriptionGetOrganizationIdAttributeTypeOk(o.OrganizationId) -} - -// SetOrganizationId sets field value -func (o *VendorSubscription) SetOrganizationId(v VendorSubscriptionGetOrganizationIdRetType) { - setVendorSubscriptionGetOrganizationIdAttributeType(&o.OrganizationId, v) -} - -// GetProduct returns the Product field value -func (o *VendorSubscription) GetProduct() (ret VendorSubscriptionGetProductRetType) { - ret, _ = o.GetProductOk() - return ret -} - -// GetProductOk returns a tuple with the Product field value -// and a boolean to check if the value has been set. -func (o *VendorSubscription) GetProductOk() (ret VendorSubscriptionGetProductRetType, ok bool) { - return getVendorSubscriptionGetProductAttributeTypeOk(o.Product) -} - -// SetProduct sets field value -func (o *VendorSubscription) SetProduct(v VendorSubscriptionGetProductRetType) { - setVendorSubscriptionGetProductAttributeType(&o.Product, v) -} - -// GetProjectId returns the ProjectId field value -func (o *VendorSubscription) GetProjectId() (ret VendorSubscriptionGetProjectIdRetType) { - ret, _ = o.GetProjectIdOk() - return ret -} - -// GetProjectIdOk returns a tuple with the ProjectId field value -// and a boolean to check if the value has been set. -func (o *VendorSubscription) GetProjectIdOk() (ret VendorSubscriptionGetProjectIdRetType, ok bool) { - return getVendorSubscriptionGetProjectIdAttributeTypeOk(o.ProjectId) -} - -// SetProjectId sets field value -func (o *VendorSubscription) SetProjectId(v VendorSubscriptionGetProjectIdRetType) { - setVendorSubscriptionGetProjectIdAttributeType(&o.ProjectId, v) -} - -// GetSubscriptionId returns the SubscriptionId field value -func (o *VendorSubscription) GetSubscriptionId() (ret VendorSubscriptionGetSubscriptionIdRetType) { - ret, _ = o.GetSubscriptionIdOk() - return ret -} - -// GetSubscriptionIdOk returns a tuple with the SubscriptionId field value -// and a boolean to check if the value has been set. -func (o *VendorSubscription) GetSubscriptionIdOk() (ret VendorSubscriptionGetSubscriptionIdRetType, ok bool) { - return getVendorSubscriptionGetSubscriptionIdAttributeTypeOk(o.SubscriptionId) -} - -// SetSubscriptionId sets field value -func (o *VendorSubscription) SetSubscriptionId(v VendorSubscriptionGetSubscriptionIdRetType) { - setVendorSubscriptionGetSubscriptionIdAttributeType(&o.SubscriptionId, v) -} - -func (o VendorSubscription) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getVendorSubscriptionGetLifecycleStateAttributeTypeOk(o.LifecycleState); ok { - toSerialize["LifecycleState"] = val - } - if val, ok := getVendorSubscriptionGetOrganizationIdAttributeTypeOk(o.OrganizationId); ok { - toSerialize["OrganizationId"] = val - } - if val, ok := getVendorSubscriptionGetProductAttributeTypeOk(o.Product); ok { - toSerialize["Product"] = val - } - if val, ok := getVendorSubscriptionGetProjectIdAttributeTypeOk(o.ProjectId); ok { - toSerialize["ProjectId"] = val - } - if val, ok := getVendorSubscriptionGetSubscriptionIdAttributeTypeOk(o.SubscriptionId); ok { - toSerialize["SubscriptionId"] = val - } - return toSerialize, nil -} - -type NullableVendorSubscription struct { - value *VendorSubscription - isSet bool -} - -func (v NullableVendorSubscription) Get() *VendorSubscription { - return v.value -} - -func (v *NullableVendorSubscription) Set(val *VendorSubscription) { - v.value = val - v.isSet = true -} - -func (v NullableVendorSubscription) IsSet() bool { - return v.isSet -} - -func (v *NullableVendorSubscription) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVendorSubscription(val *VendorSubscription) *NullableVendorSubscription { - return &NullableVendorSubscription{value: val, isSet: true} -} - -func (v NullableVendorSubscription) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVendorSubscription) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/stackitmarketplace/model_vendor_subscription_test.go b/services/stackitmarketplace/model_vendor_subscription_test.go deleted file mode 100644 index 8d52b2c3c..000000000 --- a/services/stackitmarketplace/model_vendor_subscription_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Marketplace API - -API to manage STACKIT Marketplace. - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace diff --git a/services/stackitmarketplace/oas_commit b/services/stackitmarketplace/oas_commit new file mode 100644 index 000000000..5c05d0ead --- /dev/null +++ b/services/stackitmarketplace/oas_commit @@ -0,0 +1 @@ +58dbd39e05f1ddc2d44b191eb3476225130c4ded diff --git a/services/stackitmarketplace/package.go b/services/stackitmarketplace/package.go new file mode 100644 index 000000000..e61453211 --- /dev/null +++ b/services/stackitmarketplace/package.go @@ -0,0 +1 @@ +package stackitmarketplace diff --git a/services/stackitmarketplace/v1api/api_default.go b/services/stackitmarketplace/v1api/api_default.go new file mode 100644 index 000000000..265dd8b81 --- /dev/null +++ b/services/stackitmarketplace/v1api/api_default.go @@ -0,0 +1,2272 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +Contact: marketplace@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v1api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + + "github.com/stackitcloud/stackit-sdk-go/core/config" + "github.com/stackitcloud/stackit-sdk-go/core/oapierror" +) + +type DefaultAPI interface { + + /* + ApproveSubscription Approve a pending subscription. + + Approve a pending subscription. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param subscriptionId + @return ApiApproveSubscriptionRequest + */ + ApproveSubscription(ctx context.Context, projectId string, subscriptionId string) ApiApproveSubscriptionRequest + + // ApproveSubscriptionExecute executes the request + ApproveSubscriptionExecute(r ApiApproveSubscriptionRequest) error + + /* + ConsumersSubscriptionsCancel Cancel a subscription. + + Cancel a subscription. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param subscriptionId + @return ApiConsumersSubscriptionsCancelRequest + */ + ConsumersSubscriptionsCancel(ctx context.Context, projectId string, subscriptionId string) ApiConsumersSubscriptionsCancelRequest + + // ConsumersSubscriptionsCancelExecute executes the request + ConsumersSubscriptionsCancelExecute(r ApiConsumersSubscriptionsCancelRequest) error + + /* + ConsumersSubscriptionsCreate Create a new subscription. + + Create a new subscription. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @return ApiConsumersSubscriptionsCreateRequest + */ + ConsumersSubscriptionsCreate(ctx context.Context, projectId string) ApiConsumersSubscriptionsCreateRequest + + // ConsumersSubscriptionsCreateExecute executes the request + // @return MarketplaceSubscriptionV1Subscription + ConsumersSubscriptionsCreateExecute(r ApiConsumersSubscriptionsCreateRequest) (*MarketplaceSubscriptionV1Subscription, error) + + /* + ConsumersSubscriptionsGet Get a subscription. + + Get a subscription. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param subscriptionId + @return ApiConsumersSubscriptionsGetRequest + */ + ConsumersSubscriptionsGet(ctx context.Context, projectId string, subscriptionId string) ApiConsumersSubscriptionsGetRequest + + // ConsumersSubscriptionsGetExecute executes the request + // @return MarketplaceSubscriptionV1Subscription + ConsumersSubscriptionsGetExecute(r ApiConsumersSubscriptionsGetRequest) (*MarketplaceSubscriptionV1Subscription, error) + + /* + ConsumersSubscriptionsListByOrganization List all subscriptions of an organization. + + List all subscriptions of an organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param organizationId + @return ApiConsumersSubscriptionsListByOrganizationRequest + */ + ConsumersSubscriptionsListByOrganization(ctx context.Context, organizationId string) ApiConsumersSubscriptionsListByOrganizationRequest + + // ConsumersSubscriptionsListByOrganizationExecute executes the request + // @return MarketplaceSubscriptionV1ListSubscriptionsResponse + ConsumersSubscriptionsListByOrganizationExecute(r ApiConsumersSubscriptionsListByOrganizationRequest) (*MarketplaceSubscriptionV1ListSubscriptionsResponse, error) + + /* + ConsumersSubscriptionsListByProject List all subscriptions of an project. + + List all subscriptions of an project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @return ApiConsumersSubscriptionsListByProjectRequest + */ + ConsumersSubscriptionsListByProject(ctx context.Context, projectId string) ApiConsumersSubscriptionsListByProjectRequest + + // ConsumersSubscriptionsListByProjectExecute executes the request + // @return MarketplaceSubscriptionV1ListSubscriptionsResponse + ConsumersSubscriptionsListByProjectExecute(r ApiConsumersSubscriptionsListByProjectRequest) (*MarketplaceSubscriptionV1ListSubscriptionsResponse, error) + + /* + ConsumersSubscriptionsRedirectsGet Get a subscription redirect. + + Get a subscription redirect. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param subscriptionId + @return ApiConsumersSubscriptionsRedirectsGetRequest + */ + ConsumersSubscriptionsRedirectsGet(ctx context.Context, projectId string, subscriptionId string) ApiConsumersSubscriptionsRedirectsGetRequest + + // ConsumersSubscriptionsRedirectsGetExecute executes the request + // @return MarketplaceSubscriptionV1SubscriptionRedirect + ConsumersSubscriptionsRedirectsGetExecute(r ApiConsumersSubscriptionsRedirectsGetRequest) (*MarketplaceSubscriptionV1SubscriptionRedirect, error) + + /* + ResolveCustomer Resolve customer. + + Resolve customer. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @return ApiResolveCustomerRequest + */ + ResolveCustomer(ctx context.Context, projectId string) ApiResolveCustomerRequest + + // ResolveCustomerExecute executes the request + // @return MarketplaceSubscriptionV1Subscription + ResolveCustomerExecute(r ApiResolveCustomerRequest) (*MarketplaceSubscriptionV1Subscription, error) + + /* + VendorsSubscriptionsGet Get a subscription. + + Get a subscription. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param subscriptionId + @return ApiVendorsSubscriptionsGetRequest + */ + VendorsSubscriptionsGet(ctx context.Context, projectId string, subscriptionId string) ApiVendorsSubscriptionsGetRequest + + // VendorsSubscriptionsGetExecute executes the request + // @return MarketplaceSubscriptionV1Subscription + VendorsSubscriptionsGetExecute(r ApiVendorsSubscriptionsGetRequest) (*MarketplaceSubscriptionV1Subscription, error) + + /* + VendorsSubscriptionsListByOrganization List all subscriptions of an organization. + + List all subscriptions of an organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param organizationId + @return ApiVendorsSubscriptionsListByOrganizationRequest + */ + VendorsSubscriptionsListByOrganization(ctx context.Context, organizationId string) ApiVendorsSubscriptionsListByOrganizationRequest + + // VendorsSubscriptionsListByOrganizationExecute executes the request + // @return MarketplaceSubscriptionV1ListSubscriptionsResponse + VendorsSubscriptionsListByOrganizationExecute(r ApiVendorsSubscriptionsListByOrganizationRequest) (*MarketplaceSubscriptionV1ListSubscriptionsResponse, error) + + /* + VendorsSubscriptionsListByProject List all subscriptions of an project. + + List all subscriptions of an project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @return ApiVendorsSubscriptionsListByProjectRequest + */ + VendorsSubscriptionsListByProject(ctx context.Context, projectId string) ApiVendorsSubscriptionsListByProjectRequest + + // VendorsSubscriptionsListByProjectExecute executes the request + // @return MarketplaceSubscriptionV1ListSubscriptionsResponse + VendorsSubscriptionsListByProjectExecute(r ApiVendorsSubscriptionsListByProjectRequest) (*MarketplaceSubscriptionV1ListSubscriptionsResponse, error) + + /* + VendorsSubscriptionsReject Reject a subscription. + + Reject a subscription (in any lifecycle state). Only available for subscriptions to products with lifecycle state `PRODUCT_PREVIEW`. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param subscriptionId + @return ApiVendorsSubscriptionsRejectRequest + */ + VendorsSubscriptionsReject(ctx context.Context, projectId string, subscriptionId string) ApiVendorsSubscriptionsRejectRequest + + // VendorsSubscriptionsRejectExecute executes the request + VendorsSubscriptionsRejectExecute(r ApiVendorsSubscriptionsRejectRequest) error +} + +// DefaultAPIService DefaultAPI service +type DefaultAPIService service + +type ApiApproveSubscriptionRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + subscriptionId string + approveSubscriptionPayload *ApproveSubscriptionPayload +} + +func (r ApiApproveSubscriptionRequest) ApproveSubscriptionPayload(approveSubscriptionPayload ApproveSubscriptionPayload) ApiApproveSubscriptionRequest { + r.approveSubscriptionPayload = &approveSubscriptionPayload + return r +} + +func (r ApiApproveSubscriptionRequest) Execute() error { + return r.ApiService.ApproveSubscriptionExecute(r) +} + +/* +ApproveSubscription Approve a pending subscription. + +Approve a pending subscription. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param subscriptionId + @return ApiApproveSubscriptionRequest +*/ +func (a *DefaultAPIService) ApproveSubscription(ctx context.Context, projectId string, subscriptionId string) ApiApproveSubscriptionRequest { + return ApiApproveSubscriptionRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + subscriptionId: subscriptionId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) ApproveSubscriptionExecute(r ApiApproveSubscriptionRequest) error { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ApproveSubscription") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/vendors/projects/{projectId}/subscriptions/{subscriptionId}/approve" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", url.PathEscape(parameterValueToString(r.subscriptionId, "subscriptionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.approveSubscriptionPayload == nil { + return reportError("approveSubscriptionPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.approveSubscriptionPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return newErr + } + + return nil +} + +type ApiConsumersSubscriptionsCancelRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + subscriptionId string +} + +func (r ApiConsumersSubscriptionsCancelRequest) Execute() error { + return r.ApiService.ConsumersSubscriptionsCancelExecute(r) +} + +/* +ConsumersSubscriptionsCancel Cancel a subscription. + +Cancel a subscription. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param subscriptionId + @return ApiConsumersSubscriptionsCancelRequest +*/ +func (a *DefaultAPIService) ConsumersSubscriptionsCancel(ctx context.Context, projectId string, subscriptionId string) ApiConsumersSubscriptionsCancelRequest { + return ApiConsumersSubscriptionsCancelRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + subscriptionId: subscriptionId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) ConsumersSubscriptionsCancelExecute(r ApiConsumersSubscriptionsCancelRequest) error { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ConsumersSubscriptionsCancel") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/consumers/projects/{projectId}/subscriptions/{subscriptionId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", url.PathEscape(parameterValueToString(r.subscriptionId, "subscriptionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return newErr + } + + return nil +} + +type ApiConsumersSubscriptionsCreateRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + consumersSubscriptionsCreatePayload *ConsumersSubscriptionsCreatePayload +} + +func (r ApiConsumersSubscriptionsCreateRequest) ConsumersSubscriptionsCreatePayload(consumersSubscriptionsCreatePayload ConsumersSubscriptionsCreatePayload) ApiConsumersSubscriptionsCreateRequest { + r.consumersSubscriptionsCreatePayload = &consumersSubscriptionsCreatePayload + return r +} + +func (r ApiConsumersSubscriptionsCreateRequest) Execute() (*MarketplaceSubscriptionV1Subscription, error) { + return r.ApiService.ConsumersSubscriptionsCreateExecute(r) +} + +/* +ConsumersSubscriptionsCreate Create a new subscription. + +Create a new subscription. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @return ApiConsumersSubscriptionsCreateRequest +*/ +func (a *DefaultAPIService) ConsumersSubscriptionsCreate(ctx context.Context, projectId string) ApiConsumersSubscriptionsCreateRequest { + return ApiConsumersSubscriptionsCreateRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return MarketplaceSubscriptionV1Subscription +func (a *DefaultAPIService) ConsumersSubscriptionsCreateExecute(r ApiConsumersSubscriptionsCreateRequest) (*MarketplaceSubscriptionV1Subscription, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MarketplaceSubscriptionV1Subscription + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ConsumersSubscriptionsCreate") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/consumers/projects/{projectId}/subscriptions" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.consumersSubscriptionsCreatePayload == nil { + return localVarReturnValue, reportError("consumersSubscriptionsCreatePayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.consumersSubscriptionsCreatePayload + req, err := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.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 ErrorResponse + err = a.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 == 403 { + var v ErrorResponse + err = a.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 == 409 { + var v ErrorResponse + err = a.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 = a.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 +} + +type ApiConsumersSubscriptionsGetRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + subscriptionId string + includeExpired *bool +} + +// Flag to control if cancelled or rejected subscriptions should be returned. +func (r ApiConsumersSubscriptionsGetRequest) IncludeExpired(includeExpired bool) ApiConsumersSubscriptionsGetRequest { + r.includeExpired = &includeExpired + return r +} + +func (r ApiConsumersSubscriptionsGetRequest) Execute() (*MarketplaceSubscriptionV1Subscription, error) { + return r.ApiService.ConsumersSubscriptionsGetExecute(r) +} + +/* +ConsumersSubscriptionsGet Get a subscription. + +Get a subscription. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param subscriptionId + @return ApiConsumersSubscriptionsGetRequest +*/ +func (a *DefaultAPIService) ConsumersSubscriptionsGet(ctx context.Context, projectId string, subscriptionId string) ApiConsumersSubscriptionsGetRequest { + return ApiConsumersSubscriptionsGetRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + subscriptionId: subscriptionId, + } +} + +// Execute executes the request +// +// @return MarketplaceSubscriptionV1Subscription +func (a *DefaultAPIService) ConsumersSubscriptionsGetExecute(r ApiConsumersSubscriptionsGetRequest) (*MarketplaceSubscriptionV1Subscription, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MarketplaceSubscriptionV1Subscription + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ConsumersSubscriptionsGet") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/consumers/projects/{projectId}/subscriptions/{subscriptionId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", url.PathEscape(parameterValueToString(r.subscriptionId, "subscriptionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.includeExpired != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "includeExpired", r.includeExpired, "form", "") + } else { + var defaultValue bool = false + parameterAddToHeaderOrQuery(localVarQueryParams, "includeExpired", defaultValue, "form", "") + r.includeExpired = &defaultValue + } + // 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.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 ErrorResponse + err = a.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 == 403 { + var v ErrorResponse + err = a.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 == 404 { + var v ErrorResponse + err = a.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 = a.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 +} + +type ApiConsumersSubscriptionsListByOrganizationRequest struct { + ctx context.Context + ApiService DefaultAPI + organizationId string + cursor *string + limit *int32 + productId *string + includeExpired *bool +} + +func (r ApiConsumersSubscriptionsListByOrganizationRequest) Cursor(cursor string) ApiConsumersSubscriptionsListByOrganizationRequest { + r.cursor = &cursor + return r +} + +func (r ApiConsumersSubscriptionsListByOrganizationRequest) Limit(limit int32) ApiConsumersSubscriptionsListByOrganizationRequest { + r.limit = &limit + return r +} + +func (r ApiConsumersSubscriptionsListByOrganizationRequest) ProductId(productId string) ApiConsumersSubscriptionsListByOrganizationRequest { + r.productId = &productId + return r +} + +// Flag to control if cancelled or rejected subscriptions should be returned. +func (r ApiConsumersSubscriptionsListByOrganizationRequest) IncludeExpired(includeExpired bool) ApiConsumersSubscriptionsListByOrganizationRequest { + r.includeExpired = &includeExpired + return r +} + +func (r ApiConsumersSubscriptionsListByOrganizationRequest) Execute() (*MarketplaceSubscriptionV1ListSubscriptionsResponse, error) { + return r.ApiService.ConsumersSubscriptionsListByOrganizationExecute(r) +} + +/* +ConsumersSubscriptionsListByOrganization List all subscriptions of an organization. + +List all subscriptions of an organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param organizationId + @return ApiConsumersSubscriptionsListByOrganizationRequest +*/ +func (a *DefaultAPIService) ConsumersSubscriptionsListByOrganization(ctx context.Context, organizationId string) ApiConsumersSubscriptionsListByOrganizationRequest { + return ApiConsumersSubscriptionsListByOrganizationRequest{ + ApiService: a, + ctx: ctx, + organizationId: organizationId, + } +} + +// Execute executes the request +// +// @return MarketplaceSubscriptionV1ListSubscriptionsResponse +func (a *DefaultAPIService) ConsumersSubscriptionsListByOrganizationExecute(r ApiConsumersSubscriptionsListByOrganizationRequest) (*MarketplaceSubscriptionV1ListSubscriptionsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MarketplaceSubscriptionV1ListSubscriptionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ConsumersSubscriptionsListByOrganization") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/consumers/organizations/{organizationId}/subscriptions" + localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(parameterValueToString(r.organizationId, "organizationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.productId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "productId", r.productId, "form", "") + } + if r.includeExpired != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "includeExpired", r.includeExpired, "form", "") + } else { + var defaultValue bool = false + parameterAddToHeaderOrQuery(localVarQueryParams, "includeExpired", defaultValue, "form", "") + r.includeExpired = &defaultValue + } + // 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.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 ErrorResponse + err = a.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 == 403 { + var v ErrorResponse + err = a.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 = a.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 +} + +type ApiConsumersSubscriptionsListByProjectRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + cursor *string + limit *int32 + productId *string + includeExpired *bool +} + +func (r ApiConsumersSubscriptionsListByProjectRequest) Cursor(cursor string) ApiConsumersSubscriptionsListByProjectRequest { + r.cursor = &cursor + return r +} + +func (r ApiConsumersSubscriptionsListByProjectRequest) Limit(limit int32) ApiConsumersSubscriptionsListByProjectRequest { + r.limit = &limit + return r +} + +func (r ApiConsumersSubscriptionsListByProjectRequest) ProductId(productId string) ApiConsumersSubscriptionsListByProjectRequest { + r.productId = &productId + return r +} + +// Flag to control if cancelled or rejected subscriptions should be returned. +func (r ApiConsumersSubscriptionsListByProjectRequest) IncludeExpired(includeExpired bool) ApiConsumersSubscriptionsListByProjectRequest { + r.includeExpired = &includeExpired + return r +} + +func (r ApiConsumersSubscriptionsListByProjectRequest) Execute() (*MarketplaceSubscriptionV1ListSubscriptionsResponse, error) { + return r.ApiService.ConsumersSubscriptionsListByProjectExecute(r) +} + +/* +ConsumersSubscriptionsListByProject List all subscriptions of an project. + +List all subscriptions of an project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @return ApiConsumersSubscriptionsListByProjectRequest +*/ +func (a *DefaultAPIService) ConsumersSubscriptionsListByProject(ctx context.Context, projectId string) ApiConsumersSubscriptionsListByProjectRequest { + return ApiConsumersSubscriptionsListByProjectRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return MarketplaceSubscriptionV1ListSubscriptionsResponse +func (a *DefaultAPIService) ConsumersSubscriptionsListByProjectExecute(r ApiConsumersSubscriptionsListByProjectRequest) (*MarketplaceSubscriptionV1ListSubscriptionsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MarketplaceSubscriptionV1ListSubscriptionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ConsumersSubscriptionsListByProject") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/consumers/projects/{projectId}/subscriptions" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.productId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "productId", r.productId, "form", "") + } + if r.includeExpired != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "includeExpired", r.includeExpired, "form", "") + } else { + var defaultValue bool = false + parameterAddToHeaderOrQuery(localVarQueryParams, "includeExpired", defaultValue, "form", "") + r.includeExpired = &defaultValue + } + // 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.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 ErrorResponse + err = a.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 == 403 { + var v ErrorResponse + err = a.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 = a.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 +} + +type ApiConsumersSubscriptionsRedirectsGetRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + subscriptionId string + redirectTarget *string +} + +func (r ApiConsumersSubscriptionsRedirectsGetRequest) RedirectTarget(redirectTarget string) ApiConsumersSubscriptionsRedirectsGetRequest { + r.redirectTarget = &redirectTarget + return r +} + +func (r ApiConsumersSubscriptionsRedirectsGetRequest) Execute() (*MarketplaceSubscriptionV1SubscriptionRedirect, error) { + return r.ApiService.ConsumersSubscriptionsRedirectsGetExecute(r) +} + +/* +ConsumersSubscriptionsRedirectsGet Get a subscription redirect. + +Get a subscription redirect. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param subscriptionId + @return ApiConsumersSubscriptionsRedirectsGetRequest +*/ +func (a *DefaultAPIService) ConsumersSubscriptionsRedirectsGet(ctx context.Context, projectId string, subscriptionId string) ApiConsumersSubscriptionsRedirectsGetRequest { + return ApiConsumersSubscriptionsRedirectsGetRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + subscriptionId: subscriptionId, + } +} + +// Execute executes the request +// +// @return MarketplaceSubscriptionV1SubscriptionRedirect +func (a *DefaultAPIService) ConsumersSubscriptionsRedirectsGetExecute(r ApiConsumersSubscriptionsRedirectsGetRequest) (*MarketplaceSubscriptionV1SubscriptionRedirect, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MarketplaceSubscriptionV1SubscriptionRedirect + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ConsumersSubscriptionsRedirectsGet") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/consumers/projects/{projectId}/subscriptions/{subscriptionId}/redirects" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", url.PathEscape(parameterValueToString(r.subscriptionId, "subscriptionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.redirectTarget != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "redirectTarget", r.redirectTarget, "form", "") + } + // 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.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 ErrorResponse + err = a.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 == 403 { + var v ErrorResponse + err = a.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 = a.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 +} + +type ApiResolveCustomerRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + resolveCustomerPayload *ResolveCustomerPayload +} + +func (r ApiResolveCustomerRequest) ResolveCustomerPayload(resolveCustomerPayload ResolveCustomerPayload) ApiResolveCustomerRequest { + r.resolveCustomerPayload = &resolveCustomerPayload + return r +} + +func (r ApiResolveCustomerRequest) Execute() (*MarketplaceSubscriptionV1Subscription, error) { + return r.ApiService.ResolveCustomerExecute(r) +} + +/* +ResolveCustomer Resolve customer. + +Resolve customer. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @return ApiResolveCustomerRequest +*/ +func (a *DefaultAPIService) ResolveCustomer(ctx context.Context, projectId string) ApiResolveCustomerRequest { + return ApiResolveCustomerRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return MarketplaceSubscriptionV1Subscription +func (a *DefaultAPIService) ResolveCustomerExecute(r ApiResolveCustomerRequest) (*MarketplaceSubscriptionV1Subscription, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MarketplaceSubscriptionV1Subscription + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ResolveCustomer") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/vendors/projects/{projectId}/resolve-customer" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.resolveCustomerPayload == nil { + return localVarReturnValue, reportError("resolveCustomerPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.resolveCustomerPayload + req, err := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.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 ErrorResponse + err = a.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 == 403 { + var v ErrorResponse + err = a.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 == 404 { + var v ErrorResponse + err = a.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 = a.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 +} + +type ApiVendorsSubscriptionsGetRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + subscriptionId string + includeExpired *bool +} + +// Flag to control if cancelled or rejected subscriptions should be returned. +func (r ApiVendorsSubscriptionsGetRequest) IncludeExpired(includeExpired bool) ApiVendorsSubscriptionsGetRequest { + r.includeExpired = &includeExpired + return r +} + +func (r ApiVendorsSubscriptionsGetRequest) Execute() (*MarketplaceSubscriptionV1Subscription, error) { + return r.ApiService.VendorsSubscriptionsGetExecute(r) +} + +/* +VendorsSubscriptionsGet Get a subscription. + +Get a subscription. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param subscriptionId + @return ApiVendorsSubscriptionsGetRequest +*/ +func (a *DefaultAPIService) VendorsSubscriptionsGet(ctx context.Context, projectId string, subscriptionId string) ApiVendorsSubscriptionsGetRequest { + return ApiVendorsSubscriptionsGetRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + subscriptionId: subscriptionId, + } +} + +// Execute executes the request +// +// @return MarketplaceSubscriptionV1Subscription +func (a *DefaultAPIService) VendorsSubscriptionsGetExecute(r ApiVendorsSubscriptionsGetRequest) (*MarketplaceSubscriptionV1Subscription, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MarketplaceSubscriptionV1Subscription + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.VendorsSubscriptionsGet") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/vendors/projects/{projectId}/subscriptions/{subscriptionId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", url.PathEscape(parameterValueToString(r.subscriptionId, "subscriptionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.includeExpired != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "includeExpired", r.includeExpired, "form", "") + } else { + var defaultValue bool = false + parameterAddToHeaderOrQuery(localVarQueryParams, "includeExpired", defaultValue, "form", "") + r.includeExpired = &defaultValue + } + // 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.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 ErrorResponse + err = a.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 == 403 { + var v ErrorResponse + err = a.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 = a.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 +} + +type ApiVendorsSubscriptionsListByOrganizationRequest struct { + ctx context.Context + ApiService DefaultAPI + organizationId string + cursor *string + limit *int32 + productId *string + includeExpired *bool +} + +func (r ApiVendorsSubscriptionsListByOrganizationRequest) Cursor(cursor string) ApiVendorsSubscriptionsListByOrganizationRequest { + r.cursor = &cursor + return r +} + +func (r ApiVendorsSubscriptionsListByOrganizationRequest) Limit(limit int32) ApiVendorsSubscriptionsListByOrganizationRequest { + r.limit = &limit + return r +} + +func (r ApiVendorsSubscriptionsListByOrganizationRequest) ProductId(productId string) ApiVendorsSubscriptionsListByOrganizationRequest { + r.productId = &productId + return r +} + +// Flag to control if cancelled or rejected subscriptions should be returned. +func (r ApiVendorsSubscriptionsListByOrganizationRequest) IncludeExpired(includeExpired bool) ApiVendorsSubscriptionsListByOrganizationRequest { + r.includeExpired = &includeExpired + return r +} + +func (r ApiVendorsSubscriptionsListByOrganizationRequest) Execute() (*MarketplaceSubscriptionV1ListSubscriptionsResponse, error) { + return r.ApiService.VendorsSubscriptionsListByOrganizationExecute(r) +} + +/* +VendorsSubscriptionsListByOrganization List all subscriptions of an organization. + +List all subscriptions of an organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param organizationId + @return ApiVendorsSubscriptionsListByOrganizationRequest +*/ +func (a *DefaultAPIService) VendorsSubscriptionsListByOrganization(ctx context.Context, organizationId string) ApiVendorsSubscriptionsListByOrganizationRequest { + return ApiVendorsSubscriptionsListByOrganizationRequest{ + ApiService: a, + ctx: ctx, + organizationId: organizationId, + } +} + +// Execute executes the request +// +// @return MarketplaceSubscriptionV1ListSubscriptionsResponse +func (a *DefaultAPIService) VendorsSubscriptionsListByOrganizationExecute(r ApiVendorsSubscriptionsListByOrganizationRequest) (*MarketplaceSubscriptionV1ListSubscriptionsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MarketplaceSubscriptionV1ListSubscriptionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.VendorsSubscriptionsListByOrganization") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/vendors/organizations/{organizationId}/subscriptions" + localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(parameterValueToString(r.organizationId, "organizationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.productId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "productId", r.productId, "form", "") + } + if r.includeExpired != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "includeExpired", r.includeExpired, "form", "") + } else { + var defaultValue bool = false + parameterAddToHeaderOrQuery(localVarQueryParams, "includeExpired", defaultValue, "form", "") + r.includeExpired = &defaultValue + } + // 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.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 ErrorResponse + err = a.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 == 403 { + var v ErrorResponse + err = a.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 = a.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 +} + +type ApiVendorsSubscriptionsListByProjectRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + cursor *string + limit *int32 + productId *string + includeExpired *bool +} + +func (r ApiVendorsSubscriptionsListByProjectRequest) Cursor(cursor string) ApiVendorsSubscriptionsListByProjectRequest { + r.cursor = &cursor + return r +} + +func (r ApiVendorsSubscriptionsListByProjectRequest) Limit(limit int32) ApiVendorsSubscriptionsListByProjectRequest { + r.limit = &limit + return r +} + +func (r ApiVendorsSubscriptionsListByProjectRequest) ProductId(productId string) ApiVendorsSubscriptionsListByProjectRequest { + r.productId = &productId + return r +} + +// Flag to control if cancelled or rejected subscriptions should be returned. +func (r ApiVendorsSubscriptionsListByProjectRequest) IncludeExpired(includeExpired bool) ApiVendorsSubscriptionsListByProjectRequest { + r.includeExpired = &includeExpired + return r +} + +func (r ApiVendorsSubscriptionsListByProjectRequest) Execute() (*MarketplaceSubscriptionV1ListSubscriptionsResponse, error) { + return r.ApiService.VendorsSubscriptionsListByProjectExecute(r) +} + +/* +VendorsSubscriptionsListByProject List all subscriptions of an project. + +List all subscriptions of an project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @return ApiVendorsSubscriptionsListByProjectRequest +*/ +func (a *DefaultAPIService) VendorsSubscriptionsListByProject(ctx context.Context, projectId string) ApiVendorsSubscriptionsListByProjectRequest { + return ApiVendorsSubscriptionsListByProjectRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return MarketplaceSubscriptionV1ListSubscriptionsResponse +func (a *DefaultAPIService) VendorsSubscriptionsListByProjectExecute(r ApiVendorsSubscriptionsListByProjectRequest) (*MarketplaceSubscriptionV1ListSubscriptionsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MarketplaceSubscriptionV1ListSubscriptionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.VendorsSubscriptionsListByProject") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/vendors/projects/{projectId}/subscriptions" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.productId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "productId", r.productId, "form", "") + } + if r.includeExpired != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "includeExpired", r.includeExpired, "form", "") + } else { + var defaultValue bool = false + parameterAddToHeaderOrQuery(localVarQueryParams, "includeExpired", defaultValue, "form", "") + r.includeExpired = &defaultValue + } + // 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.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 := a.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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.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 ErrorResponse + err = a.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 == 403 { + var v ErrorResponse + err = a.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 = a.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 +} + +type ApiVendorsSubscriptionsRejectRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + subscriptionId string +} + +func (r ApiVendorsSubscriptionsRejectRequest) Execute() error { + return r.ApiService.VendorsSubscriptionsRejectExecute(r) +} + +/* +VendorsSubscriptionsReject Reject a subscription. + +Reject a subscription (in any lifecycle state). Only available for subscriptions to products with lifecycle state `PRODUCT_PREVIEW`. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param subscriptionId + @return ApiVendorsSubscriptionsRejectRequest +*/ +func (a *DefaultAPIService) VendorsSubscriptionsReject(ctx context.Context, projectId string, subscriptionId string) ApiVendorsSubscriptionsRejectRequest { + return ApiVendorsSubscriptionsRejectRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + subscriptionId: subscriptionId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) VendorsSubscriptionsRejectExecute(r ApiVendorsSubscriptionsRejectRequest) error { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.VendorsSubscriptionsReject") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/vendors/projects/{projectId}/subscriptions/{subscriptionId}/reject" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"subscriptionId"+"}", url.PathEscape(parameterValueToString(r.subscriptionId, "subscriptionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return newErr + } + + return nil +} diff --git a/services/stackitmarketplace/v1api/api_default_mock.go b/services/stackitmarketplace/v1api/api_default_mock.go new file mode 100644 index 000000000..5c3abb6fa --- /dev/null +++ b/services/stackitmarketplace/v1api/api_default_mock.go @@ -0,0 +1,267 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +Contact: marketplace@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "context" +) + +// assert the implementation matches the interface +var _ DefaultAPI = &DefaultAPIServiceMock{} + +// DefaultAPIServiceMock is meant to be used for testing only as a replacement for DefaultAPIService. +// By default all FooExecute() implementations are a no-op. Behavior of the mock can be customized by populating the callbacks in this struct. +type DefaultAPIServiceMock struct { + // ApproveSubscriptionExecuteMock can be populated to implement the behavior of the ApproveSubscriptionExecute function of this mock + ApproveSubscriptionExecuteMock *func(r ApiApproveSubscriptionRequest) error + // ConsumersSubscriptionsCancelExecuteMock can be populated to implement the behavior of the ConsumersSubscriptionsCancelExecute function of this mock + ConsumersSubscriptionsCancelExecuteMock *func(r ApiConsumersSubscriptionsCancelRequest) error + // ConsumersSubscriptionsCreateExecuteMock can be populated to implement the behavior of the ConsumersSubscriptionsCreateExecute function of this mock + ConsumersSubscriptionsCreateExecuteMock *func(r ApiConsumersSubscriptionsCreateRequest) (*MarketplaceSubscriptionV1Subscription, error) + // ConsumersSubscriptionsGetExecuteMock can be populated to implement the behavior of the ConsumersSubscriptionsGetExecute function of this mock + ConsumersSubscriptionsGetExecuteMock *func(r ApiConsumersSubscriptionsGetRequest) (*MarketplaceSubscriptionV1Subscription, error) + // ConsumersSubscriptionsListByOrganizationExecuteMock can be populated to implement the behavior of the ConsumersSubscriptionsListByOrganizationExecute function of this mock + ConsumersSubscriptionsListByOrganizationExecuteMock *func(r ApiConsumersSubscriptionsListByOrganizationRequest) (*MarketplaceSubscriptionV1ListSubscriptionsResponse, error) + // ConsumersSubscriptionsListByProjectExecuteMock can be populated to implement the behavior of the ConsumersSubscriptionsListByProjectExecute function of this mock + ConsumersSubscriptionsListByProjectExecuteMock *func(r ApiConsumersSubscriptionsListByProjectRequest) (*MarketplaceSubscriptionV1ListSubscriptionsResponse, error) + // ConsumersSubscriptionsRedirectsGetExecuteMock can be populated to implement the behavior of the ConsumersSubscriptionsRedirectsGetExecute function of this mock + ConsumersSubscriptionsRedirectsGetExecuteMock *func(r ApiConsumersSubscriptionsRedirectsGetRequest) (*MarketplaceSubscriptionV1SubscriptionRedirect, error) + // ResolveCustomerExecuteMock can be populated to implement the behavior of the ResolveCustomerExecute function of this mock + ResolveCustomerExecuteMock *func(r ApiResolveCustomerRequest) (*MarketplaceSubscriptionV1Subscription, error) + // VendorsSubscriptionsGetExecuteMock can be populated to implement the behavior of the VendorsSubscriptionsGetExecute function of this mock + VendorsSubscriptionsGetExecuteMock *func(r ApiVendorsSubscriptionsGetRequest) (*MarketplaceSubscriptionV1Subscription, error) + // VendorsSubscriptionsListByOrganizationExecuteMock can be populated to implement the behavior of the VendorsSubscriptionsListByOrganizationExecute function of this mock + VendorsSubscriptionsListByOrganizationExecuteMock *func(r ApiVendorsSubscriptionsListByOrganizationRequest) (*MarketplaceSubscriptionV1ListSubscriptionsResponse, error) + // VendorsSubscriptionsListByProjectExecuteMock can be populated to implement the behavior of the VendorsSubscriptionsListByProjectExecute function of this mock + VendorsSubscriptionsListByProjectExecuteMock *func(r ApiVendorsSubscriptionsListByProjectRequest) (*MarketplaceSubscriptionV1ListSubscriptionsResponse, error) + // VendorsSubscriptionsRejectExecuteMock can be populated to implement the behavior of the VendorsSubscriptionsRejectExecute function of this mock + VendorsSubscriptionsRejectExecuteMock *func(r ApiVendorsSubscriptionsRejectRequest) error +} + +func (a DefaultAPIServiceMock) ApproveSubscription(ctx context.Context, projectId string, subscriptionId string) ApiApproveSubscriptionRequest { + return ApiApproveSubscriptionRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + subscriptionId: subscriptionId, + } +} + +// ApproveSubscriptionExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ApproveSubscriptionExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ApproveSubscriptionExecute(r ApiApproveSubscriptionRequest) error { + if a.ApproveSubscriptionExecuteMock == nil { + return nil + } + + return (*a.ApproveSubscriptionExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ConsumersSubscriptionsCancel(ctx context.Context, projectId string, subscriptionId string) ApiConsumersSubscriptionsCancelRequest { + return ApiConsumersSubscriptionsCancelRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + subscriptionId: subscriptionId, + } +} + +// ConsumersSubscriptionsCancelExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ConsumersSubscriptionsCancelExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ConsumersSubscriptionsCancelExecute(r ApiConsumersSubscriptionsCancelRequest) error { + if a.ConsumersSubscriptionsCancelExecuteMock == nil { + return nil + } + + return (*a.ConsumersSubscriptionsCancelExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ConsumersSubscriptionsCreate(ctx context.Context, projectId string) ApiConsumersSubscriptionsCreateRequest { + return ApiConsumersSubscriptionsCreateRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// ConsumersSubscriptionsCreateExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ConsumersSubscriptionsCreateExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ConsumersSubscriptionsCreateExecute(r ApiConsumersSubscriptionsCreateRequest) (*MarketplaceSubscriptionV1Subscription, error) { + if a.ConsumersSubscriptionsCreateExecuteMock == nil { + var localVarReturnValue *MarketplaceSubscriptionV1Subscription + return localVarReturnValue, nil + } + + return (*a.ConsumersSubscriptionsCreateExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ConsumersSubscriptionsGet(ctx context.Context, projectId string, subscriptionId string) ApiConsumersSubscriptionsGetRequest { + return ApiConsumersSubscriptionsGetRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + subscriptionId: subscriptionId, + } +} + +// ConsumersSubscriptionsGetExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ConsumersSubscriptionsGetExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ConsumersSubscriptionsGetExecute(r ApiConsumersSubscriptionsGetRequest) (*MarketplaceSubscriptionV1Subscription, error) { + if a.ConsumersSubscriptionsGetExecuteMock == nil { + var localVarReturnValue *MarketplaceSubscriptionV1Subscription + return localVarReturnValue, nil + } + + return (*a.ConsumersSubscriptionsGetExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ConsumersSubscriptionsListByOrganization(ctx context.Context, organizationId string) ApiConsumersSubscriptionsListByOrganizationRequest { + return ApiConsumersSubscriptionsListByOrganizationRequest{ + ApiService: a, + ctx: ctx, + organizationId: organizationId, + } +} + +// ConsumersSubscriptionsListByOrganizationExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ConsumersSubscriptionsListByOrganizationExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ConsumersSubscriptionsListByOrganizationExecute(r ApiConsumersSubscriptionsListByOrganizationRequest) (*MarketplaceSubscriptionV1ListSubscriptionsResponse, error) { + if a.ConsumersSubscriptionsListByOrganizationExecuteMock == nil { + var localVarReturnValue *MarketplaceSubscriptionV1ListSubscriptionsResponse + return localVarReturnValue, nil + } + + return (*a.ConsumersSubscriptionsListByOrganizationExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ConsumersSubscriptionsListByProject(ctx context.Context, projectId string) ApiConsumersSubscriptionsListByProjectRequest { + return ApiConsumersSubscriptionsListByProjectRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// ConsumersSubscriptionsListByProjectExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ConsumersSubscriptionsListByProjectExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ConsumersSubscriptionsListByProjectExecute(r ApiConsumersSubscriptionsListByProjectRequest) (*MarketplaceSubscriptionV1ListSubscriptionsResponse, error) { + if a.ConsumersSubscriptionsListByProjectExecuteMock == nil { + var localVarReturnValue *MarketplaceSubscriptionV1ListSubscriptionsResponse + return localVarReturnValue, nil + } + + return (*a.ConsumersSubscriptionsListByProjectExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ConsumersSubscriptionsRedirectsGet(ctx context.Context, projectId string, subscriptionId string) ApiConsumersSubscriptionsRedirectsGetRequest { + return ApiConsumersSubscriptionsRedirectsGetRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + subscriptionId: subscriptionId, + } +} + +// ConsumersSubscriptionsRedirectsGetExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ConsumersSubscriptionsRedirectsGetExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ConsumersSubscriptionsRedirectsGetExecute(r ApiConsumersSubscriptionsRedirectsGetRequest) (*MarketplaceSubscriptionV1SubscriptionRedirect, error) { + if a.ConsumersSubscriptionsRedirectsGetExecuteMock == nil { + var localVarReturnValue *MarketplaceSubscriptionV1SubscriptionRedirect + return localVarReturnValue, nil + } + + return (*a.ConsumersSubscriptionsRedirectsGetExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ResolveCustomer(ctx context.Context, projectId string) ApiResolveCustomerRequest { + return ApiResolveCustomerRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// ResolveCustomerExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ResolveCustomerExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ResolveCustomerExecute(r ApiResolveCustomerRequest) (*MarketplaceSubscriptionV1Subscription, error) { + if a.ResolveCustomerExecuteMock == nil { + var localVarReturnValue *MarketplaceSubscriptionV1Subscription + return localVarReturnValue, nil + } + + return (*a.ResolveCustomerExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) VendorsSubscriptionsGet(ctx context.Context, projectId string, subscriptionId string) ApiVendorsSubscriptionsGetRequest { + return ApiVendorsSubscriptionsGetRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + subscriptionId: subscriptionId, + } +} + +// VendorsSubscriptionsGetExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the VendorsSubscriptionsGetExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) VendorsSubscriptionsGetExecute(r ApiVendorsSubscriptionsGetRequest) (*MarketplaceSubscriptionV1Subscription, error) { + if a.VendorsSubscriptionsGetExecuteMock == nil { + var localVarReturnValue *MarketplaceSubscriptionV1Subscription + return localVarReturnValue, nil + } + + return (*a.VendorsSubscriptionsGetExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) VendorsSubscriptionsListByOrganization(ctx context.Context, organizationId string) ApiVendorsSubscriptionsListByOrganizationRequest { + return ApiVendorsSubscriptionsListByOrganizationRequest{ + ApiService: a, + ctx: ctx, + organizationId: organizationId, + } +} + +// VendorsSubscriptionsListByOrganizationExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the VendorsSubscriptionsListByOrganizationExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) VendorsSubscriptionsListByOrganizationExecute(r ApiVendorsSubscriptionsListByOrganizationRequest) (*MarketplaceSubscriptionV1ListSubscriptionsResponse, error) { + if a.VendorsSubscriptionsListByOrganizationExecuteMock == nil { + var localVarReturnValue *MarketplaceSubscriptionV1ListSubscriptionsResponse + return localVarReturnValue, nil + } + + return (*a.VendorsSubscriptionsListByOrganizationExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) VendorsSubscriptionsListByProject(ctx context.Context, projectId string) ApiVendorsSubscriptionsListByProjectRequest { + return ApiVendorsSubscriptionsListByProjectRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// VendorsSubscriptionsListByProjectExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the VendorsSubscriptionsListByProjectExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) VendorsSubscriptionsListByProjectExecute(r ApiVendorsSubscriptionsListByProjectRequest) (*MarketplaceSubscriptionV1ListSubscriptionsResponse, error) { + if a.VendorsSubscriptionsListByProjectExecuteMock == nil { + var localVarReturnValue *MarketplaceSubscriptionV1ListSubscriptionsResponse + return localVarReturnValue, nil + } + + return (*a.VendorsSubscriptionsListByProjectExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) VendorsSubscriptionsReject(ctx context.Context, projectId string, subscriptionId string) ApiVendorsSubscriptionsRejectRequest { + return ApiVendorsSubscriptionsRejectRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + subscriptionId: subscriptionId, + } +} + +// VendorsSubscriptionsRejectExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the VendorsSubscriptionsRejectExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) VendorsSubscriptionsRejectExecute(r ApiVendorsSubscriptionsRejectRequest) error { + if a.VendorsSubscriptionsRejectExecuteMock == nil { + return nil + } + + return (*a.VendorsSubscriptionsRejectExecuteMock)(r) +} diff --git a/services/stackitmarketplace/client.go b/services/stackitmarketplace/v1api/client.go similarity index 84% rename from services/stackitmarketplace/client.go rename to services/stackitmarketplace/v1api/client.go index faf96b164..99961d663 100644 --- a/services/stackitmarketplace/client.go +++ b/services/stackitmarketplace/v1api/client.go @@ -4,17 +4,18 @@ STACKIT Marketplace API API to manage STACKIT Marketplace. API version: 1 +Contact: marketplace@stackit.cloud */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace +package v1api import ( "bytes" "context" "encoding/json" "encoding/xml" + "errors" "fmt" "io" "log" @@ -36,8 +37,8 @@ import ( ) var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) + JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`) + XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`) queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") ) @@ -45,17 +46,20 @@ var ( // APIClient manages communication with the STACKIT Marketplace API API v1 // In most cases there should be only one, shared, APIClient. type APIClient struct { - cfg *config.Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - defaultApi *DefaultApiService + cfg *config.Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + DefaultAPI DefaultAPI } type service struct { - client DefaultApi + client *APIClient } -// NewAPIClient creates a new API client. -// Optionally receives configuration options +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error) { cfg := NewConfiguration() @@ -90,7 +94,9 @@ func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error) { c := &APIClient{} c.cfg = cfg c.common.client = c - c.defaultApi = (*DefaultApiService)(&c.common) + + // API Services + c.DefaultAPI = (*DefaultAPIService)(&c.common) return c, nil } @@ -147,8 +153,12 @@ func typeCheckParameter(obj interface{}, expected string, name string) error { return nil } -func ParameterValueToString(obj interface{}, key string) string { +func parameterValueToString(obj interface{}, key string) string { if reflect.TypeOf(obj).Kind() != reflect.Ptr { + if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok { + return fmt.Sprintf("%v", actualObj.GetActualInstanceValue()) + } + return fmt.Sprintf("%v", obj) } var param, ok = obj.(MappedNullable) @@ -164,7 +174,7 @@ func ParameterValueToString(obj interface{}, key string) string { // parameterAddToHeaderOrQuery adds the provided object to the request header or url query // supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, style string, collectionType string) { var v = reflect.ValueOf(obj) var value = "" if v == reflect.ValueOf(nil) { @@ -180,11 +190,11 @@ func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix stri if err != nil { return } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, style, collectionType) return } if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, collectionType) return } value = v.Type().String() + " value" @@ -196,7 +206,11 @@ func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix stri var lenIndValue = indValue.Len() for i := 0; i < lenIndValue; i++ { var arrayValue = indValue.Index(i) - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, arrayValue.Interface(), collectionType) + var keyPrefixForCollectionType = keyPrefix + if style == "deepObject" { + keyPrefixForCollectionType = keyPrefix + "[" + strconv.Itoa(i) + "]" + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefixForCollectionType, arrayValue.Interface(), style, collectionType) } return @@ -208,14 +222,14 @@ func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix stri iter := indValue.MapRange() for iter.Next() { k, v := iter.Key(), iter.Value() - parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), collectionType) + parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), style, collectionType) } return case reflect.Interface: fallthrough case reflect.Ptr: - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), collectionType) + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), style, collectionType) return case reflect.Int, reflect.Int8, reflect.Int16, @@ -308,7 +322,7 @@ func (c *APIClient) prepareRequest( var body *bytes.Buffer // Detect postBody type and post. - if !IsNil(postBody) { + if postBody != nil { contentType := headerParams["Content-Type"] if contentType == "" { contentType = detectContentType(postBody) @@ -324,7 +338,7 @@ func (c *APIClient) prepareRequest( // add form parameters and file if available. if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { if body != nil { - return nil, fmt.Errorf("cannot specify postBody and multipart form at the same time.") + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") } body = &bytes.Buffer{} w := multipart.NewWriter(body) @@ -365,7 +379,7 @@ func (c *APIClient) prepareRequest( if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { if body != nil { - return nil, fmt.Errorf("cannot specify postBody and x-www-form-urlencoded form at the same time.") + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") } body = &bytes.Buffer{} body.WriteString(formParams.Encode()) @@ -472,27 +486,27 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err _, err = (*f).Seek(0, io.SeekStart) return } - if xmlCheck.MatchString(contentType) { + if XmlCheck.MatchString(contentType) { if err = xml.Unmarshal(b, v); err != nil { return err } return nil } - if jsonCheck.MatchString(contentType) { + if JsonCheck.MatchString(contentType) { if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined if err = unmarshalObj.UnmarshalJSON(b); err != nil { return err } } else { - return fmt.Errorf("unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") } } else if err = json.Unmarshal(b, v); err != nil { // simple model return err } return nil } - return fmt.Errorf("undefined response type") + return errors.New("undefined response type") } // Add a file to the multipart request @@ -501,10 +515,7 @@ func addFile(w *multipart.Writer, fieldName, path string) error { if err != nil { return err } - err = file.Close() - if err != nil { - return err - } + defer file.Close() part, err := w.CreateFormFile(fieldName, filepath.Base(path)) if err != nil { @@ -515,13 +526,6 @@ func addFile(w *multipart.Writer, fieldName, path string) error { return err } -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - // Set request body from an interface{} func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { if bodyBuf == nil { @@ -538,10 +542,14 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e _, err = bodyBuf.WriteString(s) } else if s, ok := body.(*string); ok { _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { + } else if JsonCheck.MatchString(contentType) { err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) + } else if XmlCheck.MatchString(contentType) { + var bs []byte + bs, err = xml.Marshal(body) + if err == nil { + bodyBuf.Write(bs) + } } if err != nil { @@ -549,7 +557,7 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e } if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s", contentType) + err = fmt.Errorf("invalid body type %s\n", contentType) return nil, err } return bodyBuf, nil @@ -629,3 +637,23 @@ func CacheExpires(r *http.Response) time.Time { func strlen(s string) int { return utf8.RuneCountInString(s) } + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + if metaValue.Kind() == reflect.Struct { + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + } + + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) +} diff --git a/services/stackitmarketplace/configuration.go b/services/stackitmarketplace/v1api/configuration.go similarity index 94% rename from services/stackitmarketplace/configuration.go rename to services/stackitmarketplace/v1api/configuration.go index 40f2f79e9..324ec4b61 100644 --- a/services/stackitmarketplace/configuration.go +++ b/services/stackitmarketplace/v1api/configuration.go @@ -4,11 +4,11 @@ STACKIT Marketplace API API to manage STACKIT Marketplace. API version: 1 +Contact: marketplace@stackit.cloud */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackitmarketplace +package v1api import ( "github.com/stackitcloud/stackit-sdk-go/core/config" diff --git a/services/stackitmarketplace/model_approve_subscription_payload.go b/services/stackitmarketplace/v1api/model_approve_subscription_payload.go similarity index 62% rename from services/stackitmarketplace/model_approve_subscription_payload.go rename to services/stackitmarketplace/v1api/model_approve_subscription_payload.go index 956d25c1f..0ea69fe33 100644 --- a/services/stackitmarketplace/model_approve_subscription_payload.go +++ b/services/stackitmarketplace/v1api/model_approve_subscription_payload.go @@ -4,11 +4,12 @@ STACKIT Marketplace API API to manage STACKIT Marketplace. API version: 1 +Contact: marketplace@stackit.cloud */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package stackitmarketplace +package v1api import ( "encoding/json" @@ -17,33 +18,15 @@ import ( // checks if the ApproveSubscriptionPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ApproveSubscriptionPayload{} -/* - types and functions for instanceTarget -*/ - -// isNotNullableString -type ApproveSubscriptionPayloadGetInstanceTargetAttributeType = *string - -func getApproveSubscriptionPayloadGetInstanceTargetAttributeTypeOk(arg ApproveSubscriptionPayloadGetInstanceTargetAttributeType) (ret ApproveSubscriptionPayloadGetInstanceTargetRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setApproveSubscriptionPayloadGetInstanceTargetAttributeType(arg *ApproveSubscriptionPayloadGetInstanceTargetAttributeType, val ApproveSubscriptionPayloadGetInstanceTargetRetType) { - *arg = &val -} - -type ApproveSubscriptionPayloadGetInstanceTargetArgType = string -type ApproveSubscriptionPayloadGetInstanceTargetRetType = string - // ApproveSubscriptionPayload struct for ApproveSubscriptionPayload type ApproveSubscriptionPayload struct { - // Uniform Resource Locator. - InstanceTarget ApproveSubscriptionPayloadGetInstanceTargetAttributeType `json:"instanceTarget,omitempty"` + // The target URL of the user instance, used to redirect the user to the instance after the subscription is active. + InstanceTarget *string `json:"instanceTarget,omitempty"` + AdditionalProperties map[string]interface{} } +type _ApproveSubscriptionPayload ApproveSubscriptionPayload + // NewApproveSubscriptionPayload instantiates a new ApproveSubscriptionPayload 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 @@ -62,36 +45,79 @@ func NewApproveSubscriptionPayloadWithDefaults() *ApproveSubscriptionPayload { } // GetInstanceTarget returns the InstanceTarget field value if set, zero value otherwise. -func (o *ApproveSubscriptionPayload) GetInstanceTarget() (res ApproveSubscriptionPayloadGetInstanceTargetRetType) { - res, _ = o.GetInstanceTargetOk() - return +func (o *ApproveSubscriptionPayload) GetInstanceTarget() string { + if o == nil || IsNil(o.InstanceTarget) { + var ret string + return ret + } + return *o.InstanceTarget } // GetInstanceTargetOk returns a tuple with the InstanceTarget field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ApproveSubscriptionPayload) GetInstanceTargetOk() (ret ApproveSubscriptionPayloadGetInstanceTargetRetType, ok bool) { - return getApproveSubscriptionPayloadGetInstanceTargetAttributeTypeOk(o.InstanceTarget) +func (o *ApproveSubscriptionPayload) GetInstanceTargetOk() (*string, bool) { + if o == nil || IsNil(o.InstanceTarget) { + return nil, false + } + return o.InstanceTarget, true } // HasInstanceTarget returns a boolean if a field has been set. func (o *ApproveSubscriptionPayload) HasInstanceTarget() bool { - _, ok := o.GetInstanceTargetOk() - return ok + if o != nil && !IsNil(o.InstanceTarget) { + return true + } + + return false } // SetInstanceTarget gets a reference to the given string and assigns it to the InstanceTarget field. -func (o *ApproveSubscriptionPayload) SetInstanceTarget(v ApproveSubscriptionPayloadGetInstanceTargetRetType) { - setApproveSubscriptionPayloadGetInstanceTargetAttributeType(&o.InstanceTarget, v) +func (o *ApproveSubscriptionPayload) SetInstanceTarget(v string) { + o.InstanceTarget = &v +} + +func (o ApproveSubscriptionPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) } func (o ApproveSubscriptionPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getApproveSubscriptionPayloadGetInstanceTargetAttributeTypeOk(o.InstanceTarget); ok { - toSerialize["InstanceTarget"] = val + if !IsNil(o.InstanceTarget) { + toSerialize["instanceTarget"] = o.InstanceTarget + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value } + return toSerialize, nil } +func (o *ApproveSubscriptionPayload) UnmarshalJSON(data []byte) (err error) { + varApproveSubscriptionPayload := _ApproveSubscriptionPayload{} + + err = json.Unmarshal(data, &varApproveSubscriptionPayload) + + if err != nil { + return err + } + + *o = ApproveSubscriptionPayload(varApproveSubscriptionPayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "instanceTarget") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableApproveSubscriptionPayload struct { value *ApproveSubscriptionPayload isSet bool diff --git a/services/stackitmarketplace/v1api/model_consumers_subscriptions_create_payload.go b/services/stackitmarketplace/v1api/model_consumers_subscriptions_create_payload.go new file mode 100644 index 000000000..b0cc89241 --- /dev/null +++ b/services/stackitmarketplace/v1api/model_consumers_subscriptions_create_payload.go @@ -0,0 +1,236 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +Contact: marketplace@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ConsumersSubscriptionsCreatePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConsumersSubscriptionsCreatePayload{} + +// ConsumersSubscriptionsCreatePayload struct for ConsumersSubscriptionsCreatePayload +type ConsumersSubscriptionsCreatePayload struct { + // An E-Mail address the vendor can reach the consuer about subscription updates. + ConsumerNotificationEmail *string `json:"consumerNotificationEmail,omitempty"` + // The user-readable ID of the product. + ProductId string `json:"productId"` + // The concrete variant of the product. + Sku string `json:"sku"` + AdditionalProperties map[string]interface{} +} + +type _ConsumersSubscriptionsCreatePayload ConsumersSubscriptionsCreatePayload + +// NewConsumersSubscriptionsCreatePayload instantiates a new ConsumersSubscriptionsCreatePayload 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 NewConsumersSubscriptionsCreatePayload(productId string, sku string) *ConsumersSubscriptionsCreatePayload { + this := ConsumersSubscriptionsCreatePayload{} + this.ProductId = productId + this.Sku = sku + return &this +} + +// NewConsumersSubscriptionsCreatePayloadWithDefaults instantiates a new ConsumersSubscriptionsCreatePayload 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 NewConsumersSubscriptionsCreatePayloadWithDefaults() *ConsumersSubscriptionsCreatePayload { + this := ConsumersSubscriptionsCreatePayload{} + return &this +} + +// GetConsumerNotificationEmail returns the ConsumerNotificationEmail field value if set, zero value otherwise. +func (o *ConsumersSubscriptionsCreatePayload) GetConsumerNotificationEmail() string { + if o == nil || IsNil(o.ConsumerNotificationEmail) { + var ret string + return ret + } + return *o.ConsumerNotificationEmail +} + +// GetConsumerNotificationEmailOk returns a tuple with the ConsumerNotificationEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConsumersSubscriptionsCreatePayload) GetConsumerNotificationEmailOk() (*string, bool) { + if o == nil || IsNil(o.ConsumerNotificationEmail) { + return nil, false + } + return o.ConsumerNotificationEmail, true +} + +// HasConsumerNotificationEmail returns a boolean if a field has been set. +func (o *ConsumersSubscriptionsCreatePayload) HasConsumerNotificationEmail() bool { + if o != nil && !IsNil(o.ConsumerNotificationEmail) { + return true + } + + return false +} + +// SetConsumerNotificationEmail gets a reference to the given string and assigns it to the ConsumerNotificationEmail field. +func (o *ConsumersSubscriptionsCreatePayload) SetConsumerNotificationEmail(v string) { + o.ConsumerNotificationEmail = &v +} + +// GetProductId returns the ProductId field value +func (o *ConsumersSubscriptionsCreatePayload) GetProductId() string { + if o == nil { + var ret string + return ret + } + + return o.ProductId +} + +// GetProductIdOk returns a tuple with the ProductId field value +// and a boolean to check if the value has been set. +func (o *ConsumersSubscriptionsCreatePayload) GetProductIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductId, true +} + +// SetProductId sets field value +func (o *ConsumersSubscriptionsCreatePayload) SetProductId(v string) { + o.ProductId = v +} + +// GetSku returns the Sku field value +func (o *ConsumersSubscriptionsCreatePayload) GetSku() string { + if o == nil { + var ret string + return ret + } + + return o.Sku +} + +// GetSkuOk returns a tuple with the Sku field value +// and a boolean to check if the value has been set. +func (o *ConsumersSubscriptionsCreatePayload) GetSkuOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Sku, true +} + +// SetSku sets field value +func (o *ConsumersSubscriptionsCreatePayload) SetSku(v string) { + o.Sku = v +} + +func (o ConsumersSubscriptionsCreatePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConsumersSubscriptionsCreatePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ConsumerNotificationEmail) { + toSerialize["consumerNotificationEmail"] = o.ConsumerNotificationEmail + } + toSerialize["productId"] = o.ProductId + toSerialize["sku"] = o.Sku + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ConsumersSubscriptionsCreatePayload) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "productId", + "sku", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConsumersSubscriptionsCreatePayload := _ConsumersSubscriptionsCreatePayload{} + + err = json.Unmarshal(data, &varConsumersSubscriptionsCreatePayload) + + if err != nil { + return err + } + + *o = ConsumersSubscriptionsCreatePayload(varConsumersSubscriptionsCreatePayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "consumerNotificationEmail") + delete(additionalProperties, "productId") + delete(additionalProperties, "sku") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableConsumersSubscriptionsCreatePayload struct { + value *ConsumersSubscriptionsCreatePayload + isSet bool +} + +func (v NullableConsumersSubscriptionsCreatePayload) Get() *ConsumersSubscriptionsCreatePayload { + return v.value +} + +func (v *NullableConsumersSubscriptionsCreatePayload) Set(val *ConsumersSubscriptionsCreatePayload) { + v.value = val + v.isSet = true +} + +func (v NullableConsumersSubscriptionsCreatePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableConsumersSubscriptionsCreatePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConsumersSubscriptionsCreatePayload(val *ConsumersSubscriptionsCreatePayload) *NullableConsumersSubscriptionsCreatePayload { + return &NullableConsumersSubscriptionsCreatePayload{value: val, isSet: true} +} + +func (v NullableConsumersSubscriptionsCreatePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConsumersSubscriptionsCreatePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/v1api/model_error_response.go b/services/stackitmarketplace/v1api/model_error_response.go new file mode 100644 index 000000000..4a5bffa71 --- /dev/null +++ b/services/stackitmarketplace/v1api/model_error_response.go @@ -0,0 +1,289 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +Contact: marketplace@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" + "fmt" + "time" +) + +// checks if the ErrorResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorResponse{} + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + // Reason phrase of the status code. + Error string `json:"error"` + // Description of the error. + Message string `json:"message"` + // Path which was called. + Path string `json:"path"` + // HTTP response status code. + Status int32 `json:"status"` + // Timestamp at which the error occurred. + TimeStamp time.Time `json:"timeStamp"` + AdditionalProperties map[string]interface{} +} + +type _ErrorResponse ErrorResponse + +// NewErrorResponse instantiates a new ErrorResponse 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 NewErrorResponse(error_ string, message string, path string, status int32, timeStamp time.Time) *ErrorResponse { + this := ErrorResponse{} + this.Error = error_ + this.Message = message + this.Path = path + this.Status = status + this.TimeStamp = timeStamp + return &this +} + +// NewErrorResponseWithDefaults instantiates a new ErrorResponse 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 NewErrorResponseWithDefaults() *ErrorResponse { + this := ErrorResponse{} + return &this +} + +// GetError returns the Error field value +func (o *ErrorResponse) GetError() string { + if o == nil { + var ret string + return ret + } + + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value +// and a boolean to check if the value has been set. +func (o *ErrorResponse) GetErrorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Error, true +} + +// SetError sets field value +func (o *ErrorResponse) SetError(v string) { + o.Error = v +} + +// GetMessage returns the Message field value +func (o *ErrorResponse) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *ErrorResponse) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *ErrorResponse) SetMessage(v string) { + o.Message = v +} + +// GetPath returns the Path field value +func (o *ErrorResponse) GetPath() string { + if o == nil { + var ret string + return ret + } + + return o.Path +} + +// GetPathOk returns a tuple with the Path field value +// and a boolean to check if the value has been set. +func (o *ErrorResponse) GetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Path, true +} + +// SetPath sets field value +func (o *ErrorResponse) SetPath(v string) { + o.Path = v +} + +// GetStatus returns the Status field value +func (o *ErrorResponse) GetStatus() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ErrorResponse) GetStatusOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ErrorResponse) SetStatus(v int32) { + o.Status = v +} + +// GetTimeStamp returns the TimeStamp field value +func (o *ErrorResponse) GetTimeStamp() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.TimeStamp +} + +// GetTimeStampOk returns a tuple with the TimeStamp field value +// and a boolean to check if the value has been set. +func (o *ErrorResponse) GetTimeStampOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.TimeStamp, true +} + +// SetTimeStamp sets field value +func (o *ErrorResponse) SetTimeStamp(v time.Time) { + o.TimeStamp = v +} + +func (o ErrorResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ErrorResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["error"] = o.Error + toSerialize["message"] = o.Message + toSerialize["path"] = o.Path + toSerialize["status"] = o.Status + toSerialize["timeStamp"] = o.TimeStamp + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ErrorResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "error", + "message", + "path", + "status", + "timeStamp", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varErrorResponse := _ErrorResponse{} + + err = json.Unmarshal(data, &varErrorResponse) + + if err != nil { + return err + } + + *o = ErrorResponse(varErrorResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "error") + delete(additionalProperties, "message") + delete(additionalProperties, "path") + delete(additionalProperties, "status") + delete(additionalProperties, "timeStamp") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableErrorResponse struct { + value *ErrorResponse + isSet bool +} + +func (v NullableErrorResponse) Get() *ErrorResponse { + return v.value +} + +func (v *NullableErrorResponse) Set(val *ErrorResponse) { + v.value = val + v.isSet = true +} + +func (v NullableErrorResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorResponse(val *ErrorResponse) *NullableErrorResponse { + return &NullableErrorResponse{value: val, isSet: true} +} + +func (v NullableErrorResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_assets.go b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_assets.go new file mode 100644 index 000000000..6dba35075 --- /dev/null +++ b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_assets.go @@ -0,0 +1,265 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +Contact: marketplace@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the MarketplaceSubscriptionV1Assets type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MarketplaceSubscriptionV1Assets{} + +// MarketplaceSubscriptionV1Assets struct for MarketplaceSubscriptionV1Assets +type MarketplaceSubscriptionV1Assets struct { + EndUserLicenseAgreement *MarketplaceSubscriptionV1File `json:"endUserLicenseAgreement,omitempty"` + ProductDescription *MarketplaceSubscriptionV1File `json:"productDescription,omitempty"` + ServiceCertificate *MarketplaceSubscriptionV1File `json:"serviceCertificate,omitempty"` + ServiceLevelAgreement *MarketplaceSubscriptionV1File `json:"serviceLevelAgreement,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _MarketplaceSubscriptionV1Assets MarketplaceSubscriptionV1Assets + +// NewMarketplaceSubscriptionV1Assets instantiates a new MarketplaceSubscriptionV1Assets 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 NewMarketplaceSubscriptionV1Assets() *MarketplaceSubscriptionV1Assets { + this := MarketplaceSubscriptionV1Assets{} + return &this +} + +// NewMarketplaceSubscriptionV1AssetsWithDefaults instantiates a new MarketplaceSubscriptionV1Assets 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 NewMarketplaceSubscriptionV1AssetsWithDefaults() *MarketplaceSubscriptionV1Assets { + this := MarketplaceSubscriptionV1Assets{} + return &this +} + +// GetEndUserLicenseAgreement returns the EndUserLicenseAgreement field value if set, zero value otherwise. +func (o *MarketplaceSubscriptionV1Assets) GetEndUserLicenseAgreement() MarketplaceSubscriptionV1File { + if o == nil || IsNil(o.EndUserLicenseAgreement) { + var ret MarketplaceSubscriptionV1File + return ret + } + return *o.EndUserLicenseAgreement +} + +// GetEndUserLicenseAgreementOk returns a tuple with the EndUserLicenseAgreement field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1Assets) GetEndUserLicenseAgreementOk() (*MarketplaceSubscriptionV1File, bool) { + if o == nil || IsNil(o.EndUserLicenseAgreement) { + return nil, false + } + return o.EndUserLicenseAgreement, true +} + +// HasEndUserLicenseAgreement returns a boolean if a field has been set. +func (o *MarketplaceSubscriptionV1Assets) HasEndUserLicenseAgreement() bool { + if o != nil && !IsNil(o.EndUserLicenseAgreement) { + return true + } + + return false +} + +// SetEndUserLicenseAgreement gets a reference to the given MarketplaceSubscriptionV1File and assigns it to the EndUserLicenseAgreement field. +func (o *MarketplaceSubscriptionV1Assets) SetEndUserLicenseAgreement(v MarketplaceSubscriptionV1File) { + o.EndUserLicenseAgreement = &v +} + +// GetProductDescription returns the ProductDescription field value if set, zero value otherwise. +func (o *MarketplaceSubscriptionV1Assets) GetProductDescription() MarketplaceSubscriptionV1File { + if o == nil || IsNil(o.ProductDescription) { + var ret MarketplaceSubscriptionV1File + return ret + } + return *o.ProductDescription +} + +// GetProductDescriptionOk returns a tuple with the ProductDescription field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1Assets) GetProductDescriptionOk() (*MarketplaceSubscriptionV1File, bool) { + if o == nil || IsNil(o.ProductDescription) { + return nil, false + } + return o.ProductDescription, true +} + +// HasProductDescription returns a boolean if a field has been set. +func (o *MarketplaceSubscriptionV1Assets) HasProductDescription() bool { + if o != nil && !IsNil(o.ProductDescription) { + return true + } + + return false +} + +// SetProductDescription gets a reference to the given MarketplaceSubscriptionV1File and assigns it to the ProductDescription field. +func (o *MarketplaceSubscriptionV1Assets) SetProductDescription(v MarketplaceSubscriptionV1File) { + o.ProductDescription = &v +} + +// GetServiceCertificate returns the ServiceCertificate field value if set, zero value otherwise. +func (o *MarketplaceSubscriptionV1Assets) GetServiceCertificate() MarketplaceSubscriptionV1File { + if o == nil || IsNil(o.ServiceCertificate) { + var ret MarketplaceSubscriptionV1File + return ret + } + return *o.ServiceCertificate +} + +// GetServiceCertificateOk returns a tuple with the ServiceCertificate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1Assets) GetServiceCertificateOk() (*MarketplaceSubscriptionV1File, bool) { + if o == nil || IsNil(o.ServiceCertificate) { + return nil, false + } + return o.ServiceCertificate, true +} + +// HasServiceCertificate returns a boolean if a field has been set. +func (o *MarketplaceSubscriptionV1Assets) HasServiceCertificate() bool { + if o != nil && !IsNil(o.ServiceCertificate) { + return true + } + + return false +} + +// SetServiceCertificate gets a reference to the given MarketplaceSubscriptionV1File and assigns it to the ServiceCertificate field. +func (o *MarketplaceSubscriptionV1Assets) SetServiceCertificate(v MarketplaceSubscriptionV1File) { + o.ServiceCertificate = &v +} + +// GetServiceLevelAgreement returns the ServiceLevelAgreement field value if set, zero value otherwise. +func (o *MarketplaceSubscriptionV1Assets) GetServiceLevelAgreement() MarketplaceSubscriptionV1File { + if o == nil || IsNil(o.ServiceLevelAgreement) { + var ret MarketplaceSubscriptionV1File + return ret + } + return *o.ServiceLevelAgreement +} + +// GetServiceLevelAgreementOk returns a tuple with the ServiceLevelAgreement field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1Assets) GetServiceLevelAgreementOk() (*MarketplaceSubscriptionV1File, bool) { + if o == nil || IsNil(o.ServiceLevelAgreement) { + return nil, false + } + return o.ServiceLevelAgreement, true +} + +// HasServiceLevelAgreement returns a boolean if a field has been set. +func (o *MarketplaceSubscriptionV1Assets) HasServiceLevelAgreement() bool { + if o != nil && !IsNil(o.ServiceLevelAgreement) { + return true + } + + return false +} + +// SetServiceLevelAgreement gets a reference to the given MarketplaceSubscriptionV1File and assigns it to the ServiceLevelAgreement field. +func (o *MarketplaceSubscriptionV1Assets) SetServiceLevelAgreement(v MarketplaceSubscriptionV1File) { + o.ServiceLevelAgreement = &v +} + +func (o MarketplaceSubscriptionV1Assets) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MarketplaceSubscriptionV1Assets) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.EndUserLicenseAgreement) { + toSerialize["endUserLicenseAgreement"] = o.EndUserLicenseAgreement + } + if !IsNil(o.ProductDescription) { + toSerialize["productDescription"] = o.ProductDescription + } + if !IsNil(o.ServiceCertificate) { + toSerialize["serviceCertificate"] = o.ServiceCertificate + } + if !IsNil(o.ServiceLevelAgreement) { + toSerialize["serviceLevelAgreement"] = o.ServiceLevelAgreement + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MarketplaceSubscriptionV1Assets) UnmarshalJSON(data []byte) (err error) { + varMarketplaceSubscriptionV1Assets := _MarketplaceSubscriptionV1Assets{} + + err = json.Unmarshal(data, &varMarketplaceSubscriptionV1Assets) + + if err != nil { + return err + } + + *o = MarketplaceSubscriptionV1Assets(varMarketplaceSubscriptionV1Assets) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "endUserLicenseAgreement") + delete(additionalProperties, "productDescription") + delete(additionalProperties, "serviceCertificate") + delete(additionalProperties, "serviceLevelAgreement") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMarketplaceSubscriptionV1Assets struct { + value *MarketplaceSubscriptionV1Assets + isSet bool +} + +func (v NullableMarketplaceSubscriptionV1Assets) Get() *MarketplaceSubscriptionV1Assets { + return v.value +} + +func (v *NullableMarketplaceSubscriptionV1Assets) Set(val *MarketplaceSubscriptionV1Assets) { + v.value = val + v.isSet = true +} + +func (v NullableMarketplaceSubscriptionV1Assets) IsSet() bool { + return v.isSet +} + +func (v *NullableMarketplaceSubscriptionV1Assets) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMarketplaceSubscriptionV1Assets(val *MarketplaceSubscriptionV1Assets) *NullableMarketplaceSubscriptionV1Assets { + return &NullableMarketplaceSubscriptionV1Assets{value: val, isSet: true} +} + +func (v NullableMarketplaceSubscriptionV1Assets) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMarketplaceSubscriptionV1Assets) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_file.go b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_file.go new file mode 100644 index 000000000..563684f77 --- /dev/null +++ b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_file.go @@ -0,0 +1,154 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +Contact: marketplace@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the MarketplaceSubscriptionV1File type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MarketplaceSubscriptionV1File{} + +// MarketplaceSubscriptionV1File struct for MarketplaceSubscriptionV1File +type MarketplaceSubscriptionV1File struct { + Version *MarketplaceSubscriptionV1FileLocalizedVersion `json:"version,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _MarketplaceSubscriptionV1File MarketplaceSubscriptionV1File + +// NewMarketplaceSubscriptionV1File instantiates a new MarketplaceSubscriptionV1File 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 NewMarketplaceSubscriptionV1File() *MarketplaceSubscriptionV1File { + this := MarketplaceSubscriptionV1File{} + return &this +} + +// NewMarketplaceSubscriptionV1FileWithDefaults instantiates a new MarketplaceSubscriptionV1File 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 NewMarketplaceSubscriptionV1FileWithDefaults() *MarketplaceSubscriptionV1File { + this := MarketplaceSubscriptionV1File{} + return &this +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *MarketplaceSubscriptionV1File) GetVersion() MarketplaceSubscriptionV1FileLocalizedVersion { + if o == nil || IsNil(o.Version) { + var ret MarketplaceSubscriptionV1FileLocalizedVersion + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1File) GetVersionOk() (*MarketplaceSubscriptionV1FileLocalizedVersion, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *MarketplaceSubscriptionV1File) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given MarketplaceSubscriptionV1FileLocalizedVersion and assigns it to the Version field. +func (o *MarketplaceSubscriptionV1File) SetVersion(v MarketplaceSubscriptionV1FileLocalizedVersion) { + o.Version = &v +} + +func (o MarketplaceSubscriptionV1File) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MarketplaceSubscriptionV1File) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MarketplaceSubscriptionV1File) UnmarshalJSON(data []byte) (err error) { + varMarketplaceSubscriptionV1File := _MarketplaceSubscriptionV1File{} + + err = json.Unmarshal(data, &varMarketplaceSubscriptionV1File) + + if err != nil { + return err + } + + *o = MarketplaceSubscriptionV1File(varMarketplaceSubscriptionV1File) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "version") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMarketplaceSubscriptionV1File struct { + value *MarketplaceSubscriptionV1File + isSet bool +} + +func (v NullableMarketplaceSubscriptionV1File) Get() *MarketplaceSubscriptionV1File { + return v.value +} + +func (v *NullableMarketplaceSubscriptionV1File) Set(val *MarketplaceSubscriptionV1File) { + v.value = val + v.isSet = true +} + +func (v NullableMarketplaceSubscriptionV1File) IsSet() bool { + return v.isSet +} + +func (v *NullableMarketplaceSubscriptionV1File) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMarketplaceSubscriptionV1File(val *MarketplaceSubscriptionV1File) *NullableMarketplaceSubscriptionV1File { + return &NullableMarketplaceSubscriptionV1File{value: val, isSet: true} +} + +func (v NullableMarketplaceSubscriptionV1File) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMarketplaceSubscriptionV1File) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_file_localized_version.go b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_file_localized_version.go new file mode 100644 index 000000000..dfd20ff6c --- /dev/null +++ b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_file_localized_version.go @@ -0,0 +1,193 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +Contact: marketplace@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the MarketplaceSubscriptionV1FileLocalizedVersion type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MarketplaceSubscriptionV1FileLocalizedVersion{} + +// MarketplaceSubscriptionV1FileLocalizedVersion struct for MarketplaceSubscriptionV1FileLocalizedVersion +type MarketplaceSubscriptionV1FileLocalizedVersion struct { + // The file version matching the file name (localized). + De *string `json:"de,omitempty"` + // The file version matching the file name (localized). + En *string `json:"en,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _MarketplaceSubscriptionV1FileLocalizedVersion MarketplaceSubscriptionV1FileLocalizedVersion + +// NewMarketplaceSubscriptionV1FileLocalizedVersion instantiates a new MarketplaceSubscriptionV1FileLocalizedVersion 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 NewMarketplaceSubscriptionV1FileLocalizedVersion() *MarketplaceSubscriptionV1FileLocalizedVersion { + this := MarketplaceSubscriptionV1FileLocalizedVersion{} + return &this +} + +// NewMarketplaceSubscriptionV1FileLocalizedVersionWithDefaults instantiates a new MarketplaceSubscriptionV1FileLocalizedVersion 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 NewMarketplaceSubscriptionV1FileLocalizedVersionWithDefaults() *MarketplaceSubscriptionV1FileLocalizedVersion { + this := MarketplaceSubscriptionV1FileLocalizedVersion{} + return &this +} + +// GetDe returns the De field value if set, zero value otherwise. +func (o *MarketplaceSubscriptionV1FileLocalizedVersion) GetDe() string { + if o == nil || IsNil(o.De) { + var ret string + return ret + } + return *o.De +} + +// GetDeOk returns a tuple with the De field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1FileLocalizedVersion) GetDeOk() (*string, bool) { + if o == nil || IsNil(o.De) { + return nil, false + } + return o.De, true +} + +// HasDe returns a boolean if a field has been set. +func (o *MarketplaceSubscriptionV1FileLocalizedVersion) HasDe() bool { + if o != nil && !IsNil(o.De) { + return true + } + + return false +} + +// SetDe gets a reference to the given string and assigns it to the De field. +func (o *MarketplaceSubscriptionV1FileLocalizedVersion) SetDe(v string) { + o.De = &v +} + +// GetEn returns the En field value if set, zero value otherwise. +func (o *MarketplaceSubscriptionV1FileLocalizedVersion) GetEn() string { + if o == nil || IsNil(o.En) { + var ret string + return ret + } + return *o.En +} + +// GetEnOk returns a tuple with the En field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1FileLocalizedVersion) GetEnOk() (*string, bool) { + if o == nil || IsNil(o.En) { + return nil, false + } + return o.En, true +} + +// HasEn returns a boolean if a field has been set. +func (o *MarketplaceSubscriptionV1FileLocalizedVersion) HasEn() bool { + if o != nil && !IsNil(o.En) { + return true + } + + return false +} + +// SetEn gets a reference to the given string and assigns it to the En field. +func (o *MarketplaceSubscriptionV1FileLocalizedVersion) SetEn(v string) { + o.En = &v +} + +func (o MarketplaceSubscriptionV1FileLocalizedVersion) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MarketplaceSubscriptionV1FileLocalizedVersion) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.De) { + toSerialize["de"] = o.De + } + if !IsNil(o.En) { + toSerialize["en"] = o.En + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MarketplaceSubscriptionV1FileLocalizedVersion) UnmarshalJSON(data []byte) (err error) { + varMarketplaceSubscriptionV1FileLocalizedVersion := _MarketplaceSubscriptionV1FileLocalizedVersion{} + + err = json.Unmarshal(data, &varMarketplaceSubscriptionV1FileLocalizedVersion) + + if err != nil { + return err + } + + *o = MarketplaceSubscriptionV1FileLocalizedVersion(varMarketplaceSubscriptionV1FileLocalizedVersion) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "de") + delete(additionalProperties, "en") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMarketplaceSubscriptionV1FileLocalizedVersion struct { + value *MarketplaceSubscriptionV1FileLocalizedVersion + isSet bool +} + +func (v NullableMarketplaceSubscriptionV1FileLocalizedVersion) Get() *MarketplaceSubscriptionV1FileLocalizedVersion { + return v.value +} + +func (v *NullableMarketplaceSubscriptionV1FileLocalizedVersion) Set(val *MarketplaceSubscriptionV1FileLocalizedVersion) { + v.value = val + v.isSet = true +} + +func (v NullableMarketplaceSubscriptionV1FileLocalizedVersion) IsSet() bool { + return v.isSet +} + +func (v *NullableMarketplaceSubscriptionV1FileLocalizedVersion) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMarketplaceSubscriptionV1FileLocalizedVersion(val *MarketplaceSubscriptionV1FileLocalizedVersion) *NullableMarketplaceSubscriptionV1FileLocalizedVersion { + return &NullableMarketplaceSubscriptionV1FileLocalizedVersion{value: val, isSet: true} +} + +func (v NullableMarketplaceSubscriptionV1FileLocalizedVersion) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMarketplaceSubscriptionV1FileLocalizedVersion) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_list_subscriptions_response.go b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_list_subscriptions_response.go new file mode 100644 index 000000000..873f8a9f5 --- /dev/null +++ b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_list_subscriptions_response.go @@ -0,0 +1,228 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +Contact: marketplace@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the MarketplaceSubscriptionV1ListSubscriptionsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MarketplaceSubscriptionV1ListSubscriptionsResponse{} + +// MarketplaceSubscriptionV1ListSubscriptionsResponse struct for MarketplaceSubscriptionV1ListSubscriptionsResponse +type MarketplaceSubscriptionV1ListSubscriptionsResponse struct { + Cursor *string `json:"cursor,omitempty"` + Items []MarketplaceSubscriptionV1Subscription `json:"items,omitempty"` + Limit *int32 `json:"limit,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _MarketplaceSubscriptionV1ListSubscriptionsResponse MarketplaceSubscriptionV1ListSubscriptionsResponse + +// NewMarketplaceSubscriptionV1ListSubscriptionsResponse instantiates a new MarketplaceSubscriptionV1ListSubscriptionsResponse 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 NewMarketplaceSubscriptionV1ListSubscriptionsResponse() *MarketplaceSubscriptionV1ListSubscriptionsResponse { + this := MarketplaceSubscriptionV1ListSubscriptionsResponse{} + return &this +} + +// NewMarketplaceSubscriptionV1ListSubscriptionsResponseWithDefaults instantiates a new MarketplaceSubscriptionV1ListSubscriptionsResponse 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 NewMarketplaceSubscriptionV1ListSubscriptionsResponseWithDefaults() *MarketplaceSubscriptionV1ListSubscriptionsResponse { + this := MarketplaceSubscriptionV1ListSubscriptionsResponse{} + return &this +} + +// GetCursor returns the Cursor field value if set, zero value otherwise. +func (o *MarketplaceSubscriptionV1ListSubscriptionsResponse) GetCursor() string { + if o == nil || IsNil(o.Cursor) { + var ret string + return ret + } + return *o.Cursor +} + +// GetCursorOk returns a tuple with the Cursor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1ListSubscriptionsResponse) GetCursorOk() (*string, bool) { + if o == nil || IsNil(o.Cursor) { + return nil, false + } + return o.Cursor, true +} + +// HasCursor returns a boolean if a field has been set. +func (o *MarketplaceSubscriptionV1ListSubscriptionsResponse) HasCursor() bool { + if o != nil && !IsNil(o.Cursor) { + return true + } + + return false +} + +// SetCursor gets a reference to the given string and assigns it to the Cursor field. +func (o *MarketplaceSubscriptionV1ListSubscriptionsResponse) SetCursor(v string) { + o.Cursor = &v +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *MarketplaceSubscriptionV1ListSubscriptionsResponse) GetItems() []MarketplaceSubscriptionV1Subscription { + if o == nil || IsNil(o.Items) { + var ret []MarketplaceSubscriptionV1Subscription + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1ListSubscriptionsResponse) GetItemsOk() ([]MarketplaceSubscriptionV1Subscription, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *MarketplaceSubscriptionV1ListSubscriptionsResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []MarketplaceSubscriptionV1Subscription and assigns it to the Items field. +func (o *MarketplaceSubscriptionV1ListSubscriptionsResponse) SetItems(v []MarketplaceSubscriptionV1Subscription) { + o.Items = v +} + +// GetLimit returns the Limit field value if set, zero value otherwise. +func (o *MarketplaceSubscriptionV1ListSubscriptionsResponse) GetLimit() int32 { + if o == nil || IsNil(o.Limit) { + var ret int32 + return ret + } + return *o.Limit +} + +// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1ListSubscriptionsResponse) GetLimitOk() (*int32, bool) { + if o == nil || IsNil(o.Limit) { + return nil, false + } + return o.Limit, true +} + +// HasLimit returns a boolean if a field has been set. +func (o *MarketplaceSubscriptionV1ListSubscriptionsResponse) HasLimit() bool { + if o != nil && !IsNil(o.Limit) { + return true + } + + return false +} + +// SetLimit gets a reference to the given int32 and assigns it to the Limit field. +func (o *MarketplaceSubscriptionV1ListSubscriptionsResponse) SetLimit(v int32) { + o.Limit = &v +} + +func (o MarketplaceSubscriptionV1ListSubscriptionsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MarketplaceSubscriptionV1ListSubscriptionsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Cursor) { + toSerialize["cursor"] = o.Cursor + } + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + if !IsNil(o.Limit) { + toSerialize["limit"] = o.Limit + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MarketplaceSubscriptionV1ListSubscriptionsResponse) UnmarshalJSON(data []byte) (err error) { + varMarketplaceSubscriptionV1ListSubscriptionsResponse := _MarketplaceSubscriptionV1ListSubscriptionsResponse{} + + err = json.Unmarshal(data, &varMarketplaceSubscriptionV1ListSubscriptionsResponse) + + if err != nil { + return err + } + + *o = MarketplaceSubscriptionV1ListSubscriptionsResponse(varMarketplaceSubscriptionV1ListSubscriptionsResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "cursor") + delete(additionalProperties, "items") + delete(additionalProperties, "limit") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMarketplaceSubscriptionV1ListSubscriptionsResponse struct { + value *MarketplaceSubscriptionV1ListSubscriptionsResponse + isSet bool +} + +func (v NullableMarketplaceSubscriptionV1ListSubscriptionsResponse) Get() *MarketplaceSubscriptionV1ListSubscriptionsResponse { + return v.value +} + +func (v *NullableMarketplaceSubscriptionV1ListSubscriptionsResponse) Set(val *MarketplaceSubscriptionV1ListSubscriptionsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableMarketplaceSubscriptionV1ListSubscriptionsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableMarketplaceSubscriptionV1ListSubscriptionsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMarketplaceSubscriptionV1ListSubscriptionsResponse(val *MarketplaceSubscriptionV1ListSubscriptionsResponse) *NullableMarketplaceSubscriptionV1ListSubscriptionsResponse { + return &NullableMarketplaceSubscriptionV1ListSubscriptionsResponse{value: val, isSet: true} +} + +func (v NullableMarketplaceSubscriptionV1ListSubscriptionsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMarketplaceSubscriptionV1ListSubscriptionsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_subscription.go b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_subscription.go new file mode 100644 index 000000000..557e59821 --- /dev/null +++ b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_subscription.go @@ -0,0 +1,507 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +Contact: marketplace@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" + "fmt" +) + +// checks if the MarketplaceSubscriptionV1Subscription type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MarketplaceSubscriptionV1Subscription{} + +// MarketplaceSubscriptionV1Subscription struct for MarketplaceSubscriptionV1Subscription +type MarketplaceSubscriptionV1Subscription struct { + // Period between the subscription was created until the approval needs to happen. + ApprovalTimeout *string `json:"approvalTimeout,omitempty"` + // If true, the the subscription will extend its validity automatically at the end of the current period. + AutoRenewal *bool `json:"autoRenewal,omitempty"` + LifecycleState MarketplaceSubscriptionV1SubscriptionLifecycleState `json:"lifecycleState"` + // When the subscription was ordered. + OrderedAt string `json:"orderedAt"` + // The UUID of the organization. + OrganizationId string `json:"organizationId"` + // The product to the subscription. + Product MarketplaceSubscriptionV1SubscriptionProduct `json:"product"` + // The UUID of the project. + ProjectId string `json:"projectId"` + // The UUID of the subscription. + SubscriptionId string `json:"subscriptionId"` + // Timestamp when the subscription will finally terminate. + TerminatesAt *string `json:"terminatesAt,omitempty"` + // Timestamp when the subscription validity has started. + ValidFrom *string `json:"validFrom,omitempty"` + // Timestamp when the current subscription validity will end. May be automatically renewed. + ValidUntil *string `json:"validUntil,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _MarketplaceSubscriptionV1Subscription MarketplaceSubscriptionV1Subscription + +// NewMarketplaceSubscriptionV1Subscription instantiates a new MarketplaceSubscriptionV1Subscription 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 NewMarketplaceSubscriptionV1Subscription(lifecycleState MarketplaceSubscriptionV1SubscriptionLifecycleState, orderedAt string, organizationId string, product MarketplaceSubscriptionV1SubscriptionProduct, projectId string, subscriptionId string) *MarketplaceSubscriptionV1Subscription { + this := MarketplaceSubscriptionV1Subscription{} + this.LifecycleState = lifecycleState + this.OrderedAt = orderedAt + this.OrganizationId = organizationId + this.Product = product + this.ProjectId = projectId + this.SubscriptionId = subscriptionId + return &this +} + +// NewMarketplaceSubscriptionV1SubscriptionWithDefaults instantiates a new MarketplaceSubscriptionV1Subscription 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 NewMarketplaceSubscriptionV1SubscriptionWithDefaults() *MarketplaceSubscriptionV1Subscription { + this := MarketplaceSubscriptionV1Subscription{} + return &this +} + +// GetApprovalTimeout returns the ApprovalTimeout field value if set, zero value otherwise. +func (o *MarketplaceSubscriptionV1Subscription) GetApprovalTimeout() string { + if o == nil || IsNil(o.ApprovalTimeout) { + var ret string + return ret + } + return *o.ApprovalTimeout +} + +// GetApprovalTimeoutOk returns a tuple with the ApprovalTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1Subscription) GetApprovalTimeoutOk() (*string, bool) { + if o == nil || IsNil(o.ApprovalTimeout) { + return nil, false + } + return o.ApprovalTimeout, true +} + +// HasApprovalTimeout returns a boolean if a field has been set. +func (o *MarketplaceSubscriptionV1Subscription) HasApprovalTimeout() bool { + if o != nil && !IsNil(o.ApprovalTimeout) { + return true + } + + return false +} + +// SetApprovalTimeout gets a reference to the given string and assigns it to the ApprovalTimeout field. +func (o *MarketplaceSubscriptionV1Subscription) SetApprovalTimeout(v string) { + o.ApprovalTimeout = &v +} + +// GetAutoRenewal returns the AutoRenewal field value if set, zero value otherwise. +func (o *MarketplaceSubscriptionV1Subscription) GetAutoRenewal() bool { + if o == nil || IsNil(o.AutoRenewal) { + var ret bool + return ret + } + return *o.AutoRenewal +} + +// GetAutoRenewalOk returns a tuple with the AutoRenewal field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1Subscription) GetAutoRenewalOk() (*bool, bool) { + if o == nil || IsNil(o.AutoRenewal) { + return nil, false + } + return o.AutoRenewal, true +} + +// HasAutoRenewal returns a boolean if a field has been set. +func (o *MarketplaceSubscriptionV1Subscription) HasAutoRenewal() bool { + if o != nil && !IsNil(o.AutoRenewal) { + return true + } + + return false +} + +// SetAutoRenewal gets a reference to the given bool and assigns it to the AutoRenewal field. +func (o *MarketplaceSubscriptionV1Subscription) SetAutoRenewal(v bool) { + o.AutoRenewal = &v +} + +// GetLifecycleState returns the LifecycleState field value +func (o *MarketplaceSubscriptionV1Subscription) GetLifecycleState() MarketplaceSubscriptionV1SubscriptionLifecycleState { + if o == nil { + var ret MarketplaceSubscriptionV1SubscriptionLifecycleState + return ret + } + + return o.LifecycleState +} + +// GetLifecycleStateOk returns a tuple with the LifecycleState field value +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1Subscription) GetLifecycleStateOk() (*MarketplaceSubscriptionV1SubscriptionLifecycleState, bool) { + if o == nil { + return nil, false + } + return &o.LifecycleState, true +} + +// SetLifecycleState sets field value +func (o *MarketplaceSubscriptionV1Subscription) SetLifecycleState(v MarketplaceSubscriptionV1SubscriptionLifecycleState) { + o.LifecycleState = v +} + +// GetOrderedAt returns the OrderedAt field value +func (o *MarketplaceSubscriptionV1Subscription) GetOrderedAt() string { + if o == nil { + var ret string + return ret + } + + return o.OrderedAt +} + +// GetOrderedAtOk returns a tuple with the OrderedAt field value +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1Subscription) GetOrderedAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrderedAt, true +} + +// SetOrderedAt sets field value +func (o *MarketplaceSubscriptionV1Subscription) SetOrderedAt(v string) { + o.OrderedAt = v +} + +// GetOrganizationId returns the OrganizationId field value +func (o *MarketplaceSubscriptionV1Subscription) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1Subscription) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *MarketplaceSubscriptionV1Subscription) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetProduct returns the Product field value +func (o *MarketplaceSubscriptionV1Subscription) GetProduct() MarketplaceSubscriptionV1SubscriptionProduct { + if o == nil { + var ret MarketplaceSubscriptionV1SubscriptionProduct + return ret + } + + return o.Product +} + +// GetProductOk returns a tuple with the Product field value +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1Subscription) GetProductOk() (*MarketplaceSubscriptionV1SubscriptionProduct, bool) { + if o == nil { + return nil, false + } + return &o.Product, true +} + +// SetProduct sets field value +func (o *MarketplaceSubscriptionV1Subscription) SetProduct(v MarketplaceSubscriptionV1SubscriptionProduct) { + o.Product = v +} + +// GetProjectId returns the ProjectId field value +func (o *MarketplaceSubscriptionV1Subscription) GetProjectId() string { + if o == nil { + var ret string + return ret + } + + return o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1Subscription) GetProjectIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProjectId, true +} + +// SetProjectId sets field value +func (o *MarketplaceSubscriptionV1Subscription) SetProjectId(v string) { + o.ProjectId = v +} + +// GetSubscriptionId returns the SubscriptionId field value +func (o *MarketplaceSubscriptionV1Subscription) GetSubscriptionId() string { + if o == nil { + var ret string + return ret + } + + return o.SubscriptionId +} + +// GetSubscriptionIdOk returns a tuple with the SubscriptionId field value +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1Subscription) GetSubscriptionIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SubscriptionId, true +} + +// SetSubscriptionId sets field value +func (o *MarketplaceSubscriptionV1Subscription) SetSubscriptionId(v string) { + o.SubscriptionId = v +} + +// GetTerminatesAt returns the TerminatesAt field value if set, zero value otherwise. +func (o *MarketplaceSubscriptionV1Subscription) GetTerminatesAt() string { + if o == nil || IsNil(o.TerminatesAt) { + var ret string + return ret + } + return *o.TerminatesAt +} + +// GetTerminatesAtOk returns a tuple with the TerminatesAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1Subscription) GetTerminatesAtOk() (*string, bool) { + if o == nil || IsNil(o.TerminatesAt) { + return nil, false + } + return o.TerminatesAt, true +} + +// HasTerminatesAt returns a boolean if a field has been set. +func (o *MarketplaceSubscriptionV1Subscription) HasTerminatesAt() bool { + if o != nil && !IsNil(o.TerminatesAt) { + return true + } + + return false +} + +// SetTerminatesAt gets a reference to the given string and assigns it to the TerminatesAt field. +func (o *MarketplaceSubscriptionV1Subscription) SetTerminatesAt(v string) { + o.TerminatesAt = &v +} + +// GetValidFrom returns the ValidFrom field value if set, zero value otherwise. +func (o *MarketplaceSubscriptionV1Subscription) GetValidFrom() string { + if o == nil || IsNil(o.ValidFrom) { + var ret string + return ret + } + return *o.ValidFrom +} + +// GetValidFromOk returns a tuple with the ValidFrom field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1Subscription) GetValidFromOk() (*string, bool) { + if o == nil || IsNil(o.ValidFrom) { + return nil, false + } + return o.ValidFrom, true +} + +// HasValidFrom returns a boolean if a field has been set. +func (o *MarketplaceSubscriptionV1Subscription) HasValidFrom() bool { + if o != nil && !IsNil(o.ValidFrom) { + return true + } + + return false +} + +// SetValidFrom gets a reference to the given string and assigns it to the ValidFrom field. +func (o *MarketplaceSubscriptionV1Subscription) SetValidFrom(v string) { + o.ValidFrom = &v +} + +// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. +func (o *MarketplaceSubscriptionV1Subscription) GetValidUntil() string { + if o == nil || IsNil(o.ValidUntil) { + var ret string + return ret + } + return *o.ValidUntil +} + +// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1Subscription) GetValidUntilOk() (*string, bool) { + if o == nil || IsNil(o.ValidUntil) { + return nil, false + } + return o.ValidUntil, true +} + +// HasValidUntil returns a boolean if a field has been set. +func (o *MarketplaceSubscriptionV1Subscription) HasValidUntil() bool { + if o != nil && !IsNil(o.ValidUntil) { + return true + } + + return false +} + +// SetValidUntil gets a reference to the given string and assigns it to the ValidUntil field. +func (o *MarketplaceSubscriptionV1Subscription) SetValidUntil(v string) { + o.ValidUntil = &v +} + +func (o MarketplaceSubscriptionV1Subscription) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MarketplaceSubscriptionV1Subscription) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ApprovalTimeout) { + toSerialize["approvalTimeout"] = o.ApprovalTimeout + } + if !IsNil(o.AutoRenewal) { + toSerialize["autoRenewal"] = o.AutoRenewal + } + toSerialize["lifecycleState"] = o.LifecycleState + toSerialize["orderedAt"] = o.OrderedAt + toSerialize["organizationId"] = o.OrganizationId + toSerialize["product"] = o.Product + toSerialize["projectId"] = o.ProjectId + toSerialize["subscriptionId"] = o.SubscriptionId + if !IsNil(o.TerminatesAt) { + toSerialize["terminatesAt"] = o.TerminatesAt + } + if !IsNil(o.ValidFrom) { + toSerialize["validFrom"] = o.ValidFrom + } + if !IsNil(o.ValidUntil) { + toSerialize["validUntil"] = o.ValidUntil + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MarketplaceSubscriptionV1Subscription) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "lifecycleState", + "orderedAt", + "organizationId", + "product", + "projectId", + "subscriptionId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMarketplaceSubscriptionV1Subscription := _MarketplaceSubscriptionV1Subscription{} + + err = json.Unmarshal(data, &varMarketplaceSubscriptionV1Subscription) + + if err != nil { + return err + } + + *o = MarketplaceSubscriptionV1Subscription(varMarketplaceSubscriptionV1Subscription) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "approvalTimeout") + delete(additionalProperties, "autoRenewal") + delete(additionalProperties, "lifecycleState") + delete(additionalProperties, "orderedAt") + delete(additionalProperties, "organizationId") + delete(additionalProperties, "product") + delete(additionalProperties, "projectId") + delete(additionalProperties, "subscriptionId") + delete(additionalProperties, "terminatesAt") + delete(additionalProperties, "validFrom") + delete(additionalProperties, "validUntil") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMarketplaceSubscriptionV1Subscription struct { + value *MarketplaceSubscriptionV1Subscription + isSet bool +} + +func (v NullableMarketplaceSubscriptionV1Subscription) Get() *MarketplaceSubscriptionV1Subscription { + return v.value +} + +func (v *NullableMarketplaceSubscriptionV1Subscription) Set(val *MarketplaceSubscriptionV1Subscription) { + v.value = val + v.isSet = true +} + +func (v NullableMarketplaceSubscriptionV1Subscription) IsSet() bool { + return v.isSet +} + +func (v *NullableMarketplaceSubscriptionV1Subscription) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMarketplaceSubscriptionV1Subscription(val *MarketplaceSubscriptionV1Subscription) *NullableMarketplaceSubscriptionV1Subscription { + return &NullableMarketplaceSubscriptionV1Subscription{value: val, isSet: true} +} + +func (v NullableMarketplaceSubscriptionV1Subscription) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMarketplaceSubscriptionV1Subscription) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_subscription_lifecycle_state.go b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_subscription_lifecycle_state.go new file mode 100644 index 000000000..b285055e6 --- /dev/null +++ b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_subscription_lifecycle_state.go @@ -0,0 +1,126 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +Contact: marketplace@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" + "fmt" +) + +// MarketplaceSubscriptionV1SubscriptionLifecycleState the model 'MarketplaceSubscriptionV1SubscriptionLifecycleState' +type MarketplaceSubscriptionV1SubscriptionLifecycleState string + +// List of marketplace_subscription_v1_Subscription_lifecycleState +const ( + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONLIFECYCLESTATE_STATE_UNSPECIFIED MarketplaceSubscriptionV1SubscriptionLifecycleState = "STATE_UNSPECIFIED" + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONLIFECYCLESTATE_SUBSCRIPTION_PENDING MarketplaceSubscriptionV1SubscriptionLifecycleState = "SUBSCRIPTION_PENDING" + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONLIFECYCLESTATE_SUBSCRIPTION_ACTIVE MarketplaceSubscriptionV1SubscriptionLifecycleState = "SUBSCRIPTION_ACTIVE" + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONLIFECYCLESTATE_SUBSCRIPTION_INACTIVE MarketplaceSubscriptionV1SubscriptionLifecycleState = "SUBSCRIPTION_INACTIVE" + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONLIFECYCLESTATE_SUBSCRIPTION_CANCELLING MarketplaceSubscriptionV1SubscriptionLifecycleState = "SUBSCRIPTION_CANCELLING" + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONLIFECYCLESTATE_SUBSCRIPTION_CANCELLED MarketplaceSubscriptionV1SubscriptionLifecycleState = "SUBSCRIPTION_CANCELLED" + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONLIFECYCLESTATE_SUBSCRIPTION_REJECTED MarketplaceSubscriptionV1SubscriptionLifecycleState = "SUBSCRIPTION_REJECTED" + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONLIFECYCLESTATE_SUBSCRIPTION_APPROVAL_TIMED_OUT MarketplaceSubscriptionV1SubscriptionLifecycleState = "SUBSCRIPTION_APPROVAL_TIMED_OUT" + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONLIFECYCLESTATE_UNKNOWN_DEFAULT_OPEN_API MarketplaceSubscriptionV1SubscriptionLifecycleState = "unknown_default_open_api" +) + +// All allowed values of MarketplaceSubscriptionV1SubscriptionLifecycleState enum +var AllowedMarketplaceSubscriptionV1SubscriptionLifecycleStateEnumValues = []MarketplaceSubscriptionV1SubscriptionLifecycleState{ + "STATE_UNSPECIFIED", + "SUBSCRIPTION_PENDING", + "SUBSCRIPTION_ACTIVE", + "SUBSCRIPTION_INACTIVE", + "SUBSCRIPTION_CANCELLING", + "SUBSCRIPTION_CANCELLED", + "SUBSCRIPTION_REJECTED", + "SUBSCRIPTION_APPROVAL_TIMED_OUT", + "unknown_default_open_api", +} + +func (v *MarketplaceSubscriptionV1SubscriptionLifecycleState) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := MarketplaceSubscriptionV1SubscriptionLifecycleState(value) + for _, existing := range AllowedMarketplaceSubscriptionV1SubscriptionLifecycleStateEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONLIFECYCLESTATE_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewMarketplaceSubscriptionV1SubscriptionLifecycleStateFromValue returns a pointer to a valid MarketplaceSubscriptionV1SubscriptionLifecycleState +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewMarketplaceSubscriptionV1SubscriptionLifecycleStateFromValue(v string) (*MarketplaceSubscriptionV1SubscriptionLifecycleState, error) { + ev := MarketplaceSubscriptionV1SubscriptionLifecycleState(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for MarketplaceSubscriptionV1SubscriptionLifecycleState: valid values are %v", v, AllowedMarketplaceSubscriptionV1SubscriptionLifecycleStateEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v MarketplaceSubscriptionV1SubscriptionLifecycleState) IsValid() bool { + for _, existing := range AllowedMarketplaceSubscriptionV1SubscriptionLifecycleStateEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to marketplace_subscription_v1_Subscription_lifecycleState value +func (v MarketplaceSubscriptionV1SubscriptionLifecycleState) Ptr() *MarketplaceSubscriptionV1SubscriptionLifecycleState { + return &v +} + +type NullableMarketplaceSubscriptionV1SubscriptionLifecycleState struct { + value *MarketplaceSubscriptionV1SubscriptionLifecycleState + isSet bool +} + +func (v NullableMarketplaceSubscriptionV1SubscriptionLifecycleState) Get() *MarketplaceSubscriptionV1SubscriptionLifecycleState { + return v.value +} + +func (v *NullableMarketplaceSubscriptionV1SubscriptionLifecycleState) Set(val *MarketplaceSubscriptionV1SubscriptionLifecycleState) { + v.value = val + v.isSet = true +} + +func (v NullableMarketplaceSubscriptionV1SubscriptionLifecycleState) IsSet() bool { + return v.isSet +} + +func (v *NullableMarketplaceSubscriptionV1SubscriptionLifecycleState) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMarketplaceSubscriptionV1SubscriptionLifecycleState(val *MarketplaceSubscriptionV1SubscriptionLifecycleState) *NullableMarketplaceSubscriptionV1SubscriptionLifecycleState { + return &NullableMarketplaceSubscriptionV1SubscriptionLifecycleState{value: val, isSet: true} +} + +func (v NullableMarketplaceSubscriptionV1SubscriptionLifecycleState) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMarketplaceSubscriptionV1SubscriptionLifecycleState) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_subscription_product.go b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_subscription_product.go new file mode 100644 index 000000000..f16a1d916 --- /dev/null +++ b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_subscription_product.go @@ -0,0 +1,518 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +Contact: marketplace@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" + "fmt" +) + +// checks if the MarketplaceSubscriptionV1SubscriptionProduct type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MarketplaceSubscriptionV1SubscriptionProduct{} + +// MarketplaceSubscriptionV1SubscriptionProduct struct for MarketplaceSubscriptionV1SubscriptionProduct +type MarketplaceSubscriptionV1SubscriptionProduct struct { + Assets *MarketplaceSubscriptionV1Assets `json:"assets,omitempty"` + DeliveryMethod MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod `json:"deliveryMethod"` + LifecycleState MarketplaceSubscriptionV1SubscriptionProductLifecycleState `json:"lifecycleState"` + // The user-readable plan ID of a pricing option. + PlanId string `json:"planId"` + PriceType MarketplaceSubscriptionV1SubscriptionProductPriceType `json:"priceType"` + // Additional price type information. + PricingPlan string `json:"pricingPlan"` + // The user-readable ID of the product. + ProductId string `json:"productId"` + // The name of the product. + ProductName string `json:"productName"` + // The product vendor's name. + VendorName string `json:"vendorName"` + // The vendor provided plan ID. + VendorPlanId *string `json:"vendorPlanId,omitempty"` + // The vendor provided prduct ID. + VendorProductId *string `json:"vendorProductId,omitempty"` + // The vendor's website. + VendorWebsiteUrl string `json:"vendorWebsiteUrl"` + AdditionalProperties map[string]interface{} +} + +type _MarketplaceSubscriptionV1SubscriptionProduct MarketplaceSubscriptionV1SubscriptionProduct + +// NewMarketplaceSubscriptionV1SubscriptionProduct instantiates a new MarketplaceSubscriptionV1SubscriptionProduct 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 NewMarketplaceSubscriptionV1SubscriptionProduct(deliveryMethod MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod, lifecycleState MarketplaceSubscriptionV1SubscriptionProductLifecycleState, planId string, priceType MarketplaceSubscriptionV1SubscriptionProductPriceType, pricingPlan string, productId string, productName string, vendorName string, vendorWebsiteUrl string) *MarketplaceSubscriptionV1SubscriptionProduct { + this := MarketplaceSubscriptionV1SubscriptionProduct{} + this.DeliveryMethod = deliveryMethod + this.LifecycleState = lifecycleState + this.PlanId = planId + this.PriceType = priceType + this.PricingPlan = pricingPlan + this.ProductId = productId + this.ProductName = productName + this.VendorName = vendorName + this.VendorWebsiteUrl = vendorWebsiteUrl + return &this +} + +// NewMarketplaceSubscriptionV1SubscriptionProductWithDefaults instantiates a new MarketplaceSubscriptionV1SubscriptionProduct 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 NewMarketplaceSubscriptionV1SubscriptionProductWithDefaults() *MarketplaceSubscriptionV1SubscriptionProduct { + this := MarketplaceSubscriptionV1SubscriptionProduct{} + return &this +} + +// GetAssets returns the Assets field value if set, zero value otherwise. +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetAssets() MarketplaceSubscriptionV1Assets { + if o == nil || IsNil(o.Assets) { + var ret MarketplaceSubscriptionV1Assets + return ret + } + return *o.Assets +} + +// GetAssetsOk returns a tuple with the Assets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetAssetsOk() (*MarketplaceSubscriptionV1Assets, bool) { + if o == nil || IsNil(o.Assets) { + return nil, false + } + return o.Assets, true +} + +// HasAssets returns a boolean if a field has been set. +func (o *MarketplaceSubscriptionV1SubscriptionProduct) HasAssets() bool { + if o != nil && !IsNil(o.Assets) { + return true + } + + return false +} + +// SetAssets gets a reference to the given MarketplaceSubscriptionV1Assets and assigns it to the Assets field. +func (o *MarketplaceSubscriptionV1SubscriptionProduct) SetAssets(v MarketplaceSubscriptionV1Assets) { + o.Assets = &v +} + +// GetDeliveryMethod returns the DeliveryMethod field value +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetDeliveryMethod() MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod { + if o == nil { + var ret MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod + return ret + } + + return o.DeliveryMethod +} + +// GetDeliveryMethodOk returns a tuple with the DeliveryMethod field value +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetDeliveryMethodOk() (*MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod, bool) { + if o == nil { + return nil, false + } + return &o.DeliveryMethod, true +} + +// SetDeliveryMethod sets field value +func (o *MarketplaceSubscriptionV1SubscriptionProduct) SetDeliveryMethod(v MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod) { + o.DeliveryMethod = v +} + +// GetLifecycleState returns the LifecycleState field value +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetLifecycleState() MarketplaceSubscriptionV1SubscriptionProductLifecycleState { + if o == nil { + var ret MarketplaceSubscriptionV1SubscriptionProductLifecycleState + return ret + } + + return o.LifecycleState +} + +// GetLifecycleStateOk returns a tuple with the LifecycleState field value +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetLifecycleStateOk() (*MarketplaceSubscriptionV1SubscriptionProductLifecycleState, bool) { + if o == nil { + return nil, false + } + return &o.LifecycleState, true +} + +// SetLifecycleState sets field value +func (o *MarketplaceSubscriptionV1SubscriptionProduct) SetLifecycleState(v MarketplaceSubscriptionV1SubscriptionProductLifecycleState) { + o.LifecycleState = v +} + +// GetPlanId returns the PlanId field value +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetPlanId() string { + if o == nil { + var ret string + return ret + } + + return o.PlanId +} + +// GetPlanIdOk returns a tuple with the PlanId field value +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetPlanIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PlanId, true +} + +// SetPlanId sets field value +func (o *MarketplaceSubscriptionV1SubscriptionProduct) SetPlanId(v string) { + o.PlanId = v +} + +// GetPriceType returns the PriceType field value +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetPriceType() MarketplaceSubscriptionV1SubscriptionProductPriceType { + if o == nil { + var ret MarketplaceSubscriptionV1SubscriptionProductPriceType + return ret + } + + return o.PriceType +} + +// GetPriceTypeOk returns a tuple with the PriceType field value +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetPriceTypeOk() (*MarketplaceSubscriptionV1SubscriptionProductPriceType, bool) { + if o == nil { + return nil, false + } + return &o.PriceType, true +} + +// SetPriceType sets field value +func (o *MarketplaceSubscriptionV1SubscriptionProduct) SetPriceType(v MarketplaceSubscriptionV1SubscriptionProductPriceType) { + o.PriceType = v +} + +// GetPricingPlan returns the PricingPlan field value +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetPricingPlan() string { + if o == nil { + var ret string + return ret + } + + return o.PricingPlan +} + +// GetPricingPlanOk returns a tuple with the PricingPlan field value +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetPricingPlanOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PricingPlan, true +} + +// SetPricingPlan sets field value +func (o *MarketplaceSubscriptionV1SubscriptionProduct) SetPricingPlan(v string) { + o.PricingPlan = v +} + +// GetProductId returns the ProductId field value +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetProductId() string { + if o == nil { + var ret string + return ret + } + + return o.ProductId +} + +// GetProductIdOk returns a tuple with the ProductId field value +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetProductIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductId, true +} + +// SetProductId sets field value +func (o *MarketplaceSubscriptionV1SubscriptionProduct) SetProductId(v string) { + o.ProductId = v +} + +// GetProductName returns the ProductName field value +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetProductName() string { + if o == nil { + var ret string + return ret + } + + return o.ProductName +} + +// GetProductNameOk returns a tuple with the ProductName field value +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetProductNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductName, true +} + +// SetProductName sets field value +func (o *MarketplaceSubscriptionV1SubscriptionProduct) SetProductName(v string) { + o.ProductName = v +} + +// GetVendorName returns the VendorName field value +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetVendorName() string { + if o == nil { + var ret string + return ret + } + + return o.VendorName +} + +// GetVendorNameOk returns a tuple with the VendorName field value +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetVendorNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.VendorName, true +} + +// SetVendorName sets field value +func (o *MarketplaceSubscriptionV1SubscriptionProduct) SetVendorName(v string) { + o.VendorName = v +} + +// GetVendorPlanId returns the VendorPlanId field value if set, zero value otherwise. +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetVendorPlanId() string { + if o == nil || IsNil(o.VendorPlanId) { + var ret string + return ret + } + return *o.VendorPlanId +} + +// GetVendorPlanIdOk returns a tuple with the VendorPlanId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetVendorPlanIdOk() (*string, bool) { + if o == nil || IsNil(o.VendorPlanId) { + return nil, false + } + return o.VendorPlanId, true +} + +// HasVendorPlanId returns a boolean if a field has been set. +func (o *MarketplaceSubscriptionV1SubscriptionProduct) HasVendorPlanId() bool { + if o != nil && !IsNil(o.VendorPlanId) { + return true + } + + return false +} + +// SetVendorPlanId gets a reference to the given string and assigns it to the VendorPlanId field. +func (o *MarketplaceSubscriptionV1SubscriptionProduct) SetVendorPlanId(v string) { + o.VendorPlanId = &v +} + +// GetVendorProductId returns the VendorProductId field value if set, zero value otherwise. +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetVendorProductId() string { + if o == nil || IsNil(o.VendorProductId) { + var ret string + return ret + } + return *o.VendorProductId +} + +// GetVendorProductIdOk returns a tuple with the VendorProductId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetVendorProductIdOk() (*string, bool) { + if o == nil || IsNil(o.VendorProductId) { + return nil, false + } + return o.VendorProductId, true +} + +// HasVendorProductId returns a boolean if a field has been set. +func (o *MarketplaceSubscriptionV1SubscriptionProduct) HasVendorProductId() bool { + if o != nil && !IsNil(o.VendorProductId) { + return true + } + + return false +} + +// SetVendorProductId gets a reference to the given string and assigns it to the VendorProductId field. +func (o *MarketplaceSubscriptionV1SubscriptionProduct) SetVendorProductId(v string) { + o.VendorProductId = &v +} + +// GetVendorWebsiteUrl returns the VendorWebsiteUrl field value +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetVendorWebsiteUrl() string { + if o == nil { + var ret string + return ret + } + + return o.VendorWebsiteUrl +} + +// GetVendorWebsiteUrlOk returns a tuple with the VendorWebsiteUrl field value +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1SubscriptionProduct) GetVendorWebsiteUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.VendorWebsiteUrl, true +} + +// SetVendorWebsiteUrl sets field value +func (o *MarketplaceSubscriptionV1SubscriptionProduct) SetVendorWebsiteUrl(v string) { + o.VendorWebsiteUrl = v +} + +func (o MarketplaceSubscriptionV1SubscriptionProduct) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MarketplaceSubscriptionV1SubscriptionProduct) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Assets) { + toSerialize["assets"] = o.Assets + } + toSerialize["deliveryMethod"] = o.DeliveryMethod + toSerialize["lifecycleState"] = o.LifecycleState + toSerialize["planId"] = o.PlanId + toSerialize["priceType"] = o.PriceType + toSerialize["pricingPlan"] = o.PricingPlan + toSerialize["productId"] = o.ProductId + toSerialize["productName"] = o.ProductName + toSerialize["vendorName"] = o.VendorName + if !IsNil(o.VendorPlanId) { + toSerialize["vendorPlanId"] = o.VendorPlanId + } + if !IsNil(o.VendorProductId) { + toSerialize["vendorProductId"] = o.VendorProductId + } + toSerialize["vendorWebsiteUrl"] = o.VendorWebsiteUrl + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MarketplaceSubscriptionV1SubscriptionProduct) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "deliveryMethod", + "lifecycleState", + "planId", + "priceType", + "pricingPlan", + "productId", + "productName", + "vendorName", + "vendorWebsiteUrl", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMarketplaceSubscriptionV1SubscriptionProduct := _MarketplaceSubscriptionV1SubscriptionProduct{} + + err = json.Unmarshal(data, &varMarketplaceSubscriptionV1SubscriptionProduct) + + if err != nil { + return err + } + + *o = MarketplaceSubscriptionV1SubscriptionProduct(varMarketplaceSubscriptionV1SubscriptionProduct) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "assets") + delete(additionalProperties, "deliveryMethod") + delete(additionalProperties, "lifecycleState") + delete(additionalProperties, "planId") + delete(additionalProperties, "priceType") + delete(additionalProperties, "pricingPlan") + delete(additionalProperties, "productId") + delete(additionalProperties, "productName") + delete(additionalProperties, "vendorName") + delete(additionalProperties, "vendorPlanId") + delete(additionalProperties, "vendorProductId") + delete(additionalProperties, "vendorWebsiteUrl") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMarketplaceSubscriptionV1SubscriptionProduct struct { + value *MarketplaceSubscriptionV1SubscriptionProduct + isSet bool +} + +func (v NullableMarketplaceSubscriptionV1SubscriptionProduct) Get() *MarketplaceSubscriptionV1SubscriptionProduct { + return v.value +} + +func (v *NullableMarketplaceSubscriptionV1SubscriptionProduct) Set(val *MarketplaceSubscriptionV1SubscriptionProduct) { + v.value = val + v.isSet = true +} + +func (v NullableMarketplaceSubscriptionV1SubscriptionProduct) IsSet() bool { + return v.isSet +} + +func (v *NullableMarketplaceSubscriptionV1SubscriptionProduct) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMarketplaceSubscriptionV1SubscriptionProduct(val *MarketplaceSubscriptionV1SubscriptionProduct) *NullableMarketplaceSubscriptionV1SubscriptionProduct { + return &NullableMarketplaceSubscriptionV1SubscriptionProduct{value: val, isSet: true} +} + +func (v NullableMarketplaceSubscriptionV1SubscriptionProduct) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMarketplaceSubscriptionV1SubscriptionProduct) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_subscription_product_delivery_method.go b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_subscription_product_delivery_method.go new file mode 100644 index 000000000..56edaa85d --- /dev/null +++ b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_subscription_product_delivery_method.go @@ -0,0 +1,118 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +Contact: marketplace@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" + "fmt" +) + +// MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod The product delivery method/type. For reference: SAAS - Software as a Service, SAI - STACKIT Application Image +type MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod string + +// List of marketplace_subscription_v1_SubscriptionProduct_deliveryMethod +const ( + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONPRODUCTDELIVERYMETHOD_SAAS MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod = "SAAS" + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONPRODUCTDELIVERYMETHOD_KUBERNETES MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod = "KUBERNETES" + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONPRODUCTDELIVERYMETHOD_SAI MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod = "SAI" + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONPRODUCTDELIVERYMETHOD_PROFESSIONAL_SERVICE MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod = "PROFESSIONAL_SERVICE" + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONPRODUCTDELIVERYMETHOD_UNKNOWN_DEFAULT_OPEN_API MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod = "unknown_default_open_api" +) + +// All allowed values of MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod enum +var AllowedMarketplaceSubscriptionV1SubscriptionProductDeliveryMethodEnumValues = []MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod{ + "SAAS", + "KUBERNETES", + "SAI", + "PROFESSIONAL_SERVICE", + "unknown_default_open_api", +} + +func (v *MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod(value) + for _, existing := range AllowedMarketplaceSubscriptionV1SubscriptionProductDeliveryMethodEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONPRODUCTDELIVERYMETHOD_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewMarketplaceSubscriptionV1SubscriptionProductDeliveryMethodFromValue returns a pointer to a valid MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewMarketplaceSubscriptionV1SubscriptionProductDeliveryMethodFromValue(v string) (*MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod, error) { + ev := MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod: valid values are %v", v, AllowedMarketplaceSubscriptionV1SubscriptionProductDeliveryMethodEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod) IsValid() bool { + for _, existing := range AllowedMarketplaceSubscriptionV1SubscriptionProductDeliveryMethodEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to marketplace_subscription_v1_SubscriptionProduct_deliveryMethod value +func (v MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod) Ptr() *MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod { + return &v +} + +type NullableMarketplaceSubscriptionV1SubscriptionProductDeliveryMethod struct { + value *MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod + isSet bool +} + +func (v NullableMarketplaceSubscriptionV1SubscriptionProductDeliveryMethod) Get() *MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod { + return v.value +} + +func (v *NullableMarketplaceSubscriptionV1SubscriptionProductDeliveryMethod) Set(val *MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod) { + v.value = val + v.isSet = true +} + +func (v NullableMarketplaceSubscriptionV1SubscriptionProductDeliveryMethod) IsSet() bool { + return v.isSet +} + +func (v *NullableMarketplaceSubscriptionV1SubscriptionProductDeliveryMethod) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMarketplaceSubscriptionV1SubscriptionProductDeliveryMethod(val *MarketplaceSubscriptionV1SubscriptionProductDeliveryMethod) *NullableMarketplaceSubscriptionV1SubscriptionProductDeliveryMethod { + return &NullableMarketplaceSubscriptionV1SubscriptionProductDeliveryMethod{value: val, isSet: true} +} + +func (v NullableMarketplaceSubscriptionV1SubscriptionProductDeliveryMethod) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMarketplaceSubscriptionV1SubscriptionProductDeliveryMethod) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_subscription_product_lifecycle_state.go b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_subscription_product_lifecycle_state.go new file mode 100644 index 000000000..bd6f22feb --- /dev/null +++ b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_subscription_product_lifecycle_state.go @@ -0,0 +1,116 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +Contact: marketplace@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" + "fmt" +) + +// MarketplaceSubscriptionV1SubscriptionProductLifecycleState The lifecycle state of the product. +type MarketplaceSubscriptionV1SubscriptionProductLifecycleState string + +// List of marketplace_subscription_v1_SubscriptionProduct_lifecycleState +const ( + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONPRODUCTLIFECYCLESTATE_PRODUCT_LIVE MarketplaceSubscriptionV1SubscriptionProductLifecycleState = "PRODUCT_LIVE" + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONPRODUCTLIFECYCLESTATE_PRODUCT_PENDING_APPROVAL MarketplaceSubscriptionV1SubscriptionProductLifecycleState = "PRODUCT_PENDING_APPROVAL" + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONPRODUCTLIFECYCLESTATE_PRODUCT_PREVIEW MarketplaceSubscriptionV1SubscriptionProductLifecycleState = "PRODUCT_PREVIEW" + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONPRODUCTLIFECYCLESTATE_UNKNOWN_DEFAULT_OPEN_API MarketplaceSubscriptionV1SubscriptionProductLifecycleState = "unknown_default_open_api" +) + +// All allowed values of MarketplaceSubscriptionV1SubscriptionProductLifecycleState enum +var AllowedMarketplaceSubscriptionV1SubscriptionProductLifecycleStateEnumValues = []MarketplaceSubscriptionV1SubscriptionProductLifecycleState{ + "PRODUCT_LIVE", + "PRODUCT_PENDING_APPROVAL", + "PRODUCT_PREVIEW", + "unknown_default_open_api", +} + +func (v *MarketplaceSubscriptionV1SubscriptionProductLifecycleState) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := MarketplaceSubscriptionV1SubscriptionProductLifecycleState(value) + for _, existing := range AllowedMarketplaceSubscriptionV1SubscriptionProductLifecycleStateEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONPRODUCTLIFECYCLESTATE_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewMarketplaceSubscriptionV1SubscriptionProductLifecycleStateFromValue returns a pointer to a valid MarketplaceSubscriptionV1SubscriptionProductLifecycleState +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewMarketplaceSubscriptionV1SubscriptionProductLifecycleStateFromValue(v string) (*MarketplaceSubscriptionV1SubscriptionProductLifecycleState, error) { + ev := MarketplaceSubscriptionV1SubscriptionProductLifecycleState(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for MarketplaceSubscriptionV1SubscriptionProductLifecycleState: valid values are %v", v, AllowedMarketplaceSubscriptionV1SubscriptionProductLifecycleStateEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v MarketplaceSubscriptionV1SubscriptionProductLifecycleState) IsValid() bool { + for _, existing := range AllowedMarketplaceSubscriptionV1SubscriptionProductLifecycleStateEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to marketplace_subscription_v1_SubscriptionProduct_lifecycleState value +func (v MarketplaceSubscriptionV1SubscriptionProductLifecycleState) Ptr() *MarketplaceSubscriptionV1SubscriptionProductLifecycleState { + return &v +} + +type NullableMarketplaceSubscriptionV1SubscriptionProductLifecycleState struct { + value *MarketplaceSubscriptionV1SubscriptionProductLifecycleState + isSet bool +} + +func (v NullableMarketplaceSubscriptionV1SubscriptionProductLifecycleState) Get() *MarketplaceSubscriptionV1SubscriptionProductLifecycleState { + return v.value +} + +func (v *NullableMarketplaceSubscriptionV1SubscriptionProductLifecycleState) Set(val *MarketplaceSubscriptionV1SubscriptionProductLifecycleState) { + v.value = val + v.isSet = true +} + +func (v NullableMarketplaceSubscriptionV1SubscriptionProductLifecycleState) IsSet() bool { + return v.isSet +} + +func (v *NullableMarketplaceSubscriptionV1SubscriptionProductLifecycleState) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMarketplaceSubscriptionV1SubscriptionProductLifecycleState(val *MarketplaceSubscriptionV1SubscriptionProductLifecycleState) *NullableMarketplaceSubscriptionV1SubscriptionProductLifecycleState { + return &NullableMarketplaceSubscriptionV1SubscriptionProductLifecycleState{value: val, isSet: true} +} + +func (v NullableMarketplaceSubscriptionV1SubscriptionProductLifecycleState) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMarketplaceSubscriptionV1SubscriptionProductLifecycleState) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_subscription_product_price_type.go b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_subscription_product_price_type.go new file mode 100644 index 000000000..a7075c170 --- /dev/null +++ b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_subscription_product_price_type.go @@ -0,0 +1,120 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +Contact: marketplace@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" + "fmt" +) + +// MarketplaceSubscriptionV1SubscriptionProductPriceType The product's price type. +type MarketplaceSubscriptionV1SubscriptionProductPriceType string + +// List of marketplace_subscription_v1_SubscriptionProduct_priceType +const ( + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONPRODUCTPRICETYPE_CONTRACT MarketplaceSubscriptionV1SubscriptionProductPriceType = "CONTRACT" + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONPRODUCTPRICETYPE_FREE MarketplaceSubscriptionV1SubscriptionProductPriceType = "FREE" + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONPRODUCTPRICETYPE_FREE_TRIAL MarketplaceSubscriptionV1SubscriptionProductPriceType = "FREE_TRIAL" + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONPRODUCTPRICETYPE_BYOL MarketplaceSubscriptionV1SubscriptionProductPriceType = "BYOL" + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONPRODUCTPRICETYPE_PAYG MarketplaceSubscriptionV1SubscriptionProductPriceType = "PAYG" + MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONPRODUCTPRICETYPE_UNKNOWN_DEFAULT_OPEN_API MarketplaceSubscriptionV1SubscriptionProductPriceType = "unknown_default_open_api" +) + +// All allowed values of MarketplaceSubscriptionV1SubscriptionProductPriceType enum +var AllowedMarketplaceSubscriptionV1SubscriptionProductPriceTypeEnumValues = []MarketplaceSubscriptionV1SubscriptionProductPriceType{ + "CONTRACT", + "FREE", + "FREE_TRIAL", + "BYOL", + "PAYG", + "unknown_default_open_api", +} + +func (v *MarketplaceSubscriptionV1SubscriptionProductPriceType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := MarketplaceSubscriptionV1SubscriptionProductPriceType(value) + for _, existing := range AllowedMarketplaceSubscriptionV1SubscriptionProductPriceTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = MARKETPLACESUBSCRIPTIONV1SUBSCRIPTIONPRODUCTPRICETYPE_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewMarketplaceSubscriptionV1SubscriptionProductPriceTypeFromValue returns a pointer to a valid MarketplaceSubscriptionV1SubscriptionProductPriceType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewMarketplaceSubscriptionV1SubscriptionProductPriceTypeFromValue(v string) (*MarketplaceSubscriptionV1SubscriptionProductPriceType, error) { + ev := MarketplaceSubscriptionV1SubscriptionProductPriceType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for MarketplaceSubscriptionV1SubscriptionProductPriceType: valid values are %v", v, AllowedMarketplaceSubscriptionV1SubscriptionProductPriceTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v MarketplaceSubscriptionV1SubscriptionProductPriceType) IsValid() bool { + for _, existing := range AllowedMarketplaceSubscriptionV1SubscriptionProductPriceTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to marketplace_subscription_v1_SubscriptionProduct_priceType value +func (v MarketplaceSubscriptionV1SubscriptionProductPriceType) Ptr() *MarketplaceSubscriptionV1SubscriptionProductPriceType { + return &v +} + +type NullableMarketplaceSubscriptionV1SubscriptionProductPriceType struct { + value *MarketplaceSubscriptionV1SubscriptionProductPriceType + isSet bool +} + +func (v NullableMarketplaceSubscriptionV1SubscriptionProductPriceType) Get() *MarketplaceSubscriptionV1SubscriptionProductPriceType { + return v.value +} + +func (v *NullableMarketplaceSubscriptionV1SubscriptionProductPriceType) Set(val *MarketplaceSubscriptionV1SubscriptionProductPriceType) { + v.value = val + v.isSet = true +} + +func (v NullableMarketplaceSubscriptionV1SubscriptionProductPriceType) IsSet() bool { + return v.isSet +} + +func (v *NullableMarketplaceSubscriptionV1SubscriptionProductPriceType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMarketplaceSubscriptionV1SubscriptionProductPriceType(val *MarketplaceSubscriptionV1SubscriptionProductPriceType) *NullableMarketplaceSubscriptionV1SubscriptionProductPriceType { + return &NullableMarketplaceSubscriptionV1SubscriptionProductPriceType{value: val, isSet: true} +} + +func (v NullableMarketplaceSubscriptionV1SubscriptionProductPriceType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMarketplaceSubscriptionV1SubscriptionProductPriceType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_subscription_redirect.go b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_subscription_redirect.go new file mode 100644 index 000000000..bb280ad56 --- /dev/null +++ b/services/stackitmarketplace/v1api/model_marketplace_subscription_v1_subscription_redirect.go @@ -0,0 +1,196 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +Contact: marketplace@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" + "fmt" +) + +// checks if the MarketplaceSubscriptionV1SubscriptionRedirect type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MarketplaceSubscriptionV1SubscriptionRedirect{} + +// MarketplaceSubscriptionV1SubscriptionRedirect struct for MarketplaceSubscriptionV1SubscriptionRedirect +type MarketplaceSubscriptionV1SubscriptionRedirect struct { + RedirectTarget string `json:"redirectTarget"` + RedirectUrl string `json:"redirectUrl"` + AdditionalProperties map[string]interface{} +} + +type _MarketplaceSubscriptionV1SubscriptionRedirect MarketplaceSubscriptionV1SubscriptionRedirect + +// NewMarketplaceSubscriptionV1SubscriptionRedirect instantiates a new MarketplaceSubscriptionV1SubscriptionRedirect 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 NewMarketplaceSubscriptionV1SubscriptionRedirect(redirectTarget string, redirectUrl string) *MarketplaceSubscriptionV1SubscriptionRedirect { + this := MarketplaceSubscriptionV1SubscriptionRedirect{} + this.RedirectTarget = redirectTarget + this.RedirectUrl = redirectUrl + return &this +} + +// NewMarketplaceSubscriptionV1SubscriptionRedirectWithDefaults instantiates a new MarketplaceSubscriptionV1SubscriptionRedirect 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 NewMarketplaceSubscriptionV1SubscriptionRedirectWithDefaults() *MarketplaceSubscriptionV1SubscriptionRedirect { + this := MarketplaceSubscriptionV1SubscriptionRedirect{} + return &this +} + +// GetRedirectTarget returns the RedirectTarget field value +func (o *MarketplaceSubscriptionV1SubscriptionRedirect) GetRedirectTarget() string { + if o == nil { + var ret string + return ret + } + + return o.RedirectTarget +} + +// GetRedirectTargetOk returns a tuple with the RedirectTarget field value +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1SubscriptionRedirect) GetRedirectTargetOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RedirectTarget, true +} + +// SetRedirectTarget sets field value +func (o *MarketplaceSubscriptionV1SubscriptionRedirect) SetRedirectTarget(v string) { + o.RedirectTarget = v +} + +// GetRedirectUrl returns the RedirectUrl field value +func (o *MarketplaceSubscriptionV1SubscriptionRedirect) GetRedirectUrl() string { + if o == nil { + var ret string + return ret + } + + return o.RedirectUrl +} + +// GetRedirectUrlOk returns a tuple with the RedirectUrl field value +// and a boolean to check if the value has been set. +func (o *MarketplaceSubscriptionV1SubscriptionRedirect) GetRedirectUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RedirectUrl, true +} + +// SetRedirectUrl sets field value +func (o *MarketplaceSubscriptionV1SubscriptionRedirect) SetRedirectUrl(v string) { + o.RedirectUrl = v +} + +func (o MarketplaceSubscriptionV1SubscriptionRedirect) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MarketplaceSubscriptionV1SubscriptionRedirect) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["redirectTarget"] = o.RedirectTarget + toSerialize["redirectUrl"] = o.RedirectUrl + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *MarketplaceSubscriptionV1SubscriptionRedirect) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "redirectTarget", + "redirectUrl", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMarketplaceSubscriptionV1SubscriptionRedirect := _MarketplaceSubscriptionV1SubscriptionRedirect{} + + err = json.Unmarshal(data, &varMarketplaceSubscriptionV1SubscriptionRedirect) + + if err != nil { + return err + } + + *o = MarketplaceSubscriptionV1SubscriptionRedirect(varMarketplaceSubscriptionV1SubscriptionRedirect) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "redirectTarget") + delete(additionalProperties, "redirectUrl") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableMarketplaceSubscriptionV1SubscriptionRedirect struct { + value *MarketplaceSubscriptionV1SubscriptionRedirect + isSet bool +} + +func (v NullableMarketplaceSubscriptionV1SubscriptionRedirect) Get() *MarketplaceSubscriptionV1SubscriptionRedirect { + return v.value +} + +func (v *NullableMarketplaceSubscriptionV1SubscriptionRedirect) Set(val *MarketplaceSubscriptionV1SubscriptionRedirect) { + v.value = val + v.isSet = true +} + +func (v NullableMarketplaceSubscriptionV1SubscriptionRedirect) IsSet() bool { + return v.isSet +} + +func (v *NullableMarketplaceSubscriptionV1SubscriptionRedirect) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMarketplaceSubscriptionV1SubscriptionRedirect(val *MarketplaceSubscriptionV1SubscriptionRedirect) *NullableMarketplaceSubscriptionV1SubscriptionRedirect { + return &NullableMarketplaceSubscriptionV1SubscriptionRedirect{value: val, isSet: true} +} + +func (v NullableMarketplaceSubscriptionV1SubscriptionRedirect) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMarketplaceSubscriptionV1SubscriptionRedirect) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/stackitmarketplace/model_resolve_customer_payload.go b/services/stackitmarketplace/v1api/model_resolve_customer_payload.go similarity index 56% rename from services/stackitmarketplace/model_resolve_customer_payload.go rename to services/stackitmarketplace/v1api/model_resolve_customer_payload.go index 2ad8bf522..6de2be532 100644 --- a/services/stackitmarketplace/model_resolve_customer_payload.go +++ b/services/stackitmarketplace/v1api/model_resolve_customer_payload.go @@ -4,45 +4,26 @@ STACKIT Marketplace API API to manage STACKIT Marketplace. API version: 1 +Contact: marketplace@stackit.cloud */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package stackitmarketplace +package v1api import ( "encoding/json" + "fmt" ) // checks if the ResolveCustomerPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ResolveCustomerPayload{} -/* - types and functions for token -*/ - -// isNotNullableString -type ResolveCustomerPayloadGetTokenAttributeType = *string - -func getResolveCustomerPayloadGetTokenAttributeTypeOk(arg ResolveCustomerPayloadGetTokenAttributeType) (ret ResolveCustomerPayloadGetTokenRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setResolveCustomerPayloadGetTokenAttributeType(arg *ResolveCustomerPayloadGetTokenAttributeType, val ResolveCustomerPayloadGetTokenRetType) { - *arg = &val -} - -type ResolveCustomerPayloadGetTokenArgType = string -type ResolveCustomerPayloadGetTokenRetType = string - // ResolveCustomerPayload struct for ResolveCustomerPayload type ResolveCustomerPayload struct { // Opaque token exchangeable for subscription details. - // REQUIRED - Token ResolveCustomerPayloadGetTokenAttributeType `json:"token" required:"true"` + Token string `json:"token"` + AdditionalProperties map[string]interface{} } type _ResolveCustomerPayload ResolveCustomerPayload @@ -51,9 +32,9 @@ type _ResolveCustomerPayload ResolveCustomerPayload // 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 NewResolveCustomerPayload(token ResolveCustomerPayloadGetTokenArgType) *ResolveCustomerPayload { +func NewResolveCustomerPayload(token string) *ResolveCustomerPayload { this := ResolveCustomerPayload{} - setResolveCustomerPayloadGetTokenAttributeType(&this.Token, token) + this.Token = token return &this } @@ -66,30 +47,90 @@ func NewResolveCustomerPayloadWithDefaults() *ResolveCustomerPayload { } // GetToken returns the Token field value -func (o *ResolveCustomerPayload) GetToken() (ret ResolveCustomerPayloadGetTokenRetType) { - ret, _ = o.GetTokenOk() - return ret +func (o *ResolveCustomerPayload) GetToken() string { + if o == nil { + var ret string + return ret + } + + return o.Token } // GetTokenOk returns a tuple with the Token field value // and a boolean to check if the value has been set. -func (o *ResolveCustomerPayload) GetTokenOk() (ret ResolveCustomerPayloadGetTokenRetType, ok bool) { - return getResolveCustomerPayloadGetTokenAttributeTypeOk(o.Token) +func (o *ResolveCustomerPayload) GetTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Token, true } // SetToken sets field value -func (o *ResolveCustomerPayload) SetToken(v ResolveCustomerPayloadGetTokenRetType) { - setResolveCustomerPayloadGetTokenAttributeType(&o.Token, v) +func (o *ResolveCustomerPayload) SetToken(v string) { + o.Token = v +} + +func (o ResolveCustomerPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) } func (o ResolveCustomerPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getResolveCustomerPayloadGetTokenAttributeTypeOk(o.Token); ok { - toSerialize["Token"] = val + toSerialize["token"] = o.Token + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value } + return toSerialize, nil } +func (o *ResolveCustomerPayload) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "token", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResolveCustomerPayload := _ResolveCustomerPayload{} + + err = json.Unmarshal(data, &varResolveCustomerPayload) + + if err != nil { + return err + } + + *o = ResolveCustomerPayload(varResolveCustomerPayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "token") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableResolveCustomerPayload struct { value *ResolveCustomerPayload isSet bool diff --git a/services/stackitmarketplace/v1api/response.go b/services/stackitmarketplace/v1api/response.go new file mode 100644 index 000000000..226e2fb74 --- /dev/null +++ b/services/stackitmarketplace/v1api/response.go @@ -0,0 +1,48 @@ +/* +STACKIT Marketplace API + +API to manage STACKIT Marketplace. + +API version: 1 +Contact: marketplace@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/services/stackitmarketplace/utils.go b/services/stackitmarketplace/v1api/utils.go similarity index 89% rename from services/stackitmarketplace/utils.go rename to services/stackitmarketplace/v1api/utils.go index 8677b8e67..c88f9eb3b 100644 --- a/services/stackitmarketplace/utils.go +++ b/services/stackitmarketplace/v1api/utils.go @@ -4,15 +4,17 @@ STACKIT Marketplace API API to manage STACKIT Marketplace. API version: 1 +Contact: marketplace@stackit.cloud */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package stackitmarketplace +package v1api import ( + "bytes" "encoding/json" - "math/rand" + "fmt" "reflect" "time" ) @@ -41,29 +43,6 @@ func PtrString(v string) *string { return &v } // PtrTime is helper routine that returns a pointer to given Time value. func PtrTime(v time.Time) *time.Time { return &v } -type NullableValue[T any] struct { - value *T - isSet bool -} - -func (v NullableValue[T]) Get() *T { - return v.value -} - -func (v *NullableValue[T]) Set(val *T) { - v.value = val - v.isSet = true -} - -func (v NullableValue[T]) IsSet() bool { - return v.isSet -} - -func (v *NullableValue[T]) Unset() { - v.value = nil - v.isSet = false -} - type NullableBool struct { value *bool isSet bool @@ -344,7 +323,7 @@ func NewNullableTime(val *time.Time) *NullableTime { } func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() + return json.Marshal(v.value) } func (v *NullableTime) UnmarshalJSON(src []byte) error { @@ -357,9 +336,6 @@ func IsNil(i interface{}) bool { if i == nil { return true } - if t, ok := i.(interface{ IsSet() bool }); ok { - return !t.IsSet() - } switch reflect.TypeOf(i).Kind() { case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: return reflect.ValueOf(i).IsNil() @@ -373,13 +349,14 @@ type MappedNullable interface { ToMap() (map[string]interface{}, error) } -const letterRunes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} -// randString returns a random string with a specified length. It panics if n <= 0. -func randString(n int) string { - b := make([]byte, n) - for i := range b { - b[i] = letterRunes[rand.Intn(len(letterRunes))] - } - return string(b) +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) }