From 431c608c4322759e72ae32bddf9180e53ef5a96c Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Wed, 19 Nov 2025 08:54:19 +0000 Subject: [PATCH] Generate pim --- go.work | 1 + services/pim/.openapi-generator/VERSION | 1 + services/pim/api_default.go | 3370 +++++++++++++++++ services/pim/api_default_test.go | 730 ++++ services/pim/client.go | 631 +++ services/pim/configuration.go | 38 + services/pim/go.mod | 10 + services/pim/go.sum | 8 + .../model_archiving_specific_attributes.go | 185 + ...odel_archiving_specific_attributes_test.go | 11 + ...odel_compute_engine_specific_attributes.go | 496 +++ ...compute_engine_specific_attributes_test.go | 11 + ...fidential_computing_specific_attributes.go | 496 +++ ...tial_computing_specific_attributes_test.go | 11 + services/pim/model_currency_codes.go | 117 + services/pim/model_currency_codes_test.go | 11 + services/pim/model_currency_symbols.go | 115 + services/pim/model_currency_symbols_test.go | 11 + services/pim/model_data_and_ai.go | 190 + services/pim/model_data_and_ai_test.go | 11 + services/pim/model_error.go | 219 ++ services/pim/model_error_test.go | 11 + services/pim/model_fin_ops_focus.go | 178 + services/pim/model_fin_ops_focus_test.go | 11 + .../pim/model_list_categories_200_response.go | 174 + ...model_list_categories_200_response_test.go | 11 + ...del_list_category_products_200_response.go | 174 + ...ist_category_products_200_response_test.go | 11 + .../model_list_marketing_data_200_response.go | 174 + ...l_list_marketing_data_200_response_test.go | 11 + .../model_list_product_skus_200_response.go | 174 + ...del_list_product_skus_200_response_test.go | 11 + ...ging_and_monitoring_specific_attributes.go | 431 +++ ...and_monitoring_specific_attributes_test.go | 11 + services/pim/model_marketing_advantage.go | 177 + .../pim/model_marketing_advantage_test.go | 11 + services/pim/model_marketing_application.go | 226 ++ .../pim/model_marketing_application_test.go | 11 + services/pim/model_marketing_function.go | 177 + services/pim/model_marketing_function_test.go | 11 + .../model_messaging_specific_attributes.go | 432 +++ ...odel_messaging_specific_attributes_test.go | 11 + services/pim/model_meta_information.go | 177 + services/pim/model_meta_information_test.go | 11 + .../pim/model_network_specific_attributes.go | 428 +++ .../model_network_specific_attributes_test.go | 11 + services/pim/model_price.go | 492 +++ services/pim/model_price_test.go | 11 + services/pim/model_public_category.go | 438 +++ services/pim/model_public_category_test.go | 11 + ...del_public_database_specific_attributes.go | 662 ++++ ...ublic_database_specific_attributes_test.go | 11 + services/pim/model_public_marketing_data.go | 680 ++++ .../pim/model_public_marketing_data_test.go | 11 + services/pim/model_public_product.go | 663 ++++ services/pim/model_public_product_test.go | 11 + services/pim/model_public_sku.go | 1735 +++++++++ services/pim/model_public_sku_all_of.go | 127 + ..._sku_all_of_product_specific_attributes.go | 523 +++ ...all_of_product_specific_attributes_test.go | 11 + services/pim/model_public_sku_all_of_test.go | 11 + services/pim/model_public_sku_test.go | 11 + .../pim/model_runtime_specific_attributes.go | 254 ++ .../model_runtime_specific_attributes_test.go | 11 + services/pim/model_search_skus_payload.go | 3266 ++++++++++++++++ .../pim/model_search_skus_payload_test.go | 11 + services/pim/model_sku.go | 1688 +++++++++ services/pim/model_sku_test.go | 11 + .../pim/model_storage_specific_attributes.go | 495 +++ .../model_storage_specific_attributes_test.go | 11 + .../pim/model_support_specific_attributes.go | 1507 ++++++++ .../model_support_specific_attributes_test.go | 11 + services/pim/utils.go | 385 ++ 73 files changed, 22796 insertions(+) create mode 100644 services/pim/.openapi-generator/VERSION create mode 100644 services/pim/api_default.go create mode 100644 services/pim/api_default_test.go create mode 100644 services/pim/client.go create mode 100644 services/pim/configuration.go create mode 100644 services/pim/go.mod create mode 100644 services/pim/go.sum create mode 100644 services/pim/model_archiving_specific_attributes.go create mode 100644 services/pim/model_archiving_specific_attributes_test.go create mode 100644 services/pim/model_compute_engine_specific_attributes.go create mode 100644 services/pim/model_compute_engine_specific_attributes_test.go create mode 100644 services/pim/model_confidential_computing_specific_attributes.go create mode 100644 services/pim/model_confidential_computing_specific_attributes_test.go create mode 100644 services/pim/model_currency_codes.go create mode 100644 services/pim/model_currency_codes_test.go create mode 100644 services/pim/model_currency_symbols.go create mode 100644 services/pim/model_currency_symbols_test.go create mode 100644 services/pim/model_data_and_ai.go create mode 100644 services/pim/model_data_and_ai_test.go create mode 100644 services/pim/model_error.go create mode 100644 services/pim/model_error_test.go create mode 100644 services/pim/model_fin_ops_focus.go create mode 100644 services/pim/model_fin_ops_focus_test.go create mode 100644 services/pim/model_list_categories_200_response.go create mode 100644 services/pim/model_list_categories_200_response_test.go create mode 100644 services/pim/model_list_category_products_200_response.go create mode 100644 services/pim/model_list_category_products_200_response_test.go create mode 100644 services/pim/model_list_marketing_data_200_response.go create mode 100644 services/pim/model_list_marketing_data_200_response_test.go create mode 100644 services/pim/model_list_product_skus_200_response.go create mode 100644 services/pim/model_list_product_skus_200_response_test.go create mode 100644 services/pim/model_logging_and_monitoring_specific_attributes.go create mode 100644 services/pim/model_logging_and_monitoring_specific_attributes_test.go create mode 100644 services/pim/model_marketing_advantage.go create mode 100644 services/pim/model_marketing_advantage_test.go create mode 100644 services/pim/model_marketing_application.go create mode 100644 services/pim/model_marketing_application_test.go create mode 100644 services/pim/model_marketing_function.go create mode 100644 services/pim/model_marketing_function_test.go create mode 100644 services/pim/model_messaging_specific_attributes.go create mode 100644 services/pim/model_messaging_specific_attributes_test.go create mode 100644 services/pim/model_meta_information.go create mode 100644 services/pim/model_meta_information_test.go create mode 100644 services/pim/model_network_specific_attributes.go create mode 100644 services/pim/model_network_specific_attributes_test.go create mode 100644 services/pim/model_price.go create mode 100644 services/pim/model_price_test.go create mode 100644 services/pim/model_public_category.go create mode 100644 services/pim/model_public_category_test.go create mode 100644 services/pim/model_public_database_specific_attributes.go create mode 100644 services/pim/model_public_database_specific_attributes_test.go create mode 100644 services/pim/model_public_marketing_data.go create mode 100644 services/pim/model_public_marketing_data_test.go create mode 100644 services/pim/model_public_product.go create mode 100644 services/pim/model_public_product_test.go create mode 100644 services/pim/model_public_sku.go create mode 100644 services/pim/model_public_sku_all_of.go create mode 100644 services/pim/model_public_sku_all_of_product_specific_attributes.go create mode 100644 services/pim/model_public_sku_all_of_product_specific_attributes_test.go create mode 100644 services/pim/model_public_sku_all_of_test.go create mode 100644 services/pim/model_public_sku_test.go create mode 100644 services/pim/model_runtime_specific_attributes.go create mode 100644 services/pim/model_runtime_specific_attributes_test.go create mode 100644 services/pim/model_search_skus_payload.go create mode 100644 services/pim/model_search_skus_payload_test.go create mode 100644 services/pim/model_sku.go create mode 100644 services/pim/model_sku_test.go create mode 100644 services/pim/model_storage_specific_attributes.go create mode 100644 services/pim/model_storage_specific_attributes_test.go create mode 100644 services/pim/model_support_specific_attributes.go create mode 100644 services/pim/model_support_specific_attributes_test.go create mode 100644 services/pim/utils.go diff --git a/go.work b/go.work index 839083073..aae41937e 100644 --- a/go.work +++ b/go.work @@ -52,6 +52,7 @@ use ( ./services/objectstorage ./services/observability ./services/opensearch + ./services/pim ./services/postgresflex ./services/rabbitmq ./services/redis diff --git a/services/pim/.openapi-generator/VERSION b/services/pim/.openapi-generator/VERSION new file mode 100644 index 000000000..cd802a1ec --- /dev/null +++ b/services/pim/.openapi-generator/VERSION @@ -0,0 +1 @@ +6.6.0 \ No newline at end of file diff --git a/services/pim/api_default.go b/services/pim/api_default.go new file mode 100644 index 000000000..7852bd75a --- /dev/null +++ b/services/pim/api_default.go @@ -0,0 +1,3370 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "bytes" + "context" + "fmt" + "io" + "net/http" + "net/url" + "reflect" + "strings" + + "github.com/stackitcloud/stackit-sdk-go/core/config" + "github.com/stackitcloud/stackit-sdk-go/core/oapierror" +) + +type DefaultApi interface { + /* + GetCategory Get category by ID + Retrieves a specific category by its ID, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param categoryId The unique identifier for a category. + @return ApiGetCategoryRequest + */ + GetCategory(ctx context.Context, categoryId string) ApiGetCategoryRequest + /* + GetCategoryExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param categoryId The unique identifier for a category. + @return PublicCategory + + */ + GetCategoryExecute(ctx context.Context, categoryId string) (*PublicCategory, error) + /* + GetProduct Get product by ID + Retrieves a specific product by its ID, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param productId The unique identifier for a product. + @return ApiGetProductRequest + */ + GetProduct(ctx context.Context, productId string) ApiGetProductRequest + /* + GetProductExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param productId The unique identifier for a product. + @return PublicProduct + + */ + GetProductExecute(ctx context.Context, productId string) (*PublicProduct, error) + /* + GetProductMarketingData Get marketing data for a product + Retrieves the marketing data for a specific product, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param productId The unique identifier for a product. + @return ApiGetProductMarketingDataRequest + */ + GetProductMarketingData(ctx context.Context, productId string) ApiGetProductMarketingDataRequest + /* + GetProductMarketingDataExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param productId The unique identifier for a product. + @return PublicMarketingData + + */ + GetProductMarketingDataExecute(ctx context.Context, productId string) (*PublicMarketingData, error) + /* + GetSKU Get SKU by ID + Retrieves a specific SKU by its ID, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param skuId The unique identifier for a SKU. + @return ApiGetSKURequest + */ + GetSKU(ctx context.Context, skuId string) ApiGetSKURequest + /* + GetSKUExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param skuId The unique identifier for a SKU. + @return PublicSKU + + */ + GetSKUExecute(ctx context.Context, skuId string) (*PublicSKU, error) + /* + GetSTAXSKU Get STACKIT:X SKU by ID + Retrieves a specific STACKIT:X SKU by its ID, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param skuId The unique identifier for a SKU. + @return ApiGetSTAXSKURequest + */ + GetSTAXSKU(ctx context.Context, skuId string) ApiGetSTAXSKURequest + /* + GetSTAXSKUExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param skuId The unique identifier for a SKU. + @return PublicSKU + + */ + GetSTAXSKUExecute(ctx context.Context, skuId string) (*PublicSKU, error) + /* + ListCategories List all categories + Returns all categories, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListCategoriesRequest + */ + ListCategories(ctx context.Context) ApiListCategoriesRequest + /* + ListCategoriesExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ListCategories200Response + + */ + ListCategoriesExecute(ctx context.Context) (*ListCategories200Response, error) + /* + ListCategoryProducts List products in a category + Retrieves a specific category's products, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param categoryId The unique identifier for a category. + @return ApiListCategoryProductsRequest + */ + ListCategoryProducts(ctx context.Context, categoryId string) ApiListCategoryProductsRequest + /* + ListCategoryProductsExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param categoryId The unique identifier for a category. + @return ListCategoryProducts200Response + + */ + ListCategoryProductsExecute(ctx context.Context, categoryId string) (*ListCategoryProducts200Response, error) + /* + ListMarketingData List all marketing materials + Retrieves a list of all marketing materials for all products, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListMarketingDataRequest + */ + ListMarketingData(ctx context.Context) ApiListMarketingDataRequest + /* + ListMarketingDataExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ListMarketingData200Response + + */ + ListMarketingDataExecute(ctx context.Context) (*ListMarketingData200Response, error) + /* + ListProductSKUs List SKUs for a product + Retrieves a list of all SKUs of a product, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param productId The unique identifier for a product. + @return ApiListProductSKUsRequest + */ + ListProductSKUs(ctx context.Context, productId string) ApiListProductSKUsRequest + /* + ListProductSKUsExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param productId The unique identifier for a product. + @return ListProductSKUs200Response + + */ + ListProductSKUsExecute(ctx context.Context, productId string) (*ListProductSKUs200Response, error) + /* + ListProductSTAXSKUs List STACKIT:X SKUs for a product + Retrieves a list of all STACKIT:X SKUs of a product, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param productId The unique identifier for a product. + @return ApiListProductSTAXSKUsRequest + */ + ListProductSTAXSKUs(ctx context.Context, productId string) ApiListProductSTAXSKUsRequest + /* + ListProductSTAXSKUsExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param productId The unique identifier for a product. + @return ListProductSKUs200Response + + */ + ListProductSTAXSKUsExecute(ctx context.Context, productId string) (*ListProductSKUs200Response, error) + /* + ListProducts List all products + Retrieves a list of all products, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListProductsRequest + */ + ListProducts(ctx context.Context) ApiListProductsRequest + /* + ListProductsExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ListCategoryProducts200Response + + */ + ListProductsExecute(ctx context.Context) (*ListCategoryProducts200Response, error) + /* + ListSKUs List all SKUs + Retrieves a list of all SKUs, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListSKUsRequest + */ + ListSKUs(ctx context.Context) ApiListSKUsRequest + /* + ListSKUsExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ListProductSKUs200Response + + */ + ListSKUsExecute(ctx context.Context) (*ListProductSKUs200Response, error) + /* + ListSTAXSKUs List all STACKIT:X SKUs + Get all STACKIT:X SKUs data that has maturity model different than alpha. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListSTAXSKUsRequest + */ + ListSTAXSKUs(ctx context.Context) ApiListSTAXSKUsRequest + /* + ListSTAXSKUsExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ListProductSKUs200Response + + */ + ListSTAXSKUsExecute(ctx context.Context) (*ListProductSKUs200Response, error) + /* + SearchSKUs Performs a SKUs search with specific attributes + Accepts a JSON object with a predefined set of optional attributes to be used as search criteria. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSearchSKUsRequest + */ + SearchSKUs(ctx context.Context) ApiSearchSKUsRequest + /* + SearchSKUsExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ListProductSKUs200Response + + */ + SearchSKUsExecute(ctx context.Context) (*ListProductSKUs200Response, error) +} + +type ApiGetCategoryRequest interface { + // The language to retrieve the data in, available for en and de + Language(language string) ApiGetCategoryRequest + Execute() (*PublicCategory, error) +} + +type ApiGetProductRequest interface { + // The language to retrieve the data in, available for en and de + Language(language string) ApiGetProductRequest + Execute() (*PublicProduct, error) +} + +type ApiGetProductMarketingDataRequest interface { + // The language to retrieve the data in, available for en and de + Language(language string) ApiGetProductMarketingDataRequest + Execute() (*PublicMarketingData, error) +} + +type ApiGetSKURequest interface { + // The language to retrieve the data in, available for en and de + Language(language string) ApiGetSKURequest + Execute() (*PublicSKU, error) +} + +type ApiGetSTAXSKURequest interface { + // The language to retrieve the data in, available for en and de + Language(language string) ApiGetSTAXSKURequest + Execute() (*PublicSKU, error) +} + +type ApiListCategoriesRequest interface { + // The number of items to retrieve per page + PageSize(pageSize int64) ApiListCategoriesRequest + // The cursor base64 encoded is used to retrieve the next page of results + Cursor(cursor string) ApiListCategoriesRequest + // The category's name to retrieve the data for + CategoryName(categoryName string) ApiListCategoriesRequest + // The language to retrieve the data in, available for en and de + Language(language string) ApiListCategoriesRequest + Execute() (*ListCategories200Response, error) +} + +type ApiListCategoryProductsRequest interface { + // The number of items to retrieve per page + PageSize(pageSize int64) ApiListCategoryProductsRequest + // The cursor base64 encoded is used to retrieve the next page of results + Cursor(cursor string) ApiListCategoryProductsRequest + // The product's name to retrieve the data for + ProductName(productName string) ApiListCategoryProductsRequest + // The language to retrieve the data in, available for en and de + Language(language string) ApiListCategoryProductsRequest + Execute() (*ListCategoryProducts200Response, error) +} + +type ApiListMarketingDataRequest interface { + // The number of items to retrieve per page + PageSize(pageSize int64) ApiListMarketingDataRequest + // The cursor base64 encoded is used to retrieve the next page of results + Cursor(cursor string) ApiListMarketingDataRequest + // The language to retrieve the data in, available for en and de + Language(language string) ApiListMarketingDataRequest + // The product's name to retrieve the data for + ProductName(productName string) ApiListMarketingDataRequest + Execute() (*ListMarketingData200Response, error) +} + +type ApiListProductSKUsRequest interface { + // The cursor base64 encoded is used to retrieve the next page of results + Cursor(cursor string) ApiListProductSKUsRequest + // The number of items to retrieve per page + PageSize(pageSize int64) ApiListProductSKUsRequest + // The language to retrieve the data in, available for en and de + Language(language string) ApiListProductSKUsRequest + // The SKU's name to retrieve the data for + SkuName(skuName string) ApiListProductSKUsRequest + // The region to retrieve the data in + Region(region []string) ApiListProductSKUsRequest + Execute() (*ListProductSKUs200Response, error) +} + +type ApiListProductSTAXSKUsRequest interface { + // The cursor base64 encoded is used to retrieve the next page of results + Cursor(cursor string) ApiListProductSTAXSKUsRequest + // The number of items to retrieve per page + PageSize(pageSize int64) ApiListProductSTAXSKUsRequest + // The language to retrieve the data in, available for en and de + Language(language string) ApiListProductSTAXSKUsRequest + // The SKU's name to retrieve the data for + SkuName(skuName string) ApiListProductSTAXSKUsRequest + // The region to retrieve the data in + Region(region []string) ApiListProductSTAXSKUsRequest + Execute() (*ListProductSKUs200Response, error) +} + +type ApiListProductsRequest interface { + // The number of items to retrieve per page + PageSize(pageSize int64) ApiListProductsRequest + // The cursor base64 encoded is used to retrieve the next page of results + Cursor(cursor string) ApiListProductsRequest + // The category's name to retrieve the data for + CategoryName(categoryName string) ApiListProductsRequest + // The product's name to retrieve the data for + ProductName(productName string) ApiListProductsRequest + // The language to retrieve the data in, available for en and de + Language(language string) ApiListProductsRequest + Execute() (*ListCategoryProducts200Response, error) +} + +type ApiListSKUsRequest interface { + // The cursor base64 encoded is used to retrieve the next page of results + Cursor(cursor string) ApiListSKUsRequest + // The number of items to retrieve per page + PageSize(pageSize int64) ApiListSKUsRequest + // The language to retrieve the data in, available for en and de + Language(language string) ApiListSKUsRequest + // The category's name to retrieve the data for + CategoryName(categoryName string) ApiListSKUsRequest + // The product's name to retrieve the data for + ProductName(productName string) ApiListSKUsRequest + // The SKU's name to retrieve the data for + SkuName(skuName string) ApiListSKUsRequest + // The region to retrieve the data in + Region(region []string) ApiListSKUsRequest + Execute() (*ListProductSKUs200Response, error) +} + +type ApiListSTAXSKUsRequest interface { + // The cursor base64 encoded is used to retrieve the next page of results + Cursor(cursor string) ApiListSTAXSKUsRequest + // The number of items to retrieve per page + PageSize(pageSize int64) ApiListSTAXSKUsRequest + // The language to retrieve the data in, available for en and de + Language(language string) ApiListSTAXSKUsRequest + // The category's name to retrieve the data for + CategoryName(categoryName string) ApiListSTAXSKUsRequest + // The product's name to retrieve the data for + ProductName(productName string) ApiListSTAXSKUsRequest + // The SKU's name to retrieve the data for + SkuName(skuName string) ApiListSTAXSKUsRequest + // The region to retrieve the data in + Region(region []string) ApiListSTAXSKUsRequest + Execute() (*ListProductSKUs200Response, error) +} + +type ApiSearchSKUsRequest interface { + // The language to retrieve the data in, available for en and de + Language(language string) ApiSearchSKUsRequest + // The number of items to retrieve per page + PageSize(pageSize int64) ApiSearchSKUsRequest + // The cursor base64 encoded is used to retrieve the next page of results + Cursor(cursor string) ApiSearchSKUsRequest + SearchSKUsPayload(searchSKUsPayload SearchSKUsPayload) ApiSearchSKUsRequest + Execute() (*ListProductSKUs200Response, error) +} + +// DefaultApiService DefaultApi service +type DefaultApiService service + +type GetCategoryRequest struct { + ctx context.Context + apiService *DefaultApiService + categoryId string + language *string +} + +// The language to retrieve the data in, available for en and de + +func (r GetCategoryRequest) Language(language string) ApiGetCategoryRequest { + r.language = &language + return r +} + +func (r GetCategoryRequest) Execute() (*PublicCategory, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PublicCategory + ) + 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.GetCategory") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/categories/{categoryId}" + localVarPath = strings.Replace(localVarPath, "{"+"categoryId"+"}", url.PathEscape(ParameterValueToString(r.categoryId, "categoryId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.language != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "language", r.language, "") + } + // 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 Error + 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 Error + 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 Error + 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 Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + 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 +} + +/* +GetCategory: Get category by ID + +Retrieves a specific category by its ID, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param categoryId The unique identifier for a category. + @return ApiGetCategoryRequest +*/ +func (a *APIClient) GetCategory(ctx context.Context, categoryId string) ApiGetCategoryRequest { + return GetCategoryRequest{ + apiService: a.defaultApi, + ctx: ctx, + categoryId: categoryId, + } +} + +func (a *APIClient) GetCategoryExecute(ctx context.Context, categoryId string) (*PublicCategory, error) { + r := GetCategoryRequest{ + apiService: a.defaultApi, + ctx: ctx, + categoryId: categoryId, + } + return r.Execute() +} + +type GetProductRequest struct { + ctx context.Context + apiService *DefaultApiService + productId string + language *string +} + +// The language to retrieve the data in, available for en and de + +func (r GetProductRequest) Language(language string) ApiGetProductRequest { + r.language = &language + return r +} + +func (r GetProductRequest) Execute() (*PublicProduct, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PublicProduct + ) + 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.GetProduct") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/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 r.language != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "language", r.language, "") + } + // 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 Error + 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 Error + 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 Error + 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 Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + 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 +} + +/* +GetProduct: Get product by ID + +Retrieves a specific product by its ID, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param productId The unique identifier for a product. + @return ApiGetProductRequest +*/ +func (a *APIClient) GetProduct(ctx context.Context, productId string) ApiGetProductRequest { + return GetProductRequest{ + apiService: a.defaultApi, + ctx: ctx, + productId: productId, + } +} + +func (a *APIClient) GetProductExecute(ctx context.Context, productId string) (*PublicProduct, error) { + r := GetProductRequest{ + apiService: a.defaultApi, + ctx: ctx, + productId: productId, + } + return r.Execute() +} + +type GetProductMarketingDataRequest struct { + ctx context.Context + apiService *DefaultApiService + productId string + language *string +} + +// The language to retrieve the data in, available for en and de + +func (r GetProductMarketingDataRequest) Language(language string) ApiGetProductMarketingDataRequest { + r.language = &language + return r +} + +func (r GetProductMarketingDataRequest) Execute() (*PublicMarketingData, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PublicMarketingData + ) + 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.GetProductMarketingData") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/products/{productId}/marketing" + localVarPath = strings.Replace(localVarPath, "{"+"productId"+"}", url.PathEscape(ParameterValueToString(r.productId, "productId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.language != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "language", r.language, "") + } + // 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 Error + 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 Error + 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 Error + 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 Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + 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 +} + +/* +GetProductMarketingData: Get marketing data for a product + +Retrieves the marketing data for a specific product, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param productId The unique identifier for a product. + @return ApiGetProductMarketingDataRequest +*/ +func (a *APIClient) GetProductMarketingData(ctx context.Context, productId string) ApiGetProductMarketingDataRequest { + return GetProductMarketingDataRequest{ + apiService: a.defaultApi, + ctx: ctx, + productId: productId, + } +} + +func (a *APIClient) GetProductMarketingDataExecute(ctx context.Context, productId string) (*PublicMarketingData, error) { + r := GetProductMarketingDataRequest{ + apiService: a.defaultApi, + ctx: ctx, + productId: productId, + } + return r.Execute() +} + +type GetSKURequest struct { + ctx context.Context + apiService *DefaultApiService + skuId string + language *string +} + +// The language to retrieve the data in, available for en and de + +func (r GetSKURequest) Language(language string) ApiGetSKURequest { + r.language = &language + return r +} + +func (r GetSKURequest) Execute() (*PublicSKU, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PublicSKU + ) + 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.GetSKU") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/skus/{skuId}" + localVarPath = strings.Replace(localVarPath, "{"+"skuId"+"}", url.PathEscape(ParameterValueToString(r.skuId, "skuId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.language != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "language", r.language, "") + } + // 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 Error + 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 Error + 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 Error + 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 Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + 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 +} + +/* +GetSKU: Get SKU by ID + +Retrieves a specific SKU by its ID, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param skuId The unique identifier for a SKU. + @return ApiGetSKURequest +*/ +func (a *APIClient) GetSKU(ctx context.Context, skuId string) ApiGetSKURequest { + return GetSKURequest{ + apiService: a.defaultApi, + ctx: ctx, + skuId: skuId, + } +} + +func (a *APIClient) GetSKUExecute(ctx context.Context, skuId string) (*PublicSKU, error) { + r := GetSKURequest{ + apiService: a.defaultApi, + ctx: ctx, + skuId: skuId, + } + return r.Execute() +} + +type GetSTAXSKURequest struct { + ctx context.Context + apiService *DefaultApiService + skuId string + language *string +} + +// The language to retrieve the data in, available for en and de + +func (r GetSTAXSKURequest) Language(language string) ApiGetSTAXSKURequest { + r.language = &language + return r +} + +func (r GetSTAXSKURequest) Execute() (*PublicSKU, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PublicSKU + ) + 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.GetSTAXSKU") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/stackitx/skus/{skuId}" + localVarPath = strings.Replace(localVarPath, "{"+"skuId"+"}", url.PathEscape(ParameterValueToString(r.skuId, "skuId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.language != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "language", r.language, "") + } + // 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 Error + 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 Error + 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 Error + 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 Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + 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 +} + +/* +GetSTAXSKU: Get STACKIT:X SKU by ID + +Retrieves a specific STACKIT:X SKU by its ID, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param skuId The unique identifier for a SKU. + @return ApiGetSTAXSKURequest +*/ +func (a *APIClient) GetSTAXSKU(ctx context.Context, skuId string) ApiGetSTAXSKURequest { + return GetSTAXSKURequest{ + apiService: a.defaultApi, + ctx: ctx, + skuId: skuId, + } +} + +func (a *APIClient) GetSTAXSKUExecute(ctx context.Context, skuId string) (*PublicSKU, error) { + r := GetSTAXSKURequest{ + apiService: a.defaultApi, + ctx: ctx, + skuId: skuId, + } + return r.Execute() +} + +type ListCategoriesRequest struct { + ctx context.Context + apiService *DefaultApiService + pageSize *int64 + cursor *string + categoryName *string + language *string +} + +// The number of items to retrieve per page + +func (r ListCategoriesRequest) PageSize(pageSize int64) ApiListCategoriesRequest { + r.pageSize = &pageSize + return r +} + +// The cursor base64 encoded is used to retrieve the next page of results + +func (r ListCategoriesRequest) Cursor(cursor string) ApiListCategoriesRequest { + r.cursor = &cursor + return r +} + +// The category's name to retrieve the data for + +func (r ListCategoriesRequest) CategoryName(categoryName string) ApiListCategoriesRequest { + r.categoryName = &categoryName + return r +} + +// The language to retrieve the data in, available for en and de + +func (r ListCategoriesRequest) Language(language string) ApiListCategoriesRequest { + r.language = &language + return r +} + +func (r ListCategoriesRequest) Execute() (*ListCategories200Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListCategories200Response + ) + 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.ListCategories") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/categories" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "") + } + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "") + } + if r.categoryName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "categoryName", r.categoryName, "") + } + if r.language != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "language", r.language, "") + } + // 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 Error + 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 Error + 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 Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + 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 +} + +/* +ListCategories: List all categories + +Returns all categories, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListCategoriesRequest +*/ +func (a *APIClient) ListCategories(ctx context.Context) ApiListCategoriesRequest { + return ListCategoriesRequest{ + apiService: a.defaultApi, + ctx: ctx, + } +} + +func (a *APIClient) ListCategoriesExecute(ctx context.Context) (*ListCategories200Response, error) { + r := ListCategoriesRequest{ + apiService: a.defaultApi, + ctx: ctx, + } + return r.Execute() +} + +type ListCategoryProductsRequest struct { + ctx context.Context + apiService *DefaultApiService + categoryId string + pageSize *int64 + cursor *string + productName *string + language *string +} + +// The number of items to retrieve per page + +func (r ListCategoryProductsRequest) PageSize(pageSize int64) ApiListCategoryProductsRequest { + r.pageSize = &pageSize + return r +} + +// The cursor base64 encoded is used to retrieve the next page of results + +func (r ListCategoryProductsRequest) Cursor(cursor string) ApiListCategoryProductsRequest { + r.cursor = &cursor + return r +} + +// The product's name to retrieve the data for + +func (r ListCategoryProductsRequest) ProductName(productName string) ApiListCategoryProductsRequest { + r.productName = &productName + return r +} + +// The language to retrieve the data in, available for en and de + +func (r ListCategoryProductsRequest) Language(language string) ApiListCategoryProductsRequest { + r.language = &language + return r +} + +func (r ListCategoryProductsRequest) Execute() (*ListCategoryProducts200Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListCategoryProducts200Response + ) + 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.ListCategoryProducts") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/categories/{categoryId}/products" + localVarPath = strings.Replace(localVarPath, "{"+"categoryId"+"}", url.PathEscape(ParameterValueToString(r.categoryId, "categoryId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "") + } + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "") + } + if r.productName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "productName", r.productName, "") + } + if r.language != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "language", r.language, "") + } + // 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 Error + 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 Error + 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 Error + 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 Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + 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 +} + +/* +ListCategoryProducts: List products in a category + +Retrieves a specific category's products, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param categoryId The unique identifier for a category. + @return ApiListCategoryProductsRequest +*/ +func (a *APIClient) ListCategoryProducts(ctx context.Context, categoryId string) ApiListCategoryProductsRequest { + return ListCategoryProductsRequest{ + apiService: a.defaultApi, + ctx: ctx, + categoryId: categoryId, + } +} + +func (a *APIClient) ListCategoryProductsExecute(ctx context.Context, categoryId string) (*ListCategoryProducts200Response, error) { + r := ListCategoryProductsRequest{ + apiService: a.defaultApi, + ctx: ctx, + categoryId: categoryId, + } + return r.Execute() +} + +type ListMarketingDataRequest struct { + ctx context.Context + apiService *DefaultApiService + pageSize *int64 + cursor *string + language *string + productName *string +} + +// The number of items to retrieve per page + +func (r ListMarketingDataRequest) PageSize(pageSize int64) ApiListMarketingDataRequest { + r.pageSize = &pageSize + return r +} + +// The cursor base64 encoded is used to retrieve the next page of results + +func (r ListMarketingDataRequest) Cursor(cursor string) ApiListMarketingDataRequest { + r.cursor = &cursor + return r +} + +// The language to retrieve the data in, available for en and de + +func (r ListMarketingDataRequest) Language(language string) ApiListMarketingDataRequest { + r.language = &language + return r +} + +// The product's name to retrieve the data for + +func (r ListMarketingDataRequest) ProductName(productName string) ApiListMarketingDataRequest { + r.productName = &productName + return r +} + +func (r ListMarketingDataRequest) Execute() (*ListMarketingData200Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListMarketingData200Response + ) + 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.ListMarketingData") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/marketing" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "") + } + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "") + } + if r.language != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "language", r.language, "") + } + if r.productName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "productName", r.productName, "") + } + // 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 Error + 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 Error + 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 Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + 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 +} + +/* +ListMarketingData: List all marketing materials + +Retrieves a list of all marketing materials for all products, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListMarketingDataRequest +*/ +func (a *APIClient) ListMarketingData(ctx context.Context) ApiListMarketingDataRequest { + return ListMarketingDataRequest{ + apiService: a.defaultApi, + ctx: ctx, + } +} + +func (a *APIClient) ListMarketingDataExecute(ctx context.Context) (*ListMarketingData200Response, error) { + r := ListMarketingDataRequest{ + apiService: a.defaultApi, + ctx: ctx, + } + return r.Execute() +} + +type ListProductSKUsRequest struct { + ctx context.Context + apiService *DefaultApiService + productId string + cursor *string + pageSize *int64 + language *string + skuName *string + region *[]string +} + +// The cursor base64 encoded is used to retrieve the next page of results + +func (r ListProductSKUsRequest) Cursor(cursor string) ApiListProductSKUsRequest { + r.cursor = &cursor + return r +} + +// The number of items to retrieve per page + +func (r ListProductSKUsRequest) PageSize(pageSize int64) ApiListProductSKUsRequest { + r.pageSize = &pageSize + return r +} + +// The language to retrieve the data in, available for en and de + +func (r ListProductSKUsRequest) Language(language string) ApiListProductSKUsRequest { + r.language = &language + return r +} + +// The SKU's name to retrieve the data for + +func (r ListProductSKUsRequest) SkuName(skuName string) ApiListProductSKUsRequest { + r.skuName = &skuName + return r +} + +// The region to retrieve the data in + +func (r ListProductSKUsRequest) Region(region []string) ApiListProductSKUsRequest { + r.region = ®ion + return r +} + +func (r ListProductSKUsRequest) Execute() (*ListProductSKUs200Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListProductSKUs200Response + ) + 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.ListProductSKUs") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/products/{productId}/skus" + localVarPath = strings.Replace(localVarPath, "{"+"productId"+"}", url.PathEscape(ParameterValueToString(r.productId, "productId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "") + } + if r.language != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "language", r.language, "") + } + if r.skuName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "skuName", r.skuName, "") + } + if r.region != nil { + t := *r.region + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "region", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "region", t, "multi") + } + } + // 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 Error + 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 Error + 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 Error + 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 Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + 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 +} + +/* +ListProductSKUs: List SKUs for a product + +Retrieves a list of all SKUs of a product, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param productId The unique identifier for a product. + @return ApiListProductSKUsRequest +*/ +func (a *APIClient) ListProductSKUs(ctx context.Context, productId string) ApiListProductSKUsRequest { + return ListProductSKUsRequest{ + apiService: a.defaultApi, + ctx: ctx, + productId: productId, + } +} + +func (a *APIClient) ListProductSKUsExecute(ctx context.Context, productId string) (*ListProductSKUs200Response, error) { + r := ListProductSKUsRequest{ + apiService: a.defaultApi, + ctx: ctx, + productId: productId, + } + return r.Execute() +} + +type ListProductSTAXSKUsRequest struct { + ctx context.Context + apiService *DefaultApiService + productId string + cursor *string + pageSize *int64 + language *string + skuName *string + region *[]string +} + +// The cursor base64 encoded is used to retrieve the next page of results + +func (r ListProductSTAXSKUsRequest) Cursor(cursor string) ApiListProductSTAXSKUsRequest { + r.cursor = &cursor + return r +} + +// The number of items to retrieve per page + +func (r ListProductSTAXSKUsRequest) PageSize(pageSize int64) ApiListProductSTAXSKUsRequest { + r.pageSize = &pageSize + return r +} + +// The language to retrieve the data in, available for en and de + +func (r ListProductSTAXSKUsRequest) Language(language string) ApiListProductSTAXSKUsRequest { + r.language = &language + return r +} + +// The SKU's name to retrieve the data for + +func (r ListProductSTAXSKUsRequest) SkuName(skuName string) ApiListProductSTAXSKUsRequest { + r.skuName = &skuName + return r +} + +// The region to retrieve the data in + +func (r ListProductSTAXSKUsRequest) Region(region []string) ApiListProductSTAXSKUsRequest { + r.region = ®ion + return r +} + +func (r ListProductSTAXSKUsRequest) Execute() (*ListProductSKUs200Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListProductSKUs200Response + ) + 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.ListProductSTAXSKUs") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/products/{productId}/stackitx/skus" + localVarPath = strings.Replace(localVarPath, "{"+"productId"+"}", url.PathEscape(ParameterValueToString(r.productId, "productId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "") + } + if r.language != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "language", r.language, "") + } + if r.skuName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "skuName", r.skuName, "") + } + if r.region != nil { + t := *r.region + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "region", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "region", t, "multi") + } + } + // 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 Error + 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 Error + 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 Error + 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 Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + 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 +} + +/* +ListProductSTAXSKUs: List STACKIT:X SKUs for a product + +Retrieves a list of all STACKIT:X SKUs of a product, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param productId The unique identifier for a product. + @return ApiListProductSTAXSKUsRequest +*/ +func (a *APIClient) ListProductSTAXSKUs(ctx context.Context, productId string) ApiListProductSTAXSKUsRequest { + return ListProductSTAXSKUsRequest{ + apiService: a.defaultApi, + ctx: ctx, + productId: productId, + } +} + +func (a *APIClient) ListProductSTAXSKUsExecute(ctx context.Context, productId string) (*ListProductSKUs200Response, error) { + r := ListProductSTAXSKUsRequest{ + apiService: a.defaultApi, + ctx: ctx, + productId: productId, + } + return r.Execute() +} + +type ListProductsRequest struct { + ctx context.Context + apiService *DefaultApiService + pageSize *int64 + cursor *string + categoryName *string + productName *string + language *string +} + +// The number of items to retrieve per page + +func (r ListProductsRequest) PageSize(pageSize int64) ApiListProductsRequest { + r.pageSize = &pageSize + return r +} + +// The cursor base64 encoded is used to retrieve the next page of results + +func (r ListProductsRequest) Cursor(cursor string) ApiListProductsRequest { + r.cursor = &cursor + return r +} + +// The category's name to retrieve the data for + +func (r ListProductsRequest) CategoryName(categoryName string) ApiListProductsRequest { + r.categoryName = &categoryName + return r +} + +// The product's name to retrieve the data for + +func (r ListProductsRequest) ProductName(productName string) ApiListProductsRequest { + r.productName = &productName + return r +} + +// The language to retrieve the data in, available for en and de + +func (r ListProductsRequest) Language(language string) ApiListProductsRequest { + r.language = &language + return r +} + +func (r ListProductsRequest) Execute() (*ListCategoryProducts200Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListCategoryProducts200Response + ) + 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.ListProducts") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/products" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "") + } + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "") + } + if r.categoryName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "categoryName", r.categoryName, "") + } + if r.productName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "productName", r.productName, "") + } + if r.language != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "language", r.language, "") + } + // 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 Error + 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 Error + 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 Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + 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 +} + +/* +ListProducts: List all products + +Retrieves a list of all products, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListProductsRequest +*/ +func (a *APIClient) ListProducts(ctx context.Context) ApiListProductsRequest { + return ListProductsRequest{ + apiService: a.defaultApi, + ctx: ctx, + } +} + +func (a *APIClient) ListProductsExecute(ctx context.Context) (*ListCategoryProducts200Response, error) { + r := ListProductsRequest{ + apiService: a.defaultApi, + ctx: ctx, + } + return r.Execute() +} + +type ListSKUsRequest struct { + ctx context.Context + apiService *DefaultApiService + cursor *string + pageSize *int64 + language *string + categoryName *string + productName *string + skuName *string + region *[]string +} + +// The cursor base64 encoded is used to retrieve the next page of results + +func (r ListSKUsRequest) Cursor(cursor string) ApiListSKUsRequest { + r.cursor = &cursor + return r +} + +// The number of items to retrieve per page + +func (r ListSKUsRequest) PageSize(pageSize int64) ApiListSKUsRequest { + r.pageSize = &pageSize + return r +} + +// The language to retrieve the data in, available for en and de + +func (r ListSKUsRequest) Language(language string) ApiListSKUsRequest { + r.language = &language + return r +} + +// The category's name to retrieve the data for + +func (r ListSKUsRequest) CategoryName(categoryName string) ApiListSKUsRequest { + r.categoryName = &categoryName + return r +} + +// The product's name to retrieve the data for + +func (r ListSKUsRequest) ProductName(productName string) ApiListSKUsRequest { + r.productName = &productName + return r +} + +// The SKU's name to retrieve the data for + +func (r ListSKUsRequest) SkuName(skuName string) ApiListSKUsRequest { + r.skuName = &skuName + return r +} + +// The region to retrieve the data in + +func (r ListSKUsRequest) Region(region []string) ApiListSKUsRequest { + r.region = ®ion + return r +} + +func (r ListSKUsRequest) Execute() (*ListProductSKUs200Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListProductSKUs200Response + ) + 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.ListSKUs") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/skus" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "") + } + if r.language != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "language", r.language, "") + } + if r.categoryName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "categoryName", r.categoryName, "") + } + if r.productName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "productName", r.productName, "") + } + if r.skuName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "skuName", r.skuName, "") + } + if r.region != nil { + t := *r.region + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "region", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "region", t, "multi") + } + } + // 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 Error + 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 Error + 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 Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + 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 +} + +/* +ListSKUs: List all SKUs + +Retrieves a list of all SKUs, available for general public. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListSKUsRequest +*/ +func (a *APIClient) ListSKUs(ctx context.Context) ApiListSKUsRequest { + return ListSKUsRequest{ + apiService: a.defaultApi, + ctx: ctx, + } +} + +func (a *APIClient) ListSKUsExecute(ctx context.Context) (*ListProductSKUs200Response, error) { + r := ListSKUsRequest{ + apiService: a.defaultApi, + ctx: ctx, + } + return r.Execute() +} + +type ListSTAXSKUsRequest struct { + ctx context.Context + apiService *DefaultApiService + cursor *string + pageSize *int64 + language *string + categoryName *string + productName *string + skuName *string + region *[]string +} + +// The cursor base64 encoded is used to retrieve the next page of results + +func (r ListSTAXSKUsRequest) Cursor(cursor string) ApiListSTAXSKUsRequest { + r.cursor = &cursor + return r +} + +// The number of items to retrieve per page + +func (r ListSTAXSKUsRequest) PageSize(pageSize int64) ApiListSTAXSKUsRequest { + r.pageSize = &pageSize + return r +} + +// The language to retrieve the data in, available for en and de + +func (r ListSTAXSKUsRequest) Language(language string) ApiListSTAXSKUsRequest { + r.language = &language + return r +} + +// The category's name to retrieve the data for + +func (r ListSTAXSKUsRequest) CategoryName(categoryName string) ApiListSTAXSKUsRequest { + r.categoryName = &categoryName + return r +} + +// The product's name to retrieve the data for + +func (r ListSTAXSKUsRequest) ProductName(productName string) ApiListSTAXSKUsRequest { + r.productName = &productName + return r +} + +// The SKU's name to retrieve the data for + +func (r ListSTAXSKUsRequest) SkuName(skuName string) ApiListSTAXSKUsRequest { + r.skuName = &skuName + return r +} + +// The region to retrieve the data in + +func (r ListSTAXSKUsRequest) Region(region []string) ApiListSTAXSKUsRequest { + r.region = ®ion + return r +} + +func (r ListSTAXSKUsRequest) Execute() (*ListProductSKUs200Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListProductSKUs200Response + ) + 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.ListSTAXSKUs") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/stackitx/skus" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "") + } + if r.language != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "language", r.language, "") + } + if r.categoryName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "categoryName", r.categoryName, "") + } + if r.productName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "productName", r.productName, "") + } + if r.skuName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "skuName", r.skuName, "") + } + if r.region != nil { + t := *r.region + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "region", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "region", t, "multi") + } + } + // 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 Error + 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 Error + 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 Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + 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 +} + +/* +ListSTAXSKUs: List all STACKIT:X SKUs + +Get all STACKIT:X SKUs data that has maturity model different than alpha. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListSTAXSKUsRequest +*/ +func (a *APIClient) ListSTAXSKUs(ctx context.Context) ApiListSTAXSKUsRequest { + return ListSTAXSKUsRequest{ + apiService: a.defaultApi, + ctx: ctx, + } +} + +func (a *APIClient) ListSTAXSKUsExecute(ctx context.Context) (*ListProductSKUs200Response, error) { + r := ListSTAXSKUsRequest{ + apiService: a.defaultApi, + ctx: ctx, + } + return r.Execute() +} + +type SearchSKUsRequest struct { + ctx context.Context + apiService *DefaultApiService + language *string + pageSize *int64 + cursor *string + searchSKUsPayload *SearchSKUsPayload +} + +// The language to retrieve the data in, available for en and de + +func (r SearchSKUsRequest) Language(language string) ApiSearchSKUsRequest { + r.language = &language + return r +} + +// The number of items to retrieve per page + +func (r SearchSKUsRequest) PageSize(pageSize int64) ApiSearchSKUsRequest { + r.pageSize = &pageSize + return r +} + +// The cursor base64 encoded is used to retrieve the next page of results + +func (r SearchSKUsRequest) Cursor(cursor string) ApiSearchSKUsRequest { + r.cursor = &cursor + return r +} + +func (r SearchSKUsRequest) SearchSKUsPayload(searchSKUsPayload SearchSKUsPayload) ApiSearchSKUsRequest { + r.searchSKUsPayload = &searchSKUsPayload + return r +} + +func (r SearchSKUsRequest) Execute() (*ListProductSKUs200Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListProductSKUs200Response + ) + 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.SearchSKUs") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/skus/search" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.language != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "language", r.language, "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "") + } + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "") + } + // 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.searchSKUsPayload + 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 Error + 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 Error + 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 Error + 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 Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + 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 +} + +/* +SearchSKUs: Performs a SKUs search with specific attributes + +Accepts a JSON object with a predefined set of optional attributes to be used as search criteria. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSearchSKUsRequest +*/ +func (a *APIClient) SearchSKUs(ctx context.Context) ApiSearchSKUsRequest { + return SearchSKUsRequest{ + apiService: a.defaultApi, + ctx: ctx, + } +} + +func (a *APIClient) SearchSKUsExecute(ctx context.Context) (*ListProductSKUs200Response, error) { + r := SearchSKUsRequest{ + apiService: a.defaultApi, + ctx: ctx, + } + return r.Execute() +} diff --git a/services/pim/api_default_test.go b/services/pim/api_default_test.go new file mode 100644 index 000000000..a6076301b --- /dev/null +++ b/services/pim/api_default_test.go @@ -0,0 +1,730 @@ +/* +STACKIT PIM API + +Testing DefaultApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package pim + +import ( + "context" + "encoding/json" + "net/http" + "net/http/httptest" + "net/url" + "strings" + "testing" + + "github.com/stackitcloud/stackit-sdk-go/core/config" +) + +func Test_pim_DefaultApiService(t *testing.T) { + + t.Run("Test DefaultApiService GetCategory", func(t *testing.T) { + _apiUrlPath := "/v2/categories/{categoryId}" + categoryIdValue := "categoryId-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"categoryId"+"}", url.PathEscape(ParameterValueToString(categoryIdValue, "categoryId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := PublicCategory{} + 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 pim_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) + } + + categoryId := categoryIdValue + + resp, reqErr := apiClient.GetCategory(context.Background(), categoryId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService GetProduct", func(t *testing.T) { + _apiUrlPath := "/v2/products/{productId}" + productIdValue := "productId-value" + _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 := PublicProduct{} + 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 pim_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.GetProduct(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 GetProductMarketingData", func(t *testing.T) { + _apiUrlPath := "/v2/products/{productId}/marketing" + productIdValue := "productId-value" + _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 := PublicMarketingData{} + 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 pim_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.GetProductMarketingData(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 GetSKU", func(t *testing.T) { + _apiUrlPath := "/v2/skus/{skuId}" + skuIdValue := "skuId-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"skuId"+"}", url.PathEscape(ParameterValueToString(skuIdValue, "skuId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := PublicSKU{} + 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 pim_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) + } + + skuId := skuIdValue + + resp, reqErr := apiClient.GetSKU(context.Background(), skuId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService GetSTAXSKU", func(t *testing.T) { + _apiUrlPath := "/v2/stackitx/skus/{skuId}" + skuIdValue := "skuId-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"skuId"+"}", url.PathEscape(ParameterValueToString(skuIdValue, "skuId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := PublicSKU{} + 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 pim_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) + } + + skuId := skuIdValue + + resp, reqErr := apiClient.GetSTAXSKU(context.Background(), skuId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService ListCategories", func(t *testing.T) { + _apiUrlPath := "/v2/categories" + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := ListCategories200Response{} + 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 pim_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.ListCategories(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 ListCategoryProducts", func(t *testing.T) { + _apiUrlPath := "/v2/categories/{categoryId}/products" + categoryIdValue := "categoryId-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"categoryId"+"}", url.PathEscape(ParameterValueToString(categoryIdValue, "categoryId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := ListCategoryProducts200Response{} + 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 pim_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) + } + + categoryId := categoryIdValue + + resp, reqErr := apiClient.ListCategoryProducts(context.Background(), categoryId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + + t.Run("Test DefaultApiService ListMarketingData", func(t *testing.T) { + _apiUrlPath := "/v2/marketing" + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := ListMarketingData200Response{} + 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 pim_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.ListMarketingData(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 ListProductSKUs", func(t *testing.T) { + _apiUrlPath := "/v2/products/{productId}/skus" + productIdValue := "productId-value" + _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 := ListProductSKUs200Response{} + 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 pim_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.ListProductSKUs(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 ListProductSTAXSKUs", func(t *testing.T) { + _apiUrlPath := "/v2/products/{productId}/stackitx/skus" + productIdValue := "productId-value" + _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 := ListProductSKUs200Response{} + 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 pim_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.ListProductSTAXSKUs(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 ListProducts", func(t *testing.T) { + _apiUrlPath := "/v2/products" + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := ListCategoryProducts200Response{} + 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 pim_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.ListProducts(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 ListSKUs", func(t *testing.T) { + _apiUrlPath := "/v2/skus" + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := ListProductSKUs200Response{} + 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 pim_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.ListSKUs(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 ListSTAXSKUs", func(t *testing.T) { + _apiUrlPath := "/v2/stackitx/skus" + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := ListProductSKUs200Response{} + 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 pim_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.ListSTAXSKUs(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 SearchSKUs", func(t *testing.T) { + _apiUrlPath := "/v2/skus/search" + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := ListProductSKUs200Response{} + 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 pim_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.SearchSKUs(context.Background()).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + +} diff --git a/services/pim/client.go b/services/pim/client.go new file mode 100644 index 000000000..6a8560086 --- /dev/null +++ b/services/pim/client.go @@ -0,0 +1,631 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + "github.com/stackitcloud/stackit-sdk-go/core/auth" + "github.com/stackitcloud/stackit-sdk-go/core/config" +) + +var ( + jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) + xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") +) + +// APIClient manages communication with the STACKIT PIM API API v2.0.0 +// 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 +} + +type service struct { + client DefaultApi +} + +// NewAPIClient creates a new API client. +// Optionally receives configuration options +func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error) { + cfg := NewConfiguration() + + for _, option := range opts { + err := option(cfg) + if err != nil { + return nil, fmt.Errorf("configuring the client: %w", err) + } + } + + err := config.ConfigureRegion(cfg) + if err != nil { + return nil, fmt.Errorf("configuring region: %w", err) + } + + if cfg.HTTPClient == nil { + cfg.HTTPClient = &http.Client{} + } + + authRoundTripper, err := auth.SetupAuth(cfg) + if err != nil { + return nil, fmt.Errorf("setting up authentication: %w", err) + } + + roundTripper := authRoundTripper + if cfg.Middleware != nil { + roundTripper = config.ChainMiddleware(roundTripper, cfg.Middleware...) + } + + cfg.HTTPClient.Transport = roundTripper + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + c.defaultApi = (*DefaultApiService)(&c.common) + + return c, nil +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insensitive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.EqualFold(a, needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +func ParameterValueToString(obj interface{}, key string) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + return fmt.Sprintf("%v", obj) + } + var param, ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap, err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) +} + +// 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) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" + + case reflect.Struct: + if t, ok := obj.(MappedNullable); ok { + dataMap, err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i := 0; i < lenIndValue; i++ { + var arrayValue = indValue.Index(i) + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, arrayValue.Interface(), collectionType) + } + return + + case reflect.Map: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + iter := indValue.MapRange() + for iter.Next() { + k, v := iter.Key(), iter.Value() + parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), collectionType) + } + return + + case reflect.Interface: + fallthrough + case reflect.Ptr: + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), collectionType) + return + + case reflect.Int, reflect.Int8, reflect.Int16, + reflect.Int32, reflect.Int64: + value = strconv.FormatInt(v.Int(), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, + reflect.Uint32, reflect.Uint64, reflect.Uintptr: + value = strconv.FormatUint(v.Uint(), 10) + case reflect.Float32, reflect.Float64: + value = strconv.FormatFloat(v.Float(), 'g', -1, 32) + case reflect.Bool: + value = strconv.FormatBool(v.Bool()) + case reflect.String: + value = v.String() + default: + value = v.Type().String() + " value" + } + } + + switch valuesMap := headerOrQueryParams.(type) { + case url.Values: + if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" { + valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value) + } else { + valuesMap.Add(keyPrefix, value) + } + break + case map[string]string: + valuesMap[keyPrefix] = value + break + } +} + +// helper for converting interface{} parameters to json strings +func parameterToJson(obj interface{}) (string, error) { + jsonBuf, err := json.Marshal(obj) + if err != nil { + return "", err + } + return string(jsonBuf), err +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + if c.cfg.Debug { + dump, err := httputil.DumpRequestOut(request, true) + if err != nil { + return nil, err + } + log.Printf("\n%s\n", string(dump)) + } + + resp, err := c.cfg.HTTPClient.Do(request) + if err != nil { + return resp, err + } + + if c.cfg.Debug { + dump, err := httputil.DumpResponse(resp, true) + if err != nil { + return resp, err + } + log.Printf("\n%s\n", string(dump)) + } + return resp, err +} + +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *config.Configuration { + return c.cfg +} + +type formFile struct { + fileBytes []byte + fileName string + formFileName string +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + formFiles []formFile) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if !IsNil(postBody) { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // 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.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + 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.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers[h] = []string{v} + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if f, ok := v.(*os.File); ok { + f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } + if f, ok := v.(**os.File); ok { + *f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + if err != nil { + return + } + _, err = (*f).Seek(0, io.SeekStart) + return + } + if xmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + 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") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err + } + return nil + } + return fmt.Errorf("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + err = file.Close() + if err != nil { + return err + } + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + 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 { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if jsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if xmlCheck.MatchString(contentType) { + err = xml.NewEncoder(bodyBuf).Encode(body) + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("invalid body type %s", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} diff --git a/services/pim/configuration.go b/services/pim/configuration.go new file mode 100644 index 000000000..b7f5aaa19 --- /dev/null +++ b/services/pim/configuration.go @@ -0,0 +1,38 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "github.com/stackitcloud/stackit-sdk-go/core/config" +) + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *config.Configuration { + cfg := &config.Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "stackit-sdk-go/pim", + Debug: false, + Servers: config.ServerConfigurations{ + { + URL: "https://pim.api.stackit.cloud", + Description: "No description provided", + Variables: map[string]config.ServerVariable{ + "region": { + Description: "No description provided", + DefaultValue: "global", + }, + }, + }, + }, + OperationServers: map[string]config.ServerConfigurations{}, + } + return cfg +} diff --git a/services/pim/go.mod b/services/pim/go.mod new file mode 100644 index 000000000..4d01a1ac2 --- /dev/null +++ b/services/pim/go.mod @@ -0,0 +1,10 @@ +module github.com/stackitcloud/stackit-sdk-go/services/pim + +go 1.21 + +require github.com/stackitcloud/stackit-sdk-go/core v0.20.0 + +require ( + github.com/golang-jwt/jwt/v5 v5.3.0 // indirect + github.com/google/uuid v1.6.0 // indirect +) diff --git a/services/pim/go.sum b/services/pim/go.sum new file mode 100644 index 000000000..78b492b98 --- /dev/null +++ b/services/pim/go.sum @@ -0,0 +1,8 @@ +github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo= +github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/stackitcloud/stackit-sdk-go/core v0.20.0 h1:4rrUk6uT1g4nOn5/g1uXukP07Tux/o5xbMz/f/qE1rY= +github.com/stackitcloud/stackit-sdk-go/core v0.20.0/go.mod h1:fqto7M82ynGhEnpZU6VkQKYWYoFG5goC076JWXTUPRQ= diff --git a/services/pim/model_archiving_specific_attributes.go b/services/pim/model_archiving_specific_attributes.go new file mode 100644 index 000000000..ef6524776 --- /dev/null +++ b/services/pim/model_archiving_specific_attributes.go @@ -0,0 +1,185 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the ArchivingSpecificAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ArchivingSpecificAttributes{} + +/* + types and functions for discriminator +*/ + +// isNotNullableString +type ArchivingSpecificAttributesGetDiscriminatorAttributeType = *string + +func getArchivingSpecificAttributesGetDiscriminatorAttributeTypeOk(arg ArchivingSpecificAttributesGetDiscriminatorAttributeType) (ret ArchivingSpecificAttributesGetDiscriminatorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setArchivingSpecificAttributesGetDiscriminatorAttributeType(arg *ArchivingSpecificAttributesGetDiscriminatorAttributeType, val ArchivingSpecificAttributesGetDiscriminatorRetType) { + *arg = &val +} + +type ArchivingSpecificAttributesGetDiscriminatorArgType = string +type ArchivingSpecificAttributesGetDiscriminatorRetType = string + +/* + types and functions for metro +*/ + +// isBoolean +type ArchivingSpecificAttributesgetMetroAttributeType = *bool +type ArchivingSpecificAttributesgetMetroArgType = *bool +type ArchivingSpecificAttributesgetMetroRetType = *bool + +func getArchivingSpecificAttributesgetMetroAttributeTypeOk(arg ArchivingSpecificAttributesgetMetroAttributeType) (ret ArchivingSpecificAttributesgetMetroRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setArchivingSpecificAttributesgetMetroAttributeType(arg *ArchivingSpecificAttributesgetMetroAttributeType, val ArchivingSpecificAttributesgetMetroRetType) { + *arg = val +} + +// ArchivingSpecificAttributes struct for ArchivingSpecificAttributes +type ArchivingSpecificAttributes struct { + // REQUIRED + Discriminator ArchivingSpecificAttributesGetDiscriminatorAttributeType `json:"discriminator" required:"true"` + // metro + Metro ArchivingSpecificAttributesgetMetroAttributeType `json:"metro,omitempty"` +} + +type _ArchivingSpecificAttributes ArchivingSpecificAttributes + +// NewArchivingSpecificAttributes instantiates a new ArchivingSpecificAttributes 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 NewArchivingSpecificAttributes(discriminator ArchivingSpecificAttributesGetDiscriminatorArgType) *ArchivingSpecificAttributes { + this := ArchivingSpecificAttributes{} + setArchivingSpecificAttributesGetDiscriminatorAttributeType(&this.Discriminator, discriminator) + return &this +} + +// NewArchivingSpecificAttributesWithDefaults instantiates a new ArchivingSpecificAttributes 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 NewArchivingSpecificAttributesWithDefaults() *ArchivingSpecificAttributes { + this := ArchivingSpecificAttributes{} + return &this +} + +// GetDiscriminator returns the Discriminator field value +func (o *ArchivingSpecificAttributes) GetDiscriminator() (ret ArchivingSpecificAttributesGetDiscriminatorRetType) { + ret, _ = o.GetDiscriminatorOk() + return ret +} + +// GetDiscriminatorOk returns a tuple with the Discriminator field value +// and a boolean to check if the value has been set. +func (o *ArchivingSpecificAttributes) GetDiscriminatorOk() (ret ArchivingSpecificAttributesGetDiscriminatorRetType, ok bool) { + return getArchivingSpecificAttributesGetDiscriminatorAttributeTypeOk(o.Discriminator) +} + +// SetDiscriminator sets field value +func (o *ArchivingSpecificAttributes) SetDiscriminator(v ArchivingSpecificAttributesGetDiscriminatorRetType) { + setArchivingSpecificAttributesGetDiscriminatorAttributeType(&o.Discriminator, v) +} + +// GetMetro returns the Metro field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ArchivingSpecificAttributes) GetMetro() (res ArchivingSpecificAttributesgetMetroRetType) { + res, _ = o.GetMetroOk() + return +} + +// GetMetroOk returns a tuple with the Metro field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ArchivingSpecificAttributes) GetMetroOk() (ret ArchivingSpecificAttributesgetMetroRetType, ok bool) { + return getArchivingSpecificAttributesgetMetroAttributeTypeOk(o.Metro) +} + +// HasMetro returns a boolean if a field has been set. +func (o *ArchivingSpecificAttributes) HasMetro() bool { + _, ok := o.GetMetroOk() + return ok +} + +// SetMetro gets a reference to the given bool and assigns it to the Metro field. +func (o *ArchivingSpecificAttributes) SetMetro(v ArchivingSpecificAttributesgetMetroRetType) { + setArchivingSpecificAttributesgetMetroAttributeType(&o.Metro, v) +} + +// SetMetroNil sets the value for Metro to be an explicit nil +func (o *ArchivingSpecificAttributes) SetMetroNil() { + o.Metro = nil +} + +// UnsetMetro ensures that no value is present for Metro, not even an explicit nil +func (o *ArchivingSpecificAttributes) UnsetMetro() { + o.Metro = nil +} + +func (o ArchivingSpecificAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getArchivingSpecificAttributesGetDiscriminatorAttributeTypeOk(o.Discriminator); ok { + toSerialize["Discriminator"] = val + } + if val, ok := getArchivingSpecificAttributesgetMetroAttributeTypeOk(o.Metro); ok { + toSerialize["Metro"] = val + } + return toSerialize, nil +} + +type NullableArchivingSpecificAttributes struct { + value *ArchivingSpecificAttributes + isSet bool +} + +func (v NullableArchivingSpecificAttributes) Get() *ArchivingSpecificAttributes { + return v.value +} + +func (v *NullableArchivingSpecificAttributes) Set(val *ArchivingSpecificAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableArchivingSpecificAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableArchivingSpecificAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArchivingSpecificAttributes(val *ArchivingSpecificAttributes) *NullableArchivingSpecificAttributes { + return &NullableArchivingSpecificAttributes{value: val, isSet: true} +} + +func (v NullableArchivingSpecificAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableArchivingSpecificAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_archiving_specific_attributes_test.go b/services/pim/model_archiving_specific_attributes_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_archiving_specific_attributes_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_compute_engine_specific_attributes.go b/services/pim/model_compute_engine_specific_attributes.go new file mode 100644 index 000000000..79157f112 --- /dev/null +++ b/services/pim/model_compute_engine_specific_attributes.go @@ -0,0 +1,496 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the ComputeEngineSpecificAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ComputeEngineSpecificAttributes{} + +/* + types and functions for discriminator +*/ + +// isNotNullableString +type ComputeEngineSpecificAttributesGetDiscriminatorAttributeType = *string + +func getComputeEngineSpecificAttributesGetDiscriminatorAttributeTypeOk(arg ComputeEngineSpecificAttributesGetDiscriminatorAttributeType) (ret ComputeEngineSpecificAttributesGetDiscriminatorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setComputeEngineSpecificAttributesGetDiscriminatorAttributeType(arg *ComputeEngineSpecificAttributesGetDiscriminatorAttributeType, val ComputeEngineSpecificAttributesGetDiscriminatorRetType) { + *arg = &val +} + +type ComputeEngineSpecificAttributesGetDiscriminatorArgType = string +type ComputeEngineSpecificAttributesGetDiscriminatorRetType = string + +/* + types and functions for flavor +*/ + +// isNullableString +type ComputeEngineSpecificAttributesGetFlavorAttributeType = *NullableString + +func getComputeEngineSpecificAttributesGetFlavorAttributeTypeOk(arg ComputeEngineSpecificAttributesGetFlavorAttributeType) (ret ComputeEngineSpecificAttributesGetFlavorRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setComputeEngineSpecificAttributesGetFlavorAttributeType(arg *ComputeEngineSpecificAttributesGetFlavorAttributeType, val ComputeEngineSpecificAttributesGetFlavorRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type ComputeEngineSpecificAttributesGetFlavorArgType = *string +type ComputeEngineSpecificAttributesGetFlavorRetType = *string + +/* + types and functions for hardware +*/ + +// isNullableString +type ComputeEngineSpecificAttributesGetHardwareAttributeType = *NullableString + +func getComputeEngineSpecificAttributesGetHardwareAttributeTypeOk(arg ComputeEngineSpecificAttributesGetHardwareAttributeType) (ret ComputeEngineSpecificAttributesGetHardwareRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setComputeEngineSpecificAttributesGetHardwareAttributeType(arg *ComputeEngineSpecificAttributesGetHardwareAttributeType, val ComputeEngineSpecificAttributesGetHardwareRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type ComputeEngineSpecificAttributesGetHardwareArgType = *string +type ComputeEngineSpecificAttributesGetHardwareRetType = *string + +/* + types and functions for metro +*/ + +// isBoolean +type ComputeEngineSpecificAttributesgetMetroAttributeType = *bool +type ComputeEngineSpecificAttributesgetMetroArgType = *bool +type ComputeEngineSpecificAttributesgetMetroRetType = *bool + +func getComputeEngineSpecificAttributesgetMetroAttributeTypeOk(arg ComputeEngineSpecificAttributesgetMetroAttributeType) (ret ComputeEngineSpecificAttributesgetMetroRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setComputeEngineSpecificAttributesgetMetroAttributeType(arg *ComputeEngineSpecificAttributesgetMetroAttributeType, val ComputeEngineSpecificAttributesgetMetroRetType) { + *arg = val +} + +/* + types and functions for os +*/ + +// isNullableString +type ComputeEngineSpecificAttributesGetOsAttributeType = *NullableString + +func getComputeEngineSpecificAttributesGetOsAttributeTypeOk(arg ComputeEngineSpecificAttributesGetOsAttributeType) (ret ComputeEngineSpecificAttributesGetOsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setComputeEngineSpecificAttributesGetOsAttributeType(arg *ComputeEngineSpecificAttributesGetOsAttributeType, val ComputeEngineSpecificAttributesGetOsRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type ComputeEngineSpecificAttributesGetOsArgType = *string +type ComputeEngineSpecificAttributesGetOsRetType = *string + +/* + types and functions for ram +*/ + +// isFloat +type ComputeEngineSpecificAttributesGetRamAttributeType = *float64 +type ComputeEngineSpecificAttributesGetRamArgType = *float64 +type ComputeEngineSpecificAttributesGetRamRetType = *float64 + +func getComputeEngineSpecificAttributesGetRamAttributeTypeOk(arg ComputeEngineSpecificAttributesGetRamAttributeType) (ret ComputeEngineSpecificAttributesGetRamRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setComputeEngineSpecificAttributesGetRamAttributeType(arg *ComputeEngineSpecificAttributesGetRamAttributeType, val ComputeEngineSpecificAttributesGetRamRetType) { + *arg = val +} + +/* + types and functions for vCPU +*/ + +// isLong +type ComputeEngineSpecificAttributesGetVCPUAttributeType = *int64 +type ComputeEngineSpecificAttributesGetVCPUArgType = *int64 +type ComputeEngineSpecificAttributesGetVCPURetType = *int64 + +func getComputeEngineSpecificAttributesGetVCPUAttributeTypeOk(arg ComputeEngineSpecificAttributesGetVCPUAttributeType) (ret ComputeEngineSpecificAttributesGetVCPURetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setComputeEngineSpecificAttributesGetVCPUAttributeType(arg *ComputeEngineSpecificAttributesGetVCPUAttributeType, val ComputeEngineSpecificAttributesGetVCPURetType) { + *arg = val +} + +// ComputeEngineSpecificAttributes struct for ComputeEngineSpecificAttributes +type ComputeEngineSpecificAttributes struct { + // REQUIRED + Discriminator ComputeEngineSpecificAttributesGetDiscriminatorAttributeType `json:"discriminator" required:"true"` + // Flavor + Flavor ComputeEngineSpecificAttributesGetFlavorAttributeType `json:"flavor,omitempty"` + // Hardware + Hardware ComputeEngineSpecificAttributesGetHardwareAttributeType `json:"hardware,omitempty"` + // metro + Metro ComputeEngineSpecificAttributesgetMetroAttributeType `json:"metro,omitempty"` + // Operating System (e.g. `windows`, `windows-managed`) + Os ComputeEngineSpecificAttributesGetOsAttributeType `json:"os,omitempty"` + // RAM (in GB) + // Can be cast to float32 without loss of precision. + Ram ComputeEngineSpecificAttributesGetRamAttributeType `json:"ram,omitempty"` + // Number of vCPU + VCPU ComputeEngineSpecificAttributesGetVCPUAttributeType `json:"vCPU,omitempty"` +} + +type _ComputeEngineSpecificAttributes ComputeEngineSpecificAttributes + +// NewComputeEngineSpecificAttributes instantiates a new ComputeEngineSpecificAttributes 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 NewComputeEngineSpecificAttributes(discriminator ComputeEngineSpecificAttributesGetDiscriminatorArgType) *ComputeEngineSpecificAttributes { + this := ComputeEngineSpecificAttributes{} + setComputeEngineSpecificAttributesGetDiscriminatorAttributeType(&this.Discriminator, discriminator) + return &this +} + +// NewComputeEngineSpecificAttributesWithDefaults instantiates a new ComputeEngineSpecificAttributes 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 NewComputeEngineSpecificAttributesWithDefaults() *ComputeEngineSpecificAttributes { + this := ComputeEngineSpecificAttributes{} + return &this +} + +// GetDiscriminator returns the Discriminator field value +func (o *ComputeEngineSpecificAttributes) GetDiscriminator() (ret ComputeEngineSpecificAttributesGetDiscriminatorRetType) { + ret, _ = o.GetDiscriminatorOk() + return ret +} + +// GetDiscriminatorOk returns a tuple with the Discriminator field value +// and a boolean to check if the value has been set. +func (o *ComputeEngineSpecificAttributes) GetDiscriminatorOk() (ret ComputeEngineSpecificAttributesGetDiscriminatorRetType, ok bool) { + return getComputeEngineSpecificAttributesGetDiscriminatorAttributeTypeOk(o.Discriminator) +} + +// SetDiscriminator sets field value +func (o *ComputeEngineSpecificAttributes) SetDiscriminator(v ComputeEngineSpecificAttributesGetDiscriminatorRetType) { + setComputeEngineSpecificAttributesGetDiscriminatorAttributeType(&o.Discriminator, v) +} + +// GetFlavor returns the Flavor field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComputeEngineSpecificAttributes) GetFlavor() (res ComputeEngineSpecificAttributesGetFlavorRetType) { + res, _ = o.GetFlavorOk() + return +} + +// GetFlavorOk returns a tuple with the Flavor field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComputeEngineSpecificAttributes) GetFlavorOk() (ret ComputeEngineSpecificAttributesGetFlavorRetType, ok bool) { + return getComputeEngineSpecificAttributesGetFlavorAttributeTypeOk(o.Flavor) +} + +// HasFlavor returns a boolean if a field has been set. +func (o *ComputeEngineSpecificAttributes) HasFlavor() bool { + _, ok := o.GetFlavorOk() + return ok +} + +// SetFlavor gets a reference to the given string and assigns it to the Flavor field. +func (o *ComputeEngineSpecificAttributes) SetFlavor(v ComputeEngineSpecificAttributesGetFlavorRetType) { + setComputeEngineSpecificAttributesGetFlavorAttributeType(&o.Flavor, v) +} + +// SetFlavorNil sets the value for Flavor to be an explicit nil +func (o *ComputeEngineSpecificAttributes) SetFlavorNil() { + o.Flavor = nil +} + +// UnsetFlavor ensures that no value is present for Flavor, not even an explicit nil +func (o *ComputeEngineSpecificAttributes) UnsetFlavor() { + o.Flavor = nil +} + +// GetHardware returns the Hardware field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComputeEngineSpecificAttributes) GetHardware() (res ComputeEngineSpecificAttributesGetHardwareRetType) { + res, _ = o.GetHardwareOk() + return +} + +// GetHardwareOk returns a tuple with the Hardware field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComputeEngineSpecificAttributes) GetHardwareOk() (ret ComputeEngineSpecificAttributesGetHardwareRetType, ok bool) { + return getComputeEngineSpecificAttributesGetHardwareAttributeTypeOk(o.Hardware) +} + +// HasHardware returns a boolean if a field has been set. +func (o *ComputeEngineSpecificAttributes) HasHardware() bool { + _, ok := o.GetHardwareOk() + return ok +} + +// SetHardware gets a reference to the given string and assigns it to the Hardware field. +func (o *ComputeEngineSpecificAttributes) SetHardware(v ComputeEngineSpecificAttributesGetHardwareRetType) { + setComputeEngineSpecificAttributesGetHardwareAttributeType(&o.Hardware, v) +} + +// SetHardwareNil sets the value for Hardware to be an explicit nil +func (o *ComputeEngineSpecificAttributes) SetHardwareNil() { + o.Hardware = nil +} + +// UnsetHardware ensures that no value is present for Hardware, not even an explicit nil +func (o *ComputeEngineSpecificAttributes) UnsetHardware() { + o.Hardware = nil +} + +// GetMetro returns the Metro field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComputeEngineSpecificAttributes) GetMetro() (res ComputeEngineSpecificAttributesgetMetroRetType) { + res, _ = o.GetMetroOk() + return +} + +// GetMetroOk returns a tuple with the Metro field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComputeEngineSpecificAttributes) GetMetroOk() (ret ComputeEngineSpecificAttributesgetMetroRetType, ok bool) { + return getComputeEngineSpecificAttributesgetMetroAttributeTypeOk(o.Metro) +} + +// HasMetro returns a boolean if a field has been set. +func (o *ComputeEngineSpecificAttributes) HasMetro() bool { + _, ok := o.GetMetroOk() + return ok +} + +// SetMetro gets a reference to the given bool and assigns it to the Metro field. +func (o *ComputeEngineSpecificAttributes) SetMetro(v ComputeEngineSpecificAttributesgetMetroRetType) { + setComputeEngineSpecificAttributesgetMetroAttributeType(&o.Metro, v) +} + +// SetMetroNil sets the value for Metro to be an explicit nil +func (o *ComputeEngineSpecificAttributes) SetMetroNil() { + o.Metro = nil +} + +// UnsetMetro ensures that no value is present for Metro, not even an explicit nil +func (o *ComputeEngineSpecificAttributes) UnsetMetro() { + o.Metro = nil +} + +// GetOs returns the Os field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComputeEngineSpecificAttributes) GetOs() (res ComputeEngineSpecificAttributesGetOsRetType) { + res, _ = o.GetOsOk() + return +} + +// GetOsOk returns a tuple with the Os field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComputeEngineSpecificAttributes) GetOsOk() (ret ComputeEngineSpecificAttributesGetOsRetType, ok bool) { + return getComputeEngineSpecificAttributesGetOsAttributeTypeOk(o.Os) +} + +// HasOs returns a boolean if a field has been set. +func (o *ComputeEngineSpecificAttributes) HasOs() bool { + _, ok := o.GetOsOk() + return ok +} + +// SetOs gets a reference to the given string and assigns it to the Os field. +func (o *ComputeEngineSpecificAttributes) SetOs(v ComputeEngineSpecificAttributesGetOsRetType) { + setComputeEngineSpecificAttributesGetOsAttributeType(&o.Os, v) +} + +// SetOsNil sets the value for Os to be an explicit nil +func (o *ComputeEngineSpecificAttributes) SetOsNil() { + o.Os = nil +} + +// UnsetOs ensures that no value is present for Os, not even an explicit nil +func (o *ComputeEngineSpecificAttributes) UnsetOs() { + o.Os = nil +} + +// GetRam returns the Ram field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComputeEngineSpecificAttributes) GetRam() (res ComputeEngineSpecificAttributesGetRamRetType) { + res, _ = o.GetRamOk() + return +} + +// GetRamOk returns a tuple with the Ram field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComputeEngineSpecificAttributes) GetRamOk() (ret ComputeEngineSpecificAttributesGetRamRetType, ok bool) { + return getComputeEngineSpecificAttributesGetRamAttributeTypeOk(o.Ram) +} + +// HasRam returns a boolean if a field has been set. +func (o *ComputeEngineSpecificAttributes) HasRam() bool { + _, ok := o.GetRamOk() + return ok +} + +// SetRam gets a reference to the given float64 and assigns it to the Ram field. +func (o *ComputeEngineSpecificAttributes) SetRam(v ComputeEngineSpecificAttributesGetRamRetType) { + setComputeEngineSpecificAttributesGetRamAttributeType(&o.Ram, v) +} + +// SetRamNil sets the value for Ram to be an explicit nil +func (o *ComputeEngineSpecificAttributes) SetRamNil() { + o.Ram = nil +} + +// UnsetRam ensures that no value is present for Ram, not even an explicit nil +func (o *ComputeEngineSpecificAttributes) UnsetRam() { + o.Ram = nil +} + +// GetVCPU returns the VCPU field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ComputeEngineSpecificAttributes) GetVCPU() (res ComputeEngineSpecificAttributesGetVCPURetType) { + res, _ = o.GetVCPUOk() + return +} + +// GetVCPUOk returns a tuple with the VCPU field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ComputeEngineSpecificAttributes) GetVCPUOk() (ret ComputeEngineSpecificAttributesGetVCPURetType, ok bool) { + return getComputeEngineSpecificAttributesGetVCPUAttributeTypeOk(o.VCPU) +} + +// HasVCPU returns a boolean if a field has been set. +func (o *ComputeEngineSpecificAttributes) HasVCPU() bool { + _, ok := o.GetVCPUOk() + return ok +} + +// SetVCPU gets a reference to the given int64 and assigns it to the VCPU field. +func (o *ComputeEngineSpecificAttributes) SetVCPU(v ComputeEngineSpecificAttributesGetVCPURetType) { + setComputeEngineSpecificAttributesGetVCPUAttributeType(&o.VCPU, v) +} + +// SetVCPUNil sets the value for VCPU to be an explicit nil +func (o *ComputeEngineSpecificAttributes) SetVCPUNil() { + o.VCPU = nil +} + +// UnsetVCPU ensures that no value is present for VCPU, not even an explicit nil +func (o *ComputeEngineSpecificAttributes) UnsetVCPU() { + o.VCPU = nil +} + +func (o ComputeEngineSpecificAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getComputeEngineSpecificAttributesGetDiscriminatorAttributeTypeOk(o.Discriminator); ok { + toSerialize["Discriminator"] = val + } + if val, ok := getComputeEngineSpecificAttributesGetFlavorAttributeTypeOk(o.Flavor); ok { + toSerialize["Flavor"] = val + } + if val, ok := getComputeEngineSpecificAttributesGetHardwareAttributeTypeOk(o.Hardware); ok { + toSerialize["Hardware"] = val + } + if val, ok := getComputeEngineSpecificAttributesgetMetroAttributeTypeOk(o.Metro); ok { + toSerialize["Metro"] = val + } + if val, ok := getComputeEngineSpecificAttributesGetOsAttributeTypeOk(o.Os); ok { + toSerialize["Os"] = val + } + if val, ok := getComputeEngineSpecificAttributesGetRamAttributeTypeOk(o.Ram); ok { + toSerialize["Ram"] = val + } + if val, ok := getComputeEngineSpecificAttributesGetVCPUAttributeTypeOk(o.VCPU); ok { + toSerialize["VCPU"] = val + } + return toSerialize, nil +} + +type NullableComputeEngineSpecificAttributes struct { + value *ComputeEngineSpecificAttributes + isSet bool +} + +func (v NullableComputeEngineSpecificAttributes) Get() *ComputeEngineSpecificAttributes { + return v.value +} + +func (v *NullableComputeEngineSpecificAttributes) Set(val *ComputeEngineSpecificAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableComputeEngineSpecificAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableComputeEngineSpecificAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableComputeEngineSpecificAttributes(val *ComputeEngineSpecificAttributes) *NullableComputeEngineSpecificAttributes { + return &NullableComputeEngineSpecificAttributes{value: val, isSet: true} +} + +func (v NullableComputeEngineSpecificAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableComputeEngineSpecificAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_compute_engine_specific_attributes_test.go b/services/pim/model_compute_engine_specific_attributes_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_compute_engine_specific_attributes_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_confidential_computing_specific_attributes.go b/services/pim/model_confidential_computing_specific_attributes.go new file mode 100644 index 000000000..78ac5e1ff --- /dev/null +++ b/services/pim/model_confidential_computing_specific_attributes.go @@ -0,0 +1,496 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the ConfidentialComputingSpecificAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConfidentialComputingSpecificAttributes{} + +/* + types and functions for discriminator +*/ + +// isNotNullableString +type ConfidentialComputingSpecificAttributesGetDiscriminatorAttributeType = *string + +func getConfidentialComputingSpecificAttributesGetDiscriminatorAttributeTypeOk(arg ConfidentialComputingSpecificAttributesGetDiscriminatorAttributeType) (ret ConfidentialComputingSpecificAttributesGetDiscriminatorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setConfidentialComputingSpecificAttributesGetDiscriminatorAttributeType(arg *ConfidentialComputingSpecificAttributesGetDiscriminatorAttributeType, val ConfidentialComputingSpecificAttributesGetDiscriminatorRetType) { + *arg = &val +} + +type ConfidentialComputingSpecificAttributesGetDiscriminatorArgType = string +type ConfidentialComputingSpecificAttributesGetDiscriminatorRetType = string + +/* + types and functions for flavor +*/ + +// isNullableString +type ConfidentialComputingSpecificAttributesGetFlavorAttributeType = *NullableString + +func getConfidentialComputingSpecificAttributesGetFlavorAttributeTypeOk(arg ConfidentialComputingSpecificAttributesGetFlavorAttributeType) (ret ConfidentialComputingSpecificAttributesGetFlavorRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setConfidentialComputingSpecificAttributesGetFlavorAttributeType(arg *ConfidentialComputingSpecificAttributesGetFlavorAttributeType, val ConfidentialComputingSpecificAttributesGetFlavorRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type ConfidentialComputingSpecificAttributesGetFlavorArgType = *string +type ConfidentialComputingSpecificAttributesGetFlavorRetType = *string + +/* + types and functions for hardware +*/ + +// isNullableString +type ConfidentialComputingSpecificAttributesGetHardwareAttributeType = *NullableString + +func getConfidentialComputingSpecificAttributesGetHardwareAttributeTypeOk(arg ConfidentialComputingSpecificAttributesGetHardwareAttributeType) (ret ConfidentialComputingSpecificAttributesGetHardwareRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setConfidentialComputingSpecificAttributesGetHardwareAttributeType(arg *ConfidentialComputingSpecificAttributesGetHardwareAttributeType, val ConfidentialComputingSpecificAttributesGetHardwareRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type ConfidentialComputingSpecificAttributesGetHardwareArgType = *string +type ConfidentialComputingSpecificAttributesGetHardwareRetType = *string + +/* + types and functions for metro +*/ + +// isBoolean +type ConfidentialComputingSpecificAttributesgetMetroAttributeType = *bool +type ConfidentialComputingSpecificAttributesgetMetroArgType = *bool +type ConfidentialComputingSpecificAttributesgetMetroRetType = *bool + +func getConfidentialComputingSpecificAttributesgetMetroAttributeTypeOk(arg ConfidentialComputingSpecificAttributesgetMetroAttributeType) (ret ConfidentialComputingSpecificAttributesgetMetroRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setConfidentialComputingSpecificAttributesgetMetroAttributeType(arg *ConfidentialComputingSpecificAttributesgetMetroAttributeType, val ConfidentialComputingSpecificAttributesgetMetroRetType) { + *arg = val +} + +/* + types and functions for os +*/ + +// isNullableString +type ConfidentialComputingSpecificAttributesGetOsAttributeType = *NullableString + +func getConfidentialComputingSpecificAttributesGetOsAttributeTypeOk(arg ConfidentialComputingSpecificAttributesGetOsAttributeType) (ret ConfidentialComputingSpecificAttributesGetOsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setConfidentialComputingSpecificAttributesGetOsAttributeType(arg *ConfidentialComputingSpecificAttributesGetOsAttributeType, val ConfidentialComputingSpecificAttributesGetOsRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type ConfidentialComputingSpecificAttributesGetOsArgType = *string +type ConfidentialComputingSpecificAttributesGetOsRetType = *string + +/* + types and functions for ram +*/ + +// isFloat +type ConfidentialComputingSpecificAttributesGetRamAttributeType = *float64 +type ConfidentialComputingSpecificAttributesGetRamArgType = *float64 +type ConfidentialComputingSpecificAttributesGetRamRetType = *float64 + +func getConfidentialComputingSpecificAttributesGetRamAttributeTypeOk(arg ConfidentialComputingSpecificAttributesGetRamAttributeType) (ret ConfidentialComputingSpecificAttributesGetRamRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setConfidentialComputingSpecificAttributesGetRamAttributeType(arg *ConfidentialComputingSpecificAttributesGetRamAttributeType, val ConfidentialComputingSpecificAttributesGetRamRetType) { + *arg = val +} + +/* + types and functions for vCPU +*/ + +// isLong +type ConfidentialComputingSpecificAttributesGetVCPUAttributeType = *int64 +type ConfidentialComputingSpecificAttributesGetVCPUArgType = *int64 +type ConfidentialComputingSpecificAttributesGetVCPURetType = *int64 + +func getConfidentialComputingSpecificAttributesGetVCPUAttributeTypeOk(arg ConfidentialComputingSpecificAttributesGetVCPUAttributeType) (ret ConfidentialComputingSpecificAttributesGetVCPURetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setConfidentialComputingSpecificAttributesGetVCPUAttributeType(arg *ConfidentialComputingSpecificAttributesGetVCPUAttributeType, val ConfidentialComputingSpecificAttributesGetVCPURetType) { + *arg = val +} + +// ConfidentialComputingSpecificAttributes struct for ConfidentialComputingSpecificAttributes +type ConfidentialComputingSpecificAttributes struct { + // REQUIRED + Discriminator ConfidentialComputingSpecificAttributesGetDiscriminatorAttributeType `json:"discriminator" required:"true"` + // Flavor + Flavor ConfidentialComputingSpecificAttributesGetFlavorAttributeType `json:"flavor,omitempty"` + // Hardware + Hardware ConfidentialComputingSpecificAttributesGetHardwareAttributeType `json:"hardware,omitempty"` + // metro + Metro ConfidentialComputingSpecificAttributesgetMetroAttributeType `json:"metro,omitempty"` + // Operating System (e.g. `windows`, `windows-managed`) + Os ConfidentialComputingSpecificAttributesGetOsAttributeType `json:"os,omitempty"` + // RAM (in GB) + // Can be cast to float32 without loss of precision. + Ram ConfidentialComputingSpecificAttributesGetRamAttributeType `json:"ram,omitempty"` + // Number of vCPU + VCPU ConfidentialComputingSpecificAttributesGetVCPUAttributeType `json:"vCPU,omitempty"` +} + +type _ConfidentialComputingSpecificAttributes ConfidentialComputingSpecificAttributes + +// NewConfidentialComputingSpecificAttributes instantiates a new ConfidentialComputingSpecificAttributes 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 NewConfidentialComputingSpecificAttributes(discriminator ConfidentialComputingSpecificAttributesGetDiscriminatorArgType) *ConfidentialComputingSpecificAttributes { + this := ConfidentialComputingSpecificAttributes{} + setConfidentialComputingSpecificAttributesGetDiscriminatorAttributeType(&this.Discriminator, discriminator) + return &this +} + +// NewConfidentialComputingSpecificAttributesWithDefaults instantiates a new ConfidentialComputingSpecificAttributes 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 NewConfidentialComputingSpecificAttributesWithDefaults() *ConfidentialComputingSpecificAttributes { + this := ConfidentialComputingSpecificAttributes{} + return &this +} + +// GetDiscriminator returns the Discriminator field value +func (o *ConfidentialComputingSpecificAttributes) GetDiscriminator() (ret ConfidentialComputingSpecificAttributesGetDiscriminatorRetType) { + ret, _ = o.GetDiscriminatorOk() + return ret +} + +// GetDiscriminatorOk returns a tuple with the Discriminator field value +// and a boolean to check if the value has been set. +func (o *ConfidentialComputingSpecificAttributes) GetDiscriminatorOk() (ret ConfidentialComputingSpecificAttributesGetDiscriminatorRetType, ok bool) { + return getConfidentialComputingSpecificAttributesGetDiscriminatorAttributeTypeOk(o.Discriminator) +} + +// SetDiscriminator sets field value +func (o *ConfidentialComputingSpecificAttributes) SetDiscriminator(v ConfidentialComputingSpecificAttributesGetDiscriminatorRetType) { + setConfidentialComputingSpecificAttributesGetDiscriminatorAttributeType(&o.Discriminator, v) +} + +// GetFlavor returns the Flavor field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ConfidentialComputingSpecificAttributes) GetFlavor() (res ConfidentialComputingSpecificAttributesGetFlavorRetType) { + res, _ = o.GetFlavorOk() + return +} + +// GetFlavorOk returns a tuple with the Flavor field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ConfidentialComputingSpecificAttributes) GetFlavorOk() (ret ConfidentialComputingSpecificAttributesGetFlavorRetType, ok bool) { + return getConfidentialComputingSpecificAttributesGetFlavorAttributeTypeOk(o.Flavor) +} + +// HasFlavor returns a boolean if a field has been set. +func (o *ConfidentialComputingSpecificAttributes) HasFlavor() bool { + _, ok := o.GetFlavorOk() + return ok +} + +// SetFlavor gets a reference to the given string and assigns it to the Flavor field. +func (o *ConfidentialComputingSpecificAttributes) SetFlavor(v ConfidentialComputingSpecificAttributesGetFlavorRetType) { + setConfidentialComputingSpecificAttributesGetFlavorAttributeType(&o.Flavor, v) +} + +// SetFlavorNil sets the value for Flavor to be an explicit nil +func (o *ConfidentialComputingSpecificAttributes) SetFlavorNil() { + o.Flavor = nil +} + +// UnsetFlavor ensures that no value is present for Flavor, not even an explicit nil +func (o *ConfidentialComputingSpecificAttributes) UnsetFlavor() { + o.Flavor = nil +} + +// GetHardware returns the Hardware field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ConfidentialComputingSpecificAttributes) GetHardware() (res ConfidentialComputingSpecificAttributesGetHardwareRetType) { + res, _ = o.GetHardwareOk() + return +} + +// GetHardwareOk returns a tuple with the Hardware field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ConfidentialComputingSpecificAttributes) GetHardwareOk() (ret ConfidentialComputingSpecificAttributesGetHardwareRetType, ok bool) { + return getConfidentialComputingSpecificAttributesGetHardwareAttributeTypeOk(o.Hardware) +} + +// HasHardware returns a boolean if a field has been set. +func (o *ConfidentialComputingSpecificAttributes) HasHardware() bool { + _, ok := o.GetHardwareOk() + return ok +} + +// SetHardware gets a reference to the given string and assigns it to the Hardware field. +func (o *ConfidentialComputingSpecificAttributes) SetHardware(v ConfidentialComputingSpecificAttributesGetHardwareRetType) { + setConfidentialComputingSpecificAttributesGetHardwareAttributeType(&o.Hardware, v) +} + +// SetHardwareNil sets the value for Hardware to be an explicit nil +func (o *ConfidentialComputingSpecificAttributes) SetHardwareNil() { + o.Hardware = nil +} + +// UnsetHardware ensures that no value is present for Hardware, not even an explicit nil +func (o *ConfidentialComputingSpecificAttributes) UnsetHardware() { + o.Hardware = nil +} + +// GetMetro returns the Metro field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ConfidentialComputingSpecificAttributes) GetMetro() (res ConfidentialComputingSpecificAttributesgetMetroRetType) { + res, _ = o.GetMetroOk() + return +} + +// GetMetroOk returns a tuple with the Metro field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ConfidentialComputingSpecificAttributes) GetMetroOk() (ret ConfidentialComputingSpecificAttributesgetMetroRetType, ok bool) { + return getConfidentialComputingSpecificAttributesgetMetroAttributeTypeOk(o.Metro) +} + +// HasMetro returns a boolean if a field has been set. +func (o *ConfidentialComputingSpecificAttributes) HasMetro() bool { + _, ok := o.GetMetroOk() + return ok +} + +// SetMetro gets a reference to the given bool and assigns it to the Metro field. +func (o *ConfidentialComputingSpecificAttributes) SetMetro(v ConfidentialComputingSpecificAttributesgetMetroRetType) { + setConfidentialComputingSpecificAttributesgetMetroAttributeType(&o.Metro, v) +} + +// SetMetroNil sets the value for Metro to be an explicit nil +func (o *ConfidentialComputingSpecificAttributes) SetMetroNil() { + o.Metro = nil +} + +// UnsetMetro ensures that no value is present for Metro, not even an explicit nil +func (o *ConfidentialComputingSpecificAttributes) UnsetMetro() { + o.Metro = nil +} + +// GetOs returns the Os field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ConfidentialComputingSpecificAttributes) GetOs() (res ConfidentialComputingSpecificAttributesGetOsRetType) { + res, _ = o.GetOsOk() + return +} + +// GetOsOk returns a tuple with the Os field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ConfidentialComputingSpecificAttributes) GetOsOk() (ret ConfidentialComputingSpecificAttributesGetOsRetType, ok bool) { + return getConfidentialComputingSpecificAttributesGetOsAttributeTypeOk(o.Os) +} + +// HasOs returns a boolean if a field has been set. +func (o *ConfidentialComputingSpecificAttributes) HasOs() bool { + _, ok := o.GetOsOk() + return ok +} + +// SetOs gets a reference to the given string and assigns it to the Os field. +func (o *ConfidentialComputingSpecificAttributes) SetOs(v ConfidentialComputingSpecificAttributesGetOsRetType) { + setConfidentialComputingSpecificAttributesGetOsAttributeType(&o.Os, v) +} + +// SetOsNil sets the value for Os to be an explicit nil +func (o *ConfidentialComputingSpecificAttributes) SetOsNil() { + o.Os = nil +} + +// UnsetOs ensures that no value is present for Os, not even an explicit nil +func (o *ConfidentialComputingSpecificAttributes) UnsetOs() { + o.Os = nil +} + +// GetRam returns the Ram field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ConfidentialComputingSpecificAttributes) GetRam() (res ConfidentialComputingSpecificAttributesGetRamRetType) { + res, _ = o.GetRamOk() + return +} + +// GetRamOk returns a tuple with the Ram field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ConfidentialComputingSpecificAttributes) GetRamOk() (ret ConfidentialComputingSpecificAttributesGetRamRetType, ok bool) { + return getConfidentialComputingSpecificAttributesGetRamAttributeTypeOk(o.Ram) +} + +// HasRam returns a boolean if a field has been set. +func (o *ConfidentialComputingSpecificAttributes) HasRam() bool { + _, ok := o.GetRamOk() + return ok +} + +// SetRam gets a reference to the given float64 and assigns it to the Ram field. +func (o *ConfidentialComputingSpecificAttributes) SetRam(v ConfidentialComputingSpecificAttributesGetRamRetType) { + setConfidentialComputingSpecificAttributesGetRamAttributeType(&o.Ram, v) +} + +// SetRamNil sets the value for Ram to be an explicit nil +func (o *ConfidentialComputingSpecificAttributes) SetRamNil() { + o.Ram = nil +} + +// UnsetRam ensures that no value is present for Ram, not even an explicit nil +func (o *ConfidentialComputingSpecificAttributes) UnsetRam() { + o.Ram = nil +} + +// GetVCPU returns the VCPU field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ConfidentialComputingSpecificAttributes) GetVCPU() (res ConfidentialComputingSpecificAttributesGetVCPURetType) { + res, _ = o.GetVCPUOk() + return +} + +// GetVCPUOk returns a tuple with the VCPU field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ConfidentialComputingSpecificAttributes) GetVCPUOk() (ret ConfidentialComputingSpecificAttributesGetVCPURetType, ok bool) { + return getConfidentialComputingSpecificAttributesGetVCPUAttributeTypeOk(o.VCPU) +} + +// HasVCPU returns a boolean if a field has been set. +func (o *ConfidentialComputingSpecificAttributes) HasVCPU() bool { + _, ok := o.GetVCPUOk() + return ok +} + +// SetVCPU gets a reference to the given int64 and assigns it to the VCPU field. +func (o *ConfidentialComputingSpecificAttributes) SetVCPU(v ConfidentialComputingSpecificAttributesGetVCPURetType) { + setConfidentialComputingSpecificAttributesGetVCPUAttributeType(&o.VCPU, v) +} + +// SetVCPUNil sets the value for VCPU to be an explicit nil +func (o *ConfidentialComputingSpecificAttributes) SetVCPUNil() { + o.VCPU = nil +} + +// UnsetVCPU ensures that no value is present for VCPU, not even an explicit nil +func (o *ConfidentialComputingSpecificAttributes) UnsetVCPU() { + o.VCPU = nil +} + +func (o ConfidentialComputingSpecificAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getConfidentialComputingSpecificAttributesGetDiscriminatorAttributeTypeOk(o.Discriminator); ok { + toSerialize["Discriminator"] = val + } + if val, ok := getConfidentialComputingSpecificAttributesGetFlavorAttributeTypeOk(o.Flavor); ok { + toSerialize["Flavor"] = val + } + if val, ok := getConfidentialComputingSpecificAttributesGetHardwareAttributeTypeOk(o.Hardware); ok { + toSerialize["Hardware"] = val + } + if val, ok := getConfidentialComputingSpecificAttributesgetMetroAttributeTypeOk(o.Metro); ok { + toSerialize["Metro"] = val + } + if val, ok := getConfidentialComputingSpecificAttributesGetOsAttributeTypeOk(o.Os); ok { + toSerialize["Os"] = val + } + if val, ok := getConfidentialComputingSpecificAttributesGetRamAttributeTypeOk(o.Ram); ok { + toSerialize["Ram"] = val + } + if val, ok := getConfidentialComputingSpecificAttributesGetVCPUAttributeTypeOk(o.VCPU); ok { + toSerialize["VCPU"] = val + } + return toSerialize, nil +} + +type NullableConfidentialComputingSpecificAttributes struct { + value *ConfidentialComputingSpecificAttributes + isSet bool +} + +func (v NullableConfidentialComputingSpecificAttributes) Get() *ConfidentialComputingSpecificAttributes { + return v.value +} + +func (v *NullableConfidentialComputingSpecificAttributes) Set(val *ConfidentialComputingSpecificAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableConfidentialComputingSpecificAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableConfidentialComputingSpecificAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConfidentialComputingSpecificAttributes(val *ConfidentialComputingSpecificAttributes) *NullableConfidentialComputingSpecificAttributes { + return &NullableConfidentialComputingSpecificAttributes{value: val, isSet: true} +} + +func (v NullableConfidentialComputingSpecificAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConfidentialComputingSpecificAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_confidential_computing_specific_attributes_test.go b/services/pim/model_confidential_computing_specific_attributes_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_confidential_computing_specific_attributes_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_currency_codes.go b/services/pim/model_currency_codes.go new file mode 100644 index 000000000..6b92bb7e8 --- /dev/null +++ b/services/pim/model_currency_codes.go @@ -0,0 +1,117 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" + "fmt" +) + +// CurrencyCodes Prices' currency code regarding ISO4217 +type CurrencyCodes string + +// List of currencyCodes +const ( + CURRENCYCODES_EUR CurrencyCodes = "EUR" + CURRENCYCODES_USD CurrencyCodes = "USD" + CURRENCYCODES_GBP CurrencyCodes = "GBP" +) + +// All allowed values of CurrencyCodes enum +var AllowedCurrencyCodesEnumValues = []CurrencyCodes{ + "EUR", + "USD", + "GBP", +} + +func (v *CurrencyCodes) 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 := CurrencyCodes(value) + for _, existing := range AllowedCurrencyCodesEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid CurrencyCodes", value) +} + +// NewCurrencyCodesFromValue returns a pointer to a valid CurrencyCodes +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewCurrencyCodesFromValue(v string) (*CurrencyCodes, error) { + ev := CurrencyCodes(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for CurrencyCodes: valid values are %v", v, AllowedCurrencyCodesEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v CurrencyCodes) IsValid() bool { + for _, existing := range AllowedCurrencyCodesEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to currencyCodes value +func (v CurrencyCodes) Ptr() *CurrencyCodes { + return &v +} + +type NullableCurrencyCodes struct { + value *CurrencyCodes + isSet bool +} + +func (v NullableCurrencyCodes) Get() *CurrencyCodes { + return v.value +} + +func (v *NullableCurrencyCodes) Set(val *CurrencyCodes) { + v.value = val + v.isSet = true +} + +func (v NullableCurrencyCodes) IsSet() bool { + return v.isSet +} + +func (v *NullableCurrencyCodes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCurrencyCodes(val *CurrencyCodes) *NullableCurrencyCodes { + return &NullableCurrencyCodes{value: val, isSet: true} +} + +func (v NullableCurrencyCodes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCurrencyCodes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_currency_codes_test.go b/services/pim/model_currency_codes_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_currency_codes_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_currency_symbols.go b/services/pim/model_currency_symbols.go new file mode 100644 index 000000000..7a5ec601e --- /dev/null +++ b/services/pim/model_currency_symbols.go @@ -0,0 +1,115 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" + "fmt" +) + +// CurrencySymbols Prices' currency symbol +type CurrencySymbols string + +// List of currencySymbols +const ( + CURRENCYSYMBOLS_ CurrencySymbols = "€" + CURRENCYSYMBOLS_DOLLAR CurrencySymbols = "$" +) + +// All allowed values of CurrencySymbols enum +var AllowedCurrencySymbolsEnumValues = []CurrencySymbols{ + "€", + "$", +} + +func (v *CurrencySymbols) 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 := CurrencySymbols(value) + for _, existing := range AllowedCurrencySymbolsEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid CurrencySymbols", value) +} + +// NewCurrencySymbolsFromValue returns a pointer to a valid CurrencySymbols +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewCurrencySymbolsFromValue(v string) (*CurrencySymbols, error) { + ev := CurrencySymbols(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for CurrencySymbols: valid values are %v", v, AllowedCurrencySymbolsEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v CurrencySymbols) IsValid() bool { + for _, existing := range AllowedCurrencySymbolsEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to currencySymbols value +func (v CurrencySymbols) Ptr() *CurrencySymbols { + return &v +} + +type NullableCurrencySymbols struct { + value *CurrencySymbols + isSet bool +} + +func (v NullableCurrencySymbols) Get() *CurrencySymbols { + return v.value +} + +func (v *NullableCurrencySymbols) Set(val *CurrencySymbols) { + v.value = val + v.isSet = true +} + +func (v NullableCurrencySymbols) IsSet() bool { + return v.isSet +} + +func (v *NullableCurrencySymbols) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCurrencySymbols(val *CurrencySymbols) *NullableCurrencySymbols { + return &NullableCurrencySymbols{value: val, isSet: true} +} + +func (v NullableCurrencySymbols) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCurrencySymbols) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_currency_symbols_test.go b/services/pim/model_currency_symbols_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_currency_symbols_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_data_and_ai.go b/services/pim/model_data_and_ai.go new file mode 100644 index 000000000..fcde65938 --- /dev/null +++ b/services/pim/model_data_and_ai.go @@ -0,0 +1,190 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the DataAndAI type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DataAndAI{} + +/* + types and functions for discriminator +*/ + +// isNotNullableString +type DataAndAIGetDiscriminatorAttributeType = *string + +func getDataAndAIGetDiscriminatorAttributeTypeOk(arg DataAndAIGetDiscriminatorAttributeType) (ret DataAndAIGetDiscriminatorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setDataAndAIGetDiscriminatorAttributeType(arg *DataAndAIGetDiscriminatorAttributeType, val DataAndAIGetDiscriminatorRetType) { + *arg = &val +} + +type DataAndAIGetDiscriminatorArgType = string +type DataAndAIGetDiscriminatorRetType = string + +/* + types and functions for type +*/ + +// isNullableString +type DataAndAIGetTypeAttributeType = *NullableString + +func getDataAndAIGetTypeAttributeTypeOk(arg DataAndAIGetTypeAttributeType) (ret DataAndAIGetTypeRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setDataAndAIGetTypeAttributeType(arg *DataAndAIGetTypeAttributeType, val DataAndAIGetTypeRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type DataAndAIGetTypeArgType = *string +type DataAndAIGetTypeRetType = *string + +// DataAndAI struct for DataAndAI +type DataAndAI struct { + // REQUIRED + Discriminator DataAndAIGetDiscriminatorAttributeType `json:"discriminator" required:"true"` + // Type (e.g. `capacity`, `performance`) + Type DataAndAIGetTypeAttributeType `json:"type,omitempty"` +} + +type _DataAndAI DataAndAI + +// NewDataAndAI instantiates a new DataAndAI 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 NewDataAndAI(discriminator DataAndAIGetDiscriminatorArgType) *DataAndAI { + this := DataAndAI{} + setDataAndAIGetDiscriminatorAttributeType(&this.Discriminator, discriminator) + return &this +} + +// NewDataAndAIWithDefaults instantiates a new DataAndAI 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 NewDataAndAIWithDefaults() *DataAndAI { + this := DataAndAI{} + return &this +} + +// GetDiscriminator returns the Discriminator field value +func (o *DataAndAI) GetDiscriminator() (ret DataAndAIGetDiscriminatorRetType) { + ret, _ = o.GetDiscriminatorOk() + return ret +} + +// GetDiscriminatorOk returns a tuple with the Discriminator field value +// and a boolean to check if the value has been set. +func (o *DataAndAI) GetDiscriminatorOk() (ret DataAndAIGetDiscriminatorRetType, ok bool) { + return getDataAndAIGetDiscriminatorAttributeTypeOk(o.Discriminator) +} + +// SetDiscriminator sets field value +func (o *DataAndAI) SetDiscriminator(v DataAndAIGetDiscriminatorRetType) { + setDataAndAIGetDiscriminatorAttributeType(&o.Discriminator, v) +} + +// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DataAndAI) GetType() (res DataAndAIGetTypeRetType) { + 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. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DataAndAI) GetTypeOk() (ret DataAndAIGetTypeRetType, ok bool) { + return getDataAndAIGetTypeAttributeTypeOk(o.Type) +} + +// HasType returns a boolean if a field has been set. +func (o *DataAndAI) HasType() bool { + _, ok := o.GetTypeOk() + return ok +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *DataAndAI) SetType(v DataAndAIGetTypeRetType) { + setDataAndAIGetTypeAttributeType(&o.Type, v) +} + +// SetTypeNil sets the value for Type to be an explicit nil +func (o *DataAndAI) SetTypeNil() { + o.Type = nil +} + +// UnsetType ensures that no value is present for Type, not even an explicit nil +func (o *DataAndAI) UnsetType() { + o.Type = nil +} + +func (o DataAndAI) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getDataAndAIGetDiscriminatorAttributeTypeOk(o.Discriminator); ok { + toSerialize["Discriminator"] = val + } + if val, ok := getDataAndAIGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableDataAndAI struct { + value *DataAndAI + isSet bool +} + +func (v NullableDataAndAI) Get() *DataAndAI { + return v.value +} + +func (v *NullableDataAndAI) Set(val *DataAndAI) { + v.value = val + v.isSet = true +} + +func (v NullableDataAndAI) IsSet() bool { + return v.isSet +} + +func (v *NullableDataAndAI) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDataAndAI(val *DataAndAI) *NullableDataAndAI { + return &NullableDataAndAI{value: val, isSet: true} +} + +func (v NullableDataAndAI) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDataAndAI) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_data_and_ai_test.go b/services/pim/model_data_and_ai_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_data_and_ai_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_error.go b/services/pim/model_error.go new file mode 100644 index 000000000..8316d69dd --- /dev/null +++ b/services/pim/model_error.go @@ -0,0 +1,219 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the Error type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Error{} + +/* + types and functions for code +*/ + +// isLong +type ErrorGetCodeAttributeType = *int64 +type ErrorGetCodeArgType = int64 +type ErrorGetCodeRetType = int64 + +func getErrorGetCodeAttributeTypeOk(arg ErrorGetCodeAttributeType) (ret ErrorGetCodeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setErrorGetCodeAttributeType(arg *ErrorGetCodeAttributeType, val ErrorGetCodeRetType) { + *arg = &val +} + +/* + types and functions for details +*/ + +// isArray +type ErrorGetDetailsAttributeType = *[]map[string]interface{} +type ErrorGetDetailsArgType = []map[string]interface{} +type ErrorGetDetailsRetType = []map[string]interface{} + +func getErrorGetDetailsAttributeTypeOk(arg ErrorGetDetailsAttributeType) (ret ErrorGetDetailsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setErrorGetDetailsAttributeType(arg *ErrorGetDetailsAttributeType, val ErrorGetDetailsRetType) { + *arg = &val +} + +/* + types and functions for message +*/ + +// isNotNullableString +type ErrorGetMessageAttributeType = *string + +func getErrorGetMessageAttributeTypeOk(arg ErrorGetMessageAttributeType) (ret ErrorGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setErrorGetMessageAttributeType(arg *ErrorGetMessageAttributeType, val ErrorGetMessageRetType) { + *arg = &val +} + +type ErrorGetMessageArgType = string +type ErrorGetMessageRetType = string + +// Error struct for Error +type Error struct { + // HTTP status code + // REQUIRED + Code ErrorGetCodeAttributeType `json:"code" required:"true"` + // Additional common information + Details ErrorGetDetailsAttributeType `json:"details,omitempty"` + // Error description + // REQUIRED + Message ErrorGetMessageAttributeType `json:"message" required:"true"` +} + +type _Error Error + +// NewError instantiates a new Error 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 NewError(code ErrorGetCodeArgType, message ErrorGetMessageArgType) *Error { + this := Error{} + setErrorGetCodeAttributeType(&this.Code, code) + setErrorGetMessageAttributeType(&this.Message, message) + return &this +} + +// NewErrorWithDefaults instantiates a new Error 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 NewErrorWithDefaults() *Error { + this := Error{} + return &this +} + +// GetCode returns the Code field value +func (o *Error) GetCode() (ret ErrorGetCodeRetType) { + ret, _ = o.GetCodeOk() + return ret +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *Error) GetCodeOk() (ret ErrorGetCodeRetType, ok bool) { + return getErrorGetCodeAttributeTypeOk(o.Code) +} + +// SetCode sets field value +func (o *Error) SetCode(v ErrorGetCodeRetType) { + setErrorGetCodeAttributeType(&o.Code, v) +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *Error) GetDetails() (res ErrorGetDetailsRetType) { + res, _ = o.GetDetailsOk() + return +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Error) GetDetailsOk() (ret ErrorGetDetailsRetType, ok bool) { + return getErrorGetDetailsAttributeTypeOk(o.Details) +} + +// HasDetails returns a boolean if a field has been set. +func (o *Error) HasDetails() bool { + _, ok := o.GetDetailsOk() + return ok +} + +// SetDetails gets a reference to the given []map[string]interface{} and assigns it to the Details field. +func (o *Error) SetDetails(v ErrorGetDetailsRetType) { + setErrorGetDetailsAttributeType(&o.Details, v) +} + +// GetMessage returns the Message field value +func (o *Error) GetMessage() (ret ErrorGetMessageRetType) { + 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 *Error) GetMessageOk() (ret ErrorGetMessageRetType, ok bool) { + return getErrorGetMessageAttributeTypeOk(o.Message) +} + +// SetMessage sets field value +func (o *Error) SetMessage(v ErrorGetMessageRetType) { + setErrorGetMessageAttributeType(&o.Message, v) +} + +func (o Error) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getErrorGetCodeAttributeTypeOk(o.Code); ok { + toSerialize["Code"] = val + } + if val, ok := getErrorGetDetailsAttributeTypeOk(o.Details); ok { + toSerialize["Details"] = val + } + if val, ok := getErrorGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + return toSerialize, nil +} + +type NullableError struct { + value *Error + isSet bool +} + +func (v NullableError) Get() *Error { + return v.value +} + +func (v *NullableError) Set(val *Error) { + v.value = val + v.isSet = true +} + +func (v NullableError) IsSet() bool { + return v.isSet +} + +func (v *NullableError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableError(val *Error) *NullableError { + return &NullableError{value: val, isSet: true} +} + +func (v NullableError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_error_test.go b/services/pim/model_error_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_error_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_fin_ops_focus.go b/services/pim/model_fin_ops_focus.go new file mode 100644 index 000000000..966eaa31e --- /dev/null +++ b/services/pim/model_fin_ops_focus.go @@ -0,0 +1,178 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the FinOpsFocus type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FinOpsFocus{} + +/* + types and functions for serviceCategory +*/ + +// isNotNullableString +type FinOpsFocusGetServiceCategoryAttributeType = *string + +func getFinOpsFocusGetServiceCategoryAttributeTypeOk(arg FinOpsFocusGetServiceCategoryAttributeType) (ret FinOpsFocusGetServiceCategoryRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setFinOpsFocusGetServiceCategoryAttributeType(arg *FinOpsFocusGetServiceCategoryAttributeType, val FinOpsFocusGetServiceCategoryRetType) { + *arg = &val +} + +type FinOpsFocusGetServiceCategoryArgType = string +type FinOpsFocusGetServiceCategoryRetType = string + +/* + types and functions for serviceSubCategory +*/ + +// isNotNullableString +type FinOpsFocusGetServiceSubCategoryAttributeType = *string + +func getFinOpsFocusGetServiceSubCategoryAttributeTypeOk(arg FinOpsFocusGetServiceSubCategoryAttributeType) (ret FinOpsFocusGetServiceSubCategoryRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setFinOpsFocusGetServiceSubCategoryAttributeType(arg *FinOpsFocusGetServiceSubCategoryAttributeType, val FinOpsFocusGetServiceSubCategoryRetType) { + *arg = &val +} + +type FinOpsFocusGetServiceSubCategoryArgType = string +type FinOpsFocusGetServiceSubCategoryRetType = string + +// FinOpsFocus struct for FinOpsFocus +type FinOpsFocus struct { + // FinOps Focus service category + ServiceCategory FinOpsFocusGetServiceCategoryAttributeType `json:"serviceCategory,omitempty"` + // FinOps Focus service subcategory + ServiceSubCategory FinOpsFocusGetServiceSubCategoryAttributeType `json:"serviceSubCategory,omitempty"` +} + +// NewFinOpsFocus instantiates a new FinOpsFocus 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 NewFinOpsFocus() *FinOpsFocus { + this := FinOpsFocus{} + return &this +} + +// NewFinOpsFocusWithDefaults instantiates a new FinOpsFocus 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 NewFinOpsFocusWithDefaults() *FinOpsFocus { + this := FinOpsFocus{} + return &this +} + +// GetServiceCategory returns the ServiceCategory field value if set, zero value otherwise. +func (o *FinOpsFocus) GetServiceCategory() (res FinOpsFocusGetServiceCategoryRetType) { + res, _ = o.GetServiceCategoryOk() + return +} + +// GetServiceCategoryOk returns a tuple with the ServiceCategory field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FinOpsFocus) GetServiceCategoryOk() (ret FinOpsFocusGetServiceCategoryRetType, ok bool) { + return getFinOpsFocusGetServiceCategoryAttributeTypeOk(o.ServiceCategory) +} + +// HasServiceCategory returns a boolean if a field has been set. +func (o *FinOpsFocus) HasServiceCategory() bool { + _, ok := o.GetServiceCategoryOk() + return ok +} + +// SetServiceCategory gets a reference to the given string and assigns it to the ServiceCategory field. +func (o *FinOpsFocus) SetServiceCategory(v FinOpsFocusGetServiceCategoryRetType) { + setFinOpsFocusGetServiceCategoryAttributeType(&o.ServiceCategory, v) +} + +// GetServiceSubCategory returns the ServiceSubCategory field value if set, zero value otherwise. +func (o *FinOpsFocus) GetServiceSubCategory() (res FinOpsFocusGetServiceSubCategoryRetType) { + res, _ = o.GetServiceSubCategoryOk() + return +} + +// GetServiceSubCategoryOk returns a tuple with the ServiceSubCategory field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FinOpsFocus) GetServiceSubCategoryOk() (ret FinOpsFocusGetServiceSubCategoryRetType, ok bool) { + return getFinOpsFocusGetServiceSubCategoryAttributeTypeOk(o.ServiceSubCategory) +} + +// HasServiceSubCategory returns a boolean if a field has been set. +func (o *FinOpsFocus) HasServiceSubCategory() bool { + _, ok := o.GetServiceSubCategoryOk() + return ok +} + +// SetServiceSubCategory gets a reference to the given string and assigns it to the ServiceSubCategory field. +func (o *FinOpsFocus) SetServiceSubCategory(v FinOpsFocusGetServiceSubCategoryRetType) { + setFinOpsFocusGetServiceSubCategoryAttributeType(&o.ServiceSubCategory, v) +} + +func (o FinOpsFocus) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getFinOpsFocusGetServiceCategoryAttributeTypeOk(o.ServiceCategory); ok { + toSerialize["ServiceCategory"] = val + } + if val, ok := getFinOpsFocusGetServiceSubCategoryAttributeTypeOk(o.ServiceSubCategory); ok { + toSerialize["ServiceSubCategory"] = val + } + return toSerialize, nil +} + +type NullableFinOpsFocus struct { + value *FinOpsFocus + isSet bool +} + +func (v NullableFinOpsFocus) Get() *FinOpsFocus { + return v.value +} + +func (v *NullableFinOpsFocus) Set(val *FinOpsFocus) { + v.value = val + v.isSet = true +} + +func (v NullableFinOpsFocus) IsSet() bool { + return v.isSet +} + +func (v *NullableFinOpsFocus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFinOpsFocus(val *FinOpsFocus) *NullableFinOpsFocus { + return &NullableFinOpsFocus{value: val, isSet: true} +} + +func (v NullableFinOpsFocus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFinOpsFocus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_fin_ops_focus_test.go b/services/pim/model_fin_ops_focus_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_fin_ops_focus_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_list_categories_200_response.go b/services/pim/model_list_categories_200_response.go new file mode 100644 index 000000000..3713ddb14 --- /dev/null +++ b/services/pim/model_list_categories_200_response.go @@ -0,0 +1,174 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the ListCategories200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListCategories200Response{} + +/* + types and functions for data +*/ + +// isArray +type ListCategories200ResponseGetDataAttributeType = *[]PublicCategory +type ListCategories200ResponseGetDataArgType = []PublicCategory +type ListCategories200ResponseGetDataRetType = []PublicCategory + +func getListCategories200ResponseGetDataAttributeTypeOk(arg ListCategories200ResponseGetDataAttributeType) (ret ListCategories200ResponseGetDataRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListCategories200ResponseGetDataAttributeType(arg *ListCategories200ResponseGetDataAttributeType, val ListCategories200ResponseGetDataRetType) { + *arg = &val +} + +/* + types and functions for meta +*/ + +// isModel +type ListCategories200ResponseGetMetaAttributeType = *MetaInformation +type ListCategories200ResponseGetMetaArgType = MetaInformation +type ListCategories200ResponseGetMetaRetType = MetaInformation + +func getListCategories200ResponseGetMetaAttributeTypeOk(arg ListCategories200ResponseGetMetaAttributeType) (ret ListCategories200ResponseGetMetaRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListCategories200ResponseGetMetaAttributeType(arg *ListCategories200ResponseGetMetaAttributeType, val ListCategories200ResponseGetMetaRetType) { + *arg = &val +} + +// ListCategories200Response struct for ListCategories200Response +type ListCategories200Response struct { + Data ListCategories200ResponseGetDataAttributeType `json:"data,omitempty"` + Meta ListCategories200ResponseGetMetaAttributeType `json:"meta,omitempty"` +} + +// NewListCategories200Response instantiates a new ListCategories200Response 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 NewListCategories200Response() *ListCategories200Response { + this := ListCategories200Response{} + return &this +} + +// NewListCategories200ResponseWithDefaults instantiates a new ListCategories200Response 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 NewListCategories200ResponseWithDefaults() *ListCategories200Response { + this := ListCategories200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListCategories200Response) GetData() (res ListCategories200ResponseGetDataRetType) { + res, _ = o.GetDataOk() + return +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListCategories200Response) GetDataOk() (ret ListCategories200ResponseGetDataRetType, ok bool) { + return getListCategories200ResponseGetDataAttributeTypeOk(o.Data) +} + +// HasData returns a boolean if a field has been set. +func (o *ListCategories200Response) HasData() bool { + _, ok := o.GetDataOk() + return ok +} + +// SetData gets a reference to the given []PublicCategory and assigns it to the Data field. +func (o *ListCategories200Response) SetData(v ListCategories200ResponseGetDataRetType) { + setListCategories200ResponseGetDataAttributeType(&o.Data, v) +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *ListCategories200Response) GetMeta() (res ListCategories200ResponseGetMetaRetType) { + res, _ = o.GetMetaOk() + return +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListCategories200Response) GetMetaOk() (ret ListCategories200ResponseGetMetaRetType, ok bool) { + return getListCategories200ResponseGetMetaAttributeTypeOk(o.Meta) +} + +// HasMeta returns a boolean if a field has been set. +func (o *ListCategories200Response) HasMeta() bool { + _, ok := o.GetMetaOk() + return ok +} + +// SetMeta gets a reference to the given MetaInformation and assigns it to the Meta field. +func (o *ListCategories200Response) SetMeta(v ListCategories200ResponseGetMetaRetType) { + setListCategories200ResponseGetMetaAttributeType(&o.Meta, v) +} + +func (o ListCategories200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getListCategories200ResponseGetDataAttributeTypeOk(o.Data); ok { + toSerialize["Data"] = val + } + if val, ok := getListCategories200ResponseGetMetaAttributeTypeOk(o.Meta); ok { + toSerialize["Meta"] = val + } + return toSerialize, nil +} + +type NullableListCategories200Response struct { + value *ListCategories200Response + isSet bool +} + +func (v NullableListCategories200Response) Get() *ListCategories200Response { + return v.value +} + +func (v *NullableListCategories200Response) Set(val *ListCategories200Response) { + v.value = val + v.isSet = true +} + +func (v NullableListCategories200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableListCategories200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListCategories200Response(val *ListCategories200Response) *NullableListCategories200Response { + return &NullableListCategories200Response{value: val, isSet: true} +} + +func (v NullableListCategories200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListCategories200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_list_categories_200_response_test.go b/services/pim/model_list_categories_200_response_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_list_categories_200_response_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_list_category_products_200_response.go b/services/pim/model_list_category_products_200_response.go new file mode 100644 index 000000000..1041f2492 --- /dev/null +++ b/services/pim/model_list_category_products_200_response.go @@ -0,0 +1,174 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the ListCategoryProducts200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListCategoryProducts200Response{} + +/* + types and functions for data +*/ + +// isArray +type ListCategoryProducts200ResponseGetDataAttributeType = *[]PublicProduct +type ListCategoryProducts200ResponseGetDataArgType = []PublicProduct +type ListCategoryProducts200ResponseGetDataRetType = []PublicProduct + +func getListCategoryProducts200ResponseGetDataAttributeTypeOk(arg ListCategoryProducts200ResponseGetDataAttributeType) (ret ListCategoryProducts200ResponseGetDataRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListCategoryProducts200ResponseGetDataAttributeType(arg *ListCategoryProducts200ResponseGetDataAttributeType, val ListCategoryProducts200ResponseGetDataRetType) { + *arg = &val +} + +/* + types and functions for meta +*/ + +// isModel +type ListCategoryProducts200ResponseGetMetaAttributeType = *MetaInformation +type ListCategoryProducts200ResponseGetMetaArgType = MetaInformation +type ListCategoryProducts200ResponseGetMetaRetType = MetaInformation + +func getListCategoryProducts200ResponseGetMetaAttributeTypeOk(arg ListCategoryProducts200ResponseGetMetaAttributeType) (ret ListCategoryProducts200ResponseGetMetaRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListCategoryProducts200ResponseGetMetaAttributeType(arg *ListCategoryProducts200ResponseGetMetaAttributeType, val ListCategoryProducts200ResponseGetMetaRetType) { + *arg = &val +} + +// ListCategoryProducts200Response struct for ListCategoryProducts200Response +type ListCategoryProducts200Response struct { + Data ListCategoryProducts200ResponseGetDataAttributeType `json:"data,omitempty"` + Meta ListCategoryProducts200ResponseGetMetaAttributeType `json:"meta,omitempty"` +} + +// NewListCategoryProducts200Response instantiates a new ListCategoryProducts200Response 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 NewListCategoryProducts200Response() *ListCategoryProducts200Response { + this := ListCategoryProducts200Response{} + return &this +} + +// NewListCategoryProducts200ResponseWithDefaults instantiates a new ListCategoryProducts200Response 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 NewListCategoryProducts200ResponseWithDefaults() *ListCategoryProducts200Response { + this := ListCategoryProducts200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListCategoryProducts200Response) GetData() (res ListCategoryProducts200ResponseGetDataRetType) { + res, _ = o.GetDataOk() + return +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListCategoryProducts200Response) GetDataOk() (ret ListCategoryProducts200ResponseGetDataRetType, ok bool) { + return getListCategoryProducts200ResponseGetDataAttributeTypeOk(o.Data) +} + +// HasData returns a boolean if a field has been set. +func (o *ListCategoryProducts200Response) HasData() bool { + _, ok := o.GetDataOk() + return ok +} + +// SetData gets a reference to the given []PublicProduct and assigns it to the Data field. +func (o *ListCategoryProducts200Response) SetData(v ListCategoryProducts200ResponseGetDataRetType) { + setListCategoryProducts200ResponseGetDataAttributeType(&o.Data, v) +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *ListCategoryProducts200Response) GetMeta() (res ListCategoryProducts200ResponseGetMetaRetType) { + res, _ = o.GetMetaOk() + return +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListCategoryProducts200Response) GetMetaOk() (ret ListCategoryProducts200ResponseGetMetaRetType, ok bool) { + return getListCategoryProducts200ResponseGetMetaAttributeTypeOk(o.Meta) +} + +// HasMeta returns a boolean if a field has been set. +func (o *ListCategoryProducts200Response) HasMeta() bool { + _, ok := o.GetMetaOk() + return ok +} + +// SetMeta gets a reference to the given MetaInformation and assigns it to the Meta field. +func (o *ListCategoryProducts200Response) SetMeta(v ListCategoryProducts200ResponseGetMetaRetType) { + setListCategoryProducts200ResponseGetMetaAttributeType(&o.Meta, v) +} + +func (o ListCategoryProducts200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getListCategoryProducts200ResponseGetDataAttributeTypeOk(o.Data); ok { + toSerialize["Data"] = val + } + if val, ok := getListCategoryProducts200ResponseGetMetaAttributeTypeOk(o.Meta); ok { + toSerialize["Meta"] = val + } + return toSerialize, nil +} + +type NullableListCategoryProducts200Response struct { + value *ListCategoryProducts200Response + isSet bool +} + +func (v NullableListCategoryProducts200Response) Get() *ListCategoryProducts200Response { + return v.value +} + +func (v *NullableListCategoryProducts200Response) Set(val *ListCategoryProducts200Response) { + v.value = val + v.isSet = true +} + +func (v NullableListCategoryProducts200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableListCategoryProducts200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListCategoryProducts200Response(val *ListCategoryProducts200Response) *NullableListCategoryProducts200Response { + return &NullableListCategoryProducts200Response{value: val, isSet: true} +} + +func (v NullableListCategoryProducts200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListCategoryProducts200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_list_category_products_200_response_test.go b/services/pim/model_list_category_products_200_response_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_list_category_products_200_response_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_list_marketing_data_200_response.go b/services/pim/model_list_marketing_data_200_response.go new file mode 100644 index 000000000..8661b6e1b --- /dev/null +++ b/services/pim/model_list_marketing_data_200_response.go @@ -0,0 +1,174 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the ListMarketingData200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListMarketingData200Response{} + +/* + types and functions for data +*/ + +// isArray +type ListMarketingData200ResponseGetDataAttributeType = *[]PublicMarketingData +type ListMarketingData200ResponseGetDataArgType = []PublicMarketingData +type ListMarketingData200ResponseGetDataRetType = []PublicMarketingData + +func getListMarketingData200ResponseGetDataAttributeTypeOk(arg ListMarketingData200ResponseGetDataAttributeType) (ret ListMarketingData200ResponseGetDataRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListMarketingData200ResponseGetDataAttributeType(arg *ListMarketingData200ResponseGetDataAttributeType, val ListMarketingData200ResponseGetDataRetType) { + *arg = &val +} + +/* + types and functions for meta +*/ + +// isModel +type ListMarketingData200ResponseGetMetaAttributeType = *MetaInformation +type ListMarketingData200ResponseGetMetaArgType = MetaInformation +type ListMarketingData200ResponseGetMetaRetType = MetaInformation + +func getListMarketingData200ResponseGetMetaAttributeTypeOk(arg ListMarketingData200ResponseGetMetaAttributeType) (ret ListMarketingData200ResponseGetMetaRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListMarketingData200ResponseGetMetaAttributeType(arg *ListMarketingData200ResponseGetMetaAttributeType, val ListMarketingData200ResponseGetMetaRetType) { + *arg = &val +} + +// ListMarketingData200Response struct for ListMarketingData200Response +type ListMarketingData200Response struct { + Data ListMarketingData200ResponseGetDataAttributeType `json:"data,omitempty"` + Meta ListMarketingData200ResponseGetMetaAttributeType `json:"meta,omitempty"` +} + +// NewListMarketingData200Response instantiates a new ListMarketingData200Response 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 NewListMarketingData200Response() *ListMarketingData200Response { + this := ListMarketingData200Response{} + return &this +} + +// NewListMarketingData200ResponseWithDefaults instantiates a new ListMarketingData200Response 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 NewListMarketingData200ResponseWithDefaults() *ListMarketingData200Response { + this := ListMarketingData200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListMarketingData200Response) GetData() (res ListMarketingData200ResponseGetDataRetType) { + res, _ = o.GetDataOk() + return +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListMarketingData200Response) GetDataOk() (ret ListMarketingData200ResponseGetDataRetType, ok bool) { + return getListMarketingData200ResponseGetDataAttributeTypeOk(o.Data) +} + +// HasData returns a boolean if a field has been set. +func (o *ListMarketingData200Response) HasData() bool { + _, ok := o.GetDataOk() + return ok +} + +// SetData gets a reference to the given []PublicMarketingData and assigns it to the Data field. +func (o *ListMarketingData200Response) SetData(v ListMarketingData200ResponseGetDataRetType) { + setListMarketingData200ResponseGetDataAttributeType(&o.Data, v) +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *ListMarketingData200Response) GetMeta() (res ListMarketingData200ResponseGetMetaRetType) { + res, _ = o.GetMetaOk() + return +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListMarketingData200Response) GetMetaOk() (ret ListMarketingData200ResponseGetMetaRetType, ok bool) { + return getListMarketingData200ResponseGetMetaAttributeTypeOk(o.Meta) +} + +// HasMeta returns a boolean if a field has been set. +func (o *ListMarketingData200Response) HasMeta() bool { + _, ok := o.GetMetaOk() + return ok +} + +// SetMeta gets a reference to the given MetaInformation and assigns it to the Meta field. +func (o *ListMarketingData200Response) SetMeta(v ListMarketingData200ResponseGetMetaRetType) { + setListMarketingData200ResponseGetMetaAttributeType(&o.Meta, v) +} + +func (o ListMarketingData200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getListMarketingData200ResponseGetDataAttributeTypeOk(o.Data); ok { + toSerialize["Data"] = val + } + if val, ok := getListMarketingData200ResponseGetMetaAttributeTypeOk(o.Meta); ok { + toSerialize["Meta"] = val + } + return toSerialize, nil +} + +type NullableListMarketingData200Response struct { + value *ListMarketingData200Response + isSet bool +} + +func (v NullableListMarketingData200Response) Get() *ListMarketingData200Response { + return v.value +} + +func (v *NullableListMarketingData200Response) Set(val *ListMarketingData200Response) { + v.value = val + v.isSet = true +} + +func (v NullableListMarketingData200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableListMarketingData200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListMarketingData200Response(val *ListMarketingData200Response) *NullableListMarketingData200Response { + return &NullableListMarketingData200Response{value: val, isSet: true} +} + +func (v NullableListMarketingData200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListMarketingData200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_list_marketing_data_200_response_test.go b/services/pim/model_list_marketing_data_200_response_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_list_marketing_data_200_response_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_list_product_skus_200_response.go b/services/pim/model_list_product_skus_200_response.go new file mode 100644 index 000000000..02f772c50 --- /dev/null +++ b/services/pim/model_list_product_skus_200_response.go @@ -0,0 +1,174 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the ListProductSKUs200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListProductSKUs200Response{} + +/* + types and functions for data +*/ + +// isArray +type ListProductSKUs200ResponseGetDataAttributeType = *[]PublicSKU +type ListProductSKUs200ResponseGetDataArgType = []PublicSKU +type ListProductSKUs200ResponseGetDataRetType = []PublicSKU + +func getListProductSKUs200ResponseGetDataAttributeTypeOk(arg ListProductSKUs200ResponseGetDataAttributeType) (ret ListProductSKUs200ResponseGetDataRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListProductSKUs200ResponseGetDataAttributeType(arg *ListProductSKUs200ResponseGetDataAttributeType, val ListProductSKUs200ResponseGetDataRetType) { + *arg = &val +} + +/* + types and functions for meta +*/ + +// isModel +type ListProductSKUs200ResponseGetMetaAttributeType = *MetaInformation +type ListProductSKUs200ResponseGetMetaArgType = MetaInformation +type ListProductSKUs200ResponseGetMetaRetType = MetaInformation + +func getListProductSKUs200ResponseGetMetaAttributeTypeOk(arg ListProductSKUs200ResponseGetMetaAttributeType) (ret ListProductSKUs200ResponseGetMetaRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setListProductSKUs200ResponseGetMetaAttributeType(arg *ListProductSKUs200ResponseGetMetaAttributeType, val ListProductSKUs200ResponseGetMetaRetType) { + *arg = &val +} + +// ListProductSKUs200Response struct for ListProductSKUs200Response +type ListProductSKUs200Response struct { + Data ListProductSKUs200ResponseGetDataAttributeType `json:"data,omitempty"` + Meta ListProductSKUs200ResponseGetMetaAttributeType `json:"meta,omitempty"` +} + +// NewListProductSKUs200Response instantiates a new ListProductSKUs200Response 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 NewListProductSKUs200Response() *ListProductSKUs200Response { + this := ListProductSKUs200Response{} + return &this +} + +// NewListProductSKUs200ResponseWithDefaults instantiates a new ListProductSKUs200Response 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 NewListProductSKUs200ResponseWithDefaults() *ListProductSKUs200Response { + this := ListProductSKUs200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *ListProductSKUs200Response) GetData() (res ListProductSKUs200ResponseGetDataRetType) { + res, _ = o.GetDataOk() + return +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListProductSKUs200Response) GetDataOk() (ret ListProductSKUs200ResponseGetDataRetType, ok bool) { + return getListProductSKUs200ResponseGetDataAttributeTypeOk(o.Data) +} + +// HasData returns a boolean if a field has been set. +func (o *ListProductSKUs200Response) HasData() bool { + _, ok := o.GetDataOk() + return ok +} + +// SetData gets a reference to the given []PublicSKU and assigns it to the Data field. +func (o *ListProductSKUs200Response) SetData(v ListProductSKUs200ResponseGetDataRetType) { + setListProductSKUs200ResponseGetDataAttributeType(&o.Data, v) +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *ListProductSKUs200Response) GetMeta() (res ListProductSKUs200ResponseGetMetaRetType) { + res, _ = o.GetMetaOk() + return +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListProductSKUs200Response) GetMetaOk() (ret ListProductSKUs200ResponseGetMetaRetType, ok bool) { + return getListProductSKUs200ResponseGetMetaAttributeTypeOk(o.Meta) +} + +// HasMeta returns a boolean if a field has been set. +func (o *ListProductSKUs200Response) HasMeta() bool { + _, ok := o.GetMetaOk() + return ok +} + +// SetMeta gets a reference to the given MetaInformation and assigns it to the Meta field. +func (o *ListProductSKUs200Response) SetMeta(v ListProductSKUs200ResponseGetMetaRetType) { + setListProductSKUs200ResponseGetMetaAttributeType(&o.Meta, v) +} + +func (o ListProductSKUs200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getListProductSKUs200ResponseGetDataAttributeTypeOk(o.Data); ok { + toSerialize["Data"] = val + } + if val, ok := getListProductSKUs200ResponseGetMetaAttributeTypeOk(o.Meta); ok { + toSerialize["Meta"] = val + } + return toSerialize, nil +} + +type NullableListProductSKUs200Response struct { + value *ListProductSKUs200Response + isSet bool +} + +func (v NullableListProductSKUs200Response) Get() *ListProductSKUs200Response { + return v.value +} + +func (v *NullableListProductSKUs200Response) Set(val *ListProductSKUs200Response) { + v.value = val + v.isSet = true +} + +func (v NullableListProductSKUs200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableListProductSKUs200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListProductSKUs200Response(val *ListProductSKUs200Response) *NullableListProductSKUs200Response { + return &NullableListProductSKUs200Response{value: val, isSet: true} +} + +func (v NullableListProductSKUs200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListProductSKUs200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_list_product_skus_200_response_test.go b/services/pim/model_list_product_skus_200_response_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_list_product_skus_200_response_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_logging_and_monitoring_specific_attributes.go b/services/pim/model_logging_and_monitoring_specific_attributes.go new file mode 100644 index 000000000..04924dca6 --- /dev/null +++ b/services/pim/model_logging_and_monitoring_specific_attributes.go @@ -0,0 +1,431 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the LoggingAndMonitoringSpecificAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoggingAndMonitoringSpecificAttributes{} + +/* + types and functions for discriminator +*/ + +// isNotNullableString +type LoggingAndMonitoringSpecificAttributesGetDiscriminatorAttributeType = *string + +func getLoggingAndMonitoringSpecificAttributesGetDiscriminatorAttributeTypeOk(arg LoggingAndMonitoringSpecificAttributesGetDiscriminatorAttributeType) (ret LoggingAndMonitoringSpecificAttributesGetDiscriminatorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLoggingAndMonitoringSpecificAttributesGetDiscriminatorAttributeType(arg *LoggingAndMonitoringSpecificAttributesGetDiscriminatorAttributeType, val LoggingAndMonitoringSpecificAttributesGetDiscriminatorRetType) { + *arg = &val +} + +type LoggingAndMonitoringSpecificAttributesGetDiscriminatorArgType = string +type LoggingAndMonitoringSpecificAttributesGetDiscriminatorRetType = string + +/* + types and functions for diskStoragePerNode +*/ + +// isNullableString +type LoggingAndMonitoringSpecificAttributesGetDiskStoragePerNodeAttributeType = *NullableString + +func getLoggingAndMonitoringSpecificAttributesGetDiskStoragePerNodeAttributeTypeOk(arg LoggingAndMonitoringSpecificAttributesGetDiskStoragePerNodeAttributeType) (ret LoggingAndMonitoringSpecificAttributesGetDiskStoragePerNodeRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setLoggingAndMonitoringSpecificAttributesGetDiskStoragePerNodeAttributeType(arg *LoggingAndMonitoringSpecificAttributesGetDiskStoragePerNodeAttributeType, val LoggingAndMonitoringSpecificAttributesGetDiskStoragePerNodeRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type LoggingAndMonitoringSpecificAttributesGetDiskStoragePerNodeArgType = *string +type LoggingAndMonitoringSpecificAttributesGetDiskStoragePerNodeRetType = *string + +/* + types and functions for metricPerMin +*/ + +// isLong +type LoggingAndMonitoringSpecificAttributesGetMetricPerMinAttributeType = *int64 +type LoggingAndMonitoringSpecificAttributesGetMetricPerMinArgType = *int64 +type LoggingAndMonitoringSpecificAttributesGetMetricPerMinRetType = *int64 + +func getLoggingAndMonitoringSpecificAttributesGetMetricPerMinAttributeTypeOk(arg LoggingAndMonitoringSpecificAttributesGetMetricPerMinAttributeType) (ret LoggingAndMonitoringSpecificAttributesGetMetricPerMinRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setLoggingAndMonitoringSpecificAttributesGetMetricPerMinAttributeType(arg *LoggingAndMonitoringSpecificAttributesGetMetricPerMinAttributeType, val LoggingAndMonitoringSpecificAttributesGetMetricPerMinRetType) { + *arg = val +} + +/* + types and functions for nodes +*/ + +// isLong +type LoggingAndMonitoringSpecificAttributesGetNodesAttributeType = *int64 +type LoggingAndMonitoringSpecificAttributesGetNodesArgType = *int64 +type LoggingAndMonitoringSpecificAttributesGetNodesRetType = *int64 + +func getLoggingAndMonitoringSpecificAttributesGetNodesAttributeTypeOk(arg LoggingAndMonitoringSpecificAttributesGetNodesAttributeType) (ret LoggingAndMonitoringSpecificAttributesGetNodesRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setLoggingAndMonitoringSpecificAttributesGetNodesAttributeType(arg *LoggingAndMonitoringSpecificAttributesGetNodesAttributeType, val LoggingAndMonitoringSpecificAttributesGetNodesRetType) { + *arg = val +} + +/* + types and functions for targets +*/ + +// isLong +type LoggingAndMonitoringSpecificAttributesGetTargetsAttributeType = *int64 +type LoggingAndMonitoringSpecificAttributesGetTargetsArgType = *int64 +type LoggingAndMonitoringSpecificAttributesGetTargetsRetType = *int64 + +func getLoggingAndMonitoringSpecificAttributesGetTargetsAttributeTypeOk(arg LoggingAndMonitoringSpecificAttributesGetTargetsAttributeType) (ret LoggingAndMonitoringSpecificAttributesGetTargetsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setLoggingAndMonitoringSpecificAttributesGetTargetsAttributeType(arg *LoggingAndMonitoringSpecificAttributesGetTargetsAttributeType, val LoggingAndMonitoringSpecificAttributesGetTargetsRetType) { + *arg = val +} + +/* + types and functions for type +*/ + +// isNullableString +type LoggingAndMonitoringSpecificAttributesGetTypeAttributeType = *NullableString + +func getLoggingAndMonitoringSpecificAttributesGetTypeAttributeTypeOk(arg LoggingAndMonitoringSpecificAttributesGetTypeAttributeType) (ret LoggingAndMonitoringSpecificAttributesGetTypeRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setLoggingAndMonitoringSpecificAttributesGetTypeAttributeType(arg *LoggingAndMonitoringSpecificAttributesGetTypeAttributeType, val LoggingAndMonitoringSpecificAttributesGetTypeRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type LoggingAndMonitoringSpecificAttributesGetTypeArgType = *string +type LoggingAndMonitoringSpecificAttributesGetTypeRetType = *string + +// LoggingAndMonitoringSpecificAttributes struct for LoggingAndMonitoringSpecificAttributes +type LoggingAndMonitoringSpecificAttributes struct { + // REQUIRED + Discriminator LoggingAndMonitoringSpecificAttributesGetDiscriminatorAttributeType `json:"discriminator" required:"true"` + // diskStoragePerNode + DiskStoragePerNode LoggingAndMonitoringSpecificAttributesGetDiskStoragePerNodeAttributeType `json:"diskStoragePerNode,omitempty"` + // metricPerMin + MetricPerMin LoggingAndMonitoringSpecificAttributesGetMetricPerMinAttributeType `json:"metricPerMin,omitempty"` + // Nodes + Nodes LoggingAndMonitoringSpecificAttributesGetNodesAttributeType `json:"nodes,omitempty"` + // Targets + Targets LoggingAndMonitoringSpecificAttributesGetTargetsAttributeType `json:"targets,omitempty"` + // Type (e.g. `single`, `replica`) + Type LoggingAndMonitoringSpecificAttributesGetTypeAttributeType `json:"type,omitempty"` +} + +type _LoggingAndMonitoringSpecificAttributes LoggingAndMonitoringSpecificAttributes + +// NewLoggingAndMonitoringSpecificAttributes instantiates a new LoggingAndMonitoringSpecificAttributes 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 NewLoggingAndMonitoringSpecificAttributes(discriminator LoggingAndMonitoringSpecificAttributesGetDiscriminatorArgType) *LoggingAndMonitoringSpecificAttributes { + this := LoggingAndMonitoringSpecificAttributes{} + setLoggingAndMonitoringSpecificAttributesGetDiscriminatorAttributeType(&this.Discriminator, discriminator) + return &this +} + +// NewLoggingAndMonitoringSpecificAttributesWithDefaults instantiates a new LoggingAndMonitoringSpecificAttributes 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 NewLoggingAndMonitoringSpecificAttributesWithDefaults() *LoggingAndMonitoringSpecificAttributes { + this := LoggingAndMonitoringSpecificAttributes{} + return &this +} + +// GetDiscriminator returns the Discriminator field value +func (o *LoggingAndMonitoringSpecificAttributes) GetDiscriminator() (ret LoggingAndMonitoringSpecificAttributesGetDiscriminatorRetType) { + ret, _ = o.GetDiscriminatorOk() + return ret +} + +// GetDiscriminatorOk returns a tuple with the Discriminator field value +// and a boolean to check if the value has been set. +func (o *LoggingAndMonitoringSpecificAttributes) GetDiscriminatorOk() (ret LoggingAndMonitoringSpecificAttributesGetDiscriminatorRetType, ok bool) { + return getLoggingAndMonitoringSpecificAttributesGetDiscriminatorAttributeTypeOk(o.Discriminator) +} + +// SetDiscriminator sets field value +func (o *LoggingAndMonitoringSpecificAttributes) SetDiscriminator(v LoggingAndMonitoringSpecificAttributesGetDiscriminatorRetType) { + setLoggingAndMonitoringSpecificAttributesGetDiscriminatorAttributeType(&o.Discriminator, v) +} + +// GetDiskStoragePerNode returns the DiskStoragePerNode field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *LoggingAndMonitoringSpecificAttributes) GetDiskStoragePerNode() (res LoggingAndMonitoringSpecificAttributesGetDiskStoragePerNodeRetType) { + res, _ = o.GetDiskStoragePerNodeOk() + return +} + +// GetDiskStoragePerNodeOk returns a tuple with the DiskStoragePerNode field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *LoggingAndMonitoringSpecificAttributes) GetDiskStoragePerNodeOk() (ret LoggingAndMonitoringSpecificAttributesGetDiskStoragePerNodeRetType, ok bool) { + return getLoggingAndMonitoringSpecificAttributesGetDiskStoragePerNodeAttributeTypeOk(o.DiskStoragePerNode) +} + +// HasDiskStoragePerNode returns a boolean if a field has been set. +func (o *LoggingAndMonitoringSpecificAttributes) HasDiskStoragePerNode() bool { + _, ok := o.GetDiskStoragePerNodeOk() + return ok +} + +// SetDiskStoragePerNode gets a reference to the given string and assigns it to the DiskStoragePerNode field. +func (o *LoggingAndMonitoringSpecificAttributes) SetDiskStoragePerNode(v LoggingAndMonitoringSpecificAttributesGetDiskStoragePerNodeRetType) { + setLoggingAndMonitoringSpecificAttributesGetDiskStoragePerNodeAttributeType(&o.DiskStoragePerNode, v) +} + +// SetDiskStoragePerNodeNil sets the value for DiskStoragePerNode to be an explicit nil +func (o *LoggingAndMonitoringSpecificAttributes) SetDiskStoragePerNodeNil() { + o.DiskStoragePerNode = nil +} + +// UnsetDiskStoragePerNode ensures that no value is present for DiskStoragePerNode, not even an explicit nil +func (o *LoggingAndMonitoringSpecificAttributes) UnsetDiskStoragePerNode() { + o.DiskStoragePerNode = nil +} + +// GetMetricPerMin returns the MetricPerMin field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *LoggingAndMonitoringSpecificAttributes) GetMetricPerMin() (res LoggingAndMonitoringSpecificAttributesGetMetricPerMinRetType) { + res, _ = o.GetMetricPerMinOk() + return +} + +// GetMetricPerMinOk returns a tuple with the MetricPerMin field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *LoggingAndMonitoringSpecificAttributes) GetMetricPerMinOk() (ret LoggingAndMonitoringSpecificAttributesGetMetricPerMinRetType, ok bool) { + return getLoggingAndMonitoringSpecificAttributesGetMetricPerMinAttributeTypeOk(o.MetricPerMin) +} + +// HasMetricPerMin returns a boolean if a field has been set. +func (o *LoggingAndMonitoringSpecificAttributes) HasMetricPerMin() bool { + _, ok := o.GetMetricPerMinOk() + return ok +} + +// SetMetricPerMin gets a reference to the given int64 and assigns it to the MetricPerMin field. +func (o *LoggingAndMonitoringSpecificAttributes) SetMetricPerMin(v LoggingAndMonitoringSpecificAttributesGetMetricPerMinRetType) { + setLoggingAndMonitoringSpecificAttributesGetMetricPerMinAttributeType(&o.MetricPerMin, v) +} + +// SetMetricPerMinNil sets the value for MetricPerMin to be an explicit nil +func (o *LoggingAndMonitoringSpecificAttributes) SetMetricPerMinNil() { + o.MetricPerMin = nil +} + +// UnsetMetricPerMin ensures that no value is present for MetricPerMin, not even an explicit nil +func (o *LoggingAndMonitoringSpecificAttributes) UnsetMetricPerMin() { + o.MetricPerMin = nil +} + +// GetNodes returns the Nodes field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *LoggingAndMonitoringSpecificAttributes) GetNodes() (res LoggingAndMonitoringSpecificAttributesGetNodesRetType) { + res, _ = o.GetNodesOk() + return +} + +// GetNodesOk returns a tuple with the Nodes field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *LoggingAndMonitoringSpecificAttributes) GetNodesOk() (ret LoggingAndMonitoringSpecificAttributesGetNodesRetType, ok bool) { + return getLoggingAndMonitoringSpecificAttributesGetNodesAttributeTypeOk(o.Nodes) +} + +// HasNodes returns a boolean if a field has been set. +func (o *LoggingAndMonitoringSpecificAttributes) HasNodes() bool { + _, ok := o.GetNodesOk() + return ok +} + +// SetNodes gets a reference to the given int64 and assigns it to the Nodes field. +func (o *LoggingAndMonitoringSpecificAttributes) SetNodes(v LoggingAndMonitoringSpecificAttributesGetNodesRetType) { + setLoggingAndMonitoringSpecificAttributesGetNodesAttributeType(&o.Nodes, v) +} + +// SetNodesNil sets the value for Nodes to be an explicit nil +func (o *LoggingAndMonitoringSpecificAttributes) SetNodesNil() { + o.Nodes = nil +} + +// UnsetNodes ensures that no value is present for Nodes, not even an explicit nil +func (o *LoggingAndMonitoringSpecificAttributes) UnsetNodes() { + o.Nodes = nil +} + +// GetTargets returns the Targets field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *LoggingAndMonitoringSpecificAttributes) GetTargets() (res LoggingAndMonitoringSpecificAttributesGetTargetsRetType) { + res, _ = o.GetTargetsOk() + return +} + +// GetTargetsOk returns a tuple with the Targets field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *LoggingAndMonitoringSpecificAttributes) GetTargetsOk() (ret LoggingAndMonitoringSpecificAttributesGetTargetsRetType, ok bool) { + return getLoggingAndMonitoringSpecificAttributesGetTargetsAttributeTypeOk(o.Targets) +} + +// HasTargets returns a boolean if a field has been set. +func (o *LoggingAndMonitoringSpecificAttributes) HasTargets() bool { + _, ok := o.GetTargetsOk() + return ok +} + +// SetTargets gets a reference to the given int64 and assigns it to the Targets field. +func (o *LoggingAndMonitoringSpecificAttributes) SetTargets(v LoggingAndMonitoringSpecificAttributesGetTargetsRetType) { + setLoggingAndMonitoringSpecificAttributesGetTargetsAttributeType(&o.Targets, v) +} + +// SetTargetsNil sets the value for Targets to be an explicit nil +func (o *LoggingAndMonitoringSpecificAttributes) SetTargetsNil() { + o.Targets = nil +} + +// UnsetTargets ensures that no value is present for Targets, not even an explicit nil +func (o *LoggingAndMonitoringSpecificAttributes) UnsetTargets() { + o.Targets = nil +} + +// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *LoggingAndMonitoringSpecificAttributes) GetType() (res LoggingAndMonitoringSpecificAttributesGetTypeRetType) { + 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. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *LoggingAndMonitoringSpecificAttributes) GetTypeOk() (ret LoggingAndMonitoringSpecificAttributesGetTypeRetType, ok bool) { + return getLoggingAndMonitoringSpecificAttributesGetTypeAttributeTypeOk(o.Type) +} + +// HasType returns a boolean if a field has been set. +func (o *LoggingAndMonitoringSpecificAttributes) HasType() bool { + _, ok := o.GetTypeOk() + return ok +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *LoggingAndMonitoringSpecificAttributes) SetType(v LoggingAndMonitoringSpecificAttributesGetTypeRetType) { + setLoggingAndMonitoringSpecificAttributesGetTypeAttributeType(&o.Type, v) +} + +// SetTypeNil sets the value for Type to be an explicit nil +func (o *LoggingAndMonitoringSpecificAttributes) SetTypeNil() { + o.Type = nil +} + +// UnsetType ensures that no value is present for Type, not even an explicit nil +func (o *LoggingAndMonitoringSpecificAttributes) UnsetType() { + o.Type = nil +} + +func (o LoggingAndMonitoringSpecificAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getLoggingAndMonitoringSpecificAttributesGetDiscriminatorAttributeTypeOk(o.Discriminator); ok { + toSerialize["Discriminator"] = val + } + if val, ok := getLoggingAndMonitoringSpecificAttributesGetDiskStoragePerNodeAttributeTypeOk(o.DiskStoragePerNode); ok { + toSerialize["DiskStoragePerNode"] = val + } + if val, ok := getLoggingAndMonitoringSpecificAttributesGetMetricPerMinAttributeTypeOk(o.MetricPerMin); ok { + toSerialize["MetricPerMin"] = val + } + if val, ok := getLoggingAndMonitoringSpecificAttributesGetNodesAttributeTypeOk(o.Nodes); ok { + toSerialize["Nodes"] = val + } + if val, ok := getLoggingAndMonitoringSpecificAttributesGetTargetsAttributeTypeOk(o.Targets); ok { + toSerialize["Targets"] = val + } + if val, ok := getLoggingAndMonitoringSpecificAttributesGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableLoggingAndMonitoringSpecificAttributes struct { + value *LoggingAndMonitoringSpecificAttributes + isSet bool +} + +func (v NullableLoggingAndMonitoringSpecificAttributes) Get() *LoggingAndMonitoringSpecificAttributes { + return v.value +} + +func (v *NullableLoggingAndMonitoringSpecificAttributes) Set(val *LoggingAndMonitoringSpecificAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableLoggingAndMonitoringSpecificAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableLoggingAndMonitoringSpecificAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoggingAndMonitoringSpecificAttributes(val *LoggingAndMonitoringSpecificAttributes) *NullableLoggingAndMonitoringSpecificAttributes { + return &NullableLoggingAndMonitoringSpecificAttributes{value: val, isSet: true} +} + +func (v NullableLoggingAndMonitoringSpecificAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoggingAndMonitoringSpecificAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_logging_and_monitoring_specific_attributes_test.go b/services/pim/model_logging_and_monitoring_specific_attributes_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_logging_and_monitoring_specific_attributes_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_marketing_advantage.go b/services/pim/model_marketing_advantage.go new file mode 100644 index 000000000..0b4e92d3f --- /dev/null +++ b/services/pim/model_marketing_advantage.go @@ -0,0 +1,177 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the MarketingAdvantage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MarketingAdvantage{} + +/* + types and functions for advantage +*/ + +// isNotNullableString +type MarketingAdvantageGetAdvantageAttributeType = *string + +func getMarketingAdvantageGetAdvantageAttributeTypeOk(arg MarketingAdvantageGetAdvantageAttributeType) (ret MarketingAdvantageGetAdvantageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMarketingAdvantageGetAdvantageAttributeType(arg *MarketingAdvantageGetAdvantageAttributeType, val MarketingAdvantageGetAdvantageRetType) { + *arg = &val +} + +type MarketingAdvantageGetAdvantageArgType = string +type MarketingAdvantageGetAdvantageRetType = string + +/* + types and functions for position +*/ + +// isLong +type MarketingAdvantageGetPositionAttributeType = *int64 +type MarketingAdvantageGetPositionArgType = int64 +type MarketingAdvantageGetPositionRetType = int64 + +func getMarketingAdvantageGetPositionAttributeTypeOk(arg MarketingAdvantageGetPositionAttributeType) (ret MarketingAdvantageGetPositionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMarketingAdvantageGetPositionAttributeType(arg *MarketingAdvantageGetPositionAttributeType, val MarketingAdvantageGetPositionRetType) { + *arg = &val +} + +// MarketingAdvantage struct for MarketingAdvantage +type MarketingAdvantage struct { + // Name of the advantage + Advantage MarketingAdvantageGetAdvantageAttributeType `json:"advantage,omitempty"` + // Description of the advantage + Position MarketingAdvantageGetPositionAttributeType `json:"position,omitempty"` +} + +// NewMarketingAdvantage instantiates a new MarketingAdvantage 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 NewMarketingAdvantage() *MarketingAdvantage { + this := MarketingAdvantage{} + return &this +} + +// NewMarketingAdvantageWithDefaults instantiates a new MarketingAdvantage 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 NewMarketingAdvantageWithDefaults() *MarketingAdvantage { + this := MarketingAdvantage{} + return &this +} + +// GetAdvantage returns the Advantage field value if set, zero value otherwise. +func (o *MarketingAdvantage) GetAdvantage() (res MarketingAdvantageGetAdvantageRetType) { + res, _ = o.GetAdvantageOk() + return +} + +// GetAdvantageOk returns a tuple with the Advantage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketingAdvantage) GetAdvantageOk() (ret MarketingAdvantageGetAdvantageRetType, ok bool) { + return getMarketingAdvantageGetAdvantageAttributeTypeOk(o.Advantage) +} + +// HasAdvantage returns a boolean if a field has been set. +func (o *MarketingAdvantage) HasAdvantage() bool { + _, ok := o.GetAdvantageOk() + return ok +} + +// SetAdvantage gets a reference to the given string and assigns it to the Advantage field. +func (o *MarketingAdvantage) SetAdvantage(v MarketingAdvantageGetAdvantageRetType) { + setMarketingAdvantageGetAdvantageAttributeType(&o.Advantage, v) +} + +// GetPosition returns the Position field value if set, zero value otherwise. +func (o *MarketingAdvantage) GetPosition() (res MarketingAdvantageGetPositionRetType) { + res, _ = o.GetPositionOk() + return +} + +// GetPositionOk returns a tuple with the Position field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketingAdvantage) GetPositionOk() (ret MarketingAdvantageGetPositionRetType, ok bool) { + return getMarketingAdvantageGetPositionAttributeTypeOk(o.Position) +} + +// HasPosition returns a boolean if a field has been set. +func (o *MarketingAdvantage) HasPosition() bool { + _, ok := o.GetPositionOk() + return ok +} + +// SetPosition gets a reference to the given int64 and assigns it to the Position field. +func (o *MarketingAdvantage) SetPosition(v MarketingAdvantageGetPositionRetType) { + setMarketingAdvantageGetPositionAttributeType(&o.Position, v) +} + +func (o MarketingAdvantage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getMarketingAdvantageGetAdvantageAttributeTypeOk(o.Advantage); ok { + toSerialize["Advantage"] = val + } + if val, ok := getMarketingAdvantageGetPositionAttributeTypeOk(o.Position); ok { + toSerialize["Position"] = val + } + return toSerialize, nil +} + +type NullableMarketingAdvantage struct { + value *MarketingAdvantage + isSet bool +} + +func (v NullableMarketingAdvantage) Get() *MarketingAdvantage { + return v.value +} + +func (v *NullableMarketingAdvantage) Set(val *MarketingAdvantage) { + v.value = val + v.isSet = true +} + +func (v NullableMarketingAdvantage) IsSet() bool { + return v.isSet +} + +func (v *NullableMarketingAdvantage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMarketingAdvantage(val *MarketingAdvantage) *NullableMarketingAdvantage { + return &NullableMarketingAdvantage{value: val, isSet: true} +} + +func (v NullableMarketingAdvantage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMarketingAdvantage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_marketing_advantage_test.go b/services/pim/model_marketing_advantage_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_marketing_advantage_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_marketing_application.go b/services/pim/model_marketing_application.go new file mode 100644 index 000000000..c1b8c820d --- /dev/null +++ b/services/pim/model_marketing_application.go @@ -0,0 +1,226 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the MarketingApplication type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MarketingApplication{} + +/* + types and functions for application +*/ + +// isNotNullableString +type MarketingApplicationGetApplicationAttributeType = *string + +func getMarketingApplicationGetApplicationAttributeTypeOk(arg MarketingApplicationGetApplicationAttributeType) (ret MarketingApplicationGetApplicationRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMarketingApplicationGetApplicationAttributeType(arg *MarketingApplicationGetApplicationAttributeType, val MarketingApplicationGetApplicationRetType) { + *arg = &val +} + +type MarketingApplicationGetApplicationArgType = string +type MarketingApplicationGetApplicationRetType = string + +/* + types and functions for applicationTitle +*/ + +// isNotNullableString +type MarketingApplicationGetApplicationTitleAttributeType = *string + +func getMarketingApplicationGetApplicationTitleAttributeTypeOk(arg MarketingApplicationGetApplicationTitleAttributeType) (ret MarketingApplicationGetApplicationTitleRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMarketingApplicationGetApplicationTitleAttributeType(arg *MarketingApplicationGetApplicationTitleAttributeType, val MarketingApplicationGetApplicationTitleRetType) { + *arg = &val +} + +type MarketingApplicationGetApplicationTitleArgType = string +type MarketingApplicationGetApplicationTitleRetType = string + +/* + types and functions for position +*/ + +// isLong +type MarketingApplicationGetPositionAttributeType = *int64 +type MarketingApplicationGetPositionArgType = int64 +type MarketingApplicationGetPositionRetType = int64 + +func getMarketingApplicationGetPositionAttributeTypeOk(arg MarketingApplicationGetPositionAttributeType) (ret MarketingApplicationGetPositionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMarketingApplicationGetPositionAttributeType(arg *MarketingApplicationGetPositionAttributeType, val MarketingApplicationGetPositionRetType) { + *arg = &val +} + +// MarketingApplication struct for MarketingApplication +type MarketingApplication struct { + // Description of the application + Application MarketingApplicationGetApplicationAttributeType `json:"application,omitempty"` + // Title of the application + ApplicationTitle MarketingApplicationGetApplicationTitleAttributeType `json:"applicationTitle,omitempty"` + // Position of the application + Position MarketingApplicationGetPositionAttributeType `json:"position,omitempty"` +} + +// NewMarketingApplication instantiates a new MarketingApplication 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 NewMarketingApplication() *MarketingApplication { + this := MarketingApplication{} + return &this +} + +// NewMarketingApplicationWithDefaults instantiates a new MarketingApplication 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 NewMarketingApplicationWithDefaults() *MarketingApplication { + this := MarketingApplication{} + return &this +} + +// GetApplication returns the Application field value if set, zero value otherwise. +func (o *MarketingApplication) GetApplication() (res MarketingApplicationGetApplicationRetType) { + res, _ = o.GetApplicationOk() + return +} + +// GetApplicationOk returns a tuple with the Application field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketingApplication) GetApplicationOk() (ret MarketingApplicationGetApplicationRetType, ok bool) { + return getMarketingApplicationGetApplicationAttributeTypeOk(o.Application) +} + +// HasApplication returns a boolean if a field has been set. +func (o *MarketingApplication) HasApplication() bool { + _, ok := o.GetApplicationOk() + return ok +} + +// SetApplication gets a reference to the given string and assigns it to the Application field. +func (o *MarketingApplication) SetApplication(v MarketingApplicationGetApplicationRetType) { + setMarketingApplicationGetApplicationAttributeType(&o.Application, v) +} + +// GetApplicationTitle returns the ApplicationTitle field value if set, zero value otherwise. +func (o *MarketingApplication) GetApplicationTitle() (res MarketingApplicationGetApplicationTitleRetType) { + res, _ = o.GetApplicationTitleOk() + return +} + +// GetApplicationTitleOk returns a tuple with the ApplicationTitle field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketingApplication) GetApplicationTitleOk() (ret MarketingApplicationGetApplicationTitleRetType, ok bool) { + return getMarketingApplicationGetApplicationTitleAttributeTypeOk(o.ApplicationTitle) +} + +// HasApplicationTitle returns a boolean if a field has been set. +func (o *MarketingApplication) HasApplicationTitle() bool { + _, ok := o.GetApplicationTitleOk() + return ok +} + +// SetApplicationTitle gets a reference to the given string and assigns it to the ApplicationTitle field. +func (o *MarketingApplication) SetApplicationTitle(v MarketingApplicationGetApplicationTitleRetType) { + setMarketingApplicationGetApplicationTitleAttributeType(&o.ApplicationTitle, v) +} + +// GetPosition returns the Position field value if set, zero value otherwise. +func (o *MarketingApplication) GetPosition() (res MarketingApplicationGetPositionRetType) { + res, _ = o.GetPositionOk() + return +} + +// GetPositionOk returns a tuple with the Position field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketingApplication) GetPositionOk() (ret MarketingApplicationGetPositionRetType, ok bool) { + return getMarketingApplicationGetPositionAttributeTypeOk(o.Position) +} + +// HasPosition returns a boolean if a field has been set. +func (o *MarketingApplication) HasPosition() bool { + _, ok := o.GetPositionOk() + return ok +} + +// SetPosition gets a reference to the given int64 and assigns it to the Position field. +func (o *MarketingApplication) SetPosition(v MarketingApplicationGetPositionRetType) { + setMarketingApplicationGetPositionAttributeType(&o.Position, v) +} + +func (o MarketingApplication) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getMarketingApplicationGetApplicationAttributeTypeOk(o.Application); ok { + toSerialize["Application"] = val + } + if val, ok := getMarketingApplicationGetApplicationTitleAttributeTypeOk(o.ApplicationTitle); ok { + toSerialize["ApplicationTitle"] = val + } + if val, ok := getMarketingApplicationGetPositionAttributeTypeOk(o.Position); ok { + toSerialize["Position"] = val + } + return toSerialize, nil +} + +type NullableMarketingApplication struct { + value *MarketingApplication + isSet bool +} + +func (v NullableMarketingApplication) Get() *MarketingApplication { + return v.value +} + +func (v *NullableMarketingApplication) Set(val *MarketingApplication) { + v.value = val + v.isSet = true +} + +func (v NullableMarketingApplication) IsSet() bool { + return v.isSet +} + +func (v *NullableMarketingApplication) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMarketingApplication(val *MarketingApplication) *NullableMarketingApplication { + return &NullableMarketingApplication{value: val, isSet: true} +} + +func (v NullableMarketingApplication) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMarketingApplication) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_marketing_application_test.go b/services/pim/model_marketing_application_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_marketing_application_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_marketing_function.go b/services/pim/model_marketing_function.go new file mode 100644 index 000000000..15c1f2606 --- /dev/null +++ b/services/pim/model_marketing_function.go @@ -0,0 +1,177 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the MarketingFunction type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MarketingFunction{} + +/* + types and functions for function +*/ + +// isNotNullableString +type MarketingFunctionGetFunctionAttributeType = *string + +func getMarketingFunctionGetFunctionAttributeTypeOk(arg MarketingFunctionGetFunctionAttributeType) (ret MarketingFunctionGetFunctionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMarketingFunctionGetFunctionAttributeType(arg *MarketingFunctionGetFunctionAttributeType, val MarketingFunctionGetFunctionRetType) { + *arg = &val +} + +type MarketingFunctionGetFunctionArgType = string +type MarketingFunctionGetFunctionRetType = string + +/* + types and functions for position +*/ + +// isLong +type MarketingFunctionGetPositionAttributeType = *int64 +type MarketingFunctionGetPositionArgType = int64 +type MarketingFunctionGetPositionRetType = int64 + +func getMarketingFunctionGetPositionAttributeTypeOk(arg MarketingFunctionGetPositionAttributeType) (ret MarketingFunctionGetPositionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMarketingFunctionGetPositionAttributeType(arg *MarketingFunctionGetPositionAttributeType, val MarketingFunctionGetPositionRetType) { + *arg = &val +} + +// MarketingFunction struct for MarketingFunction +type MarketingFunction struct { + // Name of the function + Function MarketingFunctionGetFunctionAttributeType `json:"function,omitempty"` + // Position of the function + Position MarketingFunctionGetPositionAttributeType `json:"position,omitempty"` +} + +// NewMarketingFunction instantiates a new MarketingFunction 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 NewMarketingFunction() *MarketingFunction { + this := MarketingFunction{} + return &this +} + +// NewMarketingFunctionWithDefaults instantiates a new MarketingFunction 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 NewMarketingFunctionWithDefaults() *MarketingFunction { + this := MarketingFunction{} + return &this +} + +// GetFunction returns the Function field value if set, zero value otherwise. +func (o *MarketingFunction) GetFunction() (res MarketingFunctionGetFunctionRetType) { + res, _ = o.GetFunctionOk() + return +} + +// GetFunctionOk returns a tuple with the Function field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketingFunction) GetFunctionOk() (ret MarketingFunctionGetFunctionRetType, ok bool) { + return getMarketingFunctionGetFunctionAttributeTypeOk(o.Function) +} + +// HasFunction returns a boolean if a field has been set. +func (o *MarketingFunction) HasFunction() bool { + _, ok := o.GetFunctionOk() + return ok +} + +// SetFunction gets a reference to the given string and assigns it to the Function field. +func (o *MarketingFunction) SetFunction(v MarketingFunctionGetFunctionRetType) { + setMarketingFunctionGetFunctionAttributeType(&o.Function, v) +} + +// GetPosition returns the Position field value if set, zero value otherwise. +func (o *MarketingFunction) GetPosition() (res MarketingFunctionGetPositionRetType) { + res, _ = o.GetPositionOk() + return +} + +// GetPositionOk returns a tuple with the Position field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MarketingFunction) GetPositionOk() (ret MarketingFunctionGetPositionRetType, ok bool) { + return getMarketingFunctionGetPositionAttributeTypeOk(o.Position) +} + +// HasPosition returns a boolean if a field has been set. +func (o *MarketingFunction) HasPosition() bool { + _, ok := o.GetPositionOk() + return ok +} + +// SetPosition gets a reference to the given int64 and assigns it to the Position field. +func (o *MarketingFunction) SetPosition(v MarketingFunctionGetPositionRetType) { + setMarketingFunctionGetPositionAttributeType(&o.Position, v) +} + +func (o MarketingFunction) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getMarketingFunctionGetFunctionAttributeTypeOk(o.Function); ok { + toSerialize["Function"] = val + } + if val, ok := getMarketingFunctionGetPositionAttributeTypeOk(o.Position); ok { + toSerialize["Position"] = val + } + return toSerialize, nil +} + +type NullableMarketingFunction struct { + value *MarketingFunction + isSet bool +} + +func (v NullableMarketingFunction) Get() *MarketingFunction { + return v.value +} + +func (v *NullableMarketingFunction) Set(val *MarketingFunction) { + v.value = val + v.isSet = true +} + +func (v NullableMarketingFunction) IsSet() bool { + return v.isSet +} + +func (v *NullableMarketingFunction) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMarketingFunction(val *MarketingFunction) *NullableMarketingFunction { + return &NullableMarketingFunction{value: val, isSet: true} +} + +func (v NullableMarketingFunction) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMarketingFunction) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_marketing_function_test.go b/services/pim/model_marketing_function_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_marketing_function_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_messaging_specific_attributes.go b/services/pim/model_messaging_specific_attributes.go new file mode 100644 index 000000000..f5d57fdac --- /dev/null +++ b/services/pim/model_messaging_specific_attributes.go @@ -0,0 +1,432 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the MessagingSpecificAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MessagingSpecificAttributes{} + +/* + types and functions for discriminator +*/ + +// isNotNullableString +type MessagingSpecificAttributesGetDiscriminatorAttributeType = *string + +func getMessagingSpecificAttributesGetDiscriminatorAttributeTypeOk(arg MessagingSpecificAttributesGetDiscriminatorAttributeType) (ret MessagingSpecificAttributesGetDiscriminatorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMessagingSpecificAttributesGetDiscriminatorAttributeType(arg *MessagingSpecificAttributesGetDiscriminatorAttributeType, val MessagingSpecificAttributesGetDiscriminatorRetType) { + *arg = &val +} + +type MessagingSpecificAttributesGetDiscriminatorArgType = string +type MessagingSpecificAttributesGetDiscriminatorRetType = string + +/* + types and functions for diskStoragePerNode +*/ + +// isNullableString +type MessagingSpecificAttributesGetDiskStoragePerNodeAttributeType = *NullableString + +func getMessagingSpecificAttributesGetDiskStoragePerNodeAttributeTypeOk(arg MessagingSpecificAttributesGetDiskStoragePerNodeAttributeType) (ret MessagingSpecificAttributesGetDiskStoragePerNodeRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setMessagingSpecificAttributesGetDiskStoragePerNodeAttributeType(arg *MessagingSpecificAttributesGetDiskStoragePerNodeAttributeType, val MessagingSpecificAttributesGetDiskStoragePerNodeRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type MessagingSpecificAttributesGetDiskStoragePerNodeArgType = *string +type MessagingSpecificAttributesGetDiskStoragePerNodeRetType = *string + +/* + types and functions for nodes +*/ + +// isLong +type MessagingSpecificAttributesGetNodesAttributeType = *int64 +type MessagingSpecificAttributesGetNodesArgType = *int64 +type MessagingSpecificAttributesGetNodesRetType = *int64 + +func getMessagingSpecificAttributesGetNodesAttributeTypeOk(arg MessagingSpecificAttributesGetNodesAttributeType) (ret MessagingSpecificAttributesGetNodesRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setMessagingSpecificAttributesGetNodesAttributeType(arg *MessagingSpecificAttributesGetNodesAttributeType, val MessagingSpecificAttributesGetNodesRetType) { + *arg = val +} + +/* + types and functions for ram +*/ + +// isFloat +type MessagingSpecificAttributesGetRamAttributeType = *float64 +type MessagingSpecificAttributesGetRamArgType = *float64 +type MessagingSpecificAttributesGetRamRetType = *float64 + +func getMessagingSpecificAttributesGetRamAttributeTypeOk(arg MessagingSpecificAttributesGetRamAttributeType) (ret MessagingSpecificAttributesGetRamRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setMessagingSpecificAttributesGetRamAttributeType(arg *MessagingSpecificAttributesGetRamAttributeType, val MessagingSpecificAttributesGetRamRetType) { + *arg = val +} + +/* + types and functions for type +*/ + +// isNullableString +type MessagingSpecificAttributesGetTypeAttributeType = *NullableString + +func getMessagingSpecificAttributesGetTypeAttributeTypeOk(arg MessagingSpecificAttributesGetTypeAttributeType) (ret MessagingSpecificAttributesGetTypeRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setMessagingSpecificAttributesGetTypeAttributeType(arg *MessagingSpecificAttributesGetTypeAttributeType, val MessagingSpecificAttributesGetTypeRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type MessagingSpecificAttributesGetTypeArgType = *string +type MessagingSpecificAttributesGetTypeRetType = *string + +/* + types and functions for vCPU +*/ + +// isLong +type MessagingSpecificAttributesGetVCPUAttributeType = *int64 +type MessagingSpecificAttributesGetVCPUArgType = *int64 +type MessagingSpecificAttributesGetVCPURetType = *int64 + +func getMessagingSpecificAttributesGetVCPUAttributeTypeOk(arg MessagingSpecificAttributesGetVCPUAttributeType) (ret MessagingSpecificAttributesGetVCPURetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setMessagingSpecificAttributesGetVCPUAttributeType(arg *MessagingSpecificAttributesGetVCPUAttributeType, val MessagingSpecificAttributesGetVCPURetType) { + *arg = val +} + +// MessagingSpecificAttributes struct for MessagingSpecificAttributes +type MessagingSpecificAttributes struct { + // REQUIRED + Discriminator MessagingSpecificAttributesGetDiscriminatorAttributeType `json:"discriminator" required:"true"` + // diskStoragePerNode + DiskStoragePerNode MessagingSpecificAttributesGetDiskStoragePerNodeAttributeType `json:"diskStoragePerNode,omitempty"` + // Nodes + Nodes MessagingSpecificAttributesGetNodesAttributeType `json:"nodes,omitempty"` + // RAM (in GB) + // Can be cast to float32 without loss of precision. + Ram MessagingSpecificAttributesGetRamAttributeType `json:"ram,omitempty"` + // Type (e.g. `single`, `replica`) + Type MessagingSpecificAttributesGetTypeAttributeType `json:"type,omitempty"` + // Number of vCPU + VCPU MessagingSpecificAttributesGetVCPUAttributeType `json:"vCPU,omitempty"` +} + +type _MessagingSpecificAttributes MessagingSpecificAttributes + +// NewMessagingSpecificAttributes instantiates a new MessagingSpecificAttributes 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 NewMessagingSpecificAttributes(discriminator MessagingSpecificAttributesGetDiscriminatorArgType) *MessagingSpecificAttributes { + this := MessagingSpecificAttributes{} + setMessagingSpecificAttributesGetDiscriminatorAttributeType(&this.Discriminator, discriminator) + return &this +} + +// NewMessagingSpecificAttributesWithDefaults instantiates a new MessagingSpecificAttributes 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 NewMessagingSpecificAttributesWithDefaults() *MessagingSpecificAttributes { + this := MessagingSpecificAttributes{} + return &this +} + +// GetDiscriminator returns the Discriminator field value +func (o *MessagingSpecificAttributes) GetDiscriminator() (ret MessagingSpecificAttributesGetDiscriminatorRetType) { + ret, _ = o.GetDiscriminatorOk() + return ret +} + +// GetDiscriminatorOk returns a tuple with the Discriminator field value +// and a boolean to check if the value has been set. +func (o *MessagingSpecificAttributes) GetDiscriminatorOk() (ret MessagingSpecificAttributesGetDiscriminatorRetType, ok bool) { + return getMessagingSpecificAttributesGetDiscriminatorAttributeTypeOk(o.Discriminator) +} + +// SetDiscriminator sets field value +func (o *MessagingSpecificAttributes) SetDiscriminator(v MessagingSpecificAttributesGetDiscriminatorRetType) { + setMessagingSpecificAttributesGetDiscriminatorAttributeType(&o.Discriminator, v) +} + +// GetDiskStoragePerNode returns the DiskStoragePerNode field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MessagingSpecificAttributes) GetDiskStoragePerNode() (res MessagingSpecificAttributesGetDiskStoragePerNodeRetType) { + res, _ = o.GetDiskStoragePerNodeOk() + return +} + +// GetDiskStoragePerNodeOk returns a tuple with the DiskStoragePerNode field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MessagingSpecificAttributes) GetDiskStoragePerNodeOk() (ret MessagingSpecificAttributesGetDiskStoragePerNodeRetType, ok bool) { + return getMessagingSpecificAttributesGetDiskStoragePerNodeAttributeTypeOk(o.DiskStoragePerNode) +} + +// HasDiskStoragePerNode returns a boolean if a field has been set. +func (o *MessagingSpecificAttributes) HasDiskStoragePerNode() bool { + _, ok := o.GetDiskStoragePerNodeOk() + return ok +} + +// SetDiskStoragePerNode gets a reference to the given string and assigns it to the DiskStoragePerNode field. +func (o *MessagingSpecificAttributes) SetDiskStoragePerNode(v MessagingSpecificAttributesGetDiskStoragePerNodeRetType) { + setMessagingSpecificAttributesGetDiskStoragePerNodeAttributeType(&o.DiskStoragePerNode, v) +} + +// SetDiskStoragePerNodeNil sets the value for DiskStoragePerNode to be an explicit nil +func (o *MessagingSpecificAttributes) SetDiskStoragePerNodeNil() { + o.DiskStoragePerNode = nil +} + +// UnsetDiskStoragePerNode ensures that no value is present for DiskStoragePerNode, not even an explicit nil +func (o *MessagingSpecificAttributes) UnsetDiskStoragePerNode() { + o.DiskStoragePerNode = nil +} + +// GetNodes returns the Nodes field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MessagingSpecificAttributes) GetNodes() (res MessagingSpecificAttributesGetNodesRetType) { + res, _ = o.GetNodesOk() + return +} + +// GetNodesOk returns a tuple with the Nodes field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MessagingSpecificAttributes) GetNodesOk() (ret MessagingSpecificAttributesGetNodesRetType, ok bool) { + return getMessagingSpecificAttributesGetNodesAttributeTypeOk(o.Nodes) +} + +// HasNodes returns a boolean if a field has been set. +func (o *MessagingSpecificAttributes) HasNodes() bool { + _, ok := o.GetNodesOk() + return ok +} + +// SetNodes gets a reference to the given int64 and assigns it to the Nodes field. +func (o *MessagingSpecificAttributes) SetNodes(v MessagingSpecificAttributesGetNodesRetType) { + setMessagingSpecificAttributesGetNodesAttributeType(&o.Nodes, v) +} + +// SetNodesNil sets the value for Nodes to be an explicit nil +func (o *MessagingSpecificAttributes) SetNodesNil() { + o.Nodes = nil +} + +// UnsetNodes ensures that no value is present for Nodes, not even an explicit nil +func (o *MessagingSpecificAttributes) UnsetNodes() { + o.Nodes = nil +} + +// GetRam returns the Ram field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MessagingSpecificAttributes) GetRam() (res MessagingSpecificAttributesGetRamRetType) { + res, _ = o.GetRamOk() + return +} + +// GetRamOk returns a tuple with the Ram field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MessagingSpecificAttributes) GetRamOk() (ret MessagingSpecificAttributesGetRamRetType, ok bool) { + return getMessagingSpecificAttributesGetRamAttributeTypeOk(o.Ram) +} + +// HasRam returns a boolean if a field has been set. +func (o *MessagingSpecificAttributes) HasRam() bool { + _, ok := o.GetRamOk() + return ok +} + +// SetRam gets a reference to the given float64 and assigns it to the Ram field. +func (o *MessagingSpecificAttributes) SetRam(v MessagingSpecificAttributesGetRamRetType) { + setMessagingSpecificAttributesGetRamAttributeType(&o.Ram, v) +} + +// SetRamNil sets the value for Ram to be an explicit nil +func (o *MessagingSpecificAttributes) SetRamNil() { + o.Ram = nil +} + +// UnsetRam ensures that no value is present for Ram, not even an explicit nil +func (o *MessagingSpecificAttributes) UnsetRam() { + o.Ram = nil +} + +// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MessagingSpecificAttributes) GetType() (res MessagingSpecificAttributesGetTypeRetType) { + 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. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MessagingSpecificAttributes) GetTypeOk() (ret MessagingSpecificAttributesGetTypeRetType, ok bool) { + return getMessagingSpecificAttributesGetTypeAttributeTypeOk(o.Type) +} + +// HasType returns a boolean if a field has been set. +func (o *MessagingSpecificAttributes) HasType() bool { + _, ok := o.GetTypeOk() + return ok +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *MessagingSpecificAttributes) SetType(v MessagingSpecificAttributesGetTypeRetType) { + setMessagingSpecificAttributesGetTypeAttributeType(&o.Type, v) +} + +// SetTypeNil sets the value for Type to be an explicit nil +func (o *MessagingSpecificAttributes) SetTypeNil() { + o.Type = nil +} + +// UnsetType ensures that no value is present for Type, not even an explicit nil +func (o *MessagingSpecificAttributes) UnsetType() { + o.Type = nil +} + +// GetVCPU returns the VCPU field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MessagingSpecificAttributes) GetVCPU() (res MessagingSpecificAttributesGetVCPURetType) { + res, _ = o.GetVCPUOk() + return +} + +// GetVCPUOk returns a tuple with the VCPU field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MessagingSpecificAttributes) GetVCPUOk() (ret MessagingSpecificAttributesGetVCPURetType, ok bool) { + return getMessagingSpecificAttributesGetVCPUAttributeTypeOk(o.VCPU) +} + +// HasVCPU returns a boolean if a field has been set. +func (o *MessagingSpecificAttributes) HasVCPU() bool { + _, ok := o.GetVCPUOk() + return ok +} + +// SetVCPU gets a reference to the given int64 and assigns it to the VCPU field. +func (o *MessagingSpecificAttributes) SetVCPU(v MessagingSpecificAttributesGetVCPURetType) { + setMessagingSpecificAttributesGetVCPUAttributeType(&o.VCPU, v) +} + +// SetVCPUNil sets the value for VCPU to be an explicit nil +func (o *MessagingSpecificAttributes) SetVCPUNil() { + o.VCPU = nil +} + +// UnsetVCPU ensures that no value is present for VCPU, not even an explicit nil +func (o *MessagingSpecificAttributes) UnsetVCPU() { + o.VCPU = nil +} + +func (o MessagingSpecificAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getMessagingSpecificAttributesGetDiscriminatorAttributeTypeOk(o.Discriminator); ok { + toSerialize["Discriminator"] = val + } + if val, ok := getMessagingSpecificAttributesGetDiskStoragePerNodeAttributeTypeOk(o.DiskStoragePerNode); ok { + toSerialize["DiskStoragePerNode"] = val + } + if val, ok := getMessagingSpecificAttributesGetNodesAttributeTypeOk(o.Nodes); ok { + toSerialize["Nodes"] = val + } + if val, ok := getMessagingSpecificAttributesGetRamAttributeTypeOk(o.Ram); ok { + toSerialize["Ram"] = val + } + if val, ok := getMessagingSpecificAttributesGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + if val, ok := getMessagingSpecificAttributesGetVCPUAttributeTypeOk(o.VCPU); ok { + toSerialize["VCPU"] = val + } + return toSerialize, nil +} + +type NullableMessagingSpecificAttributes struct { + value *MessagingSpecificAttributes + isSet bool +} + +func (v NullableMessagingSpecificAttributes) Get() *MessagingSpecificAttributes { + return v.value +} + +func (v *NullableMessagingSpecificAttributes) Set(val *MessagingSpecificAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableMessagingSpecificAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableMessagingSpecificAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMessagingSpecificAttributes(val *MessagingSpecificAttributes) *NullableMessagingSpecificAttributes { + return &NullableMessagingSpecificAttributes{value: val, isSet: true} +} + +func (v NullableMessagingSpecificAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMessagingSpecificAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_messaging_specific_attributes_test.go b/services/pim/model_messaging_specific_attributes_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_messaging_specific_attributes_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_meta_information.go b/services/pim/model_meta_information.go new file mode 100644 index 000000000..2a647d787 --- /dev/null +++ b/services/pim/model_meta_information.go @@ -0,0 +1,177 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the MetaInformation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MetaInformation{} + +/* + types and functions for nextCursor +*/ + +// isNotNullableString +type MetaInformationGetNextCursorAttributeType = *string + +func getMetaInformationGetNextCursorAttributeTypeOk(arg MetaInformationGetNextCursorAttributeType) (ret MetaInformationGetNextCursorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMetaInformationGetNextCursorAttributeType(arg *MetaInformationGetNextCursorAttributeType, val MetaInformationGetNextCursorRetType) { + *arg = &val +} + +type MetaInformationGetNextCursorArgType = string +type MetaInformationGetNextCursorRetType = string + +/* + types and functions for pageSize +*/ + +// isLong +type MetaInformationGetPageSizeAttributeType = *int64 +type MetaInformationGetPageSizeArgType = int64 +type MetaInformationGetPageSizeRetType = int64 + +func getMetaInformationGetPageSizeAttributeTypeOk(arg MetaInformationGetPageSizeAttributeType) (ret MetaInformationGetPageSizeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setMetaInformationGetPageSizeAttributeType(arg *MetaInformationGetPageSizeAttributeType, val MetaInformationGetPageSizeRetType) { + *arg = &val +} + +// MetaInformation struct for MetaInformation +type MetaInformation struct { + // The cursor base64 encoded is used to retrieve the next page of results + NextCursor MetaInformationGetNextCursorAttributeType `json:"nextCursor,omitempty"` + // The number of items per page + PageSize MetaInformationGetPageSizeAttributeType `json:"pageSize,omitempty"` +} + +// NewMetaInformation instantiates a new MetaInformation 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 NewMetaInformation() *MetaInformation { + this := MetaInformation{} + return &this +} + +// NewMetaInformationWithDefaults instantiates a new MetaInformation 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 NewMetaInformationWithDefaults() *MetaInformation { + this := MetaInformation{} + return &this +} + +// GetNextCursor returns the NextCursor field value if set, zero value otherwise. +func (o *MetaInformation) GetNextCursor() (res MetaInformationGetNextCursorRetType) { + res, _ = o.GetNextCursorOk() + return +} + +// GetNextCursorOk returns a tuple with the NextCursor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MetaInformation) GetNextCursorOk() (ret MetaInformationGetNextCursorRetType, ok bool) { + return getMetaInformationGetNextCursorAttributeTypeOk(o.NextCursor) +} + +// HasNextCursor returns a boolean if a field has been set. +func (o *MetaInformation) HasNextCursor() bool { + _, ok := o.GetNextCursorOk() + return ok +} + +// SetNextCursor gets a reference to the given string and assigns it to the NextCursor field. +func (o *MetaInformation) SetNextCursor(v MetaInformationGetNextCursorRetType) { + setMetaInformationGetNextCursorAttributeType(&o.NextCursor, v) +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *MetaInformation) GetPageSize() (res MetaInformationGetPageSizeRetType) { + res, _ = o.GetPageSizeOk() + return +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MetaInformation) GetPageSizeOk() (ret MetaInformationGetPageSizeRetType, ok bool) { + return getMetaInformationGetPageSizeAttributeTypeOk(o.PageSize) +} + +// HasPageSize returns a boolean if a field has been set. +func (o *MetaInformation) HasPageSize() bool { + _, ok := o.GetPageSizeOk() + return ok +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *MetaInformation) SetPageSize(v MetaInformationGetPageSizeRetType) { + setMetaInformationGetPageSizeAttributeType(&o.PageSize, v) +} + +func (o MetaInformation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getMetaInformationGetNextCursorAttributeTypeOk(o.NextCursor); ok { + toSerialize["NextCursor"] = val + } + if val, ok := getMetaInformationGetPageSizeAttributeTypeOk(o.PageSize); ok { + toSerialize["PageSize"] = val + } + return toSerialize, nil +} + +type NullableMetaInformation struct { + value *MetaInformation + isSet bool +} + +func (v NullableMetaInformation) Get() *MetaInformation { + return v.value +} + +func (v *NullableMetaInformation) Set(val *MetaInformation) { + v.value = val + v.isSet = true +} + +func (v NullableMetaInformation) IsSet() bool { + return v.isSet +} + +func (v *NullableMetaInformation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMetaInformation(val *MetaInformation) *NullableMetaInformation { + return &NullableMetaInformation{value: val, isSet: true} +} + +func (v NullableMetaInformation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMetaInformation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_meta_information_test.go b/services/pim/model_meta_information_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_meta_information_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_network_specific_attributes.go b/services/pim/model_network_specific_attributes.go new file mode 100644 index 000000000..02ef31184 --- /dev/null +++ b/services/pim/model_network_specific_attributes.go @@ -0,0 +1,428 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the NetworkSpecificAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NetworkSpecificAttributes{} + +/* + types and functions for connectionLimitPerLoadBalancer +*/ + +// isFloat +type NetworkSpecificAttributesGetConnectionLimitPerLoadBalancerAttributeType = *float64 +type NetworkSpecificAttributesGetConnectionLimitPerLoadBalancerArgType = *float64 +type NetworkSpecificAttributesGetConnectionLimitPerLoadBalancerRetType = *float64 + +func getNetworkSpecificAttributesGetConnectionLimitPerLoadBalancerAttributeTypeOk(arg NetworkSpecificAttributesGetConnectionLimitPerLoadBalancerAttributeType) (ret NetworkSpecificAttributesGetConnectionLimitPerLoadBalancerRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setNetworkSpecificAttributesGetConnectionLimitPerLoadBalancerAttributeType(arg *NetworkSpecificAttributesGetConnectionLimitPerLoadBalancerAttributeType, val NetworkSpecificAttributesGetConnectionLimitPerLoadBalancerRetType) { + *arg = val +} + +/* + types and functions for discriminator +*/ + +// isNotNullableString +type NetworkSpecificAttributesGetDiscriminatorAttributeType = *string + +func getNetworkSpecificAttributesGetDiscriminatorAttributeTypeOk(arg NetworkSpecificAttributesGetDiscriminatorAttributeType) (ret NetworkSpecificAttributesGetDiscriminatorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setNetworkSpecificAttributesGetDiscriminatorAttributeType(arg *NetworkSpecificAttributesGetDiscriminatorAttributeType, val NetworkSpecificAttributesGetDiscriminatorRetType) { + *arg = &val +} + +type NetworkSpecificAttributesGetDiscriminatorArgType = string +type NetworkSpecificAttributesGetDiscriminatorRetType = string + +/* + types and functions for maxBandWidth +*/ + +// isLong +type NetworkSpecificAttributesGetMaxBandWidthAttributeType = *int64 +type NetworkSpecificAttributesGetMaxBandWidthArgType = *int64 +type NetworkSpecificAttributesGetMaxBandWidthRetType = *int64 + +func getNetworkSpecificAttributesGetMaxBandWidthAttributeTypeOk(arg NetworkSpecificAttributesGetMaxBandWidthAttributeType) (ret NetworkSpecificAttributesGetMaxBandWidthRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setNetworkSpecificAttributesGetMaxBandWidthAttributeType(arg *NetworkSpecificAttributesGetMaxBandWidthAttributeType, val NetworkSpecificAttributesGetMaxBandWidthRetType) { + *arg = val +} + +/* + types and functions for maxConnections +*/ + +// isLong +type NetworkSpecificAttributesGetMaxConnectionsAttributeType = *int64 +type NetworkSpecificAttributesGetMaxConnectionsArgType = *int64 +type NetworkSpecificAttributesGetMaxConnectionsRetType = *int64 + +func getNetworkSpecificAttributesGetMaxConnectionsAttributeTypeOk(arg NetworkSpecificAttributesGetMaxConnectionsAttributeType) (ret NetworkSpecificAttributesGetMaxConnectionsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setNetworkSpecificAttributesGetMaxConnectionsAttributeType(arg *NetworkSpecificAttributesGetMaxConnectionsAttributeType, val NetworkSpecificAttributesGetMaxConnectionsRetType) { + *arg = val +} + +/* + types and functions for planId +*/ + +// isNullableString +type NetworkSpecificAttributesGetPlanIdAttributeType = *NullableString + +func getNetworkSpecificAttributesGetPlanIdAttributeTypeOk(arg NetworkSpecificAttributesGetPlanIdAttributeType) (ret NetworkSpecificAttributesGetPlanIdRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setNetworkSpecificAttributesGetPlanIdAttributeType(arg *NetworkSpecificAttributesGetPlanIdAttributeType, val NetworkSpecificAttributesGetPlanIdRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type NetworkSpecificAttributesGetPlanIdArgType = *string +type NetworkSpecificAttributesGetPlanIdRetType = *string + +/* + types and functions for recordLimitPerZone +*/ + +// isFloat +type NetworkSpecificAttributesGetRecordLimitPerZoneAttributeType = *float64 +type NetworkSpecificAttributesGetRecordLimitPerZoneArgType = *float64 +type NetworkSpecificAttributesGetRecordLimitPerZoneRetType = *float64 + +func getNetworkSpecificAttributesGetRecordLimitPerZoneAttributeTypeOk(arg NetworkSpecificAttributesGetRecordLimitPerZoneAttributeType) (ret NetworkSpecificAttributesGetRecordLimitPerZoneRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setNetworkSpecificAttributesGetRecordLimitPerZoneAttributeType(arg *NetworkSpecificAttributesGetRecordLimitPerZoneAttributeType, val NetworkSpecificAttributesGetRecordLimitPerZoneRetType) { + *arg = val +} + +// NetworkSpecificAttributes struct for NetworkSpecificAttributes +type NetworkSpecificAttributes struct { + // Connection limit per Load Balancer + // Can be cast to float32 without loss of precision. + ConnectionLimitPerLoadBalancer NetworkSpecificAttributesGetConnectionLimitPerLoadBalancerAttributeType `json:"connectionLimitPerLoadBalancer,omitempty"` + // REQUIRED + Discriminator NetworkSpecificAttributesGetDiscriminatorAttributeType `json:"discriminator" required:"true"` + // Maximum Bandwidth + MaxBandWidth NetworkSpecificAttributesGetMaxBandWidthAttributeType `json:"maxBandWidth,omitempty"` + // Maximum Connections + MaxConnections NetworkSpecificAttributesGetMaxConnectionsAttributeType `json:"maxConnections,omitempty"` + // Plan ID + PlanId NetworkSpecificAttributesGetPlanIdAttributeType `json:"planId,omitempty"` + // Record limit per zone + // Can be cast to float32 without loss of precision. + RecordLimitPerZone NetworkSpecificAttributesGetRecordLimitPerZoneAttributeType `json:"recordLimitPerZone,omitempty"` +} + +type _NetworkSpecificAttributes NetworkSpecificAttributes + +// NewNetworkSpecificAttributes instantiates a new NetworkSpecificAttributes 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 NewNetworkSpecificAttributes(discriminator NetworkSpecificAttributesGetDiscriminatorArgType) *NetworkSpecificAttributes { + this := NetworkSpecificAttributes{} + setNetworkSpecificAttributesGetDiscriminatorAttributeType(&this.Discriminator, discriminator) + return &this +} + +// NewNetworkSpecificAttributesWithDefaults instantiates a new NetworkSpecificAttributes 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 NewNetworkSpecificAttributesWithDefaults() *NetworkSpecificAttributes { + this := NetworkSpecificAttributes{} + return &this +} + +// GetConnectionLimitPerLoadBalancer returns the ConnectionLimitPerLoadBalancer field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *NetworkSpecificAttributes) GetConnectionLimitPerLoadBalancer() (res NetworkSpecificAttributesGetConnectionLimitPerLoadBalancerRetType) { + res, _ = o.GetConnectionLimitPerLoadBalancerOk() + return +} + +// GetConnectionLimitPerLoadBalancerOk returns a tuple with the ConnectionLimitPerLoadBalancer field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NetworkSpecificAttributes) GetConnectionLimitPerLoadBalancerOk() (ret NetworkSpecificAttributesGetConnectionLimitPerLoadBalancerRetType, ok bool) { + return getNetworkSpecificAttributesGetConnectionLimitPerLoadBalancerAttributeTypeOk(o.ConnectionLimitPerLoadBalancer) +} + +// HasConnectionLimitPerLoadBalancer returns a boolean if a field has been set. +func (o *NetworkSpecificAttributes) HasConnectionLimitPerLoadBalancer() bool { + _, ok := o.GetConnectionLimitPerLoadBalancerOk() + return ok +} + +// SetConnectionLimitPerLoadBalancer gets a reference to the given float64 and assigns it to the ConnectionLimitPerLoadBalancer field. +func (o *NetworkSpecificAttributes) SetConnectionLimitPerLoadBalancer(v NetworkSpecificAttributesGetConnectionLimitPerLoadBalancerRetType) { + setNetworkSpecificAttributesGetConnectionLimitPerLoadBalancerAttributeType(&o.ConnectionLimitPerLoadBalancer, v) +} + +// SetConnectionLimitPerLoadBalancerNil sets the value for ConnectionLimitPerLoadBalancer to be an explicit nil +func (o *NetworkSpecificAttributes) SetConnectionLimitPerLoadBalancerNil() { + o.ConnectionLimitPerLoadBalancer = nil +} + +// UnsetConnectionLimitPerLoadBalancer ensures that no value is present for ConnectionLimitPerLoadBalancer, not even an explicit nil +func (o *NetworkSpecificAttributes) UnsetConnectionLimitPerLoadBalancer() { + o.ConnectionLimitPerLoadBalancer = nil +} + +// GetDiscriminator returns the Discriminator field value +func (o *NetworkSpecificAttributes) GetDiscriminator() (ret NetworkSpecificAttributesGetDiscriminatorRetType) { + ret, _ = o.GetDiscriminatorOk() + return ret +} + +// GetDiscriminatorOk returns a tuple with the Discriminator field value +// and a boolean to check if the value has been set. +func (o *NetworkSpecificAttributes) GetDiscriminatorOk() (ret NetworkSpecificAttributesGetDiscriminatorRetType, ok bool) { + return getNetworkSpecificAttributesGetDiscriminatorAttributeTypeOk(o.Discriminator) +} + +// SetDiscriminator sets field value +func (o *NetworkSpecificAttributes) SetDiscriminator(v NetworkSpecificAttributesGetDiscriminatorRetType) { + setNetworkSpecificAttributesGetDiscriminatorAttributeType(&o.Discriminator, v) +} + +// GetMaxBandWidth returns the MaxBandWidth field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *NetworkSpecificAttributes) GetMaxBandWidth() (res NetworkSpecificAttributesGetMaxBandWidthRetType) { + res, _ = o.GetMaxBandWidthOk() + return +} + +// GetMaxBandWidthOk returns a tuple with the MaxBandWidth field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NetworkSpecificAttributes) GetMaxBandWidthOk() (ret NetworkSpecificAttributesGetMaxBandWidthRetType, ok bool) { + return getNetworkSpecificAttributesGetMaxBandWidthAttributeTypeOk(o.MaxBandWidth) +} + +// HasMaxBandWidth returns a boolean if a field has been set. +func (o *NetworkSpecificAttributes) HasMaxBandWidth() bool { + _, ok := o.GetMaxBandWidthOk() + return ok +} + +// SetMaxBandWidth gets a reference to the given int64 and assigns it to the MaxBandWidth field. +func (o *NetworkSpecificAttributes) SetMaxBandWidth(v NetworkSpecificAttributesGetMaxBandWidthRetType) { + setNetworkSpecificAttributesGetMaxBandWidthAttributeType(&o.MaxBandWidth, v) +} + +// SetMaxBandWidthNil sets the value for MaxBandWidth to be an explicit nil +func (o *NetworkSpecificAttributes) SetMaxBandWidthNil() { + o.MaxBandWidth = nil +} + +// UnsetMaxBandWidth ensures that no value is present for MaxBandWidth, not even an explicit nil +func (o *NetworkSpecificAttributes) UnsetMaxBandWidth() { + o.MaxBandWidth = nil +} + +// GetMaxConnections returns the MaxConnections field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *NetworkSpecificAttributes) GetMaxConnections() (res NetworkSpecificAttributesGetMaxConnectionsRetType) { + res, _ = o.GetMaxConnectionsOk() + return +} + +// GetMaxConnectionsOk returns a tuple with the MaxConnections field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NetworkSpecificAttributes) GetMaxConnectionsOk() (ret NetworkSpecificAttributesGetMaxConnectionsRetType, ok bool) { + return getNetworkSpecificAttributesGetMaxConnectionsAttributeTypeOk(o.MaxConnections) +} + +// HasMaxConnections returns a boolean if a field has been set. +func (o *NetworkSpecificAttributes) HasMaxConnections() bool { + _, ok := o.GetMaxConnectionsOk() + return ok +} + +// SetMaxConnections gets a reference to the given int64 and assigns it to the MaxConnections field. +func (o *NetworkSpecificAttributes) SetMaxConnections(v NetworkSpecificAttributesGetMaxConnectionsRetType) { + setNetworkSpecificAttributesGetMaxConnectionsAttributeType(&o.MaxConnections, v) +} + +// SetMaxConnectionsNil sets the value for MaxConnections to be an explicit nil +func (o *NetworkSpecificAttributes) SetMaxConnectionsNil() { + o.MaxConnections = nil +} + +// UnsetMaxConnections ensures that no value is present for MaxConnections, not even an explicit nil +func (o *NetworkSpecificAttributes) UnsetMaxConnections() { + o.MaxConnections = nil +} + +// GetPlanId returns the PlanId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *NetworkSpecificAttributes) GetPlanId() (res NetworkSpecificAttributesGetPlanIdRetType) { + res, _ = o.GetPlanIdOk() + return +} + +// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NetworkSpecificAttributes) GetPlanIdOk() (ret NetworkSpecificAttributesGetPlanIdRetType, ok bool) { + return getNetworkSpecificAttributesGetPlanIdAttributeTypeOk(o.PlanId) +} + +// HasPlanId returns a boolean if a field has been set. +func (o *NetworkSpecificAttributes) HasPlanId() bool { + _, ok := o.GetPlanIdOk() + return ok +} + +// SetPlanId gets a reference to the given string and assigns it to the PlanId field. +func (o *NetworkSpecificAttributes) SetPlanId(v NetworkSpecificAttributesGetPlanIdRetType) { + setNetworkSpecificAttributesGetPlanIdAttributeType(&o.PlanId, v) +} + +// SetPlanIdNil sets the value for PlanId to be an explicit nil +func (o *NetworkSpecificAttributes) SetPlanIdNil() { + o.PlanId = nil +} + +// UnsetPlanId ensures that no value is present for PlanId, not even an explicit nil +func (o *NetworkSpecificAttributes) UnsetPlanId() { + o.PlanId = nil +} + +// GetRecordLimitPerZone returns the RecordLimitPerZone field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *NetworkSpecificAttributes) GetRecordLimitPerZone() (res NetworkSpecificAttributesGetRecordLimitPerZoneRetType) { + res, _ = o.GetRecordLimitPerZoneOk() + return +} + +// GetRecordLimitPerZoneOk returns a tuple with the RecordLimitPerZone field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NetworkSpecificAttributes) GetRecordLimitPerZoneOk() (ret NetworkSpecificAttributesGetRecordLimitPerZoneRetType, ok bool) { + return getNetworkSpecificAttributesGetRecordLimitPerZoneAttributeTypeOk(o.RecordLimitPerZone) +} + +// HasRecordLimitPerZone returns a boolean if a field has been set. +func (o *NetworkSpecificAttributes) HasRecordLimitPerZone() bool { + _, ok := o.GetRecordLimitPerZoneOk() + return ok +} + +// SetRecordLimitPerZone gets a reference to the given float64 and assigns it to the RecordLimitPerZone field. +func (o *NetworkSpecificAttributes) SetRecordLimitPerZone(v NetworkSpecificAttributesGetRecordLimitPerZoneRetType) { + setNetworkSpecificAttributesGetRecordLimitPerZoneAttributeType(&o.RecordLimitPerZone, v) +} + +// SetRecordLimitPerZoneNil sets the value for RecordLimitPerZone to be an explicit nil +func (o *NetworkSpecificAttributes) SetRecordLimitPerZoneNil() { + o.RecordLimitPerZone = nil +} + +// UnsetRecordLimitPerZone ensures that no value is present for RecordLimitPerZone, not even an explicit nil +func (o *NetworkSpecificAttributes) UnsetRecordLimitPerZone() { + o.RecordLimitPerZone = nil +} + +func (o NetworkSpecificAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getNetworkSpecificAttributesGetConnectionLimitPerLoadBalancerAttributeTypeOk(o.ConnectionLimitPerLoadBalancer); ok { + toSerialize["ConnectionLimitPerLoadBalancer"] = val + } + if val, ok := getNetworkSpecificAttributesGetDiscriminatorAttributeTypeOk(o.Discriminator); ok { + toSerialize["Discriminator"] = val + } + if val, ok := getNetworkSpecificAttributesGetMaxBandWidthAttributeTypeOk(o.MaxBandWidth); ok { + toSerialize["MaxBandWidth"] = val + } + if val, ok := getNetworkSpecificAttributesGetMaxConnectionsAttributeTypeOk(o.MaxConnections); ok { + toSerialize["MaxConnections"] = val + } + if val, ok := getNetworkSpecificAttributesGetPlanIdAttributeTypeOk(o.PlanId); ok { + toSerialize["PlanId"] = val + } + if val, ok := getNetworkSpecificAttributesGetRecordLimitPerZoneAttributeTypeOk(o.RecordLimitPerZone); ok { + toSerialize["RecordLimitPerZone"] = val + } + return toSerialize, nil +} + +type NullableNetworkSpecificAttributes struct { + value *NetworkSpecificAttributes + isSet bool +} + +func (v NullableNetworkSpecificAttributes) Get() *NetworkSpecificAttributes { + return v.value +} + +func (v *NullableNetworkSpecificAttributes) Set(val *NetworkSpecificAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkSpecificAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkSpecificAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkSpecificAttributes(val *NetworkSpecificAttributes) *NullableNetworkSpecificAttributes { + return &NullableNetworkSpecificAttributes{value: val, isSet: true} +} + +func (v NullableNetworkSpecificAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkSpecificAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_network_specific_attributes_test.go b/services/pim/model_network_specific_attributes_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_network_specific_attributes_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_price.go b/services/pim/model_price.go new file mode 100644 index 000000000..ef1683ed8 --- /dev/null +++ b/services/pim/model_price.go @@ -0,0 +1,492 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" + "time" +) + +// checks if the Price type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Price{} + +/* + types and functions for currencyCode +*/ + +// isEnumRef +type PriceGetCurrencyCodeAttributeType = *CurrencyCodes +type PriceGetCurrencyCodeArgType = CurrencyCodes +type PriceGetCurrencyCodeRetType = CurrencyCodes + +func getPriceGetCurrencyCodeAttributeTypeOk(arg PriceGetCurrencyCodeAttributeType) (ret PriceGetCurrencyCodeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPriceGetCurrencyCodeAttributeType(arg *PriceGetCurrencyCodeAttributeType, val PriceGetCurrencyCodeRetType) { + *arg = &val +} + +/* + types and functions for currencySymbol +*/ + +// isEnumRef +type PriceGetCurrencySymbolAttributeType = *NullableCurrencySymbols +type PriceGetCurrencySymbolArgType = *NullableCurrencySymbols +type PriceGetCurrencySymbolRetType = *NullableCurrencySymbols + +func getPriceGetCurrencySymbolAttributeTypeOk(arg PriceGetCurrencySymbolAttributeType) (ret PriceGetCurrencySymbolRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setPriceGetCurrencySymbolAttributeType(arg *PriceGetCurrencySymbolAttributeType, val PriceGetCurrencySymbolRetType) { + *arg = val +} + +/* + types and functions for monthlyPrice +*/ + +// isNullableString +type PriceGetMonthlyPriceAttributeType = *NullableString + +func getPriceGetMonthlyPriceAttributeTypeOk(arg PriceGetMonthlyPriceAttributeType) (ret PriceGetMonthlyPriceRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPriceGetMonthlyPriceAttributeType(arg *PriceGetMonthlyPriceAttributeType, val PriceGetMonthlyPriceRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PriceGetMonthlyPriceArgType = *string +type PriceGetMonthlyPriceRetType = *string + +/* + types and functions for roundedMonthlyPrice +*/ + +// isNotNullableString +type PriceGetRoundedMonthlyPriceAttributeType = *string + +func getPriceGetRoundedMonthlyPriceAttributeTypeOk(arg PriceGetRoundedMonthlyPriceAttributeType) (ret PriceGetRoundedMonthlyPriceRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPriceGetRoundedMonthlyPriceAttributeType(arg *PriceGetRoundedMonthlyPriceAttributeType, val PriceGetRoundedMonthlyPriceRetType) { + *arg = &val +} + +type PriceGetRoundedMonthlyPriceArgType = string +type PriceGetRoundedMonthlyPriceRetType = string + +/* + types and functions for roundedValue +*/ + +// isNotNullableString +type PriceGetRoundedValueAttributeType = *string + +func getPriceGetRoundedValueAttributeTypeOk(arg PriceGetRoundedValueAttributeType) (ret PriceGetRoundedValueRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPriceGetRoundedValueAttributeType(arg *PriceGetRoundedValueAttributeType, val PriceGetRoundedValueRetType) { + *arg = &val +} + +type PriceGetRoundedValueArgType = string +type PriceGetRoundedValueRetType = string + +/* + types and functions for validFrom +*/ + +// isDateTime +type PriceGetValidFromAttributeType = *time.Time +type PriceGetValidFromArgType = time.Time +type PriceGetValidFromRetType = time.Time + +func getPriceGetValidFromAttributeTypeOk(arg PriceGetValidFromAttributeType) (ret PriceGetValidFromRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPriceGetValidFromAttributeType(arg *PriceGetValidFromAttributeType, val PriceGetValidFromRetType) { + *arg = &val +} + +/* + types and functions for value +*/ + +// isNotNullableString +type PriceGetValueAttributeType = *string + +func getPriceGetValueAttributeTypeOk(arg PriceGetValueAttributeType) (ret PriceGetValueRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPriceGetValueAttributeType(arg *PriceGetValueAttributeType, val PriceGetValueRetType) { + *arg = &val +} + +type PriceGetValueArgType = string +type PriceGetValueRetType = string + +/* + types and functions for valueAsInt +*/ + +// isLong +type PriceGetValueAsIntAttributeType = *int64 +type PriceGetValueAsIntArgType = int64 +type PriceGetValueAsIntRetType = int64 + +func getPriceGetValueAsIntAttributeTypeOk(arg PriceGetValueAsIntAttributeType) (ret PriceGetValueAsIntRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPriceGetValueAsIntAttributeType(arg *PriceGetValueAsIntAttributeType, val PriceGetValueAsIntRetType) { + *arg = &val +} + +// Price struct for Price +type Price struct { + CurrencyCode PriceGetCurrencyCodeAttributeType `json:"currencyCode,omitempty"` + CurrencySymbol PriceGetCurrencySymbolAttributeType `json:"currencySymbol,omitempty"` + // Monthly price value that is valid at request time, shown with full precision + MonthlyPrice PriceGetMonthlyPriceAttributeType `json:"monthlyPrice,omitempty"` + // Used in Portal rounded to the minimal usable precision 2 digits after 0 + RoundedMonthlyPrice PriceGetRoundedMonthlyPriceAttributeType `json:"roundedMonthlyPrice,omitempty"` + // Used in Portal rounded to the minimal usable precision 2 digits after 0 + RoundedValue PriceGetRoundedValueAttributeType `json:"roundedValue,omitempty"` + ValidFrom PriceGetValidFromAttributeType `json:"validFrom,omitempty"` + // Price value that is valid at request time, shown with full precision with 11 decimals + Value PriceGetValueAttributeType `json:"value,omitempty"` + // Price as integer representation 1e11 + ValueAsInt PriceGetValueAsIntAttributeType `json:"valueAsInt,omitempty"` +} + +// NewPrice instantiates a new Price 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 NewPrice() *Price { + this := Price{} + return &this +} + +// NewPriceWithDefaults instantiates a new Price 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 NewPriceWithDefaults() *Price { + this := Price{} + return &this +} + +// GetCurrencyCode returns the CurrencyCode field value if set, zero value otherwise. +func (o *Price) GetCurrencyCode() (res PriceGetCurrencyCodeRetType) { + res, _ = o.GetCurrencyCodeOk() + return +} + +// GetCurrencyCodeOk returns a tuple with the CurrencyCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Price) GetCurrencyCodeOk() (ret PriceGetCurrencyCodeRetType, ok bool) { + return getPriceGetCurrencyCodeAttributeTypeOk(o.CurrencyCode) +} + +// HasCurrencyCode returns a boolean if a field has been set. +func (o *Price) HasCurrencyCode() bool { + _, ok := o.GetCurrencyCodeOk() + return ok +} + +// SetCurrencyCode gets a reference to the given CurrencyCodes and assigns it to the CurrencyCode field. +func (o *Price) SetCurrencyCode(v PriceGetCurrencyCodeRetType) { + setPriceGetCurrencyCodeAttributeType(&o.CurrencyCode, v) +} + +// GetCurrencySymbol returns the CurrencySymbol field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Price) GetCurrencySymbol() (res PriceGetCurrencySymbolRetType) { + res, _ = o.GetCurrencySymbolOk() + return +} + +// GetCurrencySymbolOk returns a tuple with the CurrencySymbol field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Price) GetCurrencySymbolOk() (ret PriceGetCurrencySymbolRetType, ok bool) { + return getPriceGetCurrencySymbolAttributeTypeOk(o.CurrencySymbol) +} + +// HasCurrencySymbol returns a boolean if a field has been set. +func (o *Price) HasCurrencySymbol() bool { + _, ok := o.GetCurrencySymbolOk() + return ok +} + +// SetCurrencySymbol gets a reference to the given CurrencySymbols and assigns it to the CurrencySymbol field. +func (o *Price) SetCurrencySymbol(v PriceGetCurrencySymbolRetType) { + setPriceGetCurrencySymbolAttributeType(&o.CurrencySymbol, v) +} + +// SetCurrencySymbolNil sets the value for CurrencySymbol to be an explicit nil +func (o *Price) SetCurrencySymbolNil() { + o.CurrencySymbol = nil +} + +// UnsetCurrencySymbol ensures that no value is present for CurrencySymbol, not even an explicit nil +func (o *Price) UnsetCurrencySymbol() { + o.CurrencySymbol = nil +} + +// GetMonthlyPrice returns the MonthlyPrice field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Price) GetMonthlyPrice() (res PriceGetMonthlyPriceRetType) { + res, _ = o.GetMonthlyPriceOk() + return +} + +// GetMonthlyPriceOk returns a tuple with the MonthlyPrice field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Price) GetMonthlyPriceOk() (ret PriceGetMonthlyPriceRetType, ok bool) { + return getPriceGetMonthlyPriceAttributeTypeOk(o.MonthlyPrice) +} + +// HasMonthlyPrice returns a boolean if a field has been set. +func (o *Price) HasMonthlyPrice() bool { + _, ok := o.GetMonthlyPriceOk() + return ok +} + +// SetMonthlyPrice gets a reference to the given float64 and assigns it to the MonthlyPrice field. +func (o *Price) SetMonthlyPrice(v PriceGetMonthlyPriceRetType) { + setPriceGetMonthlyPriceAttributeType(&o.MonthlyPrice, v) +} + +// SetMonthlyPriceNil sets the value for MonthlyPrice to be an explicit nil +func (o *Price) SetMonthlyPriceNil() { + o.MonthlyPrice = nil +} + +// UnsetMonthlyPrice ensures that no value is present for MonthlyPrice, not even an explicit nil +func (o *Price) UnsetMonthlyPrice() { + o.MonthlyPrice = nil +} + +// GetRoundedMonthlyPrice returns the RoundedMonthlyPrice field value if set, zero value otherwise. +func (o *Price) GetRoundedMonthlyPrice() (res PriceGetRoundedMonthlyPriceRetType) { + res, _ = o.GetRoundedMonthlyPriceOk() + return +} + +// GetRoundedMonthlyPriceOk returns a tuple with the RoundedMonthlyPrice field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Price) GetRoundedMonthlyPriceOk() (ret PriceGetRoundedMonthlyPriceRetType, ok bool) { + return getPriceGetRoundedMonthlyPriceAttributeTypeOk(o.RoundedMonthlyPrice) +} + +// HasRoundedMonthlyPrice returns a boolean if a field has been set. +func (o *Price) HasRoundedMonthlyPrice() bool { + _, ok := o.GetRoundedMonthlyPriceOk() + return ok +} + +// SetRoundedMonthlyPrice gets a reference to the given float64 and assigns it to the RoundedMonthlyPrice field. +func (o *Price) SetRoundedMonthlyPrice(v PriceGetRoundedMonthlyPriceRetType) { + setPriceGetRoundedMonthlyPriceAttributeType(&o.RoundedMonthlyPrice, v) +} + +// GetRoundedValue returns the RoundedValue field value if set, zero value otherwise. +func (o *Price) GetRoundedValue() (res PriceGetRoundedValueRetType) { + res, _ = o.GetRoundedValueOk() + return +} + +// GetRoundedValueOk returns a tuple with the RoundedValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Price) GetRoundedValueOk() (ret PriceGetRoundedValueRetType, ok bool) { + return getPriceGetRoundedValueAttributeTypeOk(o.RoundedValue) +} + +// HasRoundedValue returns a boolean if a field has been set. +func (o *Price) HasRoundedValue() bool { + _, ok := o.GetRoundedValueOk() + return ok +} + +// SetRoundedValue gets a reference to the given float64 and assigns it to the RoundedValue field. +func (o *Price) SetRoundedValue(v PriceGetRoundedValueRetType) { + setPriceGetRoundedValueAttributeType(&o.RoundedValue, v) +} + +// GetValidFrom returns the ValidFrom field value if set, zero value otherwise. +func (o *Price) GetValidFrom() (res PriceGetValidFromRetType) { + res, _ = o.GetValidFromOk() + return +} + +// 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 *Price) GetValidFromOk() (ret PriceGetValidFromRetType, ok bool) { + return getPriceGetValidFromAttributeTypeOk(o.ValidFrom) +} + +// HasValidFrom returns a boolean if a field has been set. +func (o *Price) HasValidFrom() bool { + _, ok := o.GetValidFromOk() + return ok +} + +// SetValidFrom gets a reference to the given time.Time and assigns it to the ValidFrom field. +func (o *Price) SetValidFrom(v PriceGetValidFromRetType) { + setPriceGetValidFromAttributeType(&o.ValidFrom, v) +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *Price) GetValue() (res PriceGetValueRetType) { + 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 *Price) GetValueOk() (ret PriceGetValueRetType, ok bool) { + return getPriceGetValueAttributeTypeOk(o.Value) +} + +// HasValue returns a boolean if a field has been set. +func (o *Price) HasValue() bool { + _, ok := o.GetValueOk() + return ok +} + +// SetValue gets a reference to the given float64 and assigns it to the Value field. +func (o *Price) SetValue(v PriceGetValueRetType) { + setPriceGetValueAttributeType(&o.Value, v) +} + +// GetValueAsInt returns the ValueAsInt field value if set, zero value otherwise. +func (o *Price) GetValueAsInt() (res PriceGetValueAsIntRetType) { + res, _ = o.GetValueAsIntOk() + return +} + +// GetValueAsIntOk returns a tuple with the ValueAsInt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Price) GetValueAsIntOk() (ret PriceGetValueAsIntRetType, ok bool) { + return getPriceGetValueAsIntAttributeTypeOk(o.ValueAsInt) +} + +// HasValueAsInt returns a boolean if a field has been set. +func (o *Price) HasValueAsInt() bool { + _, ok := o.GetValueAsIntOk() + return ok +} + +// SetValueAsInt gets a reference to the given int64 and assigns it to the ValueAsInt field. +func (o *Price) SetValueAsInt(v PriceGetValueAsIntRetType) { + setPriceGetValueAsIntAttributeType(&o.ValueAsInt, v) +} + +func (o Price) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getPriceGetCurrencyCodeAttributeTypeOk(o.CurrencyCode); ok { + toSerialize["CurrencyCode"] = val + } + if val, ok := getPriceGetCurrencySymbolAttributeTypeOk(o.CurrencySymbol); ok { + toSerialize["CurrencySymbol"] = val + } + if val, ok := getPriceGetMonthlyPriceAttributeTypeOk(o.MonthlyPrice); ok { + toSerialize["MonthlyPrice"] = val + } + if val, ok := getPriceGetRoundedMonthlyPriceAttributeTypeOk(o.RoundedMonthlyPrice); ok { + toSerialize["RoundedMonthlyPrice"] = val + } + if val, ok := getPriceGetRoundedValueAttributeTypeOk(o.RoundedValue); ok { + toSerialize["RoundedValue"] = val + } + if val, ok := getPriceGetValidFromAttributeTypeOk(o.ValidFrom); ok { + toSerialize["ValidFrom"] = val + } + if val, ok := getPriceGetValueAttributeTypeOk(o.Value); ok { + toSerialize["Value"] = val + } + if val, ok := getPriceGetValueAsIntAttributeTypeOk(o.ValueAsInt); ok { + toSerialize["ValueAsInt"] = val + } + return toSerialize, nil +} + +type NullablePrice struct { + value *Price + isSet bool +} + +func (v NullablePrice) Get() *Price { + return v.value +} + +func (v *NullablePrice) Set(val *Price) { + v.value = val + v.isSet = true +} + +func (v NullablePrice) IsSet() bool { + return v.isSet +} + +func (v *NullablePrice) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePrice(val *Price) *NullablePrice { + return &NullablePrice{value: val, isSet: true} +} + +func (v NullablePrice) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePrice) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_price_test.go b/services/pim/model_price_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_price_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_public_category.go b/services/pim/model_public_category.go new file mode 100644 index 000000000..1c80e3563 --- /dev/null +++ b/services/pim/model_public_category.go @@ -0,0 +1,438 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" + "time" +) + +// checks if the PublicCategory type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PublicCategory{} + +/* + types and functions for description +*/ + +// isNotNullableString +type PublicCategoryGetDescriptionAttributeType = *string + +func getPublicCategoryGetDescriptionAttributeTypeOk(arg PublicCategoryGetDescriptionAttributeType) (ret PublicCategoryGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicCategoryGetDescriptionAttributeType(arg *PublicCategoryGetDescriptionAttributeType, val PublicCategoryGetDescriptionRetType) { + *arg = &val +} + +type PublicCategoryGetDescriptionArgType = string +type PublicCategoryGetDescriptionRetType = string + +/* + types and functions for id +*/ + +// isNullableString +type PublicCategoryGetIdAttributeType = *NullableString + +func getPublicCategoryGetIdAttributeTypeOk(arg PublicCategoryGetIdAttributeType) (ret PublicCategoryGetIdRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicCategoryGetIdAttributeType(arg *PublicCategoryGetIdAttributeType, val PublicCategoryGetIdRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicCategoryGetIdArgType = *string +type PublicCategoryGetIdRetType = *string + +/* + types and functions for image +*/ + +// isNotNullableString +type PublicCategoryGetImageAttributeType = *string + +func getPublicCategoryGetImageAttributeTypeOk(arg PublicCategoryGetImageAttributeType) (ret PublicCategoryGetImageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicCategoryGetImageAttributeType(arg *PublicCategoryGetImageAttributeType, val PublicCategoryGetImageRetType) { + *arg = &val +} + +type PublicCategoryGetImageArgType = string +type PublicCategoryGetImageRetType = string + +/* + types and functions for language +*/ + +// isNotNullableString +type PublicCategoryGetLanguageAttributeType = *string + +func getPublicCategoryGetLanguageAttributeTypeOk(arg PublicCategoryGetLanguageAttributeType) (ret PublicCategoryGetLanguageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicCategoryGetLanguageAttributeType(arg *PublicCategoryGetLanguageAttributeType, val PublicCategoryGetLanguageRetType) { + *arg = &val +} + +type PublicCategoryGetLanguageArgType = string +type PublicCategoryGetLanguageRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type PublicCategoryGetNameAttributeType = *string + +func getPublicCategoryGetNameAttributeTypeOk(arg PublicCategoryGetNameAttributeType) (ret PublicCategoryGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicCategoryGetNameAttributeType(arg *PublicCategoryGetNameAttributeType, val PublicCategoryGetNameRetType) { + *arg = &val +} + +type PublicCategoryGetNameArgType = string +type PublicCategoryGetNameRetType = string + +/* + types and functions for validStart +*/ + +// isDateTime +type PublicCategoryGetValidStartAttributeType = *time.Time +type PublicCategoryGetValidStartArgType = time.Time +type PublicCategoryGetValidStartRetType = time.Time + +func getPublicCategoryGetValidStartAttributeTypeOk(arg PublicCategoryGetValidStartAttributeType) (ret PublicCategoryGetValidStartRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicCategoryGetValidStartAttributeType(arg *PublicCategoryGetValidStartAttributeType, val PublicCategoryGetValidStartRetType) { + *arg = &val +} + +/* + types and functions for version +*/ + +// isNotNullableString +type PublicCategoryGetVersionAttributeType = *string + +func getPublicCategoryGetVersionAttributeTypeOk(arg PublicCategoryGetVersionAttributeType) (ret PublicCategoryGetVersionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicCategoryGetVersionAttributeType(arg *PublicCategoryGetVersionAttributeType, val PublicCategoryGetVersionRetType) { + *arg = &val +} + +type PublicCategoryGetVersionArgType = string +type PublicCategoryGetVersionRetType = string + +// PublicCategory struct for PublicCategory +type PublicCategory struct { + // Description of the category + Description PublicCategoryGetDescriptionAttributeType `json:"description,omitempty"` + // The unique identifier for the category, which is object id from MongoDB + Id PublicCategoryGetIdAttributeType `json:"id,omitempty"` + // URI of the category image + Image PublicCategoryGetImageAttributeType `json:"image,omitempty"` + // Language of the category + Language PublicCategoryGetLanguageAttributeType `json:"language,omitempty"` + // Category name + Name PublicCategoryGetNameAttributeType `json:"name,omitempty"` + // Date when the current version was approved and became valid in PIM + ValidStart PublicCategoryGetValidStartAttributeType `json:"validStart,omitempty"` + // Number of the revision from PIM + Version PublicCategoryGetVersionAttributeType `json:"version,omitempty"` +} + +// NewPublicCategory instantiates a new PublicCategory 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 NewPublicCategory() *PublicCategory { + this := PublicCategory{} + return &this +} + +// NewPublicCategoryWithDefaults instantiates a new PublicCategory 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 NewPublicCategoryWithDefaults() *PublicCategory { + this := PublicCategory{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PublicCategory) GetDescription() (res PublicCategoryGetDescriptionRetType) { + res, _ = o.GetDescriptionOk() + return +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicCategory) GetDescriptionOk() (ret PublicCategoryGetDescriptionRetType, ok bool) { + return getPublicCategoryGetDescriptionAttributeTypeOk(o.Description) +} + +// HasDescription returns a boolean if a field has been set. +func (o *PublicCategory) HasDescription() bool { + _, ok := o.GetDescriptionOk() + return ok +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PublicCategory) SetDescription(v PublicCategoryGetDescriptionRetType) { + setPublicCategoryGetDescriptionAttributeType(&o.Description, v) +} + +// GetId returns the Id field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicCategory) GetId() (res PublicCategoryGetIdRetType) { + res, _ = o.GetIdOk() + return +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicCategory) GetIdOk() (ret PublicCategoryGetIdRetType, ok bool) { + return getPublicCategoryGetIdAttributeTypeOk(o.Id) +} + +// HasId returns a boolean if a field has been set. +func (o *PublicCategory) HasId() bool { + _, ok := o.GetIdOk() + return ok +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PublicCategory) SetId(v PublicCategoryGetIdRetType) { + setPublicCategoryGetIdAttributeType(&o.Id, v) +} + +// SetIdNil sets the value for Id to be an explicit nil +func (o *PublicCategory) SetIdNil() { + o.Id = nil +} + +// UnsetId ensures that no value is present for Id, not even an explicit nil +func (o *PublicCategory) UnsetId() { + o.Id = nil +} + +// GetImage returns the Image field value if set, zero value otherwise. +func (o *PublicCategory) GetImage() (res PublicCategoryGetImageRetType) { + res, _ = o.GetImageOk() + return +} + +// GetImageOk returns a tuple with the Image field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicCategory) GetImageOk() (ret PublicCategoryGetImageRetType, ok bool) { + return getPublicCategoryGetImageAttributeTypeOk(o.Image) +} + +// HasImage returns a boolean if a field has been set. +func (o *PublicCategory) HasImage() bool { + _, ok := o.GetImageOk() + return ok +} + +// SetImage gets a reference to the given string and assigns it to the Image field. +func (o *PublicCategory) SetImage(v PublicCategoryGetImageRetType) { + setPublicCategoryGetImageAttributeType(&o.Image, v) +} + +// GetLanguage returns the Language field value if set, zero value otherwise. +func (o *PublicCategory) GetLanguage() (res PublicCategoryGetLanguageRetType) { + res, _ = o.GetLanguageOk() + return +} + +// GetLanguageOk returns a tuple with the Language field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicCategory) GetLanguageOk() (ret PublicCategoryGetLanguageRetType, ok bool) { + return getPublicCategoryGetLanguageAttributeTypeOk(o.Language) +} + +// HasLanguage returns a boolean if a field has been set. +func (o *PublicCategory) HasLanguage() bool { + _, ok := o.GetLanguageOk() + return ok +} + +// SetLanguage gets a reference to the given string and assigns it to the Language field. +func (o *PublicCategory) SetLanguage(v PublicCategoryGetLanguageRetType) { + setPublicCategoryGetLanguageAttributeType(&o.Language, v) +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PublicCategory) GetName() (res PublicCategoryGetNameRetType) { + res, _ = o.GetNameOk() + return +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicCategory) GetNameOk() (ret PublicCategoryGetNameRetType, ok bool) { + return getPublicCategoryGetNameAttributeTypeOk(o.Name) +} + +// HasName returns a boolean if a field has been set. +func (o *PublicCategory) HasName() bool { + _, ok := o.GetNameOk() + return ok +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PublicCategory) SetName(v PublicCategoryGetNameRetType) { + setPublicCategoryGetNameAttributeType(&o.Name, v) +} + +// GetValidStart returns the ValidStart field value if set, zero value otherwise. +func (o *PublicCategory) GetValidStart() (res PublicCategoryGetValidStartRetType) { + res, _ = o.GetValidStartOk() + return +} + +// GetValidStartOk returns a tuple with the ValidStart field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicCategory) GetValidStartOk() (ret PublicCategoryGetValidStartRetType, ok bool) { + return getPublicCategoryGetValidStartAttributeTypeOk(o.ValidStart) +} + +// HasValidStart returns a boolean if a field has been set. +func (o *PublicCategory) HasValidStart() bool { + _, ok := o.GetValidStartOk() + return ok +} + +// SetValidStart gets a reference to the given time.Time and assigns it to the ValidStart field. +func (o *PublicCategory) SetValidStart(v PublicCategoryGetValidStartRetType) { + setPublicCategoryGetValidStartAttributeType(&o.ValidStart, v) +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *PublicCategory) GetVersion() (res PublicCategoryGetVersionRetType) { + 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 *PublicCategory) GetVersionOk() (ret PublicCategoryGetVersionRetType, ok bool) { + return getPublicCategoryGetVersionAttributeTypeOk(o.Version) +} + +// HasVersion returns a boolean if a field has been set. +func (o *PublicCategory) HasVersion() bool { + _, ok := o.GetVersionOk() + return ok +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *PublicCategory) SetVersion(v PublicCategoryGetVersionRetType) { + setPublicCategoryGetVersionAttributeType(&o.Version, v) +} + +func (o PublicCategory) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getPublicCategoryGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } + if val, ok := getPublicCategoryGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getPublicCategoryGetImageAttributeTypeOk(o.Image); ok { + toSerialize["Image"] = val + } + if val, ok := getPublicCategoryGetLanguageAttributeTypeOk(o.Language); ok { + toSerialize["Language"] = val + } + if val, ok := getPublicCategoryGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getPublicCategoryGetValidStartAttributeTypeOk(o.ValidStart); ok { + toSerialize["ValidStart"] = val + } + if val, ok := getPublicCategoryGetVersionAttributeTypeOk(o.Version); ok { + toSerialize["Version"] = val + } + return toSerialize, nil +} + +type NullablePublicCategory struct { + value *PublicCategory + isSet bool +} + +func (v NullablePublicCategory) Get() *PublicCategory { + return v.value +} + +func (v *NullablePublicCategory) Set(val *PublicCategory) { + v.value = val + v.isSet = true +} + +func (v NullablePublicCategory) IsSet() bool { + return v.isSet +} + +func (v *NullablePublicCategory) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePublicCategory(val *PublicCategory) *NullablePublicCategory { + return &NullablePublicCategory{value: val, isSet: true} +} + +func (v NullablePublicCategory) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePublicCategory) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_public_category_test.go b/services/pim/model_public_category_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_public_category_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_public_database_specific_attributes.go b/services/pim/model_public_database_specific_attributes.go new file mode 100644 index 000000000..6a97bd4e6 --- /dev/null +++ b/services/pim/model_public_database_specific_attributes.go @@ -0,0 +1,662 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the PublicDatabaseSpecificAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PublicDatabaseSpecificAttributes{} + +/* + types and functions for discriminator +*/ + +// isNotNullableString +type PublicDatabaseSpecificAttributesGetDiscriminatorAttributeType = *string + +func getPublicDatabaseSpecificAttributesGetDiscriminatorAttributeTypeOk(arg PublicDatabaseSpecificAttributesGetDiscriminatorAttributeType) (ret PublicDatabaseSpecificAttributesGetDiscriminatorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicDatabaseSpecificAttributesGetDiscriminatorAttributeType(arg *PublicDatabaseSpecificAttributesGetDiscriminatorAttributeType, val PublicDatabaseSpecificAttributesGetDiscriminatorRetType) { + *arg = &val +} + +type PublicDatabaseSpecificAttributesGetDiscriminatorArgType = string +type PublicDatabaseSpecificAttributesGetDiscriminatorRetType = string + +/* + types and functions for diskStoragePerNode +*/ + +// isNullableString +type PublicDatabaseSpecificAttributesGetDiskStoragePerNodeAttributeType = *NullableString + +func getPublicDatabaseSpecificAttributesGetDiskStoragePerNodeAttributeTypeOk(arg PublicDatabaseSpecificAttributesGetDiskStoragePerNodeAttributeType) (ret PublicDatabaseSpecificAttributesGetDiskStoragePerNodeRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicDatabaseSpecificAttributesGetDiskStoragePerNodeAttributeType(arg *PublicDatabaseSpecificAttributesGetDiskStoragePerNodeAttributeType, val PublicDatabaseSpecificAttributesGetDiskStoragePerNodeRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicDatabaseSpecificAttributesGetDiskStoragePerNodeArgType = *string +type PublicDatabaseSpecificAttributesGetDiskStoragePerNodeRetType = *string + +/* + types and functions for flavor +*/ + +// isNullableString +type PublicDatabaseSpecificAttributesGetFlavorAttributeType = *NullableString + +func getPublicDatabaseSpecificAttributesGetFlavorAttributeTypeOk(arg PublicDatabaseSpecificAttributesGetFlavorAttributeType) (ret PublicDatabaseSpecificAttributesGetFlavorRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicDatabaseSpecificAttributesGetFlavorAttributeType(arg *PublicDatabaseSpecificAttributesGetFlavorAttributeType, val PublicDatabaseSpecificAttributesGetFlavorRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicDatabaseSpecificAttributesGetFlavorArgType = *string +type PublicDatabaseSpecificAttributesGetFlavorRetType = *string + +/* + types and functions for nodes +*/ + +// isLong +type PublicDatabaseSpecificAttributesGetNodesAttributeType = *int64 +type PublicDatabaseSpecificAttributesGetNodesArgType = *int64 +type PublicDatabaseSpecificAttributesGetNodesRetType = *int64 + +func getPublicDatabaseSpecificAttributesGetNodesAttributeTypeOk(arg PublicDatabaseSpecificAttributesGetNodesAttributeType) (ret PublicDatabaseSpecificAttributesGetNodesRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setPublicDatabaseSpecificAttributesGetNodesAttributeType(arg *PublicDatabaseSpecificAttributesGetNodesAttributeType, val PublicDatabaseSpecificAttributesGetNodesRetType) { + *arg = val +} + +/* + types and functions for performanceClasses +*/ + +// isArray +type PublicDatabaseSpecificAttributesGetPerformanceClassesAttributeType = *[]string +type PublicDatabaseSpecificAttributesGetPerformanceClassesArgType = []string +type PublicDatabaseSpecificAttributesGetPerformanceClassesRetType = []string + +func getPublicDatabaseSpecificAttributesGetPerformanceClassesAttributeTypeOk(arg PublicDatabaseSpecificAttributesGetPerformanceClassesAttributeType) (ret PublicDatabaseSpecificAttributesGetPerformanceClassesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicDatabaseSpecificAttributesGetPerformanceClassesAttributeType(arg *PublicDatabaseSpecificAttributesGetPerformanceClassesAttributeType, val PublicDatabaseSpecificAttributesGetPerformanceClassesRetType) { + *arg = &val +} + +/* + types and functions for ram +*/ + +// isFloat +type PublicDatabaseSpecificAttributesGetRamAttributeType = *float64 +type PublicDatabaseSpecificAttributesGetRamArgType = *float64 +type PublicDatabaseSpecificAttributesGetRamRetType = *float64 + +func getPublicDatabaseSpecificAttributesGetRamAttributeTypeOk(arg PublicDatabaseSpecificAttributesGetRamAttributeType) (ret PublicDatabaseSpecificAttributesGetRamRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setPublicDatabaseSpecificAttributesGetRamAttributeType(arg *PublicDatabaseSpecificAttributesGetRamAttributeType, val PublicDatabaseSpecificAttributesGetRamRetType) { + *arg = val +} + +/* + types and functions for storageMaxGb +*/ + +// isLong +type PublicDatabaseSpecificAttributesGetStorageMaxGbAttributeType = *int64 +type PublicDatabaseSpecificAttributesGetStorageMaxGbArgType = *int64 +type PublicDatabaseSpecificAttributesGetStorageMaxGbRetType = *int64 + +func getPublicDatabaseSpecificAttributesGetStorageMaxGbAttributeTypeOk(arg PublicDatabaseSpecificAttributesGetStorageMaxGbAttributeType) (ret PublicDatabaseSpecificAttributesGetStorageMaxGbRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setPublicDatabaseSpecificAttributesGetStorageMaxGbAttributeType(arg *PublicDatabaseSpecificAttributesGetStorageMaxGbAttributeType, val PublicDatabaseSpecificAttributesGetStorageMaxGbRetType) { + *arg = val +} + +/* + types and functions for storageMinGb +*/ + +// isLong +type PublicDatabaseSpecificAttributesGetStorageMinGbAttributeType = *int64 +type PublicDatabaseSpecificAttributesGetStorageMinGbArgType = *int64 +type PublicDatabaseSpecificAttributesGetStorageMinGbRetType = *int64 + +func getPublicDatabaseSpecificAttributesGetStorageMinGbAttributeTypeOk(arg PublicDatabaseSpecificAttributesGetStorageMinGbAttributeType) (ret PublicDatabaseSpecificAttributesGetStorageMinGbRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setPublicDatabaseSpecificAttributesGetStorageMinGbAttributeType(arg *PublicDatabaseSpecificAttributesGetStorageMinGbAttributeType, val PublicDatabaseSpecificAttributesGetStorageMinGbRetType) { + *arg = val +} + +/* + types and functions for type +*/ + +// isNullableString +type PublicDatabaseSpecificAttributesGetTypeAttributeType = *NullableString + +func getPublicDatabaseSpecificAttributesGetTypeAttributeTypeOk(arg PublicDatabaseSpecificAttributesGetTypeAttributeType) (ret PublicDatabaseSpecificAttributesGetTypeRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicDatabaseSpecificAttributesGetTypeAttributeType(arg *PublicDatabaseSpecificAttributesGetTypeAttributeType, val PublicDatabaseSpecificAttributesGetTypeRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicDatabaseSpecificAttributesGetTypeArgType = *string +type PublicDatabaseSpecificAttributesGetTypeRetType = *string + +/* + types and functions for vCPU +*/ + +// isLong +type PublicDatabaseSpecificAttributesGetVCPUAttributeType = *int64 +type PublicDatabaseSpecificAttributesGetVCPUArgType = *int64 +type PublicDatabaseSpecificAttributesGetVCPURetType = *int64 + +func getPublicDatabaseSpecificAttributesGetVCPUAttributeTypeOk(arg PublicDatabaseSpecificAttributesGetVCPUAttributeType) (ret PublicDatabaseSpecificAttributesGetVCPURetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setPublicDatabaseSpecificAttributesGetVCPUAttributeType(arg *PublicDatabaseSpecificAttributesGetVCPUAttributeType, val PublicDatabaseSpecificAttributesGetVCPURetType) { + *arg = val +} + +// PublicDatabaseSpecificAttributes struct for PublicDatabaseSpecificAttributes +type PublicDatabaseSpecificAttributes struct { + // REQUIRED + Discriminator PublicDatabaseSpecificAttributesGetDiscriminatorAttributeType `json:"discriminator" required:"true"` + // diskStoragePerNode + DiskStoragePerNode PublicDatabaseSpecificAttributesGetDiskStoragePerNodeAttributeType `json:"diskStoragePerNode,omitempty"` + // Flavor + Flavor PublicDatabaseSpecificAttributesGetFlavorAttributeType `json:"flavor,omitempty"` + // Nodes + Nodes PublicDatabaseSpecificAttributesGetNodesAttributeType `json:"nodes,omitempty"` + // Performance Classes + PerformanceClasses PublicDatabaseSpecificAttributesGetPerformanceClassesAttributeType `json:"performanceClasses,omitempty"` + // RAM (in GB) + // Can be cast to float32 without loss of precision. + Ram PublicDatabaseSpecificAttributesGetRamAttributeType `json:"ram,omitempty"` + // Max Storage in Gb + StorageMaxGb PublicDatabaseSpecificAttributesGetStorageMaxGbAttributeType `json:"storageMaxGb,omitempty"` + // Min Storage in Gb + StorageMinGb PublicDatabaseSpecificAttributesGetStorageMinGbAttributeType `json:"storageMinGb,omitempty"` + // Type (e.g. `single`, `replica`) + Type PublicDatabaseSpecificAttributesGetTypeAttributeType `json:"type,omitempty"` + // Number of vCPU + VCPU PublicDatabaseSpecificAttributesGetVCPUAttributeType `json:"vCPU,omitempty"` +} + +type _PublicDatabaseSpecificAttributes PublicDatabaseSpecificAttributes + +// NewPublicDatabaseSpecificAttributes instantiates a new PublicDatabaseSpecificAttributes 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 NewPublicDatabaseSpecificAttributes(discriminator PublicDatabaseSpecificAttributesGetDiscriminatorArgType) *PublicDatabaseSpecificAttributes { + this := PublicDatabaseSpecificAttributes{} + setPublicDatabaseSpecificAttributesGetDiscriminatorAttributeType(&this.Discriminator, discriminator) + return &this +} + +// NewPublicDatabaseSpecificAttributesWithDefaults instantiates a new PublicDatabaseSpecificAttributes 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 NewPublicDatabaseSpecificAttributesWithDefaults() *PublicDatabaseSpecificAttributes { + this := PublicDatabaseSpecificAttributes{} + return &this +} + +// GetDiscriminator returns the Discriminator field value +func (o *PublicDatabaseSpecificAttributes) GetDiscriminator() (ret PublicDatabaseSpecificAttributesGetDiscriminatorRetType) { + ret, _ = o.GetDiscriminatorOk() + return ret +} + +// GetDiscriminatorOk returns a tuple with the Discriminator field value +// and a boolean to check if the value has been set. +func (o *PublicDatabaseSpecificAttributes) GetDiscriminatorOk() (ret PublicDatabaseSpecificAttributesGetDiscriminatorRetType, ok bool) { + return getPublicDatabaseSpecificAttributesGetDiscriminatorAttributeTypeOk(o.Discriminator) +} + +// SetDiscriminator sets field value +func (o *PublicDatabaseSpecificAttributes) SetDiscriminator(v PublicDatabaseSpecificAttributesGetDiscriminatorRetType) { + setPublicDatabaseSpecificAttributesGetDiscriminatorAttributeType(&o.Discriminator, v) +} + +// GetDiskStoragePerNode returns the DiskStoragePerNode field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicDatabaseSpecificAttributes) GetDiskStoragePerNode() (res PublicDatabaseSpecificAttributesGetDiskStoragePerNodeRetType) { + res, _ = o.GetDiskStoragePerNodeOk() + return +} + +// GetDiskStoragePerNodeOk returns a tuple with the DiskStoragePerNode field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicDatabaseSpecificAttributes) GetDiskStoragePerNodeOk() (ret PublicDatabaseSpecificAttributesGetDiskStoragePerNodeRetType, ok bool) { + return getPublicDatabaseSpecificAttributesGetDiskStoragePerNodeAttributeTypeOk(o.DiskStoragePerNode) +} + +// HasDiskStoragePerNode returns a boolean if a field has been set. +func (o *PublicDatabaseSpecificAttributes) HasDiskStoragePerNode() bool { + _, ok := o.GetDiskStoragePerNodeOk() + return ok +} + +// SetDiskStoragePerNode gets a reference to the given string and assigns it to the DiskStoragePerNode field. +func (o *PublicDatabaseSpecificAttributes) SetDiskStoragePerNode(v PublicDatabaseSpecificAttributesGetDiskStoragePerNodeRetType) { + setPublicDatabaseSpecificAttributesGetDiskStoragePerNodeAttributeType(&o.DiskStoragePerNode, v) +} + +// SetDiskStoragePerNodeNil sets the value for DiskStoragePerNode to be an explicit nil +func (o *PublicDatabaseSpecificAttributes) SetDiskStoragePerNodeNil() { + o.DiskStoragePerNode = nil +} + +// UnsetDiskStoragePerNode ensures that no value is present for DiskStoragePerNode, not even an explicit nil +func (o *PublicDatabaseSpecificAttributes) UnsetDiskStoragePerNode() { + o.DiskStoragePerNode = nil +} + +// GetFlavor returns the Flavor field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicDatabaseSpecificAttributes) GetFlavor() (res PublicDatabaseSpecificAttributesGetFlavorRetType) { + res, _ = o.GetFlavorOk() + return +} + +// GetFlavorOk returns a tuple with the Flavor field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicDatabaseSpecificAttributes) GetFlavorOk() (ret PublicDatabaseSpecificAttributesGetFlavorRetType, ok bool) { + return getPublicDatabaseSpecificAttributesGetFlavorAttributeTypeOk(o.Flavor) +} + +// HasFlavor returns a boolean if a field has been set. +func (o *PublicDatabaseSpecificAttributes) HasFlavor() bool { + _, ok := o.GetFlavorOk() + return ok +} + +// SetFlavor gets a reference to the given string and assigns it to the Flavor field. +func (o *PublicDatabaseSpecificAttributes) SetFlavor(v PublicDatabaseSpecificAttributesGetFlavorRetType) { + setPublicDatabaseSpecificAttributesGetFlavorAttributeType(&o.Flavor, v) +} + +// SetFlavorNil sets the value for Flavor to be an explicit nil +func (o *PublicDatabaseSpecificAttributes) SetFlavorNil() { + o.Flavor = nil +} + +// UnsetFlavor ensures that no value is present for Flavor, not even an explicit nil +func (o *PublicDatabaseSpecificAttributes) UnsetFlavor() { + o.Flavor = nil +} + +// GetNodes returns the Nodes field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicDatabaseSpecificAttributes) GetNodes() (res PublicDatabaseSpecificAttributesGetNodesRetType) { + res, _ = o.GetNodesOk() + return +} + +// GetNodesOk returns a tuple with the Nodes field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicDatabaseSpecificAttributes) GetNodesOk() (ret PublicDatabaseSpecificAttributesGetNodesRetType, ok bool) { + return getPublicDatabaseSpecificAttributesGetNodesAttributeTypeOk(o.Nodes) +} + +// HasNodes returns a boolean if a field has been set. +func (o *PublicDatabaseSpecificAttributes) HasNodes() bool { + _, ok := o.GetNodesOk() + return ok +} + +// SetNodes gets a reference to the given int64 and assigns it to the Nodes field. +func (o *PublicDatabaseSpecificAttributes) SetNodes(v PublicDatabaseSpecificAttributesGetNodesRetType) { + setPublicDatabaseSpecificAttributesGetNodesAttributeType(&o.Nodes, v) +} + +// SetNodesNil sets the value for Nodes to be an explicit nil +func (o *PublicDatabaseSpecificAttributes) SetNodesNil() { + o.Nodes = nil +} + +// UnsetNodes ensures that no value is present for Nodes, not even an explicit nil +func (o *PublicDatabaseSpecificAttributes) UnsetNodes() { + o.Nodes = nil +} + +// GetPerformanceClasses returns the PerformanceClasses field value if set, zero value otherwise. +func (o *PublicDatabaseSpecificAttributes) GetPerformanceClasses() (res PublicDatabaseSpecificAttributesGetPerformanceClassesRetType) { + res, _ = o.GetPerformanceClassesOk() + return +} + +// GetPerformanceClassesOk returns a tuple with the PerformanceClasses field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicDatabaseSpecificAttributes) GetPerformanceClassesOk() (ret PublicDatabaseSpecificAttributesGetPerformanceClassesRetType, ok bool) { + return getPublicDatabaseSpecificAttributesGetPerformanceClassesAttributeTypeOk(o.PerformanceClasses) +} + +// HasPerformanceClasses returns a boolean if a field has been set. +func (o *PublicDatabaseSpecificAttributes) HasPerformanceClasses() bool { + _, ok := o.GetPerformanceClassesOk() + return ok +} + +// SetPerformanceClasses gets a reference to the given []string and assigns it to the PerformanceClasses field. +func (o *PublicDatabaseSpecificAttributes) SetPerformanceClasses(v PublicDatabaseSpecificAttributesGetPerformanceClassesRetType) { + setPublicDatabaseSpecificAttributesGetPerformanceClassesAttributeType(&o.PerformanceClasses, v) +} + +// GetRam returns the Ram field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicDatabaseSpecificAttributes) GetRam() (res PublicDatabaseSpecificAttributesGetRamRetType) { + res, _ = o.GetRamOk() + return +} + +// GetRamOk returns a tuple with the Ram field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicDatabaseSpecificAttributes) GetRamOk() (ret PublicDatabaseSpecificAttributesGetRamRetType, ok bool) { + return getPublicDatabaseSpecificAttributesGetRamAttributeTypeOk(o.Ram) +} + +// HasRam returns a boolean if a field has been set. +func (o *PublicDatabaseSpecificAttributes) HasRam() bool { + _, ok := o.GetRamOk() + return ok +} + +// SetRam gets a reference to the given float64 and assigns it to the Ram field. +func (o *PublicDatabaseSpecificAttributes) SetRam(v PublicDatabaseSpecificAttributesGetRamRetType) { + setPublicDatabaseSpecificAttributesGetRamAttributeType(&o.Ram, v) +} + +// SetRamNil sets the value for Ram to be an explicit nil +func (o *PublicDatabaseSpecificAttributes) SetRamNil() { + o.Ram = nil +} + +// UnsetRam ensures that no value is present for Ram, not even an explicit nil +func (o *PublicDatabaseSpecificAttributes) UnsetRam() { + o.Ram = nil +} + +// GetStorageMaxGb returns the StorageMaxGb field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicDatabaseSpecificAttributes) GetStorageMaxGb() (res PublicDatabaseSpecificAttributesGetStorageMaxGbRetType) { + res, _ = o.GetStorageMaxGbOk() + return +} + +// GetStorageMaxGbOk returns a tuple with the StorageMaxGb field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicDatabaseSpecificAttributes) GetStorageMaxGbOk() (ret PublicDatabaseSpecificAttributesGetStorageMaxGbRetType, ok bool) { + return getPublicDatabaseSpecificAttributesGetStorageMaxGbAttributeTypeOk(o.StorageMaxGb) +} + +// HasStorageMaxGb returns a boolean if a field has been set. +func (o *PublicDatabaseSpecificAttributes) HasStorageMaxGb() bool { + _, ok := o.GetStorageMaxGbOk() + return ok +} + +// SetStorageMaxGb gets a reference to the given int64 and assigns it to the StorageMaxGb field. +func (o *PublicDatabaseSpecificAttributes) SetStorageMaxGb(v PublicDatabaseSpecificAttributesGetStorageMaxGbRetType) { + setPublicDatabaseSpecificAttributesGetStorageMaxGbAttributeType(&o.StorageMaxGb, v) +} + +// SetStorageMaxGbNil sets the value for StorageMaxGb to be an explicit nil +func (o *PublicDatabaseSpecificAttributes) SetStorageMaxGbNil() { + o.StorageMaxGb = nil +} + +// UnsetStorageMaxGb ensures that no value is present for StorageMaxGb, not even an explicit nil +func (o *PublicDatabaseSpecificAttributes) UnsetStorageMaxGb() { + o.StorageMaxGb = nil +} + +// GetStorageMinGb returns the StorageMinGb field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicDatabaseSpecificAttributes) GetStorageMinGb() (res PublicDatabaseSpecificAttributesGetStorageMinGbRetType) { + res, _ = o.GetStorageMinGbOk() + return +} + +// GetStorageMinGbOk returns a tuple with the StorageMinGb field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicDatabaseSpecificAttributes) GetStorageMinGbOk() (ret PublicDatabaseSpecificAttributesGetStorageMinGbRetType, ok bool) { + return getPublicDatabaseSpecificAttributesGetStorageMinGbAttributeTypeOk(o.StorageMinGb) +} + +// HasStorageMinGb returns a boolean if a field has been set. +func (o *PublicDatabaseSpecificAttributes) HasStorageMinGb() bool { + _, ok := o.GetStorageMinGbOk() + return ok +} + +// SetStorageMinGb gets a reference to the given int64 and assigns it to the StorageMinGb field. +func (o *PublicDatabaseSpecificAttributes) SetStorageMinGb(v PublicDatabaseSpecificAttributesGetStorageMinGbRetType) { + setPublicDatabaseSpecificAttributesGetStorageMinGbAttributeType(&o.StorageMinGb, v) +} + +// SetStorageMinGbNil sets the value for StorageMinGb to be an explicit nil +func (o *PublicDatabaseSpecificAttributes) SetStorageMinGbNil() { + o.StorageMinGb = nil +} + +// UnsetStorageMinGb ensures that no value is present for StorageMinGb, not even an explicit nil +func (o *PublicDatabaseSpecificAttributes) UnsetStorageMinGb() { + o.StorageMinGb = nil +} + +// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicDatabaseSpecificAttributes) GetType() (res PublicDatabaseSpecificAttributesGetTypeRetType) { + 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. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicDatabaseSpecificAttributes) GetTypeOk() (ret PublicDatabaseSpecificAttributesGetTypeRetType, ok bool) { + return getPublicDatabaseSpecificAttributesGetTypeAttributeTypeOk(o.Type) +} + +// HasType returns a boolean if a field has been set. +func (o *PublicDatabaseSpecificAttributes) HasType() bool { + _, ok := o.GetTypeOk() + return ok +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *PublicDatabaseSpecificAttributes) SetType(v PublicDatabaseSpecificAttributesGetTypeRetType) { + setPublicDatabaseSpecificAttributesGetTypeAttributeType(&o.Type, v) +} + +// SetTypeNil sets the value for Type to be an explicit nil +func (o *PublicDatabaseSpecificAttributes) SetTypeNil() { + o.Type = nil +} + +// UnsetType ensures that no value is present for Type, not even an explicit nil +func (o *PublicDatabaseSpecificAttributes) UnsetType() { + o.Type = nil +} + +// GetVCPU returns the VCPU field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicDatabaseSpecificAttributes) GetVCPU() (res PublicDatabaseSpecificAttributesGetVCPURetType) { + res, _ = o.GetVCPUOk() + return +} + +// GetVCPUOk returns a tuple with the VCPU field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicDatabaseSpecificAttributes) GetVCPUOk() (ret PublicDatabaseSpecificAttributesGetVCPURetType, ok bool) { + return getPublicDatabaseSpecificAttributesGetVCPUAttributeTypeOk(o.VCPU) +} + +// HasVCPU returns a boolean if a field has been set. +func (o *PublicDatabaseSpecificAttributes) HasVCPU() bool { + _, ok := o.GetVCPUOk() + return ok +} + +// SetVCPU gets a reference to the given int64 and assigns it to the VCPU field. +func (o *PublicDatabaseSpecificAttributes) SetVCPU(v PublicDatabaseSpecificAttributesGetVCPURetType) { + setPublicDatabaseSpecificAttributesGetVCPUAttributeType(&o.VCPU, v) +} + +// SetVCPUNil sets the value for VCPU to be an explicit nil +func (o *PublicDatabaseSpecificAttributes) SetVCPUNil() { + o.VCPU = nil +} + +// UnsetVCPU ensures that no value is present for VCPU, not even an explicit nil +func (o *PublicDatabaseSpecificAttributes) UnsetVCPU() { + o.VCPU = nil +} + +func (o PublicDatabaseSpecificAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getPublicDatabaseSpecificAttributesGetDiscriminatorAttributeTypeOk(o.Discriminator); ok { + toSerialize["Discriminator"] = val + } + if val, ok := getPublicDatabaseSpecificAttributesGetDiskStoragePerNodeAttributeTypeOk(o.DiskStoragePerNode); ok { + toSerialize["DiskStoragePerNode"] = val + } + if val, ok := getPublicDatabaseSpecificAttributesGetFlavorAttributeTypeOk(o.Flavor); ok { + toSerialize["Flavor"] = val + } + if val, ok := getPublicDatabaseSpecificAttributesGetNodesAttributeTypeOk(o.Nodes); ok { + toSerialize["Nodes"] = val + } + if val, ok := getPublicDatabaseSpecificAttributesGetPerformanceClassesAttributeTypeOk(o.PerformanceClasses); ok { + toSerialize["PerformanceClasses"] = val + } + if val, ok := getPublicDatabaseSpecificAttributesGetRamAttributeTypeOk(o.Ram); ok { + toSerialize["Ram"] = val + } + if val, ok := getPublicDatabaseSpecificAttributesGetStorageMaxGbAttributeTypeOk(o.StorageMaxGb); ok { + toSerialize["StorageMaxGb"] = val + } + if val, ok := getPublicDatabaseSpecificAttributesGetStorageMinGbAttributeTypeOk(o.StorageMinGb); ok { + toSerialize["StorageMinGb"] = val + } + if val, ok := getPublicDatabaseSpecificAttributesGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + if val, ok := getPublicDatabaseSpecificAttributesGetVCPUAttributeTypeOk(o.VCPU); ok { + toSerialize["VCPU"] = val + } + return toSerialize, nil +} + +type NullablePublicDatabaseSpecificAttributes struct { + value *PublicDatabaseSpecificAttributes + isSet bool +} + +func (v NullablePublicDatabaseSpecificAttributes) Get() *PublicDatabaseSpecificAttributes { + return v.value +} + +func (v *NullablePublicDatabaseSpecificAttributes) Set(val *PublicDatabaseSpecificAttributes) { + v.value = val + v.isSet = true +} + +func (v NullablePublicDatabaseSpecificAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullablePublicDatabaseSpecificAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePublicDatabaseSpecificAttributes(val *PublicDatabaseSpecificAttributes) *NullablePublicDatabaseSpecificAttributes { + return &NullablePublicDatabaseSpecificAttributes{value: val, isSet: true} +} + +func (v NullablePublicDatabaseSpecificAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePublicDatabaseSpecificAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_public_database_specific_attributes_test.go b/services/pim/model_public_database_specific_attributes_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_public_database_specific_attributes_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_public_marketing_data.go b/services/pim/model_public_marketing_data.go new file mode 100644 index 000000000..2a5680fec --- /dev/null +++ b/services/pim/model_public_marketing_data.go @@ -0,0 +1,680 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" + "time" +) + +// checks if the PublicMarketingData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PublicMarketingData{} + +/* + types and functions for advantages +*/ + +// isArray +type PublicMarketingDataGetAdvantagesAttributeType = *[]MarketingAdvantage +type PublicMarketingDataGetAdvantagesArgType = []MarketingAdvantage +type PublicMarketingDataGetAdvantagesRetType = []MarketingAdvantage + +func getPublicMarketingDataGetAdvantagesAttributeTypeOk(arg PublicMarketingDataGetAdvantagesAttributeType) (ret PublicMarketingDataGetAdvantagesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicMarketingDataGetAdvantagesAttributeType(arg *PublicMarketingDataGetAdvantagesAttributeType, val PublicMarketingDataGetAdvantagesRetType) { + *arg = &val +} + +/* + types and functions for applications +*/ + +// isArray +type PublicMarketingDataGetApplicationsAttributeType = *[]MarketingApplication +type PublicMarketingDataGetApplicationsArgType = []MarketingApplication +type PublicMarketingDataGetApplicationsRetType = []MarketingApplication + +func getPublicMarketingDataGetApplicationsAttributeTypeOk(arg PublicMarketingDataGetApplicationsAttributeType) (ret PublicMarketingDataGetApplicationsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicMarketingDataGetApplicationsAttributeType(arg *PublicMarketingDataGetApplicationsAttributeType, val PublicMarketingDataGetApplicationsRetType) { + *arg = &val +} + +/* + types and functions for functions +*/ + +// isArray +type PublicMarketingDataGetFunctionsAttributeType = *[]MarketingFunction +type PublicMarketingDataGetFunctionsArgType = []MarketingFunction +type PublicMarketingDataGetFunctionsRetType = []MarketingFunction + +func getPublicMarketingDataGetFunctionsAttributeTypeOk(arg PublicMarketingDataGetFunctionsAttributeType) (ret PublicMarketingDataGetFunctionsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicMarketingDataGetFunctionsAttributeType(arg *PublicMarketingDataGetFunctionsAttributeType, val PublicMarketingDataGetFunctionsRetType) { + *arg = &val +} + +/* + types and functions for headline +*/ + +// isNotNullableString +type PublicMarketingDataGetHeadlineAttributeType = *string + +func getPublicMarketingDataGetHeadlineAttributeTypeOk(arg PublicMarketingDataGetHeadlineAttributeType) (ret PublicMarketingDataGetHeadlineRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicMarketingDataGetHeadlineAttributeType(arg *PublicMarketingDataGetHeadlineAttributeType, val PublicMarketingDataGetHeadlineRetType) { + *arg = &val +} + +type PublicMarketingDataGetHeadlineArgType = string +type PublicMarketingDataGetHeadlineRetType = string + +/* + types and functions for id +*/ + +// isNullableString +type PublicMarketingDataGetIdAttributeType = *NullableString + +func getPublicMarketingDataGetIdAttributeTypeOk(arg PublicMarketingDataGetIdAttributeType) (ret PublicMarketingDataGetIdRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicMarketingDataGetIdAttributeType(arg *PublicMarketingDataGetIdAttributeType, val PublicMarketingDataGetIdRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicMarketingDataGetIdArgType = *string +type PublicMarketingDataGetIdRetType = *string + +/* + types and functions for introductoryText +*/ + +// isNotNullableString +type PublicMarketingDataGetIntroductoryTextAttributeType = *string + +func getPublicMarketingDataGetIntroductoryTextAttributeTypeOk(arg PublicMarketingDataGetIntroductoryTextAttributeType) (ret PublicMarketingDataGetIntroductoryTextRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicMarketingDataGetIntroductoryTextAttributeType(arg *PublicMarketingDataGetIntroductoryTextAttributeType, val PublicMarketingDataGetIntroductoryTextRetType) { + *arg = &val +} + +type PublicMarketingDataGetIntroductoryTextArgType = string +type PublicMarketingDataGetIntroductoryTextRetType = string + +/* + types and functions for language +*/ + +// isNotNullableString +type PublicMarketingDataGetLanguageAttributeType = *string + +func getPublicMarketingDataGetLanguageAttributeTypeOk(arg PublicMarketingDataGetLanguageAttributeType) (ret PublicMarketingDataGetLanguageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicMarketingDataGetLanguageAttributeType(arg *PublicMarketingDataGetLanguageAttributeType, val PublicMarketingDataGetLanguageRetType) { + *arg = &val +} + +type PublicMarketingDataGetLanguageArgType = string +type PublicMarketingDataGetLanguageRetType = string + +/* + types and functions for longName +*/ + +// isNotNullableString +type PublicMarketingDataGetLongNameAttributeType = *string + +func getPublicMarketingDataGetLongNameAttributeTypeOk(arg PublicMarketingDataGetLongNameAttributeType) (ret PublicMarketingDataGetLongNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicMarketingDataGetLongNameAttributeType(arg *PublicMarketingDataGetLongNameAttributeType, val PublicMarketingDataGetLongNameRetType) { + *arg = &val +} + +type PublicMarketingDataGetLongNameArgType = string +type PublicMarketingDataGetLongNameRetType = string + +/* + types and functions for shortName +*/ + +// isNotNullableString +type PublicMarketingDataGetShortNameAttributeType = *string + +func getPublicMarketingDataGetShortNameAttributeTypeOk(arg PublicMarketingDataGetShortNameAttributeType) (ret PublicMarketingDataGetShortNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicMarketingDataGetShortNameAttributeType(arg *PublicMarketingDataGetShortNameAttributeType, val PublicMarketingDataGetShortNameRetType) { + *arg = &val +} + +type PublicMarketingDataGetShortNameArgType = string +type PublicMarketingDataGetShortNameRetType = string + +/* + types and functions for stId +*/ + +// isNotNullableString +type PublicMarketingDataGetStIdAttributeType = *string + +func getPublicMarketingDataGetStIdAttributeTypeOk(arg PublicMarketingDataGetStIdAttributeType) (ret PublicMarketingDataGetStIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicMarketingDataGetStIdAttributeType(arg *PublicMarketingDataGetStIdAttributeType, val PublicMarketingDataGetStIdRetType) { + *arg = &val +} + +type PublicMarketingDataGetStIdArgType = string +type PublicMarketingDataGetStIdRetType = string + +/* + types and functions for validStart +*/ + +// isDateTime +type PublicMarketingDataGetValidStartAttributeType = *time.Time +type PublicMarketingDataGetValidStartArgType = time.Time +type PublicMarketingDataGetValidStartRetType = time.Time + +func getPublicMarketingDataGetValidStartAttributeTypeOk(arg PublicMarketingDataGetValidStartAttributeType) (ret PublicMarketingDataGetValidStartRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicMarketingDataGetValidStartAttributeType(arg *PublicMarketingDataGetValidStartAttributeType, val PublicMarketingDataGetValidStartRetType) { + *arg = &val +} + +/* + types and functions for version +*/ + +// isNotNullableString +type PublicMarketingDataGetVersionAttributeType = *string + +func getPublicMarketingDataGetVersionAttributeTypeOk(arg PublicMarketingDataGetVersionAttributeType) (ret PublicMarketingDataGetVersionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicMarketingDataGetVersionAttributeType(arg *PublicMarketingDataGetVersionAttributeType, val PublicMarketingDataGetVersionRetType) { + *arg = &val +} + +type PublicMarketingDataGetVersionArgType = string +type PublicMarketingDataGetVersionRetType = string + +// PublicMarketingData struct for PublicMarketingData +type PublicMarketingData struct { + // List of advantages of the product + Advantages PublicMarketingDataGetAdvantagesAttributeType `json:"advantages,omitempty"` + // List of applications provided by the product + Applications PublicMarketingDataGetApplicationsAttributeType `json:"applications,omitempty"` + // List of functions provided by the product + Functions PublicMarketingDataGetFunctionsAttributeType `json:"functions,omitempty"` + // Short description of what the product delivers + Headline PublicMarketingDataGetHeadlineAttributeType `json:"headline,omitempty"` + // Unique identifier of the marketing product, which is object id from MongoDB + Id PublicMarketingDataGetIdAttributeType `json:"id,omitempty"` + // Basic information of the product + IntroductoryText PublicMarketingDataGetIntroductoryTextAttributeType `json:"introductoryText,omitempty"` + // Language of the marketing data + Language PublicMarketingDataGetLanguageAttributeType `json:"language,omitempty"` + // Extended name of the product + LongName PublicMarketingDataGetLongNameAttributeType `json:"longName,omitempty"` + // An abbreviated name of the product + ShortName PublicMarketingDataGetShortNameAttributeType `json:"shortName,omitempty"` + // Internal ID of the product in PIM + StId PublicMarketingDataGetStIdAttributeType `json:"stId,omitempty"` + // Date when the current version was approved and became valid in PIM + ValidStart PublicMarketingDataGetValidStartAttributeType `json:"validStart,omitempty"` + // Number of the revision from PIM + Version PublicMarketingDataGetVersionAttributeType `json:"version,omitempty"` +} + +// NewPublicMarketingData instantiates a new PublicMarketingData 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 NewPublicMarketingData() *PublicMarketingData { + this := PublicMarketingData{} + return &this +} + +// NewPublicMarketingDataWithDefaults instantiates a new PublicMarketingData 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 NewPublicMarketingDataWithDefaults() *PublicMarketingData { + this := PublicMarketingData{} + return &this +} + +// GetAdvantages returns the Advantages field value if set, zero value otherwise. +func (o *PublicMarketingData) GetAdvantages() (res PublicMarketingDataGetAdvantagesRetType) { + res, _ = o.GetAdvantagesOk() + return +} + +// GetAdvantagesOk returns a tuple with the Advantages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicMarketingData) GetAdvantagesOk() (ret PublicMarketingDataGetAdvantagesRetType, ok bool) { + return getPublicMarketingDataGetAdvantagesAttributeTypeOk(o.Advantages) +} + +// HasAdvantages returns a boolean if a field has been set. +func (o *PublicMarketingData) HasAdvantages() bool { + _, ok := o.GetAdvantagesOk() + return ok +} + +// SetAdvantages gets a reference to the given []MarketingAdvantage and assigns it to the Advantages field. +func (o *PublicMarketingData) SetAdvantages(v PublicMarketingDataGetAdvantagesRetType) { + setPublicMarketingDataGetAdvantagesAttributeType(&o.Advantages, v) +} + +// GetApplications returns the Applications field value if set, zero value otherwise. +func (o *PublicMarketingData) GetApplications() (res PublicMarketingDataGetApplicationsRetType) { + res, _ = o.GetApplicationsOk() + return +} + +// GetApplicationsOk returns a tuple with the Applications field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicMarketingData) GetApplicationsOk() (ret PublicMarketingDataGetApplicationsRetType, ok bool) { + return getPublicMarketingDataGetApplicationsAttributeTypeOk(o.Applications) +} + +// HasApplications returns a boolean if a field has been set. +func (o *PublicMarketingData) HasApplications() bool { + _, ok := o.GetApplicationsOk() + return ok +} + +// SetApplications gets a reference to the given []MarketingApplication and assigns it to the Applications field. +func (o *PublicMarketingData) SetApplications(v PublicMarketingDataGetApplicationsRetType) { + setPublicMarketingDataGetApplicationsAttributeType(&o.Applications, v) +} + +// GetFunctions returns the Functions field value if set, zero value otherwise. +func (o *PublicMarketingData) GetFunctions() (res PublicMarketingDataGetFunctionsRetType) { + res, _ = o.GetFunctionsOk() + return +} + +// GetFunctionsOk returns a tuple with the Functions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicMarketingData) GetFunctionsOk() (ret PublicMarketingDataGetFunctionsRetType, ok bool) { + return getPublicMarketingDataGetFunctionsAttributeTypeOk(o.Functions) +} + +// HasFunctions returns a boolean if a field has been set. +func (o *PublicMarketingData) HasFunctions() bool { + _, ok := o.GetFunctionsOk() + return ok +} + +// SetFunctions gets a reference to the given []MarketingFunction and assigns it to the Functions field. +func (o *PublicMarketingData) SetFunctions(v PublicMarketingDataGetFunctionsRetType) { + setPublicMarketingDataGetFunctionsAttributeType(&o.Functions, v) +} + +// GetHeadline returns the Headline field value if set, zero value otherwise. +func (o *PublicMarketingData) GetHeadline() (res PublicMarketingDataGetHeadlineRetType) { + res, _ = o.GetHeadlineOk() + return +} + +// GetHeadlineOk returns a tuple with the Headline field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicMarketingData) GetHeadlineOk() (ret PublicMarketingDataGetHeadlineRetType, ok bool) { + return getPublicMarketingDataGetHeadlineAttributeTypeOk(o.Headline) +} + +// HasHeadline returns a boolean if a field has been set. +func (o *PublicMarketingData) HasHeadline() bool { + _, ok := o.GetHeadlineOk() + return ok +} + +// SetHeadline gets a reference to the given string and assigns it to the Headline field. +func (o *PublicMarketingData) SetHeadline(v PublicMarketingDataGetHeadlineRetType) { + setPublicMarketingDataGetHeadlineAttributeType(&o.Headline, v) +} + +// GetId returns the Id field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicMarketingData) GetId() (res PublicMarketingDataGetIdRetType) { + res, _ = o.GetIdOk() + return +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicMarketingData) GetIdOk() (ret PublicMarketingDataGetIdRetType, ok bool) { + return getPublicMarketingDataGetIdAttributeTypeOk(o.Id) +} + +// HasId returns a boolean if a field has been set. +func (o *PublicMarketingData) HasId() bool { + _, ok := o.GetIdOk() + return ok +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PublicMarketingData) SetId(v PublicMarketingDataGetIdRetType) { + setPublicMarketingDataGetIdAttributeType(&o.Id, v) +} + +// SetIdNil sets the value for Id to be an explicit nil +func (o *PublicMarketingData) SetIdNil() { + o.Id = nil +} + +// UnsetId ensures that no value is present for Id, not even an explicit nil +func (o *PublicMarketingData) UnsetId() { + o.Id = nil +} + +// GetIntroductoryText returns the IntroductoryText field value if set, zero value otherwise. +func (o *PublicMarketingData) GetIntroductoryText() (res PublicMarketingDataGetIntroductoryTextRetType) { + res, _ = o.GetIntroductoryTextOk() + return +} + +// GetIntroductoryTextOk returns a tuple with the IntroductoryText field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicMarketingData) GetIntroductoryTextOk() (ret PublicMarketingDataGetIntroductoryTextRetType, ok bool) { + return getPublicMarketingDataGetIntroductoryTextAttributeTypeOk(o.IntroductoryText) +} + +// HasIntroductoryText returns a boolean if a field has been set. +func (o *PublicMarketingData) HasIntroductoryText() bool { + _, ok := o.GetIntroductoryTextOk() + return ok +} + +// SetIntroductoryText gets a reference to the given string and assigns it to the IntroductoryText field. +func (o *PublicMarketingData) SetIntroductoryText(v PublicMarketingDataGetIntroductoryTextRetType) { + setPublicMarketingDataGetIntroductoryTextAttributeType(&o.IntroductoryText, v) +} + +// GetLanguage returns the Language field value if set, zero value otherwise. +func (o *PublicMarketingData) GetLanguage() (res PublicMarketingDataGetLanguageRetType) { + res, _ = o.GetLanguageOk() + return +} + +// GetLanguageOk returns a tuple with the Language field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicMarketingData) GetLanguageOk() (ret PublicMarketingDataGetLanguageRetType, ok bool) { + return getPublicMarketingDataGetLanguageAttributeTypeOk(o.Language) +} + +// HasLanguage returns a boolean if a field has been set. +func (o *PublicMarketingData) HasLanguage() bool { + _, ok := o.GetLanguageOk() + return ok +} + +// SetLanguage gets a reference to the given string and assigns it to the Language field. +func (o *PublicMarketingData) SetLanguage(v PublicMarketingDataGetLanguageRetType) { + setPublicMarketingDataGetLanguageAttributeType(&o.Language, v) +} + +// GetLongName returns the LongName field value if set, zero value otherwise. +func (o *PublicMarketingData) GetLongName() (res PublicMarketingDataGetLongNameRetType) { + res, _ = o.GetLongNameOk() + return +} + +// GetLongNameOk returns a tuple with the LongName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicMarketingData) GetLongNameOk() (ret PublicMarketingDataGetLongNameRetType, ok bool) { + return getPublicMarketingDataGetLongNameAttributeTypeOk(o.LongName) +} + +// HasLongName returns a boolean if a field has been set. +func (o *PublicMarketingData) HasLongName() bool { + _, ok := o.GetLongNameOk() + return ok +} + +// SetLongName gets a reference to the given string and assigns it to the LongName field. +func (o *PublicMarketingData) SetLongName(v PublicMarketingDataGetLongNameRetType) { + setPublicMarketingDataGetLongNameAttributeType(&o.LongName, v) +} + +// GetShortName returns the ShortName field value if set, zero value otherwise. +func (o *PublicMarketingData) GetShortName() (res PublicMarketingDataGetShortNameRetType) { + res, _ = o.GetShortNameOk() + return +} + +// GetShortNameOk returns a tuple with the ShortName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicMarketingData) GetShortNameOk() (ret PublicMarketingDataGetShortNameRetType, ok bool) { + return getPublicMarketingDataGetShortNameAttributeTypeOk(o.ShortName) +} + +// HasShortName returns a boolean if a field has been set. +func (o *PublicMarketingData) HasShortName() bool { + _, ok := o.GetShortNameOk() + return ok +} + +// SetShortName gets a reference to the given string and assigns it to the ShortName field. +func (o *PublicMarketingData) SetShortName(v PublicMarketingDataGetShortNameRetType) { + setPublicMarketingDataGetShortNameAttributeType(&o.ShortName, v) +} + +// GetStId returns the StId field value if set, zero value otherwise. +func (o *PublicMarketingData) GetStId() (res PublicMarketingDataGetStIdRetType) { + res, _ = o.GetStIdOk() + return +} + +// GetStIdOk returns a tuple with the StId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicMarketingData) GetStIdOk() (ret PublicMarketingDataGetStIdRetType, ok bool) { + return getPublicMarketingDataGetStIdAttributeTypeOk(o.StId) +} + +// HasStId returns a boolean if a field has been set. +func (o *PublicMarketingData) HasStId() bool { + _, ok := o.GetStIdOk() + return ok +} + +// SetStId gets a reference to the given string and assigns it to the StId field. +func (o *PublicMarketingData) SetStId(v PublicMarketingDataGetStIdRetType) { + setPublicMarketingDataGetStIdAttributeType(&o.StId, v) +} + +// GetValidStart returns the ValidStart field value if set, zero value otherwise. +func (o *PublicMarketingData) GetValidStart() (res PublicMarketingDataGetValidStartRetType) { + res, _ = o.GetValidStartOk() + return +} + +// GetValidStartOk returns a tuple with the ValidStart field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicMarketingData) GetValidStartOk() (ret PublicMarketingDataGetValidStartRetType, ok bool) { + return getPublicMarketingDataGetValidStartAttributeTypeOk(o.ValidStart) +} + +// HasValidStart returns a boolean if a field has been set. +func (o *PublicMarketingData) HasValidStart() bool { + _, ok := o.GetValidStartOk() + return ok +} + +// SetValidStart gets a reference to the given time.Time and assigns it to the ValidStart field. +func (o *PublicMarketingData) SetValidStart(v PublicMarketingDataGetValidStartRetType) { + setPublicMarketingDataGetValidStartAttributeType(&o.ValidStart, v) +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *PublicMarketingData) GetVersion() (res PublicMarketingDataGetVersionRetType) { + 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 *PublicMarketingData) GetVersionOk() (ret PublicMarketingDataGetVersionRetType, ok bool) { + return getPublicMarketingDataGetVersionAttributeTypeOk(o.Version) +} + +// HasVersion returns a boolean if a field has been set. +func (o *PublicMarketingData) HasVersion() bool { + _, ok := o.GetVersionOk() + return ok +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *PublicMarketingData) SetVersion(v PublicMarketingDataGetVersionRetType) { + setPublicMarketingDataGetVersionAttributeType(&o.Version, v) +} + +func (o PublicMarketingData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getPublicMarketingDataGetAdvantagesAttributeTypeOk(o.Advantages); ok { + toSerialize["Advantages"] = val + } + if val, ok := getPublicMarketingDataGetApplicationsAttributeTypeOk(o.Applications); ok { + toSerialize["Applications"] = val + } + if val, ok := getPublicMarketingDataGetFunctionsAttributeTypeOk(o.Functions); ok { + toSerialize["Functions"] = val + } + if val, ok := getPublicMarketingDataGetHeadlineAttributeTypeOk(o.Headline); ok { + toSerialize["Headline"] = val + } + if val, ok := getPublicMarketingDataGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getPublicMarketingDataGetIntroductoryTextAttributeTypeOk(o.IntroductoryText); ok { + toSerialize["IntroductoryText"] = val + } + if val, ok := getPublicMarketingDataGetLanguageAttributeTypeOk(o.Language); ok { + toSerialize["Language"] = val + } + if val, ok := getPublicMarketingDataGetLongNameAttributeTypeOk(o.LongName); ok { + toSerialize["LongName"] = val + } + if val, ok := getPublicMarketingDataGetShortNameAttributeTypeOk(o.ShortName); ok { + toSerialize["ShortName"] = val + } + if val, ok := getPublicMarketingDataGetStIdAttributeTypeOk(o.StId); ok { + toSerialize["StId"] = val + } + if val, ok := getPublicMarketingDataGetValidStartAttributeTypeOk(o.ValidStart); ok { + toSerialize["ValidStart"] = val + } + if val, ok := getPublicMarketingDataGetVersionAttributeTypeOk(o.Version); ok { + toSerialize["Version"] = val + } + return toSerialize, nil +} + +type NullablePublicMarketingData struct { + value *PublicMarketingData + isSet bool +} + +func (v NullablePublicMarketingData) Get() *PublicMarketingData { + return v.value +} + +func (v *NullablePublicMarketingData) Set(val *PublicMarketingData) { + v.value = val + v.isSet = true +} + +func (v NullablePublicMarketingData) IsSet() bool { + return v.isSet +} + +func (v *NullablePublicMarketingData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePublicMarketingData(val *PublicMarketingData) *NullablePublicMarketingData { + return &NullablePublicMarketingData{value: val, isSet: true} +} + +func (v NullablePublicMarketingData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePublicMarketingData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_public_marketing_data_test.go b/services/pim/model_public_marketing_data_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_public_marketing_data_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_public_product.go b/services/pim/model_public_product.go new file mode 100644 index 000000000..2e187221c --- /dev/null +++ b/services/pim/model_public_product.go @@ -0,0 +1,663 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" + "time" +) + +// checks if the PublicProduct type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PublicProduct{} + +/* + types and functions for apiIdentifier +*/ + +// isArray +type PublicProductGetApiIdentifierAttributeType = *[]string +type PublicProductGetApiIdentifierArgType = []string +type PublicProductGetApiIdentifierRetType = []string + +func getPublicProductGetApiIdentifierAttributeTypeOk(arg PublicProductGetApiIdentifierAttributeType) (ret PublicProductGetApiIdentifierRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicProductGetApiIdentifierAttributeType(arg *PublicProductGetApiIdentifierAttributeType, val PublicProductGetApiIdentifierRetType) { + *arg = &val +} + +/* + types and functions for categoryId +*/ + +// isNullableString +type PublicProductGetCategoryIdAttributeType = *NullableString + +func getPublicProductGetCategoryIdAttributeTypeOk(arg PublicProductGetCategoryIdAttributeType) (ret PublicProductGetCategoryIdRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicProductGetCategoryIdAttributeType(arg *PublicProductGetCategoryIdAttributeType, val PublicProductGetCategoryIdRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicProductGetCategoryIdArgType = *string +type PublicProductGetCategoryIdRetType = *string + +/* + types and functions for categoryName +*/ + +// isNullableString +type PublicProductGetCategoryNameAttributeType = *NullableString + +func getPublicProductGetCategoryNameAttributeTypeOk(arg PublicProductGetCategoryNameAttributeType) (ret PublicProductGetCategoryNameRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicProductGetCategoryNameAttributeType(arg *PublicProductGetCategoryNameAttributeType, val PublicProductGetCategoryNameRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicProductGetCategoryNameArgType = *string +type PublicProductGetCategoryNameRetType = *string + +/* + types and functions for description +*/ + +// isNotNullableString +type PublicProductGetDescriptionAttributeType = *string + +func getPublicProductGetDescriptionAttributeTypeOk(arg PublicProductGetDescriptionAttributeType) (ret PublicProductGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicProductGetDescriptionAttributeType(arg *PublicProductGetDescriptionAttributeType, val PublicProductGetDescriptionRetType) { + *arg = &val +} + +type PublicProductGetDescriptionArgType = string +type PublicProductGetDescriptionRetType = string + +/* + types and functions for id +*/ + +// isNullableString +type PublicProductGetIdAttributeType = *NullableString + +func getPublicProductGetIdAttributeTypeOk(arg PublicProductGetIdAttributeType) (ret PublicProductGetIdRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicProductGetIdAttributeType(arg *PublicProductGetIdAttributeType, val PublicProductGetIdRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicProductGetIdArgType = *string +type PublicProductGetIdRetType = *string + +/* + types and functions for image +*/ + +// isNotNullableString +type PublicProductGetImageAttributeType = *string + +func getPublicProductGetImageAttributeTypeOk(arg PublicProductGetImageAttributeType) (ret PublicProductGetImageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicProductGetImageAttributeType(arg *PublicProductGetImageAttributeType, val PublicProductGetImageRetType) { + *arg = &val +} + +type PublicProductGetImageArgType = string +type PublicProductGetImageRetType = string + +/* + types and functions for language +*/ + +// isNotNullableString +type PublicProductGetLanguageAttributeType = *string + +func getPublicProductGetLanguageAttributeTypeOk(arg PublicProductGetLanguageAttributeType) (ret PublicProductGetLanguageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicProductGetLanguageAttributeType(arg *PublicProductGetLanguageAttributeType, val PublicProductGetLanguageRetType) { + *arg = &val +} + +type PublicProductGetLanguageArgType = string +type PublicProductGetLanguageRetType = string + +/* + types and functions for longName +*/ + +// isNotNullableString +type PublicProductGetLongNameAttributeType = *string + +func getPublicProductGetLongNameAttributeTypeOk(arg PublicProductGetLongNameAttributeType) (ret PublicProductGetLongNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicProductGetLongNameAttributeType(arg *PublicProductGetLongNameAttributeType, val PublicProductGetLongNameRetType) { + *arg = &val +} + +type PublicProductGetLongNameArgType = string +type PublicProductGetLongNameRetType = string + +/* + types and functions for shortName +*/ + +// isNotNullableString +type PublicProductGetShortNameAttributeType = *string + +func getPublicProductGetShortNameAttributeTypeOk(arg PublicProductGetShortNameAttributeType) (ret PublicProductGetShortNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicProductGetShortNameAttributeType(arg *PublicProductGetShortNameAttributeType, val PublicProductGetShortNameRetType) { + *arg = &val +} + +type PublicProductGetShortNameArgType = string +type PublicProductGetShortNameRetType = string + +/* + types and functions for validStart +*/ + +// isDateTime +type PublicProductGetValidStartAttributeType = *time.Time +type PublicProductGetValidStartArgType = time.Time +type PublicProductGetValidStartRetType = time.Time + +func getPublicProductGetValidStartAttributeTypeOk(arg PublicProductGetValidStartAttributeType) (ret PublicProductGetValidStartRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicProductGetValidStartAttributeType(arg *PublicProductGetValidStartAttributeType, val PublicProductGetValidStartRetType) { + *arg = &val +} + +/* + types and functions for version +*/ + +// isNotNullableString +type PublicProductGetVersionAttributeType = *string + +func getPublicProductGetVersionAttributeTypeOk(arg PublicProductGetVersionAttributeType) (ret PublicProductGetVersionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicProductGetVersionAttributeType(arg *PublicProductGetVersionAttributeType, val PublicProductGetVersionRetType) { + *arg = &val +} + +type PublicProductGetVersionArgType = string +type PublicProductGetVersionRetType = string + +// PublicProduct struct for PublicProduct +type PublicProduct struct { + // Api identifier + ApiIdentifier PublicProductGetApiIdentifierAttributeType `json:"apiIdentifier,omitempty"` + // The unique identifier for the category, which is object id from MongoDB + CategoryId PublicProductGetCategoryIdAttributeType `json:"categoryId,omitempty"` + // Generic categorization to structure the customer's invoice transparently (e.g. `Compute Engine`, `Database`, `Storage`) + CategoryName PublicProductGetCategoryNameAttributeType `json:"categoryName,omitempty"` + // Description of the product + Description PublicProductGetDescriptionAttributeType `json:"description,omitempty"` + // Unique identifier of the product, which is object id from MongoDB + Id PublicProductGetIdAttributeType `json:"id,omitempty"` + // URI of the category image + Image PublicProductGetImageAttributeType `json:"image,omitempty"` + // Language of the product + Language PublicProductGetLanguageAttributeType `json:"language,omitempty"` + // Extended name of the product + LongName PublicProductGetLongNameAttributeType `json:"longName,omitempty"` + // An abbreviated name of the product + ShortName PublicProductGetShortNameAttributeType `json:"shortName,omitempty"` + // Date when the current version was approved and became valid in PIM + ValidStart PublicProductGetValidStartAttributeType `json:"validStart,omitempty"` + // Number of the revision from PIM + Version PublicProductGetVersionAttributeType `json:"version,omitempty"` +} + +// NewPublicProduct instantiates a new PublicProduct 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 NewPublicProduct() *PublicProduct { + this := PublicProduct{} + return &this +} + +// NewPublicProductWithDefaults instantiates a new PublicProduct 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 NewPublicProductWithDefaults() *PublicProduct { + this := PublicProduct{} + return &this +} + +// GetApiIdentifier returns the ApiIdentifier field value if set, zero value otherwise. +func (o *PublicProduct) GetApiIdentifier() (res PublicProductGetApiIdentifierRetType) { + res, _ = o.GetApiIdentifierOk() + return +} + +// GetApiIdentifierOk returns a tuple with the ApiIdentifier field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicProduct) GetApiIdentifierOk() (ret PublicProductGetApiIdentifierRetType, ok bool) { + return getPublicProductGetApiIdentifierAttributeTypeOk(o.ApiIdentifier) +} + +// HasApiIdentifier returns a boolean if a field has been set. +func (o *PublicProduct) HasApiIdentifier() bool { + _, ok := o.GetApiIdentifierOk() + return ok +} + +// SetApiIdentifier gets a reference to the given []string and assigns it to the ApiIdentifier field. +func (o *PublicProduct) SetApiIdentifier(v PublicProductGetApiIdentifierRetType) { + setPublicProductGetApiIdentifierAttributeType(&o.ApiIdentifier, v) +} + +// GetCategoryId returns the CategoryId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicProduct) GetCategoryId() (res PublicProductGetCategoryIdRetType) { + res, _ = o.GetCategoryIdOk() + return +} + +// GetCategoryIdOk returns a tuple with the CategoryId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicProduct) GetCategoryIdOk() (ret PublicProductGetCategoryIdRetType, ok bool) { + return getPublicProductGetCategoryIdAttributeTypeOk(o.CategoryId) +} + +// HasCategoryId returns a boolean if a field has been set. +func (o *PublicProduct) HasCategoryId() bool { + _, ok := o.GetCategoryIdOk() + return ok +} + +// SetCategoryId gets a reference to the given string and assigns it to the CategoryId field. +func (o *PublicProduct) SetCategoryId(v PublicProductGetCategoryIdRetType) { + setPublicProductGetCategoryIdAttributeType(&o.CategoryId, v) +} + +// SetCategoryIdNil sets the value for CategoryId to be an explicit nil +func (o *PublicProduct) SetCategoryIdNil() { + o.CategoryId = nil +} + +// UnsetCategoryId ensures that no value is present for CategoryId, not even an explicit nil +func (o *PublicProduct) UnsetCategoryId() { + o.CategoryId = nil +} + +// GetCategoryName returns the CategoryName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicProduct) GetCategoryName() (res PublicProductGetCategoryNameRetType) { + res, _ = o.GetCategoryNameOk() + return +} + +// GetCategoryNameOk returns a tuple with the CategoryName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicProduct) GetCategoryNameOk() (ret PublicProductGetCategoryNameRetType, ok bool) { + return getPublicProductGetCategoryNameAttributeTypeOk(o.CategoryName) +} + +// HasCategoryName returns a boolean if a field has been set. +func (o *PublicProduct) HasCategoryName() bool { + _, ok := o.GetCategoryNameOk() + return ok +} + +// SetCategoryName gets a reference to the given string and assigns it to the CategoryName field. +func (o *PublicProduct) SetCategoryName(v PublicProductGetCategoryNameRetType) { + setPublicProductGetCategoryNameAttributeType(&o.CategoryName, v) +} + +// SetCategoryNameNil sets the value for CategoryName to be an explicit nil +func (o *PublicProduct) SetCategoryNameNil() { + o.CategoryName = nil +} + +// UnsetCategoryName ensures that no value is present for CategoryName, not even an explicit nil +func (o *PublicProduct) UnsetCategoryName() { + o.CategoryName = nil +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PublicProduct) GetDescription() (res PublicProductGetDescriptionRetType) { + res, _ = o.GetDescriptionOk() + return +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicProduct) GetDescriptionOk() (ret PublicProductGetDescriptionRetType, ok bool) { + return getPublicProductGetDescriptionAttributeTypeOk(o.Description) +} + +// HasDescription returns a boolean if a field has been set. +func (o *PublicProduct) HasDescription() bool { + _, ok := o.GetDescriptionOk() + return ok +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PublicProduct) SetDescription(v PublicProductGetDescriptionRetType) { + setPublicProductGetDescriptionAttributeType(&o.Description, v) +} + +// GetId returns the Id field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicProduct) GetId() (res PublicProductGetIdRetType) { + res, _ = o.GetIdOk() + return +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicProduct) GetIdOk() (ret PublicProductGetIdRetType, ok bool) { + return getPublicProductGetIdAttributeTypeOk(o.Id) +} + +// HasId returns a boolean if a field has been set. +func (o *PublicProduct) HasId() bool { + _, ok := o.GetIdOk() + return ok +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PublicProduct) SetId(v PublicProductGetIdRetType) { + setPublicProductGetIdAttributeType(&o.Id, v) +} + +// SetIdNil sets the value for Id to be an explicit nil +func (o *PublicProduct) SetIdNil() { + o.Id = nil +} + +// UnsetId ensures that no value is present for Id, not even an explicit nil +func (o *PublicProduct) UnsetId() { + o.Id = nil +} + +// GetImage returns the Image field value if set, zero value otherwise. +func (o *PublicProduct) GetImage() (res PublicProductGetImageRetType) { + res, _ = o.GetImageOk() + return +} + +// GetImageOk returns a tuple with the Image field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicProduct) GetImageOk() (ret PublicProductGetImageRetType, ok bool) { + return getPublicProductGetImageAttributeTypeOk(o.Image) +} + +// HasImage returns a boolean if a field has been set. +func (o *PublicProduct) HasImage() bool { + _, ok := o.GetImageOk() + return ok +} + +// SetImage gets a reference to the given string and assigns it to the Image field. +func (o *PublicProduct) SetImage(v PublicProductGetImageRetType) { + setPublicProductGetImageAttributeType(&o.Image, v) +} + +// GetLanguage returns the Language field value if set, zero value otherwise. +func (o *PublicProduct) GetLanguage() (res PublicProductGetLanguageRetType) { + res, _ = o.GetLanguageOk() + return +} + +// GetLanguageOk returns a tuple with the Language field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicProduct) GetLanguageOk() (ret PublicProductGetLanguageRetType, ok bool) { + return getPublicProductGetLanguageAttributeTypeOk(o.Language) +} + +// HasLanguage returns a boolean if a field has been set. +func (o *PublicProduct) HasLanguage() bool { + _, ok := o.GetLanguageOk() + return ok +} + +// SetLanguage gets a reference to the given string and assigns it to the Language field. +func (o *PublicProduct) SetLanguage(v PublicProductGetLanguageRetType) { + setPublicProductGetLanguageAttributeType(&o.Language, v) +} + +// GetLongName returns the LongName field value if set, zero value otherwise. +func (o *PublicProduct) GetLongName() (res PublicProductGetLongNameRetType) { + res, _ = o.GetLongNameOk() + return +} + +// GetLongNameOk returns a tuple with the LongName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicProduct) GetLongNameOk() (ret PublicProductGetLongNameRetType, ok bool) { + return getPublicProductGetLongNameAttributeTypeOk(o.LongName) +} + +// HasLongName returns a boolean if a field has been set. +func (o *PublicProduct) HasLongName() bool { + _, ok := o.GetLongNameOk() + return ok +} + +// SetLongName gets a reference to the given string and assigns it to the LongName field. +func (o *PublicProduct) SetLongName(v PublicProductGetLongNameRetType) { + setPublicProductGetLongNameAttributeType(&o.LongName, v) +} + +// GetShortName returns the ShortName field value if set, zero value otherwise. +func (o *PublicProduct) GetShortName() (res PublicProductGetShortNameRetType) { + res, _ = o.GetShortNameOk() + return +} + +// GetShortNameOk returns a tuple with the ShortName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicProduct) GetShortNameOk() (ret PublicProductGetShortNameRetType, ok bool) { + return getPublicProductGetShortNameAttributeTypeOk(o.ShortName) +} + +// HasShortName returns a boolean if a field has been set. +func (o *PublicProduct) HasShortName() bool { + _, ok := o.GetShortNameOk() + return ok +} + +// SetShortName gets a reference to the given string and assigns it to the ShortName field. +func (o *PublicProduct) SetShortName(v PublicProductGetShortNameRetType) { + setPublicProductGetShortNameAttributeType(&o.ShortName, v) +} + +// GetValidStart returns the ValidStart field value if set, zero value otherwise. +func (o *PublicProduct) GetValidStart() (res PublicProductGetValidStartRetType) { + res, _ = o.GetValidStartOk() + return +} + +// GetValidStartOk returns a tuple with the ValidStart field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicProduct) GetValidStartOk() (ret PublicProductGetValidStartRetType, ok bool) { + return getPublicProductGetValidStartAttributeTypeOk(o.ValidStart) +} + +// HasValidStart returns a boolean if a field has been set. +func (o *PublicProduct) HasValidStart() bool { + _, ok := o.GetValidStartOk() + return ok +} + +// SetValidStart gets a reference to the given time.Time and assigns it to the ValidStart field. +func (o *PublicProduct) SetValidStart(v PublicProductGetValidStartRetType) { + setPublicProductGetValidStartAttributeType(&o.ValidStart, v) +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *PublicProduct) GetVersion() (res PublicProductGetVersionRetType) { + 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 *PublicProduct) GetVersionOk() (ret PublicProductGetVersionRetType, ok bool) { + return getPublicProductGetVersionAttributeTypeOk(o.Version) +} + +// HasVersion returns a boolean if a field has been set. +func (o *PublicProduct) HasVersion() bool { + _, ok := o.GetVersionOk() + return ok +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *PublicProduct) SetVersion(v PublicProductGetVersionRetType) { + setPublicProductGetVersionAttributeType(&o.Version, v) +} + +func (o PublicProduct) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getPublicProductGetApiIdentifierAttributeTypeOk(o.ApiIdentifier); ok { + toSerialize["ApiIdentifier"] = val + } + if val, ok := getPublicProductGetCategoryIdAttributeTypeOk(o.CategoryId); ok { + toSerialize["CategoryId"] = val + } + if val, ok := getPublicProductGetCategoryNameAttributeTypeOk(o.CategoryName); ok { + toSerialize["CategoryName"] = val + } + if val, ok := getPublicProductGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } + if val, ok := getPublicProductGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getPublicProductGetImageAttributeTypeOk(o.Image); ok { + toSerialize["Image"] = val + } + if val, ok := getPublicProductGetLanguageAttributeTypeOk(o.Language); ok { + toSerialize["Language"] = val + } + if val, ok := getPublicProductGetLongNameAttributeTypeOk(o.LongName); ok { + toSerialize["LongName"] = val + } + if val, ok := getPublicProductGetShortNameAttributeTypeOk(o.ShortName); ok { + toSerialize["ShortName"] = val + } + if val, ok := getPublicProductGetValidStartAttributeTypeOk(o.ValidStart); ok { + toSerialize["ValidStart"] = val + } + if val, ok := getPublicProductGetVersionAttributeTypeOk(o.Version); ok { + toSerialize["Version"] = val + } + return toSerialize, nil +} + +type NullablePublicProduct struct { + value *PublicProduct + isSet bool +} + +func (v NullablePublicProduct) Get() *PublicProduct { + return v.value +} + +func (v *NullablePublicProduct) Set(val *PublicProduct) { + v.value = val + v.isSet = true +} + +func (v NullablePublicProduct) IsSet() bool { + return v.isSet +} + +func (v *NullablePublicProduct) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePublicProduct(val *PublicProduct) *NullablePublicProduct { + return &NullablePublicProduct{value: val, isSet: true} +} + +func (v NullablePublicProduct) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePublicProduct) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_public_product_test.go b/services/pim/model_public_product_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_public_product_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_public_sku.go b/services/pim/model_public_sku.go new file mode 100644 index 000000000..7aaf530e4 --- /dev/null +++ b/services/pim/model_public_sku.go @@ -0,0 +1,1735 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" + "time" +) + +// checks if the PublicSKU type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PublicSKU{} + +/* + types and functions for categoryId +*/ + +// isNullableString +type PublicSKUGetCategoryIdAttributeType = *NullableString + +func getPublicSKUGetCategoryIdAttributeTypeOk(arg PublicSKUGetCategoryIdAttributeType) (ret PublicSKUGetCategoryIdRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicSKUGetCategoryIdAttributeType(arg *PublicSKUGetCategoryIdAttributeType, val PublicSKUGetCategoryIdRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicSKUGetCategoryIdArgType = *string +type PublicSKUGetCategoryIdRetType = *string + +/* + types and functions for categoryName +*/ + +// isNullableString +type PublicSKUGetCategoryNameAttributeType = *NullableString + +func getPublicSKUGetCategoryNameAttributeTypeOk(arg PublicSKUGetCategoryNameAttributeType) (ret PublicSKUGetCategoryNameRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicSKUGetCategoryNameAttributeType(arg *PublicSKUGetCategoryNameAttributeType, val PublicSKUGetCategoryNameRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicSKUGetCategoryNameArgType = *string +type PublicSKUGetCategoryNameRetType = *string + +/* + types and functions for cpuOverprovisioning +*/ + +// isBoolean +type PublicSKUgetCpuOverprovisioningAttributeType = *bool +type PublicSKUgetCpuOverprovisioningArgType = *bool +type PublicSKUgetCpuOverprovisioningRetType = *bool + +func getPublicSKUgetCpuOverprovisioningAttributeTypeOk(arg PublicSKUgetCpuOverprovisioningAttributeType) (ret PublicSKUgetCpuOverprovisioningRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setPublicSKUgetCpuOverprovisioningAttributeType(arg *PublicSKUgetCpuOverprovisioningAttributeType, val PublicSKUgetCpuOverprovisioningRetType) { + *arg = val +} + +/* + types and functions for deprecated +*/ + +// isNullableString +type PublicSKUGetDeprecatedAttributeType = *NullableString + +func getPublicSKUGetDeprecatedAttributeTypeOk(arg PublicSKUGetDeprecatedAttributeType) (ret PublicSKUGetDeprecatedRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicSKUGetDeprecatedAttributeType(arg *PublicSKUGetDeprecatedAttributeType, val PublicSKUGetDeprecatedRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicSKUGetDeprecatedArgType = *string +type PublicSKUGetDeprecatedRetType = *string + +/* + types and functions for documentation +*/ + +// isNullableString +type PublicSKUGetDocumentationAttributeType = *NullableString + +func getPublicSKUGetDocumentationAttributeTypeOk(arg PublicSKUGetDocumentationAttributeType) (ret PublicSKUGetDocumentationRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicSKUGetDocumentationAttributeType(arg *PublicSKUGetDocumentationAttributeType, val PublicSKUGetDocumentationRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicSKUGetDocumentationArgType = *string +type PublicSKUGetDocumentationRetType = *string + +/* + types and functions for finOpsFocus +*/ + +// isModel +type PublicSKUGetFinOpsFocusAttributeType = *FinOpsFocus +type PublicSKUGetFinOpsFocusArgType = FinOpsFocus +type PublicSKUGetFinOpsFocusRetType = FinOpsFocus + +func getPublicSKUGetFinOpsFocusAttributeTypeOk(arg PublicSKUGetFinOpsFocusAttributeType) (ret PublicSKUGetFinOpsFocusRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicSKUGetFinOpsFocusAttributeType(arg *PublicSKUGetFinOpsFocusAttributeType, val PublicSKUGetFinOpsFocusRetType) { + *arg = &val +} + +/* + types and functions for generalProductGroup +*/ + +// isNullableString +type PublicSKUGetGeneralProductGroupAttributeType = *NullableString + +func getPublicSKUGetGeneralProductGroupAttributeTypeOk(arg PublicSKUGetGeneralProductGroupAttributeType) (ret PublicSKUGetGeneralProductGroupRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicSKUGetGeneralProductGroupAttributeType(arg *PublicSKUGetGeneralProductGroupAttributeType, val PublicSKUGetGeneralProductGroupRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicSKUGetGeneralProductGroupArgType = *string +type PublicSKUGetGeneralProductGroupRetType = *string + +/* + types and functions for id +*/ + +// isNotNullableString +type PublicSKUGetIdAttributeType = *string + +func getPublicSKUGetIdAttributeTypeOk(arg PublicSKUGetIdAttributeType) (ret PublicSKUGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicSKUGetIdAttributeType(arg *PublicSKUGetIdAttributeType, val PublicSKUGetIdRetType) { + *arg = &val +} + +type PublicSKUGetIdArgType = string +type PublicSKUGetIdRetType = string + +/* + types and functions for language +*/ + +// isNotNullableString +type PublicSKUGetLanguageAttributeType = *string + +func getPublicSKUGetLanguageAttributeTypeOk(arg PublicSKUGetLanguageAttributeType) (ret PublicSKUGetLanguageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicSKUGetLanguageAttributeType(arg *PublicSKUGetLanguageAttributeType, val PublicSKUGetLanguageRetType) { + *arg = &val +} + +type PublicSKUGetLanguageArgType = string +type PublicSKUGetLanguageRetType = string + +/* + types and functions for licenseName +*/ + +// isNullableString +type PublicSKUGetLicenseNameAttributeType = *NullableString + +func getPublicSKUGetLicenseNameAttributeTypeOk(arg PublicSKUGetLicenseNameAttributeType) (ret PublicSKUGetLicenseNameRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicSKUGetLicenseNameAttributeType(arg *PublicSKUGetLicenseNameAttributeType, val PublicSKUGetLicenseNameRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicSKUGetLicenseNameArgType = *string +type PublicSKUGetLicenseNameRetType = *string + +/* + types and functions for maturityModelState +*/ + +// isNullableString +type PublicSKUGetMaturityModelStateAttributeType = *NullableString + +func getPublicSKUGetMaturityModelStateAttributeTypeOk(arg PublicSKUGetMaturityModelStateAttributeType) (ret PublicSKUGetMaturityModelStateRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicSKUGetMaturityModelStateAttributeType(arg *PublicSKUGetMaturityModelStateAttributeType, val PublicSKUGetMaturityModelStateRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicSKUGetMaturityModelStateArgType = *string +type PublicSKUGetMaturityModelStateRetType = *string + +/* + types and functions for metric +*/ + +// isNullableString +type PublicSKUGetMetricAttributeType = *NullableString + +func getPublicSKUGetMetricAttributeTypeOk(arg PublicSKUGetMetricAttributeType) (ret PublicSKUGetMetricRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicSKUGetMetricAttributeType(arg *PublicSKUGetMetricAttributeType, val PublicSKUGetMetricRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicSKUGetMetricArgType = *string +type PublicSKUGetMetricRetType = *string + +/* + types and functions for name +*/ + +// isNullableString +type PublicSKUGetNameAttributeType = *NullableString + +func getPublicSKUGetNameAttributeTypeOk(arg PublicSKUGetNameAttributeType) (ret PublicSKUGetNameRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicSKUGetNameAttributeType(arg *PublicSKUGetNameAttributeType, val PublicSKUGetNameRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicSKUGetNameArgType = *string +type PublicSKUGetNameRetType = *string + +/* + types and functions for priceListVisibility +*/ + +// isNullableString +type PublicSKUGetPriceListVisibilityAttributeType = *NullableString + +func getPublicSKUGetPriceListVisibilityAttributeTypeOk(arg PublicSKUGetPriceListVisibilityAttributeType) (ret PublicSKUGetPriceListVisibilityRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicSKUGetPriceListVisibilityAttributeType(arg *PublicSKUGetPriceListVisibilityAttributeType, val PublicSKUGetPriceListVisibilityRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicSKUGetPriceListVisibilityArgType = *string +type PublicSKUGetPriceListVisibilityRetType = *string + +/* + types and functions for prices +*/ + +// isArray +type PublicSKUGetPricesAttributeType = *[]Price +type PublicSKUGetPricesArgType = []Price +type PublicSKUGetPricesRetType = []Price + +func getPublicSKUGetPricesAttributeTypeOk(arg PublicSKUGetPricesAttributeType) (ret PublicSKUGetPricesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicSKUGetPricesAttributeType(arg *PublicSKUGetPricesAttributeType, val PublicSKUGetPricesRetType) { + *arg = &val +} + +/* + types and functions for productId +*/ + +// isNullableString +type PublicSKUGetProductIdAttributeType = *NullableString + +func getPublicSKUGetProductIdAttributeTypeOk(arg PublicSKUGetProductIdAttributeType) (ret PublicSKUGetProductIdRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicSKUGetProductIdAttributeType(arg *PublicSKUGetProductIdAttributeType, val PublicSKUGetProductIdRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicSKUGetProductIdArgType = *string +type PublicSKUGetProductIdRetType = *string + +/* + types and functions for productName +*/ + +// isNullableString +type PublicSKUGetProductNameAttributeType = *NullableString + +func getPublicSKUGetProductNameAttributeTypeOk(arg PublicSKUGetProductNameAttributeType) (ret PublicSKUGetProductNameRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicSKUGetProductNameAttributeType(arg *PublicSKUGetProductNameAttributeType, val PublicSKUGetProductNameRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicSKUGetProductNameArgType = *string +type PublicSKUGetProductNameRetType = *string + +/* + types and functions for rateType +*/ + +// isNullableString +type PublicSKUGetRateTypeAttributeType = *NullableString + +func getPublicSKUGetRateTypeAttributeTypeOk(arg PublicSKUGetRateTypeAttributeType) (ret PublicSKUGetRateTypeRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicSKUGetRateTypeAttributeType(arg *PublicSKUGetRateTypeAttributeType, val PublicSKUGetRateTypeRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicSKUGetRateTypeArgType = *string +type PublicSKUGetRateTypeRetType = *string + +/* + types and functions for region +*/ + +// isNotNullableString +type PublicSKUGetRegionAttributeType = *string + +func getPublicSKUGetRegionAttributeTypeOk(arg PublicSKUGetRegionAttributeType) (ret PublicSKUGetRegionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicSKUGetRegionAttributeType(arg *PublicSKUGetRegionAttributeType, val PublicSKUGetRegionRetType) { + *arg = &val +} + +type PublicSKUGetRegionArgType = string +type PublicSKUGetRegionRetType = string + +/* + types and functions for serviceId +*/ + +// isArray +type PublicSKUGetServiceIdAttributeType = *[]string +type PublicSKUGetServiceIdArgType = []string +type PublicSKUGetServiceIdRetType = []string + +func getPublicSKUGetServiceIdAttributeTypeOk(arg PublicSKUGetServiceIdAttributeType) (ret PublicSKUGetServiceIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicSKUGetServiceIdAttributeType(arg *PublicSKUGetServiceIdAttributeType, val PublicSKUGetServiceIdRetType) { + *arg = &val +} + +/* + types and functions for technicalProductGroup +*/ + +// isNullableString +type PublicSKUGetTechnicalProductGroupAttributeType = *NullableString + +func getPublicSKUGetTechnicalProductGroupAttributeTypeOk(arg PublicSKUGetTechnicalProductGroupAttributeType) (ret PublicSKUGetTechnicalProductGroupRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setPublicSKUGetTechnicalProductGroupAttributeType(arg *PublicSKUGetTechnicalProductGroupAttributeType, val PublicSKUGetTechnicalProductGroupRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type PublicSKUGetTechnicalProductGroupArgType = *string +type PublicSKUGetTechnicalProductGroupRetType = *string + +/* + types and functions for tierMaxValue +*/ + +// isLong +type PublicSKUGetTierMaxValueAttributeType = *int64 +type PublicSKUGetTierMaxValueArgType = *int64 +type PublicSKUGetTierMaxValueRetType = *int64 + +func getPublicSKUGetTierMaxValueAttributeTypeOk(arg PublicSKUGetTierMaxValueAttributeType) (ret PublicSKUGetTierMaxValueRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setPublicSKUGetTierMaxValueAttributeType(arg *PublicSKUGetTierMaxValueAttributeType, val PublicSKUGetTierMaxValueRetType) { + *arg = val +} + +/* + types and functions for tierMinValue +*/ + +// isLong +type PublicSKUGetTierMinValueAttributeType = *int64 +type PublicSKUGetTierMinValueArgType = *int64 +type PublicSKUGetTierMinValueRetType = *int64 + +func getPublicSKUGetTierMinValueAttributeTypeOk(arg PublicSKUGetTierMinValueAttributeType) (ret PublicSKUGetTierMinValueRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setPublicSKUGetTierMinValueAttributeType(arg *PublicSKUGetTierMinValueAttributeType, val PublicSKUGetTierMinValueRetType) { + *arg = val +} + +/* + types and functions for title +*/ + +// isNotNullableString +type PublicSKUGetTitleAttributeType = *string + +func getPublicSKUGetTitleAttributeTypeOk(arg PublicSKUGetTitleAttributeType) (ret PublicSKUGetTitleRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicSKUGetTitleAttributeType(arg *PublicSKUGetTitleAttributeType, val PublicSKUGetTitleRetType) { + *arg = &val +} + +type PublicSKUGetTitleArgType = string +type PublicSKUGetTitleRetType = string + +/* + types and functions for unit +*/ + +// isNotNullableString +type PublicSKUGetUnitAttributeType = *string + +func getPublicSKUGetUnitAttributeTypeOk(arg PublicSKUGetUnitAttributeType) (ret PublicSKUGetUnitRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicSKUGetUnitAttributeType(arg *PublicSKUGetUnitAttributeType, val PublicSKUGetUnitRetType) { + *arg = &val +} + +type PublicSKUGetUnitArgType = string +type PublicSKUGetUnitRetType = string + +/* + types and functions for unitBilling +*/ + +// isNotNullableString +type PublicSKUGetUnitBillingAttributeType = *string + +func getPublicSKUGetUnitBillingAttributeTypeOk(arg PublicSKUGetUnitBillingAttributeType) (ret PublicSKUGetUnitBillingRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicSKUGetUnitBillingAttributeType(arg *PublicSKUGetUnitBillingAttributeType, val PublicSKUGetUnitBillingRetType) { + *arg = &val +} + +type PublicSKUGetUnitBillingArgType = string +type PublicSKUGetUnitBillingRetType = string + +/* + types and functions for validStart +*/ + +// isDateTime +type PublicSKUGetValidStartAttributeType = *time.Time +type PublicSKUGetValidStartArgType = time.Time +type PublicSKUGetValidStartRetType = time.Time + +func getPublicSKUGetValidStartAttributeTypeOk(arg PublicSKUGetValidStartAttributeType) (ret PublicSKUGetValidStartRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicSKUGetValidStartAttributeType(arg *PublicSKUGetValidStartAttributeType, val PublicSKUGetValidStartRetType) { + *arg = &val +} + +/* + types and functions for version +*/ + +// isNotNullableString +type PublicSKUGetVersionAttributeType = *string + +func getPublicSKUGetVersionAttributeTypeOk(arg PublicSKUGetVersionAttributeType) (ret PublicSKUGetVersionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicSKUGetVersionAttributeType(arg *PublicSKUGetVersionAttributeType, val PublicSKUGetVersionRetType) { + *arg = &val +} + +type PublicSKUGetVersionArgType = string +type PublicSKUGetVersionRetType = string + +/* + types and functions for productSpecificAttributes +*/ + +// isModel +type PublicSKUGetProductSpecificAttributesAttributeType = *PublicSKUAllOfProductSpecificAttributes +type PublicSKUGetProductSpecificAttributesArgType = PublicSKUAllOfProductSpecificAttributes +type PublicSKUGetProductSpecificAttributesRetType = PublicSKUAllOfProductSpecificAttributes + +func getPublicSKUGetProductSpecificAttributesAttributeTypeOk(arg PublicSKUGetProductSpecificAttributesAttributeType) (ret PublicSKUGetProductSpecificAttributesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicSKUGetProductSpecificAttributesAttributeType(arg *PublicSKUGetProductSpecificAttributesAttributeType, val PublicSKUGetProductSpecificAttributesRetType) { + *arg = &val +} + +// PublicSKU struct for PublicSKU +type PublicSKU struct { + // The unique identifier for the category, which is object id from MongoDB + CategoryId PublicSKUGetCategoryIdAttributeType `json:"categoryId,omitempty"` + // Generic categorization to structure the customer's invoice transparently (e.g. `Compute Engine`, `Database`, `Storage`) + CategoryName PublicSKUGetCategoryNameAttributeType `json:"categoryName,omitempty"` + // CPU overprovisioning + CpuOverprovisioning PublicSKUgetCpuOverprovisioningAttributeType `json:"cpuOverprovisioning,omitempty"` + // Attribute that indicates if product is deprecated or not. + Deprecated PublicSKUGetDeprecatedAttributeType `json:"deprecated,omitempty"` + // Documentation URL + Documentation PublicSKUGetDocumentationAttributeType `json:"documentation,omitempty"` + FinOpsFocus PublicSKUGetFinOpsFocusAttributeType `json:"finOpsFocus,omitempty"` + // Category designation one level below the generic designation that describes the overall product group to which all the SKUs are allocated to. + GeneralProductGroup PublicSKUGetGeneralProductGroupAttributeType `json:"generalProductGroup,omitempty"` + // SKU ID \\ Complete SAP article number with prefix. Will be shown on the invoice like this + Id PublicSKUGetIdAttributeType `json:"id,omitempty"` + // Language of sku + Language PublicSKUGetLanguageAttributeType `json:"language,omitempty"` + // Name of license + LicenseName PublicSKUGetLicenseNameAttributeType `json:"licenseName,omitempty"` + // State of the SKU following the mandatory product‘s maturity model progress (e.g. `beta`, `ga`) + MaturityModelState PublicSKUGetMaturityModelStateAttributeType `json:"maturityModelState,omitempty"` + // Metric of service + Metric PublicSKUGetMetricAttributeType `json:"metric,omitempty"` + // How the line item will appear on the bill + Name PublicSKUGetNameAttributeType `json:"name,omitempty"` + // Attribute that indicates if PriceList is visible or not. + PriceListVisibility PublicSKUGetPriceListVisibilityAttributeType `json:"priceListVisibility,omitempty"` + // List of prices + Prices PublicSKUGetPricesAttributeType `json:"prices,omitempty"` + // The unique identifier for the product, which is object id from MongoDB + ProductId PublicSKUGetProductIdAttributeType `json:"productId,omitempty"` + // Generic product (e.g. `Windows Server`, `Server Backup Management`, `Server`) + ProductName PublicSKUGetProductNameAttributeType `json:"productName,omitempty"` + // Rate type of service + RateType PublicSKUGetRateTypeAttributeType `json:"rateType,omitempty"` + // Region of sku + Region PublicSKUGetRegionAttributeType `json:"region,omitempty"` + // List of unique service look up ids + ServiceId PublicSKUGetServiceIdAttributeType `json:"serviceId,omitempty"` + // Technical differentiation + TechnicalProductGroup PublicSKUGetTechnicalProductGroupAttributeType `json:"technicalProductGroup,omitempty"` + // Tier max value + TierMaxValue PublicSKUGetTierMaxValueAttributeType `json:"tierMaxValue,omitempty"` + // Tier min value + TierMinValue PublicSKUGetTierMinValueAttributeType `json:"tierMinValue,omitempty"` + // Service name + Title PublicSKUGetTitleAttributeType `json:"title,omitempty"` + // Full SAP article number with prefix. Will appear on the invoice like that + Unit PublicSKUGetUnitAttributeType `json:"unit,omitempty"` + // Unit billing + UnitBilling PublicSKUGetUnitBillingAttributeType `json:"unitBilling,omitempty"` + // Date when the current version was approved and became valid in PIM + ValidStart PublicSKUGetValidStartAttributeType `json:"validStart,omitempty"` + // Number of the revision from PIM + Version PublicSKUGetVersionAttributeType `json:"version,omitempty"` + ProductSpecificAttributes PublicSKUGetProductSpecificAttributesAttributeType `json:"productSpecificAttributes,omitempty"` +} + +// NewPublicSKU instantiates a new PublicSKU 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 NewPublicSKU() *PublicSKU { + this := PublicSKU{} + return &this +} + +// NewPublicSKUWithDefaults instantiates a new PublicSKU 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 NewPublicSKUWithDefaults() *PublicSKU { + this := PublicSKU{} + return &this +} + +// GetCategoryId returns the CategoryId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicSKU) GetCategoryId() (res PublicSKUGetCategoryIdRetType) { + res, _ = o.GetCategoryIdOk() + return +} + +// GetCategoryIdOk returns a tuple with the CategoryId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicSKU) GetCategoryIdOk() (ret PublicSKUGetCategoryIdRetType, ok bool) { + return getPublicSKUGetCategoryIdAttributeTypeOk(o.CategoryId) +} + +// HasCategoryId returns a boolean if a field has been set. +func (o *PublicSKU) HasCategoryId() bool { + _, ok := o.GetCategoryIdOk() + return ok +} + +// SetCategoryId gets a reference to the given string and assigns it to the CategoryId field. +func (o *PublicSKU) SetCategoryId(v PublicSKUGetCategoryIdRetType) { + setPublicSKUGetCategoryIdAttributeType(&o.CategoryId, v) +} + +// SetCategoryIdNil sets the value for CategoryId to be an explicit nil +func (o *PublicSKU) SetCategoryIdNil() { + o.CategoryId = nil +} + +// UnsetCategoryId ensures that no value is present for CategoryId, not even an explicit nil +func (o *PublicSKU) UnsetCategoryId() { + o.CategoryId = nil +} + +// GetCategoryName returns the CategoryName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicSKU) GetCategoryName() (res PublicSKUGetCategoryNameRetType) { + res, _ = o.GetCategoryNameOk() + return +} + +// GetCategoryNameOk returns a tuple with the CategoryName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicSKU) GetCategoryNameOk() (ret PublicSKUGetCategoryNameRetType, ok bool) { + return getPublicSKUGetCategoryNameAttributeTypeOk(o.CategoryName) +} + +// HasCategoryName returns a boolean if a field has been set. +func (o *PublicSKU) HasCategoryName() bool { + _, ok := o.GetCategoryNameOk() + return ok +} + +// SetCategoryName gets a reference to the given string and assigns it to the CategoryName field. +func (o *PublicSKU) SetCategoryName(v PublicSKUGetCategoryNameRetType) { + setPublicSKUGetCategoryNameAttributeType(&o.CategoryName, v) +} + +// SetCategoryNameNil sets the value for CategoryName to be an explicit nil +func (o *PublicSKU) SetCategoryNameNil() { + o.CategoryName = nil +} + +// UnsetCategoryName ensures that no value is present for CategoryName, not even an explicit nil +func (o *PublicSKU) UnsetCategoryName() { + o.CategoryName = nil +} + +// GetCpuOverprovisioning returns the CpuOverprovisioning field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicSKU) GetCpuOverprovisioning() (res PublicSKUgetCpuOverprovisioningRetType) { + res, _ = o.GetCpuOverprovisioningOk() + return +} + +// GetCpuOverprovisioningOk returns a tuple with the CpuOverprovisioning field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicSKU) GetCpuOverprovisioningOk() (ret PublicSKUgetCpuOverprovisioningRetType, ok bool) { + return getPublicSKUgetCpuOverprovisioningAttributeTypeOk(o.CpuOverprovisioning) +} + +// HasCpuOverprovisioning returns a boolean if a field has been set. +func (o *PublicSKU) HasCpuOverprovisioning() bool { + _, ok := o.GetCpuOverprovisioningOk() + return ok +} + +// SetCpuOverprovisioning gets a reference to the given bool and assigns it to the CpuOverprovisioning field. +func (o *PublicSKU) SetCpuOverprovisioning(v PublicSKUgetCpuOverprovisioningRetType) { + setPublicSKUgetCpuOverprovisioningAttributeType(&o.CpuOverprovisioning, v) +} + +// SetCpuOverprovisioningNil sets the value for CpuOverprovisioning to be an explicit nil +func (o *PublicSKU) SetCpuOverprovisioningNil() { + o.CpuOverprovisioning = nil +} + +// UnsetCpuOverprovisioning ensures that no value is present for CpuOverprovisioning, not even an explicit nil +func (o *PublicSKU) UnsetCpuOverprovisioning() { + o.CpuOverprovisioning = nil +} + +// GetDeprecated returns the Deprecated field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicSKU) GetDeprecated() (res PublicSKUGetDeprecatedRetType) { + res, _ = o.GetDeprecatedOk() + return +} + +// GetDeprecatedOk returns a tuple with the Deprecated field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicSKU) GetDeprecatedOk() (ret PublicSKUGetDeprecatedRetType, ok bool) { + return getPublicSKUGetDeprecatedAttributeTypeOk(o.Deprecated) +} + +// HasDeprecated returns a boolean if a field has been set. +func (o *PublicSKU) HasDeprecated() bool { + _, ok := o.GetDeprecatedOk() + return ok +} + +// SetDeprecated gets a reference to the given string and assigns it to the Deprecated field. +func (o *PublicSKU) SetDeprecated(v PublicSKUGetDeprecatedRetType) { + setPublicSKUGetDeprecatedAttributeType(&o.Deprecated, v) +} + +// SetDeprecatedNil sets the value for Deprecated to be an explicit nil +func (o *PublicSKU) SetDeprecatedNil() { + o.Deprecated = nil +} + +// UnsetDeprecated ensures that no value is present for Deprecated, not even an explicit nil +func (o *PublicSKU) UnsetDeprecated() { + o.Deprecated = nil +} + +// GetDocumentation returns the Documentation field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicSKU) GetDocumentation() (res PublicSKUGetDocumentationRetType) { + res, _ = o.GetDocumentationOk() + return +} + +// GetDocumentationOk returns a tuple with the Documentation field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicSKU) GetDocumentationOk() (ret PublicSKUGetDocumentationRetType, ok bool) { + return getPublicSKUGetDocumentationAttributeTypeOk(o.Documentation) +} + +// HasDocumentation returns a boolean if a field has been set. +func (o *PublicSKU) HasDocumentation() bool { + _, ok := o.GetDocumentationOk() + return ok +} + +// SetDocumentation gets a reference to the given string and assigns it to the Documentation field. +func (o *PublicSKU) SetDocumentation(v PublicSKUGetDocumentationRetType) { + setPublicSKUGetDocumentationAttributeType(&o.Documentation, v) +} + +// SetDocumentationNil sets the value for Documentation to be an explicit nil +func (o *PublicSKU) SetDocumentationNil() { + o.Documentation = nil +} + +// UnsetDocumentation ensures that no value is present for Documentation, not even an explicit nil +func (o *PublicSKU) UnsetDocumentation() { + o.Documentation = nil +} + +// GetFinOpsFocus returns the FinOpsFocus field value if set, zero value otherwise. +func (o *PublicSKU) GetFinOpsFocus() (res PublicSKUGetFinOpsFocusRetType) { + res, _ = o.GetFinOpsFocusOk() + return +} + +// GetFinOpsFocusOk returns a tuple with the FinOpsFocus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicSKU) GetFinOpsFocusOk() (ret PublicSKUGetFinOpsFocusRetType, ok bool) { + return getPublicSKUGetFinOpsFocusAttributeTypeOk(o.FinOpsFocus) +} + +// HasFinOpsFocus returns a boolean if a field has been set. +func (o *PublicSKU) HasFinOpsFocus() bool { + _, ok := o.GetFinOpsFocusOk() + return ok +} + +// SetFinOpsFocus gets a reference to the given FinOpsFocus and assigns it to the FinOpsFocus field. +func (o *PublicSKU) SetFinOpsFocus(v PublicSKUGetFinOpsFocusRetType) { + setPublicSKUGetFinOpsFocusAttributeType(&o.FinOpsFocus, v) +} + +// GetGeneralProductGroup returns the GeneralProductGroup field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicSKU) GetGeneralProductGroup() (res PublicSKUGetGeneralProductGroupRetType) { + res, _ = o.GetGeneralProductGroupOk() + return +} + +// GetGeneralProductGroupOk returns a tuple with the GeneralProductGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicSKU) GetGeneralProductGroupOk() (ret PublicSKUGetGeneralProductGroupRetType, ok bool) { + return getPublicSKUGetGeneralProductGroupAttributeTypeOk(o.GeneralProductGroup) +} + +// HasGeneralProductGroup returns a boolean if a field has been set. +func (o *PublicSKU) HasGeneralProductGroup() bool { + _, ok := o.GetGeneralProductGroupOk() + return ok +} + +// SetGeneralProductGroup gets a reference to the given string and assigns it to the GeneralProductGroup field. +func (o *PublicSKU) SetGeneralProductGroup(v PublicSKUGetGeneralProductGroupRetType) { + setPublicSKUGetGeneralProductGroupAttributeType(&o.GeneralProductGroup, v) +} + +// SetGeneralProductGroupNil sets the value for GeneralProductGroup to be an explicit nil +func (o *PublicSKU) SetGeneralProductGroupNil() { + o.GeneralProductGroup = nil +} + +// UnsetGeneralProductGroup ensures that no value is present for GeneralProductGroup, not even an explicit nil +func (o *PublicSKU) UnsetGeneralProductGroup() { + o.GeneralProductGroup = nil +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *PublicSKU) GetId() (res PublicSKUGetIdRetType) { + res, _ = o.GetIdOk() + return +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicSKU) GetIdOk() (ret PublicSKUGetIdRetType, ok bool) { + return getPublicSKUGetIdAttributeTypeOk(o.Id) +} + +// HasId returns a boolean if a field has been set. +func (o *PublicSKU) HasId() bool { + _, ok := o.GetIdOk() + return ok +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *PublicSKU) SetId(v PublicSKUGetIdRetType) { + setPublicSKUGetIdAttributeType(&o.Id, v) +} + +// GetLanguage returns the Language field value if set, zero value otherwise. +func (o *PublicSKU) GetLanguage() (res PublicSKUGetLanguageRetType) { + res, _ = o.GetLanguageOk() + return +} + +// GetLanguageOk returns a tuple with the Language field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicSKU) GetLanguageOk() (ret PublicSKUGetLanguageRetType, ok bool) { + return getPublicSKUGetLanguageAttributeTypeOk(o.Language) +} + +// HasLanguage returns a boolean if a field has been set. +func (o *PublicSKU) HasLanguage() bool { + _, ok := o.GetLanguageOk() + return ok +} + +// SetLanguage gets a reference to the given string and assigns it to the Language field. +func (o *PublicSKU) SetLanguage(v PublicSKUGetLanguageRetType) { + setPublicSKUGetLanguageAttributeType(&o.Language, v) +} + +// GetLicenseName returns the LicenseName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicSKU) GetLicenseName() (res PublicSKUGetLicenseNameRetType) { + res, _ = o.GetLicenseNameOk() + return +} + +// GetLicenseNameOk returns a tuple with the LicenseName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicSKU) GetLicenseNameOk() (ret PublicSKUGetLicenseNameRetType, ok bool) { + return getPublicSKUGetLicenseNameAttributeTypeOk(o.LicenseName) +} + +// HasLicenseName returns a boolean if a field has been set. +func (o *PublicSKU) HasLicenseName() bool { + _, ok := o.GetLicenseNameOk() + return ok +} + +// SetLicenseName gets a reference to the given string and assigns it to the LicenseName field. +func (o *PublicSKU) SetLicenseName(v PublicSKUGetLicenseNameRetType) { + setPublicSKUGetLicenseNameAttributeType(&o.LicenseName, v) +} + +// SetLicenseNameNil sets the value for LicenseName to be an explicit nil +func (o *PublicSKU) SetLicenseNameNil() { + o.LicenseName = nil +} + +// UnsetLicenseName ensures that no value is present for LicenseName, not even an explicit nil +func (o *PublicSKU) UnsetLicenseName() { + o.LicenseName = nil +} + +// GetMaturityModelState returns the MaturityModelState field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicSKU) GetMaturityModelState() (res PublicSKUGetMaturityModelStateRetType) { + res, _ = o.GetMaturityModelStateOk() + return +} + +// GetMaturityModelStateOk returns a tuple with the MaturityModelState field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicSKU) GetMaturityModelStateOk() (ret PublicSKUGetMaturityModelStateRetType, ok bool) { + return getPublicSKUGetMaturityModelStateAttributeTypeOk(o.MaturityModelState) +} + +// HasMaturityModelState returns a boolean if a field has been set. +func (o *PublicSKU) HasMaturityModelState() bool { + _, ok := o.GetMaturityModelStateOk() + return ok +} + +// SetMaturityModelState gets a reference to the given string and assigns it to the MaturityModelState field. +func (o *PublicSKU) SetMaturityModelState(v PublicSKUGetMaturityModelStateRetType) { + setPublicSKUGetMaturityModelStateAttributeType(&o.MaturityModelState, v) +} + +// SetMaturityModelStateNil sets the value for MaturityModelState to be an explicit nil +func (o *PublicSKU) SetMaturityModelStateNil() { + o.MaturityModelState = nil +} + +// UnsetMaturityModelState ensures that no value is present for MaturityModelState, not even an explicit nil +func (o *PublicSKU) UnsetMaturityModelState() { + o.MaturityModelState = nil +} + +// GetMetric returns the Metric field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicSKU) GetMetric() (res PublicSKUGetMetricRetType) { + res, _ = o.GetMetricOk() + return +} + +// GetMetricOk returns a tuple with the Metric field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicSKU) GetMetricOk() (ret PublicSKUGetMetricRetType, ok bool) { + return getPublicSKUGetMetricAttributeTypeOk(o.Metric) +} + +// HasMetric returns a boolean if a field has been set. +func (o *PublicSKU) HasMetric() bool { + _, ok := o.GetMetricOk() + return ok +} + +// SetMetric gets a reference to the given string and assigns it to the Metric field. +func (o *PublicSKU) SetMetric(v PublicSKUGetMetricRetType) { + setPublicSKUGetMetricAttributeType(&o.Metric, v) +} + +// SetMetricNil sets the value for Metric to be an explicit nil +func (o *PublicSKU) SetMetricNil() { + o.Metric = nil +} + +// UnsetMetric ensures that no value is present for Metric, not even an explicit nil +func (o *PublicSKU) UnsetMetric() { + o.Metric = nil +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicSKU) GetName() (res PublicSKUGetNameRetType) { + res, _ = o.GetNameOk() + return +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicSKU) GetNameOk() (ret PublicSKUGetNameRetType, ok bool) { + return getPublicSKUGetNameAttributeTypeOk(o.Name) +} + +// HasName returns a boolean if a field has been set. +func (o *PublicSKU) HasName() bool { + _, ok := o.GetNameOk() + return ok +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PublicSKU) SetName(v PublicSKUGetNameRetType) { + setPublicSKUGetNameAttributeType(&o.Name, v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *PublicSKU) SetNameNil() { + o.Name = nil +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *PublicSKU) UnsetName() { + o.Name = nil +} + +// GetPriceListVisibility returns the PriceListVisibility field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicSKU) GetPriceListVisibility() (res PublicSKUGetPriceListVisibilityRetType) { + res, _ = o.GetPriceListVisibilityOk() + return +} + +// GetPriceListVisibilityOk returns a tuple with the PriceListVisibility field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicSKU) GetPriceListVisibilityOk() (ret PublicSKUGetPriceListVisibilityRetType, ok bool) { + return getPublicSKUGetPriceListVisibilityAttributeTypeOk(o.PriceListVisibility) +} + +// HasPriceListVisibility returns a boolean if a field has been set. +func (o *PublicSKU) HasPriceListVisibility() bool { + _, ok := o.GetPriceListVisibilityOk() + return ok +} + +// SetPriceListVisibility gets a reference to the given string and assigns it to the PriceListVisibility field. +func (o *PublicSKU) SetPriceListVisibility(v PublicSKUGetPriceListVisibilityRetType) { + setPublicSKUGetPriceListVisibilityAttributeType(&o.PriceListVisibility, v) +} + +// SetPriceListVisibilityNil sets the value for PriceListVisibility to be an explicit nil +func (o *PublicSKU) SetPriceListVisibilityNil() { + o.PriceListVisibility = nil +} + +// UnsetPriceListVisibility ensures that no value is present for PriceListVisibility, not even an explicit nil +func (o *PublicSKU) UnsetPriceListVisibility() { + o.PriceListVisibility = nil +} + +// GetPrices returns the Prices field value if set, zero value otherwise. +func (o *PublicSKU) GetPrices() (res PublicSKUGetPricesRetType) { + res, _ = o.GetPricesOk() + return +} + +// GetPricesOk returns a tuple with the Prices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicSKU) GetPricesOk() (ret PublicSKUGetPricesRetType, ok bool) { + return getPublicSKUGetPricesAttributeTypeOk(o.Prices) +} + +// HasPrices returns a boolean if a field has been set. +func (o *PublicSKU) HasPrices() bool { + _, ok := o.GetPricesOk() + return ok +} + +// SetPrices gets a reference to the given []Price and assigns it to the Prices field. +func (o *PublicSKU) SetPrices(v PublicSKUGetPricesRetType) { + setPublicSKUGetPricesAttributeType(&o.Prices, v) +} + +// GetProductId returns the ProductId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicSKU) GetProductId() (res PublicSKUGetProductIdRetType) { + res, _ = o.GetProductIdOk() + return +} + +// GetProductIdOk returns a tuple with the ProductId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicSKU) GetProductIdOk() (ret PublicSKUGetProductIdRetType, ok bool) { + return getPublicSKUGetProductIdAttributeTypeOk(o.ProductId) +} + +// HasProductId returns a boolean if a field has been set. +func (o *PublicSKU) HasProductId() bool { + _, ok := o.GetProductIdOk() + return ok +} + +// SetProductId gets a reference to the given string and assigns it to the ProductId field. +func (o *PublicSKU) SetProductId(v PublicSKUGetProductIdRetType) { + setPublicSKUGetProductIdAttributeType(&o.ProductId, v) +} + +// SetProductIdNil sets the value for ProductId to be an explicit nil +func (o *PublicSKU) SetProductIdNil() { + o.ProductId = nil +} + +// UnsetProductId ensures that no value is present for ProductId, not even an explicit nil +func (o *PublicSKU) UnsetProductId() { + o.ProductId = nil +} + +// GetProductName returns the ProductName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicSKU) GetProductName() (res PublicSKUGetProductNameRetType) { + res, _ = o.GetProductNameOk() + return +} + +// GetProductNameOk returns a tuple with the ProductName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicSKU) GetProductNameOk() (ret PublicSKUGetProductNameRetType, ok bool) { + return getPublicSKUGetProductNameAttributeTypeOk(o.ProductName) +} + +// HasProductName returns a boolean if a field has been set. +func (o *PublicSKU) HasProductName() bool { + _, ok := o.GetProductNameOk() + return ok +} + +// SetProductName gets a reference to the given string and assigns it to the ProductName field. +func (o *PublicSKU) SetProductName(v PublicSKUGetProductNameRetType) { + setPublicSKUGetProductNameAttributeType(&o.ProductName, v) +} + +// SetProductNameNil sets the value for ProductName to be an explicit nil +func (o *PublicSKU) SetProductNameNil() { + o.ProductName = nil +} + +// UnsetProductName ensures that no value is present for ProductName, not even an explicit nil +func (o *PublicSKU) UnsetProductName() { + o.ProductName = nil +} + +// GetRateType returns the RateType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicSKU) GetRateType() (res PublicSKUGetRateTypeRetType) { + res, _ = o.GetRateTypeOk() + return +} + +// GetRateTypeOk returns a tuple with the RateType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicSKU) GetRateTypeOk() (ret PublicSKUGetRateTypeRetType, ok bool) { + return getPublicSKUGetRateTypeAttributeTypeOk(o.RateType) +} + +// HasRateType returns a boolean if a field has been set. +func (o *PublicSKU) HasRateType() bool { + _, ok := o.GetRateTypeOk() + return ok +} + +// SetRateType gets a reference to the given string and assigns it to the RateType field. +func (o *PublicSKU) SetRateType(v PublicSKUGetRateTypeRetType) { + setPublicSKUGetRateTypeAttributeType(&o.RateType, v) +} + +// SetRateTypeNil sets the value for RateType to be an explicit nil +func (o *PublicSKU) SetRateTypeNil() { + o.RateType = nil +} + +// UnsetRateType ensures that no value is present for RateType, not even an explicit nil +func (o *PublicSKU) UnsetRateType() { + o.RateType = nil +} + +// GetRegion returns the Region field value if set, zero value otherwise. +func (o *PublicSKU) GetRegion() (res PublicSKUGetRegionRetType) { + res, _ = o.GetRegionOk() + return +} + +// GetRegionOk returns a tuple with the Region field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicSKU) GetRegionOk() (ret PublicSKUGetRegionRetType, ok bool) { + return getPublicSKUGetRegionAttributeTypeOk(o.Region) +} + +// HasRegion returns a boolean if a field has been set. +func (o *PublicSKU) HasRegion() bool { + _, ok := o.GetRegionOk() + return ok +} + +// SetRegion gets a reference to the given string and assigns it to the Region field. +func (o *PublicSKU) SetRegion(v PublicSKUGetRegionRetType) { + setPublicSKUGetRegionAttributeType(&o.Region, v) +} + +// GetServiceId returns the ServiceId field value if set, zero value otherwise. +func (o *PublicSKU) GetServiceId() (res PublicSKUGetServiceIdRetType) { + res, _ = o.GetServiceIdOk() + return +} + +// GetServiceIdOk returns a tuple with the ServiceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicSKU) GetServiceIdOk() (ret PublicSKUGetServiceIdRetType, ok bool) { + return getPublicSKUGetServiceIdAttributeTypeOk(o.ServiceId) +} + +// HasServiceId returns a boolean if a field has been set. +func (o *PublicSKU) HasServiceId() bool { + _, ok := o.GetServiceIdOk() + return ok +} + +// SetServiceId gets a reference to the given []string and assigns it to the ServiceId field. +func (o *PublicSKU) SetServiceId(v PublicSKUGetServiceIdRetType) { + setPublicSKUGetServiceIdAttributeType(&o.ServiceId, v) +} + +// GetTechnicalProductGroup returns the TechnicalProductGroup field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicSKU) GetTechnicalProductGroup() (res PublicSKUGetTechnicalProductGroupRetType) { + res, _ = o.GetTechnicalProductGroupOk() + return +} + +// GetTechnicalProductGroupOk returns a tuple with the TechnicalProductGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicSKU) GetTechnicalProductGroupOk() (ret PublicSKUGetTechnicalProductGroupRetType, ok bool) { + return getPublicSKUGetTechnicalProductGroupAttributeTypeOk(o.TechnicalProductGroup) +} + +// HasTechnicalProductGroup returns a boolean if a field has been set. +func (o *PublicSKU) HasTechnicalProductGroup() bool { + _, ok := o.GetTechnicalProductGroupOk() + return ok +} + +// SetTechnicalProductGroup gets a reference to the given string and assigns it to the TechnicalProductGroup field. +func (o *PublicSKU) SetTechnicalProductGroup(v PublicSKUGetTechnicalProductGroupRetType) { + setPublicSKUGetTechnicalProductGroupAttributeType(&o.TechnicalProductGroup, v) +} + +// SetTechnicalProductGroupNil sets the value for TechnicalProductGroup to be an explicit nil +func (o *PublicSKU) SetTechnicalProductGroupNil() { + o.TechnicalProductGroup = nil +} + +// UnsetTechnicalProductGroup ensures that no value is present for TechnicalProductGroup, not even an explicit nil +func (o *PublicSKU) UnsetTechnicalProductGroup() { + o.TechnicalProductGroup = nil +} + +// GetTierMaxValue returns the TierMaxValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicSKU) GetTierMaxValue() (res PublicSKUGetTierMaxValueRetType) { + res, _ = o.GetTierMaxValueOk() + return +} + +// GetTierMaxValueOk returns a tuple with the TierMaxValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicSKU) GetTierMaxValueOk() (ret PublicSKUGetTierMaxValueRetType, ok bool) { + return getPublicSKUGetTierMaxValueAttributeTypeOk(o.TierMaxValue) +} + +// HasTierMaxValue returns a boolean if a field has been set. +func (o *PublicSKU) HasTierMaxValue() bool { + _, ok := o.GetTierMaxValueOk() + return ok +} + +// SetTierMaxValue gets a reference to the given int64 and assigns it to the TierMaxValue field. +func (o *PublicSKU) SetTierMaxValue(v PublicSKUGetTierMaxValueRetType) { + setPublicSKUGetTierMaxValueAttributeType(&o.TierMaxValue, v) +} + +// SetTierMaxValueNil sets the value for TierMaxValue to be an explicit nil +func (o *PublicSKU) SetTierMaxValueNil() { + o.TierMaxValue = nil +} + +// UnsetTierMaxValue ensures that no value is present for TierMaxValue, not even an explicit nil +func (o *PublicSKU) UnsetTierMaxValue() { + o.TierMaxValue = nil +} + +// GetTierMinValue returns the TierMinValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PublicSKU) GetTierMinValue() (res PublicSKUGetTierMinValueRetType) { + res, _ = o.GetTierMinValueOk() + return +} + +// GetTierMinValueOk returns a tuple with the TierMinValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PublicSKU) GetTierMinValueOk() (ret PublicSKUGetTierMinValueRetType, ok bool) { + return getPublicSKUGetTierMinValueAttributeTypeOk(o.TierMinValue) +} + +// HasTierMinValue returns a boolean if a field has been set. +func (o *PublicSKU) HasTierMinValue() bool { + _, ok := o.GetTierMinValueOk() + return ok +} + +// SetTierMinValue gets a reference to the given int64 and assigns it to the TierMinValue field. +func (o *PublicSKU) SetTierMinValue(v PublicSKUGetTierMinValueRetType) { + setPublicSKUGetTierMinValueAttributeType(&o.TierMinValue, v) +} + +// SetTierMinValueNil sets the value for TierMinValue to be an explicit nil +func (o *PublicSKU) SetTierMinValueNil() { + o.TierMinValue = nil +} + +// UnsetTierMinValue ensures that no value is present for TierMinValue, not even an explicit nil +func (o *PublicSKU) UnsetTierMinValue() { + o.TierMinValue = nil +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *PublicSKU) GetTitle() (res PublicSKUGetTitleRetType) { + res, _ = o.GetTitleOk() + return +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicSKU) GetTitleOk() (ret PublicSKUGetTitleRetType, ok bool) { + return getPublicSKUGetTitleAttributeTypeOk(o.Title) +} + +// HasTitle returns a boolean if a field has been set. +func (o *PublicSKU) HasTitle() bool { + _, ok := o.GetTitleOk() + return ok +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *PublicSKU) SetTitle(v PublicSKUGetTitleRetType) { + setPublicSKUGetTitleAttributeType(&o.Title, v) +} + +// GetUnit returns the Unit field value if set, zero value otherwise. +func (o *PublicSKU) GetUnit() (res PublicSKUGetUnitRetType) { + 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 *PublicSKU) GetUnitOk() (ret PublicSKUGetUnitRetType, ok bool) { + return getPublicSKUGetUnitAttributeTypeOk(o.Unit) +} + +// HasUnit returns a boolean if a field has been set. +func (o *PublicSKU) HasUnit() bool { + _, ok := o.GetUnitOk() + return ok +} + +// SetUnit gets a reference to the given string and assigns it to the Unit field. +func (o *PublicSKU) SetUnit(v PublicSKUGetUnitRetType) { + setPublicSKUGetUnitAttributeType(&o.Unit, v) +} + +// GetUnitBilling returns the UnitBilling field value if set, zero value otherwise. +func (o *PublicSKU) GetUnitBilling() (res PublicSKUGetUnitBillingRetType) { + res, _ = o.GetUnitBillingOk() + return +} + +// GetUnitBillingOk returns a tuple with the UnitBilling field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicSKU) GetUnitBillingOk() (ret PublicSKUGetUnitBillingRetType, ok bool) { + return getPublicSKUGetUnitBillingAttributeTypeOk(o.UnitBilling) +} + +// HasUnitBilling returns a boolean if a field has been set. +func (o *PublicSKU) HasUnitBilling() bool { + _, ok := o.GetUnitBillingOk() + return ok +} + +// SetUnitBilling gets a reference to the given string and assigns it to the UnitBilling field. +func (o *PublicSKU) SetUnitBilling(v PublicSKUGetUnitBillingRetType) { + setPublicSKUGetUnitBillingAttributeType(&o.UnitBilling, v) +} + +// GetValidStart returns the ValidStart field value if set, zero value otherwise. +func (o *PublicSKU) GetValidStart() (res PublicSKUGetValidStartRetType) { + res, _ = o.GetValidStartOk() + return +} + +// GetValidStartOk returns a tuple with the ValidStart field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicSKU) GetValidStartOk() (ret PublicSKUGetValidStartRetType, ok bool) { + return getPublicSKUGetValidStartAttributeTypeOk(o.ValidStart) +} + +// HasValidStart returns a boolean if a field has been set. +func (o *PublicSKU) HasValidStart() bool { + _, ok := o.GetValidStartOk() + return ok +} + +// SetValidStart gets a reference to the given time.Time and assigns it to the ValidStart field. +func (o *PublicSKU) SetValidStart(v PublicSKUGetValidStartRetType) { + setPublicSKUGetValidStartAttributeType(&o.ValidStart, v) +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *PublicSKU) GetVersion() (res PublicSKUGetVersionRetType) { + 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 *PublicSKU) GetVersionOk() (ret PublicSKUGetVersionRetType, ok bool) { + return getPublicSKUGetVersionAttributeTypeOk(o.Version) +} + +// HasVersion returns a boolean if a field has been set. +func (o *PublicSKU) HasVersion() bool { + _, ok := o.GetVersionOk() + return ok +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *PublicSKU) SetVersion(v PublicSKUGetVersionRetType) { + setPublicSKUGetVersionAttributeType(&o.Version, v) +} + +// GetProductSpecificAttributes returns the ProductSpecificAttributes field value if set, zero value otherwise. +func (o *PublicSKU) GetProductSpecificAttributes() (res PublicSKUGetProductSpecificAttributesRetType) { + res, _ = o.GetProductSpecificAttributesOk() + return +} + +// GetProductSpecificAttributesOk returns a tuple with the ProductSpecificAttributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicSKU) GetProductSpecificAttributesOk() (ret PublicSKUGetProductSpecificAttributesRetType, ok bool) { + return getPublicSKUGetProductSpecificAttributesAttributeTypeOk(o.ProductSpecificAttributes) +} + +// HasProductSpecificAttributes returns a boolean if a field has been set. +func (o *PublicSKU) HasProductSpecificAttributes() bool { + _, ok := o.GetProductSpecificAttributesOk() + return ok +} + +// SetProductSpecificAttributes gets a reference to the given PublicSKUAllOfProductSpecificAttributes and assigns it to the ProductSpecificAttributes field. +func (o *PublicSKU) SetProductSpecificAttributes(v PublicSKUGetProductSpecificAttributesRetType) { + setPublicSKUGetProductSpecificAttributesAttributeType(&o.ProductSpecificAttributes, v) +} + +func (o PublicSKU) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getPublicSKUGetCategoryIdAttributeTypeOk(o.CategoryId); ok { + toSerialize["CategoryId"] = val + } + if val, ok := getPublicSKUGetCategoryNameAttributeTypeOk(o.CategoryName); ok { + toSerialize["CategoryName"] = val + } + if val, ok := getPublicSKUgetCpuOverprovisioningAttributeTypeOk(o.CpuOverprovisioning); ok { + toSerialize["CpuOverprovisioning"] = val + } + if val, ok := getPublicSKUGetDeprecatedAttributeTypeOk(o.Deprecated); ok { + toSerialize["Deprecated"] = val + } + if val, ok := getPublicSKUGetDocumentationAttributeTypeOk(o.Documentation); ok { + toSerialize["Documentation"] = val + } + if val, ok := getPublicSKUGetFinOpsFocusAttributeTypeOk(o.FinOpsFocus); ok { + toSerialize["FinOpsFocus"] = val + } + if val, ok := getPublicSKUGetGeneralProductGroupAttributeTypeOk(o.GeneralProductGroup); ok { + toSerialize["GeneralProductGroup"] = val + } + if val, ok := getPublicSKUGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getPublicSKUGetLanguageAttributeTypeOk(o.Language); ok { + toSerialize["Language"] = val + } + if val, ok := getPublicSKUGetLicenseNameAttributeTypeOk(o.LicenseName); ok { + toSerialize["LicenseName"] = val + } + if val, ok := getPublicSKUGetMaturityModelStateAttributeTypeOk(o.MaturityModelState); ok { + toSerialize["MaturityModelState"] = val + } + if val, ok := getPublicSKUGetMetricAttributeTypeOk(o.Metric); ok { + toSerialize["Metric"] = val + } + if val, ok := getPublicSKUGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getPublicSKUGetPriceListVisibilityAttributeTypeOk(o.PriceListVisibility); ok { + toSerialize["PriceListVisibility"] = val + } + if val, ok := getPublicSKUGetPricesAttributeTypeOk(o.Prices); ok { + toSerialize["Prices"] = val + } + if val, ok := getPublicSKUGetProductIdAttributeTypeOk(o.ProductId); ok { + toSerialize["ProductId"] = val + } + if val, ok := getPublicSKUGetProductNameAttributeTypeOk(o.ProductName); ok { + toSerialize["ProductName"] = val + } + if val, ok := getPublicSKUGetRateTypeAttributeTypeOk(o.RateType); ok { + toSerialize["RateType"] = val + } + if val, ok := getPublicSKUGetRegionAttributeTypeOk(o.Region); ok { + toSerialize["Region"] = val + } + if val, ok := getPublicSKUGetServiceIdAttributeTypeOk(o.ServiceId); ok { + toSerialize["ServiceId"] = val + } + if val, ok := getPublicSKUGetTechnicalProductGroupAttributeTypeOk(o.TechnicalProductGroup); ok { + toSerialize["TechnicalProductGroup"] = val + } + if val, ok := getPublicSKUGetTierMaxValueAttributeTypeOk(o.TierMaxValue); ok { + toSerialize["TierMaxValue"] = val + } + if val, ok := getPublicSKUGetTierMinValueAttributeTypeOk(o.TierMinValue); ok { + toSerialize["TierMinValue"] = val + } + if val, ok := getPublicSKUGetTitleAttributeTypeOk(o.Title); ok { + toSerialize["Title"] = val + } + if val, ok := getPublicSKUGetUnitAttributeTypeOk(o.Unit); ok { + toSerialize["Unit"] = val + } + if val, ok := getPublicSKUGetUnitBillingAttributeTypeOk(o.UnitBilling); ok { + toSerialize["UnitBilling"] = val + } + if val, ok := getPublicSKUGetValidStartAttributeTypeOk(o.ValidStart); ok { + toSerialize["ValidStart"] = val + } + if val, ok := getPublicSKUGetVersionAttributeTypeOk(o.Version); ok { + toSerialize["Version"] = val + } + if val, ok := getPublicSKUGetProductSpecificAttributesAttributeTypeOk(o.ProductSpecificAttributes); ok { + toSerialize["ProductSpecificAttributes"] = val + } + return toSerialize, nil +} + +type NullablePublicSKU struct { + value *PublicSKU + isSet bool +} + +func (v NullablePublicSKU) Get() *PublicSKU { + return v.value +} + +func (v *NullablePublicSKU) Set(val *PublicSKU) { + v.value = val + v.isSet = true +} + +func (v NullablePublicSKU) IsSet() bool { + return v.isSet +} + +func (v *NullablePublicSKU) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePublicSKU(val *PublicSKU) *NullablePublicSKU { + return &NullablePublicSKU{value: val, isSet: true} +} + +func (v NullablePublicSKU) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePublicSKU) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_public_sku_all_of.go b/services/pim/model_public_sku_all_of.go new file mode 100644 index 000000000..37937eb2d --- /dev/null +++ b/services/pim/model_public_sku_all_of.go @@ -0,0 +1,127 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the PublicSKUAllOf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PublicSKUAllOf{} + +/* + types and functions for productSpecificAttributes +*/ + +// isModel +type PublicSKUAllOfGetProductSpecificAttributesAttributeType = *PublicSKUAllOfProductSpecificAttributes +type PublicSKUAllOfGetProductSpecificAttributesArgType = PublicSKUAllOfProductSpecificAttributes +type PublicSKUAllOfGetProductSpecificAttributesRetType = PublicSKUAllOfProductSpecificAttributes + +func getPublicSKUAllOfGetProductSpecificAttributesAttributeTypeOk(arg PublicSKUAllOfGetProductSpecificAttributesAttributeType) (ret PublicSKUAllOfGetProductSpecificAttributesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setPublicSKUAllOfGetProductSpecificAttributesAttributeType(arg *PublicSKUAllOfGetProductSpecificAttributesAttributeType, val PublicSKUAllOfGetProductSpecificAttributesRetType) { + *arg = &val +} + +// PublicSKUAllOf struct for PublicSKUAllOf +type PublicSKUAllOf struct { + ProductSpecificAttributes PublicSKUAllOfGetProductSpecificAttributesAttributeType `json:"productSpecificAttributes,omitempty"` +} + +// NewPublicSKUAllOf instantiates a new PublicSKUAllOf 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 NewPublicSKUAllOf() *PublicSKUAllOf { + this := PublicSKUAllOf{} + return &this +} + +// NewPublicSKUAllOfWithDefaults instantiates a new PublicSKUAllOf 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 NewPublicSKUAllOfWithDefaults() *PublicSKUAllOf { + this := PublicSKUAllOf{} + return &this +} + +// GetProductSpecificAttributes returns the ProductSpecificAttributes field value if set, zero value otherwise. +func (o *PublicSKUAllOf) GetProductSpecificAttributes() (res PublicSKUAllOfGetProductSpecificAttributesRetType) { + res, _ = o.GetProductSpecificAttributesOk() + return +} + +// GetProductSpecificAttributesOk returns a tuple with the ProductSpecificAttributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PublicSKUAllOf) GetProductSpecificAttributesOk() (ret PublicSKUAllOfGetProductSpecificAttributesRetType, ok bool) { + return getPublicSKUAllOfGetProductSpecificAttributesAttributeTypeOk(o.ProductSpecificAttributes) +} + +// HasProductSpecificAttributes returns a boolean if a field has been set. +func (o *PublicSKUAllOf) HasProductSpecificAttributes() bool { + _, ok := o.GetProductSpecificAttributesOk() + return ok +} + +// SetProductSpecificAttributes gets a reference to the given PublicSKUAllOfProductSpecificAttributes and assigns it to the ProductSpecificAttributes field. +func (o *PublicSKUAllOf) SetProductSpecificAttributes(v PublicSKUAllOfGetProductSpecificAttributesRetType) { + setPublicSKUAllOfGetProductSpecificAttributesAttributeType(&o.ProductSpecificAttributes, v) +} + +func (o PublicSKUAllOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getPublicSKUAllOfGetProductSpecificAttributesAttributeTypeOk(o.ProductSpecificAttributes); ok { + toSerialize["ProductSpecificAttributes"] = val + } + return toSerialize, nil +} + +type NullablePublicSKUAllOf struct { + value *PublicSKUAllOf + isSet bool +} + +func (v NullablePublicSKUAllOf) Get() *PublicSKUAllOf { + return v.value +} + +func (v *NullablePublicSKUAllOf) Set(val *PublicSKUAllOf) { + v.value = val + v.isSet = true +} + +func (v NullablePublicSKUAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullablePublicSKUAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePublicSKUAllOf(val *PublicSKUAllOf) *NullablePublicSKUAllOf { + return &NullablePublicSKUAllOf{value: val, isSet: true} +} + +func (v NullablePublicSKUAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePublicSKUAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_public_sku_all_of_product_specific_attributes.go b/services/pim/model_public_sku_all_of_product_specific_attributes.go new file mode 100644 index 000000000..07306743a --- /dev/null +++ b/services/pim/model_public_sku_all_of_product_specific_attributes.go @@ -0,0 +1,523 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" + "fmt" +) + +// PublicSKUAllOfProductSpecificAttributes - struct for PublicSKUAllOfProductSpecificAttributes +type PublicSKUAllOfProductSpecificAttributes struct { + ArchivingSpecificAttributes *ArchivingSpecificAttributes + ComputeEngineSpecificAttributes *ComputeEngineSpecificAttributes + ConfidentialComputingSpecificAttributes *ConfidentialComputingSpecificAttributes + DataAndAI *DataAndAI + LoggingAndMonitoringSpecificAttributes *LoggingAndMonitoringSpecificAttributes + MessagingSpecificAttributes *MessagingSpecificAttributes + NetworkSpecificAttributes *NetworkSpecificAttributes + PublicDatabaseSpecificAttributes *PublicDatabaseSpecificAttributes + RuntimeSpecificAttributes *RuntimeSpecificAttributes + StorageSpecificAttributes *StorageSpecificAttributes + SupportSpecificAttributes *SupportSpecificAttributes +} + +// ArchivingSpecificAttributesAsPublicSKUAllOfProductSpecificAttributes is a convenience function that returns ArchivingSpecificAttributes wrapped in PublicSKUAllOfProductSpecificAttributes +func ArchivingSpecificAttributesAsPublicSKUAllOfProductSpecificAttributes(v *ArchivingSpecificAttributes) PublicSKUAllOfProductSpecificAttributes { + return PublicSKUAllOfProductSpecificAttributes{ + ArchivingSpecificAttributes: v, + } +} + +// ComputeEngineSpecificAttributesAsPublicSKUAllOfProductSpecificAttributes is a convenience function that returns ComputeEngineSpecificAttributes wrapped in PublicSKUAllOfProductSpecificAttributes +func ComputeEngineSpecificAttributesAsPublicSKUAllOfProductSpecificAttributes(v *ComputeEngineSpecificAttributes) PublicSKUAllOfProductSpecificAttributes { + return PublicSKUAllOfProductSpecificAttributes{ + ComputeEngineSpecificAttributes: v, + } +} + +// ConfidentialComputingSpecificAttributesAsPublicSKUAllOfProductSpecificAttributes is a convenience function that returns ConfidentialComputingSpecificAttributes wrapped in PublicSKUAllOfProductSpecificAttributes +func ConfidentialComputingSpecificAttributesAsPublicSKUAllOfProductSpecificAttributes(v *ConfidentialComputingSpecificAttributes) PublicSKUAllOfProductSpecificAttributes { + return PublicSKUAllOfProductSpecificAttributes{ + ConfidentialComputingSpecificAttributes: v, + } +} + +// DataAndAIAsPublicSKUAllOfProductSpecificAttributes is a convenience function that returns DataAndAI wrapped in PublicSKUAllOfProductSpecificAttributes +func DataAndAIAsPublicSKUAllOfProductSpecificAttributes(v *DataAndAI) PublicSKUAllOfProductSpecificAttributes { + return PublicSKUAllOfProductSpecificAttributes{ + DataAndAI: v, + } +} + +// LoggingAndMonitoringSpecificAttributesAsPublicSKUAllOfProductSpecificAttributes is a convenience function that returns LoggingAndMonitoringSpecificAttributes wrapped in PublicSKUAllOfProductSpecificAttributes +func LoggingAndMonitoringSpecificAttributesAsPublicSKUAllOfProductSpecificAttributes(v *LoggingAndMonitoringSpecificAttributes) PublicSKUAllOfProductSpecificAttributes { + return PublicSKUAllOfProductSpecificAttributes{ + LoggingAndMonitoringSpecificAttributes: v, + } +} + +// MessagingSpecificAttributesAsPublicSKUAllOfProductSpecificAttributes is a convenience function that returns MessagingSpecificAttributes wrapped in PublicSKUAllOfProductSpecificAttributes +func MessagingSpecificAttributesAsPublicSKUAllOfProductSpecificAttributes(v *MessagingSpecificAttributes) PublicSKUAllOfProductSpecificAttributes { + return PublicSKUAllOfProductSpecificAttributes{ + MessagingSpecificAttributes: v, + } +} + +// NetworkSpecificAttributesAsPublicSKUAllOfProductSpecificAttributes is a convenience function that returns NetworkSpecificAttributes wrapped in PublicSKUAllOfProductSpecificAttributes +func NetworkSpecificAttributesAsPublicSKUAllOfProductSpecificAttributes(v *NetworkSpecificAttributes) PublicSKUAllOfProductSpecificAttributes { + return PublicSKUAllOfProductSpecificAttributes{ + NetworkSpecificAttributes: v, + } +} + +// PublicDatabaseSpecificAttributesAsPublicSKUAllOfProductSpecificAttributes is a convenience function that returns PublicDatabaseSpecificAttributes wrapped in PublicSKUAllOfProductSpecificAttributes +func PublicDatabaseSpecificAttributesAsPublicSKUAllOfProductSpecificAttributes(v *PublicDatabaseSpecificAttributes) PublicSKUAllOfProductSpecificAttributes { + return PublicSKUAllOfProductSpecificAttributes{ + PublicDatabaseSpecificAttributes: v, + } +} + +// RuntimeSpecificAttributesAsPublicSKUAllOfProductSpecificAttributes is a convenience function that returns RuntimeSpecificAttributes wrapped in PublicSKUAllOfProductSpecificAttributes +func RuntimeSpecificAttributesAsPublicSKUAllOfProductSpecificAttributes(v *RuntimeSpecificAttributes) PublicSKUAllOfProductSpecificAttributes { + return PublicSKUAllOfProductSpecificAttributes{ + RuntimeSpecificAttributes: v, + } +} + +// StorageSpecificAttributesAsPublicSKUAllOfProductSpecificAttributes is a convenience function that returns StorageSpecificAttributes wrapped in PublicSKUAllOfProductSpecificAttributes +func StorageSpecificAttributesAsPublicSKUAllOfProductSpecificAttributes(v *StorageSpecificAttributes) PublicSKUAllOfProductSpecificAttributes { + return PublicSKUAllOfProductSpecificAttributes{ + StorageSpecificAttributes: v, + } +} + +// SupportSpecificAttributesAsPublicSKUAllOfProductSpecificAttributes is a convenience function that returns SupportSpecificAttributes wrapped in PublicSKUAllOfProductSpecificAttributes +func SupportSpecificAttributesAsPublicSKUAllOfProductSpecificAttributes(v *SupportSpecificAttributes) PublicSKUAllOfProductSpecificAttributes { + return PublicSKUAllOfProductSpecificAttributes{ + SupportSpecificAttributes: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *PublicSKUAllOfProductSpecificAttributes) UnmarshalJSON(data []byte) error { + var err error + // use discriminator value to speed up the lookup + var jsonDict map[string]interface{} + err = newStrictDecoder(data).Decode(&jsonDict) + if err != nil { + return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") + } + + // check if the discriminator value is 'Archiving' + if jsonDict["discriminator"] == "Archiving" { + // try to unmarshal JSON data into ArchivingSpecificAttributes + err = json.Unmarshal(data, &dst.ArchivingSpecificAttributes) + if err == nil { + return nil // data stored in dst.ArchivingSpecificAttributes, return on the first match + } else { + dst.ArchivingSpecificAttributes = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as ArchivingSpecificAttributes: %s", err.Error()) + } + } + + // check if the discriminator value is 'ArchivingSpecificAttributes' + if jsonDict["discriminator"] == "ArchivingSpecificAttributes" { + // try to unmarshal JSON data into ArchivingSpecificAttributes + err = json.Unmarshal(data, &dst.ArchivingSpecificAttributes) + if err == nil { + return nil // data stored in dst.ArchivingSpecificAttributes, return on the first match + } else { + dst.ArchivingSpecificAttributes = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as ArchivingSpecificAttributes: %s", err.Error()) + } + } + + // check if the discriminator value is 'ComputeEngine' + if jsonDict["discriminator"] == "ComputeEngine" { + // try to unmarshal JSON data into ComputeEngineSpecificAttributes + err = json.Unmarshal(data, &dst.ComputeEngineSpecificAttributes) + if err == nil { + return nil // data stored in dst.ComputeEngineSpecificAttributes, return on the first match + } else { + dst.ComputeEngineSpecificAttributes = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as ComputeEngineSpecificAttributes: %s", err.Error()) + } + } + + // check if the discriminator value is 'ComputeEngineSpecificAttributes' + if jsonDict["discriminator"] == "ComputeEngineSpecificAttributes" { + // try to unmarshal JSON data into ComputeEngineSpecificAttributes + err = json.Unmarshal(data, &dst.ComputeEngineSpecificAttributes) + if err == nil { + return nil // data stored in dst.ComputeEngineSpecificAttributes, return on the first match + } else { + dst.ComputeEngineSpecificAttributes = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as ComputeEngineSpecificAttributes: %s", err.Error()) + } + } + + // check if the discriminator value is 'ConfidentialComputing' + if jsonDict["discriminator"] == "ConfidentialComputing" { + // try to unmarshal JSON data into ConfidentialComputingSpecificAttributes + err = json.Unmarshal(data, &dst.ConfidentialComputingSpecificAttributes) + if err == nil { + return nil // data stored in dst.ConfidentialComputingSpecificAttributes, return on the first match + } else { + dst.ConfidentialComputingSpecificAttributes = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as ConfidentialComputingSpecificAttributes: %s", err.Error()) + } + } + + // check if the discriminator value is 'ConfidentialComputingSpecificAttributes' + if jsonDict["discriminator"] == "ConfidentialComputingSpecificAttributes" { + // try to unmarshal JSON data into ConfidentialComputingSpecificAttributes + err = json.Unmarshal(data, &dst.ConfidentialComputingSpecificAttributes) + if err == nil { + return nil // data stored in dst.ConfidentialComputingSpecificAttributes, return on the first match + } else { + dst.ConfidentialComputingSpecificAttributes = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as ConfidentialComputingSpecificAttributes: %s", err.Error()) + } + } + + // check if the discriminator value is 'Data&AI' + if jsonDict["discriminator"] == "Data&AI" { + // try to unmarshal JSON data into DataAndAI + err = json.Unmarshal(data, &dst.DataAndAI) + if err == nil { + return nil // data stored in dst.DataAndAI, return on the first match + } else { + dst.DataAndAI = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as DataAndAI: %s", err.Error()) + } + } + + // check if the discriminator value is 'DataAndAI' + if jsonDict["discriminator"] == "DataAndAI" { + // try to unmarshal JSON data into DataAndAI + err = json.Unmarshal(data, &dst.DataAndAI) + if err == nil { + return nil // data stored in dst.DataAndAI, return on the first match + } else { + dst.DataAndAI = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as DataAndAI: %s", err.Error()) + } + } + + // check if the discriminator value is 'Database' + if jsonDict["discriminator"] == "Database" { + // try to unmarshal JSON data into PublicDatabaseSpecificAttributes + err = json.Unmarshal(data, &dst.PublicDatabaseSpecificAttributes) + if err == nil { + return nil // data stored in dst.PublicDatabaseSpecificAttributes, return on the first match + } else { + dst.PublicDatabaseSpecificAttributes = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as PublicDatabaseSpecificAttributes: %s", err.Error()) + } + } + + // check if the discriminator value is 'LoggingAndMonitoring' + if jsonDict["discriminator"] == "LoggingAndMonitoring" { + // try to unmarshal JSON data into LoggingAndMonitoringSpecificAttributes + err = json.Unmarshal(data, &dst.LoggingAndMonitoringSpecificAttributes) + if err == nil { + return nil // data stored in dst.LoggingAndMonitoringSpecificAttributes, return on the first match + } else { + dst.LoggingAndMonitoringSpecificAttributes = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as LoggingAndMonitoringSpecificAttributes: %s", err.Error()) + } + } + + // check if the discriminator value is 'LoggingAndMonitoringSpecificAttributes' + if jsonDict["discriminator"] == "LoggingAndMonitoringSpecificAttributes" { + // try to unmarshal JSON data into LoggingAndMonitoringSpecificAttributes + err = json.Unmarshal(data, &dst.LoggingAndMonitoringSpecificAttributes) + if err == nil { + return nil // data stored in dst.LoggingAndMonitoringSpecificAttributes, return on the first match + } else { + dst.LoggingAndMonitoringSpecificAttributes = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as LoggingAndMonitoringSpecificAttributes: %s", err.Error()) + } + } + + // check if the discriminator value is 'Messaging' + if jsonDict["discriminator"] == "Messaging" { + // try to unmarshal JSON data into MessagingSpecificAttributes + err = json.Unmarshal(data, &dst.MessagingSpecificAttributes) + if err == nil { + return nil // data stored in dst.MessagingSpecificAttributes, return on the first match + } else { + dst.MessagingSpecificAttributes = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as MessagingSpecificAttributes: %s", err.Error()) + } + } + + // check if the discriminator value is 'MessagingSpecificAttributes' + if jsonDict["discriminator"] == "MessagingSpecificAttributes" { + // try to unmarshal JSON data into MessagingSpecificAttributes + err = json.Unmarshal(data, &dst.MessagingSpecificAttributes) + if err == nil { + return nil // data stored in dst.MessagingSpecificAttributes, return on the first match + } else { + dst.MessagingSpecificAttributes = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as MessagingSpecificAttributes: %s", err.Error()) + } + } + + // check if the discriminator value is 'Network' + if jsonDict["discriminator"] == "Network" { + // try to unmarshal JSON data into NetworkSpecificAttributes + err = json.Unmarshal(data, &dst.NetworkSpecificAttributes) + if err == nil { + return nil // data stored in dst.NetworkSpecificAttributes, return on the first match + } else { + dst.NetworkSpecificAttributes = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as NetworkSpecificAttributes: %s", err.Error()) + } + } + + // check if the discriminator value is 'NetworkSpecificAttributes' + if jsonDict["discriminator"] == "NetworkSpecificAttributes" { + // try to unmarshal JSON data into NetworkSpecificAttributes + err = json.Unmarshal(data, &dst.NetworkSpecificAttributes) + if err == nil { + return nil // data stored in dst.NetworkSpecificAttributes, return on the first match + } else { + dst.NetworkSpecificAttributes = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as NetworkSpecificAttributes: %s", err.Error()) + } + } + + // check if the discriminator value is 'PublicDatabaseSpecificAttributes' + if jsonDict["discriminator"] == "PublicDatabaseSpecificAttributes" { + // try to unmarshal JSON data into PublicDatabaseSpecificAttributes + err = json.Unmarshal(data, &dst.PublicDatabaseSpecificAttributes) + if err == nil { + return nil // data stored in dst.PublicDatabaseSpecificAttributes, return on the first match + } else { + dst.PublicDatabaseSpecificAttributes = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as PublicDatabaseSpecificAttributes: %s", err.Error()) + } + } + + // check if the discriminator value is 'Runtime' + if jsonDict["discriminator"] == "Runtime" { + // try to unmarshal JSON data into RuntimeSpecificAttributes + err = json.Unmarshal(data, &dst.RuntimeSpecificAttributes) + if err == nil { + return nil // data stored in dst.RuntimeSpecificAttributes, return on the first match + } else { + dst.RuntimeSpecificAttributes = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as RuntimeSpecificAttributes: %s", err.Error()) + } + } + + // check if the discriminator value is 'RuntimeSpecificAttributes' + if jsonDict["discriminator"] == "RuntimeSpecificAttributes" { + // try to unmarshal JSON data into RuntimeSpecificAttributes + err = json.Unmarshal(data, &dst.RuntimeSpecificAttributes) + if err == nil { + return nil // data stored in dst.RuntimeSpecificAttributes, return on the first match + } else { + dst.RuntimeSpecificAttributes = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as RuntimeSpecificAttributes: %s", err.Error()) + } + } + + // check if the discriminator value is 'Storage' + if jsonDict["discriminator"] == "Storage" { + // try to unmarshal JSON data into StorageSpecificAttributes + err = json.Unmarshal(data, &dst.StorageSpecificAttributes) + if err == nil { + return nil // data stored in dst.StorageSpecificAttributes, return on the first match + } else { + dst.StorageSpecificAttributes = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as StorageSpecificAttributes: %s", err.Error()) + } + } + + // check if the discriminator value is 'StorageSpecificAttributes' + if jsonDict["discriminator"] == "StorageSpecificAttributes" { + // try to unmarshal JSON data into StorageSpecificAttributes + err = json.Unmarshal(data, &dst.StorageSpecificAttributes) + if err == nil { + return nil // data stored in dst.StorageSpecificAttributes, return on the first match + } else { + dst.StorageSpecificAttributes = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as StorageSpecificAttributes: %s", err.Error()) + } + } + + // check if the discriminator value is 'Support' + if jsonDict["discriminator"] == "Support" { + // try to unmarshal JSON data into SupportSpecificAttributes + err = json.Unmarshal(data, &dst.SupportSpecificAttributes) + if err == nil { + return nil // data stored in dst.SupportSpecificAttributes, return on the first match + } else { + dst.SupportSpecificAttributes = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as SupportSpecificAttributes: %s", err.Error()) + } + } + + // check if the discriminator value is 'SupportSpecificAttributes' + if jsonDict["discriminator"] == "SupportSpecificAttributes" { + // try to unmarshal JSON data into SupportSpecificAttributes + err = json.Unmarshal(data, &dst.SupportSpecificAttributes) + if err == nil { + return nil // data stored in dst.SupportSpecificAttributes, return on the first match + } else { + dst.SupportSpecificAttributes = nil + return fmt.Errorf("failed to unmarshal PublicSKUAllOfProductSpecificAttributes as SupportSpecificAttributes: %s", err.Error()) + } + } + + return nil +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src PublicSKUAllOfProductSpecificAttributes) MarshalJSON() ([]byte, error) { + if src.ArchivingSpecificAttributes != nil { + return json.Marshal(&src.ArchivingSpecificAttributes) + } + + if src.ComputeEngineSpecificAttributes != nil { + return json.Marshal(&src.ComputeEngineSpecificAttributes) + } + + if src.ConfidentialComputingSpecificAttributes != nil { + return json.Marshal(&src.ConfidentialComputingSpecificAttributes) + } + + if src.DataAndAI != nil { + return json.Marshal(&src.DataAndAI) + } + + if src.LoggingAndMonitoringSpecificAttributes != nil { + return json.Marshal(&src.LoggingAndMonitoringSpecificAttributes) + } + + if src.MessagingSpecificAttributes != nil { + return json.Marshal(&src.MessagingSpecificAttributes) + } + + if src.NetworkSpecificAttributes != nil { + return json.Marshal(&src.NetworkSpecificAttributes) + } + + if src.PublicDatabaseSpecificAttributes != nil { + return json.Marshal(&src.PublicDatabaseSpecificAttributes) + } + + if src.RuntimeSpecificAttributes != nil { + return json.Marshal(&src.RuntimeSpecificAttributes) + } + + if src.StorageSpecificAttributes != nil { + return json.Marshal(&src.StorageSpecificAttributes) + } + + if src.SupportSpecificAttributes != nil { + return json.Marshal(&src.SupportSpecificAttributes) + } + + return []byte("{}"), nil // no data in oneOf schemas => empty JSON object +} + +// Get the actual instance +func (obj *PublicSKUAllOfProductSpecificAttributes) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.ArchivingSpecificAttributes != nil { + return obj.ArchivingSpecificAttributes + } + + if obj.ComputeEngineSpecificAttributes != nil { + return obj.ComputeEngineSpecificAttributes + } + + if obj.ConfidentialComputingSpecificAttributes != nil { + return obj.ConfidentialComputingSpecificAttributes + } + + if obj.DataAndAI != nil { + return obj.DataAndAI + } + + if obj.LoggingAndMonitoringSpecificAttributes != nil { + return obj.LoggingAndMonitoringSpecificAttributes + } + + if obj.MessagingSpecificAttributes != nil { + return obj.MessagingSpecificAttributes + } + + if obj.NetworkSpecificAttributes != nil { + return obj.NetworkSpecificAttributes + } + + if obj.PublicDatabaseSpecificAttributes != nil { + return obj.PublicDatabaseSpecificAttributes + } + + if obj.RuntimeSpecificAttributes != nil { + return obj.RuntimeSpecificAttributes + } + + if obj.StorageSpecificAttributes != nil { + return obj.StorageSpecificAttributes + } + + if obj.SupportSpecificAttributes != nil { + return obj.SupportSpecificAttributes + } + + // all schemas are nil + return nil +} + +type NullablePublicSKUAllOfProductSpecificAttributes struct { + value *PublicSKUAllOfProductSpecificAttributes + isSet bool +} + +func (v NullablePublicSKUAllOfProductSpecificAttributes) Get() *PublicSKUAllOfProductSpecificAttributes { + return v.value +} + +func (v *NullablePublicSKUAllOfProductSpecificAttributes) Set(val *PublicSKUAllOfProductSpecificAttributes) { + v.value = val + v.isSet = true +} + +func (v NullablePublicSKUAllOfProductSpecificAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullablePublicSKUAllOfProductSpecificAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePublicSKUAllOfProductSpecificAttributes(val *PublicSKUAllOfProductSpecificAttributes) *NullablePublicSKUAllOfProductSpecificAttributes { + return &NullablePublicSKUAllOfProductSpecificAttributes{value: val, isSet: true} +} + +func (v NullablePublicSKUAllOfProductSpecificAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePublicSKUAllOfProductSpecificAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_public_sku_all_of_product_specific_attributes_test.go b/services/pim/model_public_sku_all_of_product_specific_attributes_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_public_sku_all_of_product_specific_attributes_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_public_sku_all_of_test.go b/services/pim/model_public_sku_all_of_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_public_sku_all_of_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_public_sku_test.go b/services/pim/model_public_sku_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_public_sku_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_runtime_specific_attributes.go b/services/pim/model_runtime_specific_attributes.go new file mode 100644 index 000000000..407e34cb9 --- /dev/null +++ b/services/pim/model_runtime_specific_attributes.go @@ -0,0 +1,254 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the RuntimeSpecificAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RuntimeSpecificAttributes{} + +/* + types and functions for discriminator +*/ + +// isNotNullableString +type RuntimeSpecificAttributesGetDiscriminatorAttributeType = *string + +func getRuntimeSpecificAttributesGetDiscriminatorAttributeTypeOk(arg RuntimeSpecificAttributesGetDiscriminatorAttributeType) (ret RuntimeSpecificAttributesGetDiscriminatorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setRuntimeSpecificAttributesGetDiscriminatorAttributeType(arg *RuntimeSpecificAttributesGetDiscriminatorAttributeType, val RuntimeSpecificAttributesGetDiscriminatorRetType) { + *arg = &val +} + +type RuntimeSpecificAttributesGetDiscriminatorArgType = string +type RuntimeSpecificAttributesGetDiscriminatorRetType = string + +/* + types and functions for planId +*/ + +// isNullableString +type RuntimeSpecificAttributesGetPlanIdAttributeType = *NullableString + +func getRuntimeSpecificAttributesGetPlanIdAttributeTypeOk(arg RuntimeSpecificAttributesGetPlanIdAttributeType) (ret RuntimeSpecificAttributesGetPlanIdRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setRuntimeSpecificAttributesGetPlanIdAttributeType(arg *RuntimeSpecificAttributesGetPlanIdAttributeType, val RuntimeSpecificAttributesGetPlanIdRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type RuntimeSpecificAttributesGetPlanIdArgType = *string +type RuntimeSpecificAttributesGetPlanIdRetType = *string + +/* + types and functions for type +*/ + +// isNullableString +type RuntimeSpecificAttributesGetTypeAttributeType = *NullableString + +func getRuntimeSpecificAttributesGetTypeAttributeTypeOk(arg RuntimeSpecificAttributesGetTypeAttributeType) (ret RuntimeSpecificAttributesGetTypeRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setRuntimeSpecificAttributesGetTypeAttributeType(arg *RuntimeSpecificAttributesGetTypeAttributeType, val RuntimeSpecificAttributesGetTypeRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type RuntimeSpecificAttributesGetTypeArgType = *string +type RuntimeSpecificAttributesGetTypeRetType = *string + +// RuntimeSpecificAttributes struct for RuntimeSpecificAttributes +type RuntimeSpecificAttributes struct { + // REQUIRED + Discriminator RuntimeSpecificAttributesGetDiscriminatorAttributeType `json:"discriminator" required:"true"` + // Plan ID + PlanId RuntimeSpecificAttributesGetPlanIdAttributeType `json:"planId,omitempty"` + // Type (e.g. `single`, `replica`) + Type RuntimeSpecificAttributesGetTypeAttributeType `json:"type,omitempty"` +} + +type _RuntimeSpecificAttributes RuntimeSpecificAttributes + +// NewRuntimeSpecificAttributes instantiates a new RuntimeSpecificAttributes 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 NewRuntimeSpecificAttributes(discriminator RuntimeSpecificAttributesGetDiscriminatorArgType) *RuntimeSpecificAttributes { + this := RuntimeSpecificAttributes{} + setRuntimeSpecificAttributesGetDiscriminatorAttributeType(&this.Discriminator, discriminator) + return &this +} + +// NewRuntimeSpecificAttributesWithDefaults instantiates a new RuntimeSpecificAttributes 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 NewRuntimeSpecificAttributesWithDefaults() *RuntimeSpecificAttributes { + this := RuntimeSpecificAttributes{} + return &this +} + +// GetDiscriminator returns the Discriminator field value +func (o *RuntimeSpecificAttributes) GetDiscriminator() (ret RuntimeSpecificAttributesGetDiscriminatorRetType) { + ret, _ = o.GetDiscriminatorOk() + return ret +} + +// GetDiscriminatorOk returns a tuple with the Discriminator field value +// and a boolean to check if the value has been set. +func (o *RuntimeSpecificAttributes) GetDiscriminatorOk() (ret RuntimeSpecificAttributesGetDiscriminatorRetType, ok bool) { + return getRuntimeSpecificAttributesGetDiscriminatorAttributeTypeOk(o.Discriminator) +} + +// SetDiscriminator sets field value +func (o *RuntimeSpecificAttributes) SetDiscriminator(v RuntimeSpecificAttributesGetDiscriminatorRetType) { + setRuntimeSpecificAttributesGetDiscriminatorAttributeType(&o.Discriminator, v) +} + +// GetPlanId returns the PlanId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RuntimeSpecificAttributes) GetPlanId() (res RuntimeSpecificAttributesGetPlanIdRetType) { + res, _ = o.GetPlanIdOk() + return +} + +// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RuntimeSpecificAttributes) GetPlanIdOk() (ret RuntimeSpecificAttributesGetPlanIdRetType, ok bool) { + return getRuntimeSpecificAttributesGetPlanIdAttributeTypeOk(o.PlanId) +} + +// HasPlanId returns a boolean if a field has been set. +func (o *RuntimeSpecificAttributes) HasPlanId() bool { + _, ok := o.GetPlanIdOk() + return ok +} + +// SetPlanId gets a reference to the given string and assigns it to the PlanId field. +func (o *RuntimeSpecificAttributes) SetPlanId(v RuntimeSpecificAttributesGetPlanIdRetType) { + setRuntimeSpecificAttributesGetPlanIdAttributeType(&o.PlanId, v) +} + +// SetPlanIdNil sets the value for PlanId to be an explicit nil +func (o *RuntimeSpecificAttributes) SetPlanIdNil() { + o.PlanId = nil +} + +// UnsetPlanId ensures that no value is present for PlanId, not even an explicit nil +func (o *RuntimeSpecificAttributes) UnsetPlanId() { + o.PlanId = nil +} + +// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RuntimeSpecificAttributes) GetType() (res RuntimeSpecificAttributesGetTypeRetType) { + 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. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RuntimeSpecificAttributes) GetTypeOk() (ret RuntimeSpecificAttributesGetTypeRetType, ok bool) { + return getRuntimeSpecificAttributesGetTypeAttributeTypeOk(o.Type) +} + +// HasType returns a boolean if a field has been set. +func (o *RuntimeSpecificAttributes) HasType() bool { + _, ok := o.GetTypeOk() + return ok +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *RuntimeSpecificAttributes) SetType(v RuntimeSpecificAttributesGetTypeRetType) { + setRuntimeSpecificAttributesGetTypeAttributeType(&o.Type, v) +} + +// SetTypeNil sets the value for Type to be an explicit nil +func (o *RuntimeSpecificAttributes) SetTypeNil() { + o.Type = nil +} + +// UnsetType ensures that no value is present for Type, not even an explicit nil +func (o *RuntimeSpecificAttributes) UnsetType() { + o.Type = nil +} + +func (o RuntimeSpecificAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getRuntimeSpecificAttributesGetDiscriminatorAttributeTypeOk(o.Discriminator); ok { + toSerialize["Discriminator"] = val + } + if val, ok := getRuntimeSpecificAttributesGetPlanIdAttributeTypeOk(o.PlanId); ok { + toSerialize["PlanId"] = val + } + if val, ok := getRuntimeSpecificAttributesGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableRuntimeSpecificAttributes struct { + value *RuntimeSpecificAttributes + isSet bool +} + +func (v NullableRuntimeSpecificAttributes) Get() *RuntimeSpecificAttributes { + return v.value +} + +func (v *NullableRuntimeSpecificAttributes) Set(val *RuntimeSpecificAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableRuntimeSpecificAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableRuntimeSpecificAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRuntimeSpecificAttributes(val *RuntimeSpecificAttributes) *NullableRuntimeSpecificAttributes { + return &NullableRuntimeSpecificAttributes{value: val, isSet: true} +} + +func (v NullableRuntimeSpecificAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRuntimeSpecificAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_runtime_specific_attributes_test.go b/services/pim/model_runtime_specific_attributes_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_runtime_specific_attributes_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_search_skus_payload.go b/services/pim/model_search_skus_payload.go new file mode 100644 index 000000000..3b63917de --- /dev/null +++ b/services/pim/model_search_skus_payload.go @@ -0,0 +1,3266 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" + "time" +) + +// checks if the SearchSKUsPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SearchSKUsPayload{} + +/* + types and functions for categoryName +*/ + +// isNotNullableString +type SearchSKUsPayloadGetCategoryNameAttributeType = *string + +func getSearchSKUsPayloadGetCategoryNameAttributeTypeOk(arg SearchSKUsPayloadGetCategoryNameAttributeType) (ret SearchSKUsPayloadGetCategoryNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetCategoryNameAttributeType(arg *SearchSKUsPayloadGetCategoryNameAttributeType, val SearchSKUsPayloadGetCategoryNameRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetCategoryNameArgType = string +type SearchSKUsPayloadGetCategoryNameRetType = string + +/* + types and functions for class +*/ + +// isNotNullableString +type SearchSKUsPayloadGetClassAttributeType = *string + +func getSearchSKUsPayloadGetClassAttributeTypeOk(arg SearchSKUsPayloadGetClassAttributeType) (ret SearchSKUsPayloadGetClassRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetClassAttributeType(arg *SearchSKUsPayloadGetClassAttributeType, val SearchSKUsPayloadGetClassRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetClassArgType = string +type SearchSKUsPayloadGetClassRetType = string + +/* + types and functions for communicationChannel +*/ + +// isNotNullableString +type SearchSKUsPayloadGetCommunicationChannelAttributeType = *string + +func getSearchSKUsPayloadGetCommunicationChannelAttributeTypeOk(arg SearchSKUsPayloadGetCommunicationChannelAttributeType) (ret SearchSKUsPayloadGetCommunicationChannelRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetCommunicationChannelAttributeType(arg *SearchSKUsPayloadGetCommunicationChannelAttributeType, val SearchSKUsPayloadGetCommunicationChannelRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetCommunicationChannelArgType = string +type SearchSKUsPayloadGetCommunicationChannelRetType = string + +/* + types and functions for connectionLimitPerLoadBalancer +*/ + +// isFloat +type SearchSKUsPayloadGetConnectionLimitPerLoadBalancerAttributeType = *float64 +type SearchSKUsPayloadGetConnectionLimitPerLoadBalancerArgType = float64 +type SearchSKUsPayloadGetConnectionLimitPerLoadBalancerRetType = float64 + +func getSearchSKUsPayloadGetConnectionLimitPerLoadBalancerAttributeTypeOk(arg SearchSKUsPayloadGetConnectionLimitPerLoadBalancerAttributeType) (ret SearchSKUsPayloadGetConnectionLimitPerLoadBalancerRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetConnectionLimitPerLoadBalancerAttributeType(arg *SearchSKUsPayloadGetConnectionLimitPerLoadBalancerAttributeType, val SearchSKUsPayloadGetConnectionLimitPerLoadBalancerRetType) { + *arg = &val +} + +/* + types and functions for contractNoticePeriodInDays +*/ + +// isLong +type SearchSKUsPayloadGetContractNoticePeriodInDaysAttributeType = *int64 +type SearchSKUsPayloadGetContractNoticePeriodInDaysArgType = *int64 +type SearchSKUsPayloadGetContractNoticePeriodInDaysRetType = *int64 + +func getSearchSKUsPayloadGetContractNoticePeriodInDaysAttributeTypeOk(arg SearchSKUsPayloadGetContractNoticePeriodInDaysAttributeType) (ret SearchSKUsPayloadGetContractNoticePeriodInDaysRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSearchSKUsPayloadGetContractNoticePeriodInDaysAttributeType(arg *SearchSKUsPayloadGetContractNoticePeriodInDaysAttributeType, val SearchSKUsPayloadGetContractNoticePeriodInDaysRetType) { + *arg = val +} + +/* + types and functions for deprecated +*/ + +// isNotNullableString +type SearchSKUsPayloadGetDeprecatedAttributeType = *string + +func getSearchSKUsPayloadGetDeprecatedAttributeTypeOk(arg SearchSKUsPayloadGetDeprecatedAttributeType) (ret SearchSKUsPayloadGetDeprecatedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetDeprecatedAttributeType(arg *SearchSKUsPayloadGetDeprecatedAttributeType, val SearchSKUsPayloadGetDeprecatedRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetDeprecatedArgType = string +type SearchSKUsPayloadGetDeprecatedRetType = string + +/* + types and functions for diskStoragePerNode +*/ + +// isNotNullableString +type SearchSKUsPayloadGetDiskStoragePerNodeAttributeType = *string + +func getSearchSKUsPayloadGetDiskStoragePerNodeAttributeTypeOk(arg SearchSKUsPayloadGetDiskStoragePerNodeAttributeType) (ret SearchSKUsPayloadGetDiskStoragePerNodeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetDiskStoragePerNodeAttributeType(arg *SearchSKUsPayloadGetDiskStoragePerNodeAttributeType, val SearchSKUsPayloadGetDiskStoragePerNodeRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetDiskStoragePerNodeArgType = string +type SearchSKUsPayloadGetDiskStoragePerNodeRetType = string + +/* + types and functions for documentation +*/ + +// isNotNullableString +type SearchSKUsPayloadGetDocumentationAttributeType = *string + +func getSearchSKUsPayloadGetDocumentationAttributeTypeOk(arg SearchSKUsPayloadGetDocumentationAttributeType) (ret SearchSKUsPayloadGetDocumentationRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetDocumentationAttributeType(arg *SearchSKUsPayloadGetDocumentationAttributeType, val SearchSKUsPayloadGetDocumentationRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetDocumentationArgType = string +type SearchSKUsPayloadGetDocumentationRetType = string + +/* + types and functions for escalationAvailabilityBCINC +*/ + +// isNullableString +type SearchSKUsPayloadGetEscalationAvailabilityBCINCAttributeType = *NullableString + +func getSearchSKUsPayloadGetEscalationAvailabilityBCINCAttributeTypeOk(arg SearchSKUsPayloadGetEscalationAvailabilityBCINCAttributeType) (ret SearchSKUsPayloadGetEscalationAvailabilityBCINCRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSearchSKUsPayloadGetEscalationAvailabilityBCINCAttributeType(arg *SearchSKUsPayloadGetEscalationAvailabilityBCINCAttributeType, val SearchSKUsPayloadGetEscalationAvailabilityBCINCRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SearchSKUsPayloadGetEscalationAvailabilityBCINCArgType = *string +type SearchSKUsPayloadGetEscalationAvailabilityBCINCRetType = *string + +/* + types and functions for escalationAvailabilityINC +*/ + +// isNullableString +type SearchSKUsPayloadGetEscalationAvailabilityINCAttributeType = *NullableString + +func getSearchSKUsPayloadGetEscalationAvailabilityINCAttributeTypeOk(arg SearchSKUsPayloadGetEscalationAvailabilityINCAttributeType) (ret SearchSKUsPayloadGetEscalationAvailabilityINCRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSearchSKUsPayloadGetEscalationAvailabilityINCAttributeType(arg *SearchSKUsPayloadGetEscalationAvailabilityINCAttributeType, val SearchSKUsPayloadGetEscalationAvailabilityINCRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SearchSKUsPayloadGetEscalationAvailabilityINCArgType = *string +type SearchSKUsPayloadGetEscalationAvailabilityINCRetType = *string + +/* + types and functions for escalationAvailabilitySR +*/ + +// isNullableString +type SearchSKUsPayloadGetEscalationAvailabilitySRAttributeType = *NullableString + +func getSearchSKUsPayloadGetEscalationAvailabilitySRAttributeTypeOk(arg SearchSKUsPayloadGetEscalationAvailabilitySRAttributeType) (ret SearchSKUsPayloadGetEscalationAvailabilitySRRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSearchSKUsPayloadGetEscalationAvailabilitySRAttributeType(arg *SearchSKUsPayloadGetEscalationAvailabilitySRAttributeType, val SearchSKUsPayloadGetEscalationAvailabilitySRRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SearchSKUsPayloadGetEscalationAvailabilitySRArgType = *string +type SearchSKUsPayloadGetEscalationAvailabilitySRRetType = *string + +/* + types and functions for escalationThresholdBCINCInMins +*/ + +// isLong +type SearchSKUsPayloadGetEscalationThresholdBCINCInMinsAttributeType = *int64 +type SearchSKUsPayloadGetEscalationThresholdBCINCInMinsArgType = *int64 +type SearchSKUsPayloadGetEscalationThresholdBCINCInMinsRetType = *int64 + +func getSearchSKUsPayloadGetEscalationThresholdBCINCInMinsAttributeTypeOk(arg SearchSKUsPayloadGetEscalationThresholdBCINCInMinsAttributeType) (ret SearchSKUsPayloadGetEscalationThresholdBCINCInMinsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSearchSKUsPayloadGetEscalationThresholdBCINCInMinsAttributeType(arg *SearchSKUsPayloadGetEscalationThresholdBCINCInMinsAttributeType, val SearchSKUsPayloadGetEscalationThresholdBCINCInMinsRetType) { + *arg = val +} + +/* + types and functions for escalationThresholdINCInMins +*/ + +// isLong +type SearchSKUsPayloadGetEscalationThresholdINCInMinsAttributeType = *int64 +type SearchSKUsPayloadGetEscalationThresholdINCInMinsArgType = *int64 +type SearchSKUsPayloadGetEscalationThresholdINCInMinsRetType = *int64 + +func getSearchSKUsPayloadGetEscalationThresholdINCInMinsAttributeTypeOk(arg SearchSKUsPayloadGetEscalationThresholdINCInMinsAttributeType) (ret SearchSKUsPayloadGetEscalationThresholdINCInMinsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSearchSKUsPayloadGetEscalationThresholdINCInMinsAttributeType(arg *SearchSKUsPayloadGetEscalationThresholdINCInMinsAttributeType, val SearchSKUsPayloadGetEscalationThresholdINCInMinsRetType) { + *arg = val +} + +/* + types and functions for escalationThresholdSRInMins +*/ + +// isLong +type SearchSKUsPayloadGetEscalationThresholdSRInMinsAttributeType = *int64 +type SearchSKUsPayloadGetEscalationThresholdSRInMinsArgType = *int64 +type SearchSKUsPayloadGetEscalationThresholdSRInMinsRetType = *int64 + +func getSearchSKUsPayloadGetEscalationThresholdSRInMinsAttributeTypeOk(arg SearchSKUsPayloadGetEscalationThresholdSRInMinsAttributeType) (ret SearchSKUsPayloadGetEscalationThresholdSRInMinsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSearchSKUsPayloadGetEscalationThresholdSRInMinsAttributeType(arg *SearchSKUsPayloadGetEscalationThresholdSRInMinsAttributeType, val SearchSKUsPayloadGetEscalationThresholdSRInMinsRetType) { + *arg = val +} + +/* + types and functions for finPenaltySLAVio80Pct +*/ + +// isLong +type SearchSKUsPayloadGetFinPenaltySLAVio80PctAttributeType = *int64 +type SearchSKUsPayloadGetFinPenaltySLAVio80PctArgType = *int64 +type SearchSKUsPayloadGetFinPenaltySLAVio80PctRetType = *int64 + +func getSearchSKUsPayloadGetFinPenaltySLAVio80PctAttributeTypeOk(arg SearchSKUsPayloadGetFinPenaltySLAVio80PctAttributeType) (ret SearchSKUsPayloadGetFinPenaltySLAVio80PctRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSearchSKUsPayloadGetFinPenaltySLAVio80PctAttributeType(arg *SearchSKUsPayloadGetFinPenaltySLAVio80PctAttributeType, val SearchSKUsPayloadGetFinPenaltySLAVio80PctRetType) { + *arg = val +} + +/* + types and functions for finPenaltySLAVio90-80Pct +*/ + +// isLong +type SearchSKUsPayloadGetFinPenaltySLAVio9080PctAttributeType = *int64 +type SearchSKUsPayloadGetFinPenaltySLAVio9080PctArgType = *int64 +type SearchSKUsPayloadGetFinPenaltySLAVio9080PctRetType = *int64 + +func getSearchSKUsPayloadGetFinPenaltySLAVio9080PctAttributeTypeOk(arg SearchSKUsPayloadGetFinPenaltySLAVio9080PctAttributeType) (ret SearchSKUsPayloadGetFinPenaltySLAVio9080PctRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSearchSKUsPayloadGetFinPenaltySLAVio9080PctAttributeType(arg *SearchSKUsPayloadGetFinPenaltySLAVio9080PctAttributeType, val SearchSKUsPayloadGetFinPenaltySLAVio9080PctRetType) { + *arg = val +} + +/* + types and functions for flavor +*/ + +// isNotNullableString +type SearchSKUsPayloadGetFlavorAttributeType = *string + +func getSearchSKUsPayloadGetFlavorAttributeTypeOk(arg SearchSKUsPayloadGetFlavorAttributeType) (ret SearchSKUsPayloadGetFlavorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetFlavorAttributeType(arg *SearchSKUsPayloadGetFlavorAttributeType, val SearchSKUsPayloadGetFlavorRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetFlavorArgType = string +type SearchSKUsPayloadGetFlavorRetType = string + +/* + types and functions for generalProductGroup +*/ + +// isNotNullableString +type SearchSKUsPayloadGetGeneralProductGroupAttributeType = *string + +func getSearchSKUsPayloadGetGeneralProductGroupAttributeTypeOk(arg SearchSKUsPayloadGetGeneralProductGroupAttributeType) (ret SearchSKUsPayloadGetGeneralProductGroupRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetGeneralProductGroupAttributeType(arg *SearchSKUsPayloadGetGeneralProductGroupAttributeType, val SearchSKUsPayloadGetGeneralProductGroupRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetGeneralProductGroupArgType = string +type SearchSKUsPayloadGetGeneralProductGroupRetType = string + +/* + types and functions for hardware +*/ + +// isNotNullableString +type SearchSKUsPayloadGetHardwareAttributeType = *string + +func getSearchSKUsPayloadGetHardwareAttributeTypeOk(arg SearchSKUsPayloadGetHardwareAttributeType) (ret SearchSKUsPayloadGetHardwareRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetHardwareAttributeType(arg *SearchSKUsPayloadGetHardwareAttributeType, val SearchSKUsPayloadGetHardwareRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetHardwareArgType = string +type SearchSKUsPayloadGetHardwareRetType = string + +/* + types and functions for initialRuntimeInMonths +*/ + +// isLong +type SearchSKUsPayloadGetInitialRuntimeInMonthsAttributeType = *int64 +type SearchSKUsPayloadGetInitialRuntimeInMonthsArgType = *int64 +type SearchSKUsPayloadGetInitialRuntimeInMonthsRetType = *int64 + +func getSearchSKUsPayloadGetInitialRuntimeInMonthsAttributeTypeOk(arg SearchSKUsPayloadGetInitialRuntimeInMonthsAttributeType) (ret SearchSKUsPayloadGetInitialRuntimeInMonthsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSearchSKUsPayloadGetInitialRuntimeInMonthsAttributeType(arg *SearchSKUsPayloadGetInitialRuntimeInMonthsAttributeType, val SearchSKUsPayloadGetInitialRuntimeInMonthsRetType) { + *arg = val +} + +/* + types and functions for leadTimeInWorkDays +*/ + +// isLong +type SearchSKUsPayloadGetLeadTimeInWorkDaysAttributeType = *int64 +type SearchSKUsPayloadGetLeadTimeInWorkDaysArgType = *int64 +type SearchSKUsPayloadGetLeadTimeInWorkDaysRetType = *int64 + +func getSearchSKUsPayloadGetLeadTimeInWorkDaysAttributeTypeOk(arg SearchSKUsPayloadGetLeadTimeInWorkDaysAttributeType) (ret SearchSKUsPayloadGetLeadTimeInWorkDaysRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSearchSKUsPayloadGetLeadTimeInWorkDaysAttributeType(arg *SearchSKUsPayloadGetLeadTimeInWorkDaysAttributeType, val SearchSKUsPayloadGetLeadTimeInWorkDaysRetType) { + *arg = val +} + +/* + types and functions for location +*/ + +// isNullableString +type SearchSKUsPayloadGetLocationAttributeType = *NullableString + +func getSearchSKUsPayloadGetLocationAttributeTypeOk(arg SearchSKUsPayloadGetLocationAttributeType) (ret SearchSKUsPayloadGetLocationRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSearchSKUsPayloadGetLocationAttributeType(arg *SearchSKUsPayloadGetLocationAttributeType, val SearchSKUsPayloadGetLocationRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SearchSKUsPayloadGetLocationArgType = *string +type SearchSKUsPayloadGetLocationRetType = *string + +/* + types and functions for maturityModelState +*/ + +// isNotNullableString +type SearchSKUsPayloadGetMaturityModelStateAttributeType = *string + +func getSearchSKUsPayloadGetMaturityModelStateAttributeTypeOk(arg SearchSKUsPayloadGetMaturityModelStateAttributeType) (ret SearchSKUsPayloadGetMaturityModelStateRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetMaturityModelStateAttributeType(arg *SearchSKUsPayloadGetMaturityModelStateAttributeType, val SearchSKUsPayloadGetMaturityModelStateRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetMaturityModelStateArgType = string +type SearchSKUsPayloadGetMaturityModelStateRetType = string + +/* + types and functions for maxIOPerSec +*/ + +// isLong +type SearchSKUsPayloadGetMaxIOPerSecAttributeType = *int64 +type SearchSKUsPayloadGetMaxIOPerSecArgType = int64 +type SearchSKUsPayloadGetMaxIOPerSecRetType = int64 + +func getSearchSKUsPayloadGetMaxIOPerSecAttributeTypeOk(arg SearchSKUsPayloadGetMaxIOPerSecAttributeType) (ret SearchSKUsPayloadGetMaxIOPerSecRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetMaxIOPerSecAttributeType(arg *SearchSKUsPayloadGetMaxIOPerSecAttributeType, val SearchSKUsPayloadGetMaxIOPerSecRetType) { + *arg = &val +} + +/* + types and functions for maxTroughInMB +*/ + +// isLong +type SearchSKUsPayloadGetMaxTroughInMBAttributeType = *int64 +type SearchSKUsPayloadGetMaxTroughInMBArgType = int64 +type SearchSKUsPayloadGetMaxTroughInMBRetType = int64 + +func getSearchSKUsPayloadGetMaxTroughInMBAttributeTypeOk(arg SearchSKUsPayloadGetMaxTroughInMBAttributeType) (ret SearchSKUsPayloadGetMaxTroughInMBRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetMaxTroughInMBAttributeType(arg *SearchSKUsPayloadGetMaxTroughInMBAttributeType, val SearchSKUsPayloadGetMaxTroughInMBRetType) { + *arg = &val +} + +/* + types and functions for metricPerMin +*/ + +// isLong +type SearchSKUsPayloadGetMetricPerMinAttributeType = *int64 +type SearchSKUsPayloadGetMetricPerMinArgType = int64 +type SearchSKUsPayloadGetMetricPerMinRetType = int64 + +func getSearchSKUsPayloadGetMetricPerMinAttributeTypeOk(arg SearchSKUsPayloadGetMetricPerMinAttributeType) (ret SearchSKUsPayloadGetMetricPerMinRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetMetricPerMinAttributeType(arg *SearchSKUsPayloadGetMetricPerMinAttributeType, val SearchSKUsPayloadGetMetricPerMinRetType) { + *arg = &val +} + +/* + types and functions for metro +*/ + +// isBoolean +type SearchSKUsPayloadgetMetroAttributeType = *bool +type SearchSKUsPayloadgetMetroArgType = bool +type SearchSKUsPayloadgetMetroRetType = bool + +func getSearchSKUsPayloadgetMetroAttributeTypeOk(arg SearchSKUsPayloadgetMetroAttributeType) (ret SearchSKUsPayloadgetMetroRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadgetMetroAttributeType(arg *SearchSKUsPayloadgetMetroAttributeType, val SearchSKUsPayloadgetMetroRetType) { + *arg = &val +} + +/* + types and functions for monthlyPrice +*/ + +// isNotNullableString +type SearchSKUsPayloadGetMonthlyPriceAttributeType = *string + +func getSearchSKUsPayloadGetMonthlyPriceAttributeTypeOk(arg SearchSKUsPayloadGetMonthlyPriceAttributeType) (ret SearchSKUsPayloadGetMonthlyPriceRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetMonthlyPriceAttributeType(arg *SearchSKUsPayloadGetMonthlyPriceAttributeType, val SearchSKUsPayloadGetMonthlyPriceRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetMonthlyPriceArgType = string +type SearchSKUsPayloadGetMonthlyPriceRetType = string + +/* + types and functions for name +*/ + +// isNotNullableString +type SearchSKUsPayloadGetNameAttributeType = *string + +func getSearchSKUsPayloadGetNameAttributeTypeOk(arg SearchSKUsPayloadGetNameAttributeType) (ret SearchSKUsPayloadGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetNameAttributeType(arg *SearchSKUsPayloadGetNameAttributeType, val SearchSKUsPayloadGetNameRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetNameArgType = string +type SearchSKUsPayloadGetNameRetType = string + +/* + types and functions for nodes +*/ + +// isLong +type SearchSKUsPayloadGetNodesAttributeType = *int64 +type SearchSKUsPayloadGetNodesArgType = int64 +type SearchSKUsPayloadGetNodesRetType = int64 + +func getSearchSKUsPayloadGetNodesAttributeTypeOk(arg SearchSKUsPayloadGetNodesAttributeType) (ret SearchSKUsPayloadGetNodesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetNodesAttributeType(arg *SearchSKUsPayloadGetNodesAttributeType, val SearchSKUsPayloadGetNodesRetType) { + *arg = &val +} + +/* + types and functions for os +*/ + +// isNotNullableString +type SearchSKUsPayloadGetOsAttributeType = *string + +func getSearchSKUsPayloadGetOsAttributeTypeOk(arg SearchSKUsPayloadGetOsAttributeType) (ret SearchSKUsPayloadGetOsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetOsAttributeType(arg *SearchSKUsPayloadGetOsAttributeType, val SearchSKUsPayloadGetOsRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetOsArgType = string +type SearchSKUsPayloadGetOsRetType = string + +/* + types and functions for priceListVisibility +*/ + +// isNotNullableString +type SearchSKUsPayloadGetPriceListVisibilityAttributeType = *string + +func getSearchSKUsPayloadGetPriceListVisibilityAttributeTypeOk(arg SearchSKUsPayloadGetPriceListVisibilityAttributeType) (ret SearchSKUsPayloadGetPriceListVisibilityRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetPriceListVisibilityAttributeType(arg *SearchSKUsPayloadGetPriceListVisibilityAttributeType, val SearchSKUsPayloadGetPriceListVisibilityRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetPriceListVisibilityArgType = string +type SearchSKUsPayloadGetPriceListVisibilityRetType = string + +/* + types and functions for productName +*/ + +// isNotNullableString +type SearchSKUsPayloadGetProductNameAttributeType = *string + +func getSearchSKUsPayloadGetProductNameAttributeTypeOk(arg SearchSKUsPayloadGetProductNameAttributeType) (ret SearchSKUsPayloadGetProductNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetProductNameAttributeType(arg *SearchSKUsPayloadGetProductNameAttributeType, val SearchSKUsPayloadGetProductNameRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetProductNameArgType = string +type SearchSKUsPayloadGetProductNameRetType = string + +/* + types and functions for projectNoticePeriodInWorkDays +*/ + +// isLong +type SearchSKUsPayloadGetProjectNoticePeriodInWorkDaysAttributeType = *int64 +type SearchSKUsPayloadGetProjectNoticePeriodInWorkDaysArgType = *int64 +type SearchSKUsPayloadGetProjectNoticePeriodInWorkDaysRetType = *int64 + +func getSearchSKUsPayloadGetProjectNoticePeriodInWorkDaysAttributeTypeOk(arg SearchSKUsPayloadGetProjectNoticePeriodInWorkDaysAttributeType) (ret SearchSKUsPayloadGetProjectNoticePeriodInWorkDaysRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSearchSKUsPayloadGetProjectNoticePeriodInWorkDaysAttributeType(arg *SearchSKUsPayloadGetProjectNoticePeriodInWorkDaysAttributeType, val SearchSKUsPayloadGetProjectNoticePeriodInWorkDaysRetType) { + *arg = val +} + +/* + types and functions for ram +*/ + +// isFloat +type SearchSKUsPayloadGetRamAttributeType = *float64 +type SearchSKUsPayloadGetRamArgType = float64 +type SearchSKUsPayloadGetRamRetType = float64 + +func getSearchSKUsPayloadGetRamAttributeTypeOk(arg SearchSKUsPayloadGetRamAttributeType) (ret SearchSKUsPayloadGetRamRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetRamAttributeType(arg *SearchSKUsPayloadGetRamAttributeType, val SearchSKUsPayloadGetRamRetType) { + *arg = &val +} + +/* + types and functions for reactionTimeInMins +*/ + +// isLong +type SearchSKUsPayloadGetReactionTimeInMinsAttributeType = *int64 +type SearchSKUsPayloadGetReactionTimeInMinsArgType = *int64 +type SearchSKUsPayloadGetReactionTimeInMinsRetType = *int64 + +func getSearchSKUsPayloadGetReactionTimeInMinsAttributeTypeOk(arg SearchSKUsPayloadGetReactionTimeInMinsAttributeType) (ret SearchSKUsPayloadGetReactionTimeInMinsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSearchSKUsPayloadGetReactionTimeInMinsAttributeType(arg *SearchSKUsPayloadGetReactionTimeInMinsAttributeType, val SearchSKUsPayloadGetReactionTimeInMinsRetType) { + *arg = val +} + +/* + types and functions for recordLimitPerZone +*/ + +// isFloat +type SearchSKUsPayloadGetRecordLimitPerZoneAttributeType = *float64 +type SearchSKUsPayloadGetRecordLimitPerZoneArgType = float64 +type SearchSKUsPayloadGetRecordLimitPerZoneRetType = float64 + +func getSearchSKUsPayloadGetRecordLimitPerZoneAttributeTypeOk(arg SearchSKUsPayloadGetRecordLimitPerZoneAttributeType) (ret SearchSKUsPayloadGetRecordLimitPerZoneRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetRecordLimitPerZoneAttributeType(arg *SearchSKUsPayloadGetRecordLimitPerZoneAttributeType, val SearchSKUsPayloadGetRecordLimitPerZoneRetType) { + *arg = &val +} + +/* + types and functions for region +*/ + +// isNotNullableString +type SearchSKUsPayloadGetRegionAttributeType = *string + +func getSearchSKUsPayloadGetRegionAttributeTypeOk(arg SearchSKUsPayloadGetRegionAttributeType) (ret SearchSKUsPayloadGetRegionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetRegionAttributeType(arg *SearchSKUsPayloadGetRegionAttributeType, val SearchSKUsPayloadGetRegionRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetRegionArgType = string +type SearchSKUsPayloadGetRegionRetType = string + +/* + types and functions for repeatedRuntimeInMonths +*/ + +// isLong +type SearchSKUsPayloadGetRepeatedRuntimeInMonthsAttributeType = *int64 +type SearchSKUsPayloadGetRepeatedRuntimeInMonthsArgType = *int64 +type SearchSKUsPayloadGetRepeatedRuntimeInMonthsRetType = *int64 + +func getSearchSKUsPayloadGetRepeatedRuntimeInMonthsAttributeTypeOk(arg SearchSKUsPayloadGetRepeatedRuntimeInMonthsAttributeType) (ret SearchSKUsPayloadGetRepeatedRuntimeInMonthsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSearchSKUsPayloadGetRepeatedRuntimeInMonthsAttributeType(arg *SearchSKUsPayloadGetRepeatedRuntimeInMonthsAttributeType, val SearchSKUsPayloadGetRepeatedRuntimeInMonthsRetType) { + *arg = val +} + +/* + types and functions for responseTimeBCINCInMins +*/ + +// isLong +type SearchSKUsPayloadGetResponseTimeBCINCInMinsAttributeType = *int64 +type SearchSKUsPayloadGetResponseTimeBCINCInMinsArgType = *int64 +type SearchSKUsPayloadGetResponseTimeBCINCInMinsRetType = *int64 + +func getSearchSKUsPayloadGetResponseTimeBCINCInMinsAttributeTypeOk(arg SearchSKUsPayloadGetResponseTimeBCINCInMinsAttributeType) (ret SearchSKUsPayloadGetResponseTimeBCINCInMinsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSearchSKUsPayloadGetResponseTimeBCINCInMinsAttributeType(arg *SearchSKUsPayloadGetResponseTimeBCINCInMinsAttributeType, val SearchSKUsPayloadGetResponseTimeBCINCInMinsRetType) { + *arg = val +} + +/* + types and functions for responseTimeINCInMins +*/ + +// isLong +type SearchSKUsPayloadGetResponseTimeINCInMinsAttributeType = *int64 +type SearchSKUsPayloadGetResponseTimeINCInMinsArgType = *int64 +type SearchSKUsPayloadGetResponseTimeINCInMinsRetType = *int64 + +func getSearchSKUsPayloadGetResponseTimeINCInMinsAttributeTypeOk(arg SearchSKUsPayloadGetResponseTimeINCInMinsAttributeType) (ret SearchSKUsPayloadGetResponseTimeINCInMinsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSearchSKUsPayloadGetResponseTimeINCInMinsAttributeType(arg *SearchSKUsPayloadGetResponseTimeINCInMinsAttributeType, val SearchSKUsPayloadGetResponseTimeINCInMinsRetType) { + *arg = val +} + +/* + types and functions for responseTimeSRInMins +*/ + +// isLong +type SearchSKUsPayloadGetResponseTimeSRInMinsAttributeType = *int64 +type SearchSKUsPayloadGetResponseTimeSRInMinsArgType = *int64 +type SearchSKUsPayloadGetResponseTimeSRInMinsRetType = *int64 + +func getSearchSKUsPayloadGetResponseTimeSRInMinsAttributeTypeOk(arg SearchSKUsPayloadGetResponseTimeSRInMinsAttributeType) (ret SearchSKUsPayloadGetResponseTimeSRInMinsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSearchSKUsPayloadGetResponseTimeSRInMinsAttributeType(arg *SearchSKUsPayloadGetResponseTimeSRInMinsAttributeType, val SearchSKUsPayloadGetResponseTimeSRInMinsRetType) { + *arg = val +} + +/* + types and functions for serviceHoursBCINC +*/ + +// isNullableString +type SearchSKUsPayloadGetServiceHoursBCINCAttributeType = *NullableString + +func getSearchSKUsPayloadGetServiceHoursBCINCAttributeTypeOk(arg SearchSKUsPayloadGetServiceHoursBCINCAttributeType) (ret SearchSKUsPayloadGetServiceHoursBCINCRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSearchSKUsPayloadGetServiceHoursBCINCAttributeType(arg *SearchSKUsPayloadGetServiceHoursBCINCAttributeType, val SearchSKUsPayloadGetServiceHoursBCINCRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SearchSKUsPayloadGetServiceHoursBCINCArgType = *string +type SearchSKUsPayloadGetServiceHoursBCINCRetType = *string + +/* + types and functions for serviceHoursINC +*/ + +// isNullableString +type SearchSKUsPayloadGetServiceHoursINCAttributeType = *NullableString + +func getSearchSKUsPayloadGetServiceHoursINCAttributeTypeOk(arg SearchSKUsPayloadGetServiceHoursINCAttributeType) (ret SearchSKUsPayloadGetServiceHoursINCRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSearchSKUsPayloadGetServiceHoursINCAttributeType(arg *SearchSKUsPayloadGetServiceHoursINCAttributeType, val SearchSKUsPayloadGetServiceHoursINCRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SearchSKUsPayloadGetServiceHoursINCArgType = *string +type SearchSKUsPayloadGetServiceHoursINCRetType = *string + +/* + types and functions for serviceHoursSR +*/ + +// isNullableString +type SearchSKUsPayloadGetServiceHoursSRAttributeType = *NullableString + +func getSearchSKUsPayloadGetServiceHoursSRAttributeTypeOk(arg SearchSKUsPayloadGetServiceHoursSRAttributeType) (ret SearchSKUsPayloadGetServiceHoursSRRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSearchSKUsPayloadGetServiceHoursSRAttributeType(arg *SearchSKUsPayloadGetServiceHoursSRAttributeType, val SearchSKUsPayloadGetServiceHoursSRRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SearchSKUsPayloadGetServiceHoursSRArgType = *string +type SearchSKUsPayloadGetServiceHoursSRRetType = *string + +/* + types and functions for serviceId +*/ + +// isNotNullableString +type SearchSKUsPayloadGetServiceIdAttributeType = *string + +func getSearchSKUsPayloadGetServiceIdAttributeTypeOk(arg SearchSKUsPayloadGetServiceIdAttributeType) (ret SearchSKUsPayloadGetServiceIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetServiceIdAttributeType(arg *SearchSKUsPayloadGetServiceIdAttributeType, val SearchSKUsPayloadGetServiceIdRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetServiceIdArgType = string +type SearchSKUsPayloadGetServiceIdRetType = string + +/* + types and functions for sku +*/ + +// isNotNullableString +type SearchSKUsPayloadGetSkuAttributeType = *string + +func getSearchSKUsPayloadGetSkuAttributeTypeOk(arg SearchSKUsPayloadGetSkuAttributeType) (ret SearchSKUsPayloadGetSkuRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetSkuAttributeType(arg *SearchSKUsPayloadGetSkuAttributeType, val SearchSKUsPayloadGetSkuRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetSkuArgType = string +type SearchSKUsPayloadGetSkuRetType = string + +/* + types and functions for slaGoalInPercentage +*/ + +// isLong +type SearchSKUsPayloadGetSlaGoalInPercentageAttributeType = *int64 +type SearchSKUsPayloadGetSlaGoalInPercentageArgType = *int64 +type SearchSKUsPayloadGetSlaGoalInPercentageRetType = *int64 + +func getSearchSKUsPayloadGetSlaGoalInPercentageAttributeTypeOk(arg SearchSKUsPayloadGetSlaGoalInPercentageAttributeType) (ret SearchSKUsPayloadGetSlaGoalInPercentageRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSearchSKUsPayloadGetSlaGoalInPercentageAttributeType(arg *SearchSKUsPayloadGetSlaGoalInPercentageAttributeType, val SearchSKUsPayloadGetSlaGoalInPercentageRetType) { + *arg = val +} + +/* + types and functions for storage +*/ + +// isNotNullableString +type SearchSKUsPayloadGetStorageAttributeType = *string + +func getSearchSKUsPayloadGetStorageAttributeTypeOk(arg SearchSKUsPayloadGetStorageAttributeType) (ret SearchSKUsPayloadGetStorageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetStorageAttributeType(arg *SearchSKUsPayloadGetStorageAttributeType, val SearchSKUsPayloadGetStorageRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetStorageArgType = string +type SearchSKUsPayloadGetStorageRetType = string + +/* + types and functions for storageMaxGb +*/ + +// isLong +type SearchSKUsPayloadGetStorageMaxGbAttributeType = *int64 +type SearchSKUsPayloadGetStorageMaxGbArgType = int64 +type SearchSKUsPayloadGetStorageMaxGbRetType = int64 + +func getSearchSKUsPayloadGetStorageMaxGbAttributeTypeOk(arg SearchSKUsPayloadGetStorageMaxGbAttributeType) (ret SearchSKUsPayloadGetStorageMaxGbRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetStorageMaxGbAttributeType(arg *SearchSKUsPayloadGetStorageMaxGbAttributeType, val SearchSKUsPayloadGetStorageMaxGbRetType) { + *arg = &val +} + +/* + types and functions for storageMinGb +*/ + +// isLong +type SearchSKUsPayloadGetStorageMinGbAttributeType = *int64 +type SearchSKUsPayloadGetStorageMinGbArgType = int64 +type SearchSKUsPayloadGetStorageMinGbRetType = int64 + +func getSearchSKUsPayloadGetStorageMinGbAttributeTypeOk(arg SearchSKUsPayloadGetStorageMinGbAttributeType) (ret SearchSKUsPayloadGetStorageMinGbRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetStorageMinGbAttributeType(arg *SearchSKUsPayloadGetStorageMinGbAttributeType, val SearchSKUsPayloadGetStorageMinGbRetType) { + *arg = &val +} + +/* + types and functions for targets +*/ + +// isLong +type SearchSKUsPayloadGetTargetsAttributeType = *int64 +type SearchSKUsPayloadGetTargetsArgType = int64 +type SearchSKUsPayloadGetTargetsRetType = int64 + +func getSearchSKUsPayloadGetTargetsAttributeTypeOk(arg SearchSKUsPayloadGetTargetsAttributeType) (ret SearchSKUsPayloadGetTargetsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetTargetsAttributeType(arg *SearchSKUsPayloadGetTargetsAttributeType, val SearchSKUsPayloadGetTargetsRetType) { + *arg = &val +} + +/* + types and functions for technicalProductGroup +*/ + +// isNotNullableString +type SearchSKUsPayloadGetTechnicalProductGroupAttributeType = *string + +func getSearchSKUsPayloadGetTechnicalProductGroupAttributeTypeOk(arg SearchSKUsPayloadGetTechnicalProductGroupAttributeType) (ret SearchSKUsPayloadGetTechnicalProductGroupRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetTechnicalProductGroupAttributeType(arg *SearchSKUsPayloadGetTechnicalProductGroupAttributeType, val SearchSKUsPayloadGetTechnicalProductGroupRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetTechnicalProductGroupArgType = string +type SearchSKUsPayloadGetTechnicalProductGroupRetType = string + +/* + types and functions for title +*/ + +// isNotNullableString +type SearchSKUsPayloadGetTitleAttributeType = *string + +func getSearchSKUsPayloadGetTitleAttributeTypeOk(arg SearchSKUsPayloadGetTitleAttributeType) (ret SearchSKUsPayloadGetTitleRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetTitleAttributeType(arg *SearchSKUsPayloadGetTitleAttributeType, val SearchSKUsPayloadGetTitleRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetTitleArgType = string +type SearchSKUsPayloadGetTitleRetType = string + +/* + types and functions for type +*/ + +// isNotNullableString +type SearchSKUsPayloadGetTypeAttributeType = *string + +func getSearchSKUsPayloadGetTypeAttributeTypeOk(arg SearchSKUsPayloadGetTypeAttributeType) (ret SearchSKUsPayloadGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetTypeAttributeType(arg *SearchSKUsPayloadGetTypeAttributeType, val SearchSKUsPayloadGetTypeRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetTypeArgType = string +type SearchSKUsPayloadGetTypeRetType = string + +/* + types and functions for unit +*/ + +// isNotNullableString +type SearchSKUsPayloadGetUnitAttributeType = *string + +func getSearchSKUsPayloadGetUnitAttributeTypeOk(arg SearchSKUsPayloadGetUnitAttributeType) (ret SearchSKUsPayloadGetUnitRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetUnitAttributeType(arg *SearchSKUsPayloadGetUnitAttributeType, val SearchSKUsPayloadGetUnitRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetUnitArgType = string +type SearchSKUsPayloadGetUnitRetType = string + +/* + types and functions for unitBilling +*/ + +// isNotNullableString +type SearchSKUsPayloadGetUnitBillingAttributeType = *string + +func getSearchSKUsPayloadGetUnitBillingAttributeTypeOk(arg SearchSKUsPayloadGetUnitBillingAttributeType) (ret SearchSKUsPayloadGetUnitBillingRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetUnitBillingAttributeType(arg *SearchSKUsPayloadGetUnitBillingAttributeType, val SearchSKUsPayloadGetUnitBillingRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetUnitBillingArgType = string +type SearchSKUsPayloadGetUnitBillingRetType = string + +/* + types and functions for vCPU +*/ + +// isLong +type SearchSKUsPayloadGetVCPUAttributeType = *int64 +type SearchSKUsPayloadGetVCPUArgType = int64 +type SearchSKUsPayloadGetVCPURetType = int64 + +func getSearchSKUsPayloadGetVCPUAttributeTypeOk(arg SearchSKUsPayloadGetVCPUAttributeType) (ret SearchSKUsPayloadGetVCPURetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetVCPUAttributeType(arg *SearchSKUsPayloadGetVCPUAttributeType, val SearchSKUsPayloadGetVCPURetType) { + *arg = &val +} + +/* + types and functions for validFrom +*/ + +// isDateTime +type SearchSKUsPayloadGetValidFromAttributeType = *time.Time +type SearchSKUsPayloadGetValidFromArgType = time.Time +type SearchSKUsPayloadGetValidFromRetType = time.Time + +func getSearchSKUsPayloadGetValidFromAttributeTypeOk(arg SearchSKUsPayloadGetValidFromAttributeType) (ret SearchSKUsPayloadGetValidFromRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetValidFromAttributeType(arg *SearchSKUsPayloadGetValidFromAttributeType, val SearchSKUsPayloadGetValidFromRetType) { + *arg = &val +} + +/* + types and functions for value +*/ + +// isNotNullableString +type SearchSKUsPayloadGetValueAttributeType = *string + +func getSearchSKUsPayloadGetValueAttributeTypeOk(arg SearchSKUsPayloadGetValueAttributeType) (ret SearchSKUsPayloadGetValueRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSearchSKUsPayloadGetValueAttributeType(arg *SearchSKUsPayloadGetValueAttributeType, val SearchSKUsPayloadGetValueRetType) { + *arg = &val +} + +type SearchSKUsPayloadGetValueArgType = string +type SearchSKUsPayloadGetValueRetType = string + +// SearchSKUsPayload struct for SearchSKUsPayload +type SearchSKUsPayload struct { + // Generic categorization to structure the customer's invoice transparently (e.g. `Compute Engine`, `Database`, `Storage`) + CategoryName SearchSKUsPayloadGetCategoryNameAttributeType `json:"categoryName,omitempty"` + // Storage Class type + Class SearchSKUsPayloadGetClassAttributeType `json:"class,omitempty"` + // Communication Channel + CommunicationChannel SearchSKUsPayloadGetCommunicationChannelAttributeType `json:"communicationChannel,omitempty"` + // Connection limit per Load Balancer + // Can be cast to float32 without loss of precision. + ConnectionLimitPerLoadBalancer SearchSKUsPayloadGetConnectionLimitPerLoadBalancerAttributeType `json:"connectionLimitPerLoadBalancer,omitempty"` + // Contract notice period in days + ContractNoticePeriodInDays SearchSKUsPayloadGetContractNoticePeriodInDaysAttributeType `json:"contractNoticePeriodInDays,omitempty"` + // Attribute that indicates if product is deprecated or not. + Deprecated SearchSKUsPayloadGetDeprecatedAttributeType `json:"deprecated,omitempty"` + // diskStoragePerNode + DiskStoragePerNode SearchSKUsPayloadGetDiskStoragePerNodeAttributeType `json:"diskStoragePerNode,omitempty"` + // Documentation URL + Documentation SearchSKUsPayloadGetDocumentationAttributeType `json:"documentation,omitempty"` + // Escalation availability BC INC + EscalationAvailabilityBCINC SearchSKUsPayloadGetEscalationAvailabilityBCINCAttributeType `json:"escalationAvailabilityBCINC,omitempty"` + // Escalation availability INC + EscalationAvailabilityINC SearchSKUsPayloadGetEscalationAvailabilityINCAttributeType `json:"escalationAvailabilityINC,omitempty"` + // Escalation availability for Service Requests + EscalationAvailabilitySR SearchSKUsPayloadGetEscalationAvailabilitySRAttributeType `json:"escalationAvailabilitySR,omitempty"` + // Escalation threshold BC INC (in minutes) + EscalationThresholdBCINCInMins SearchSKUsPayloadGetEscalationThresholdBCINCInMinsAttributeType `json:"escalationThresholdBCINCInMins,omitempty"` + // Escalation threshold INC (in minutes) + EscalationThresholdINCInMins SearchSKUsPayloadGetEscalationThresholdINCInMinsAttributeType `json:"escalationThresholdINCInMins,omitempty"` + // Escalation threshold for Service Requests + EscalationThresholdSRInMins SearchSKUsPayloadGetEscalationThresholdSRInMinsAttributeType `json:"escalationThresholdSRInMins,omitempty"` + // Financial Penalty for SLA Violation <80 (in %) + FinPenaltySLAVio80Pct SearchSKUsPayloadGetFinPenaltySLAVio80PctAttributeType `json:"finPenaltySLAVio80Pct,omitempty"` + // Financial Penalty for SLA Violation <90 - 80 (in %) + FinPenaltySLAVio9080Pct SearchSKUsPayloadGetFinPenaltySLAVio9080PctAttributeType `json:"finPenaltySLAVio90-80Pct,omitempty"` + // Flavor + Flavor SearchSKUsPayloadGetFlavorAttributeType `json:"flavor,omitempty"` + // Category designation one level below the generic designation that describes the overall product group to which all the SKUs are allocated to. + GeneralProductGroup SearchSKUsPayloadGetGeneralProductGroupAttributeType `json:"generalProductGroup,omitempty"` + // Hardware + Hardware SearchSKUsPayloadGetHardwareAttributeType `json:"hardware,omitempty"` + // Initial runtime in months + InitialRuntimeInMonths SearchSKUsPayloadGetInitialRuntimeInMonthsAttributeType `json:"initialRuntimeInMonths,omitempty"` + // Lead time in workdays + LeadTimeInWorkDays SearchSKUsPayloadGetLeadTimeInWorkDaysAttributeType `json:"leadTimeInWorkDays,omitempty"` + // Location + Location SearchSKUsPayloadGetLocationAttributeType `json:"location,omitempty"` + // State of the SKU following the mandatory product‘s maturity model progress (e.g. `beta`, `ga`) + MaturityModelState SearchSKUsPayloadGetMaturityModelStateAttributeType `json:"maturityModelState,omitempty"` + // Storage maxIOPerSec + MaxIOPerSec SearchSKUsPayloadGetMaxIOPerSecAttributeType `json:"maxIOPerSec,omitempty"` + // Storage maxTroughInMB + MaxTroughInMB SearchSKUsPayloadGetMaxTroughInMBAttributeType `json:"maxTroughInMB,omitempty"` + // metricPerMin + MetricPerMin SearchSKUsPayloadGetMetricPerMinAttributeType `json:"metricPerMin,omitempty"` + // metro + Metro SearchSKUsPayloadgetMetroAttributeType `json:"metro,omitempty"` + // Monthly price value that is valid at request time, shown with full precision + MonthlyPrice SearchSKUsPayloadGetMonthlyPriceAttributeType `json:"monthlyPrice,omitempty"` + // How the line item will appear on the bill + Name SearchSKUsPayloadGetNameAttributeType `json:"name,omitempty"` + // Nodes + Nodes SearchSKUsPayloadGetNodesAttributeType `json:"nodes,omitempty"` + // Operating System (e.g. `windows`, `windows-managed`) + Os SearchSKUsPayloadGetOsAttributeType `json:"os,omitempty"` + // Attribute that indicates if PriceList is visible or not. + PriceListVisibility SearchSKUsPayloadGetPriceListVisibilityAttributeType `json:"priceListVisibility,omitempty"` + // Generic product (e.g. `Windows Server`, `Server Backup Management`, `Server`) + ProductName SearchSKUsPayloadGetProductNameAttributeType `json:"productName,omitempty"` + // Project notice period in workdays + ProjectNoticePeriodInWorkDays SearchSKUsPayloadGetProjectNoticePeriodInWorkDaysAttributeType `json:"projectNoticePeriodInWorkDays,omitempty"` + // RAM (in GB) + // Can be cast to float32 without loss of precision. + Ram SearchSKUsPayloadGetRamAttributeType `json:"ram,omitempty"` + // Reaction time (in minutes) + ReactionTimeInMins SearchSKUsPayloadGetReactionTimeInMinsAttributeType `json:"reactionTimeInMins,omitempty"` + // Record limit per zone + // Can be cast to float32 without loss of precision. + RecordLimitPerZone SearchSKUsPayloadGetRecordLimitPerZoneAttributeType `json:"recordLimitPerZone,omitempty"` + // Region of sku + Region SearchSKUsPayloadGetRegionAttributeType `json:"region,omitempty"` + // Repeated runtime in months + RepeatedRuntimeInMonths SearchSKUsPayloadGetRepeatedRuntimeInMonthsAttributeType `json:"repeatedRuntimeInMonths,omitempty"` + // Response time BC INC (in minutes) + ResponseTimeBCINCInMins SearchSKUsPayloadGetResponseTimeBCINCInMinsAttributeType `json:"responseTimeBCINCInMins,omitempty"` + // Response time INC (in minutes) + ResponseTimeINCInMins SearchSKUsPayloadGetResponseTimeINCInMinsAttributeType `json:"responseTimeINCInMins,omitempty"` + // Response time (in minutes) for Service Requests + ResponseTimeSRInMins SearchSKUsPayloadGetResponseTimeSRInMinsAttributeType `json:"responseTimeSRInMins,omitempty"` + // Service hours BC INC + ServiceHoursBCINC SearchSKUsPayloadGetServiceHoursBCINCAttributeType `json:"serviceHoursBCINC,omitempty"` + // Service hours INC + ServiceHoursINC SearchSKUsPayloadGetServiceHoursINCAttributeType `json:"serviceHoursINC,omitempty"` + // Service hours for Service Requests + ServiceHoursSR SearchSKUsPayloadGetServiceHoursSRAttributeType `json:"serviceHoursSR,omitempty"` + // List of unique service look up ids + ServiceId SearchSKUsPayloadGetServiceIdAttributeType `json:"serviceId,omitempty"` + // SKU ID \\ Complete SAP article number with prefix. Will be shown on the invoice like this + Sku SearchSKUsPayloadGetSkuAttributeType `json:"sku,omitempty"` + // SLA goal in percentage + SlaGoalInPercentage SearchSKUsPayloadGetSlaGoalInPercentageAttributeType `json:"slaGoalInPercentage,omitempty"` + // Storage (e.g. `image`, `postgresql`, `snapshot`, `volume`) + Storage SearchSKUsPayloadGetStorageAttributeType `json:"storage,omitempty"` + // Max Storage in Gb + StorageMaxGb SearchSKUsPayloadGetStorageMaxGbAttributeType `json:"storageMaxGb,omitempty"` + // Min Storage in Gb + StorageMinGb SearchSKUsPayloadGetStorageMinGbAttributeType `json:"storageMinGb,omitempty"` + // Targets + Targets SearchSKUsPayloadGetTargetsAttributeType `json:"targets,omitempty"` + // Technical differentiation + TechnicalProductGroup SearchSKUsPayloadGetTechnicalProductGroupAttributeType `json:"technicalProductGroup,omitempty"` + // Service name + Title SearchSKUsPayloadGetTitleAttributeType `json:"title,omitempty"` + // Type (e.g. `single`, `replica`) + Type SearchSKUsPayloadGetTypeAttributeType `json:"type,omitempty"` + // Full SAP article number with prefix. Will appear on the invoice like that + Unit SearchSKUsPayloadGetUnitAttributeType `json:"unit,omitempty"` + // Unit billing + UnitBilling SearchSKUsPayloadGetUnitBillingAttributeType `json:"unitBilling,omitempty"` + // Number of vCPU + VCPU SearchSKUsPayloadGetVCPUAttributeType `json:"vCPU,omitempty"` + // Price valid from + ValidFrom SearchSKUsPayloadGetValidFromAttributeType `json:"validFrom,omitempty"` + // Price value that is valid at request time, shown with full precision with 11 decimals + Value SearchSKUsPayloadGetValueAttributeType `json:"value,omitempty"` +} + +// NewSearchSKUsPayload instantiates a new SearchSKUsPayload 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 NewSearchSKUsPayload() *SearchSKUsPayload { + this := SearchSKUsPayload{} + return &this +} + +// NewSearchSKUsPayloadWithDefaults instantiates a new SearchSKUsPayload 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 NewSearchSKUsPayloadWithDefaults() *SearchSKUsPayload { + this := SearchSKUsPayload{} + return &this +} + +// GetCategoryName returns the CategoryName field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetCategoryName() (res SearchSKUsPayloadGetCategoryNameRetType) { + res, _ = o.GetCategoryNameOk() + return +} + +// GetCategoryNameOk returns a tuple with the CategoryName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetCategoryNameOk() (ret SearchSKUsPayloadGetCategoryNameRetType, ok bool) { + return getSearchSKUsPayloadGetCategoryNameAttributeTypeOk(o.CategoryName) +} + +// HasCategoryName returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasCategoryName() bool { + _, ok := o.GetCategoryNameOk() + return ok +} + +// SetCategoryName gets a reference to the given string and assigns it to the CategoryName field. +func (o *SearchSKUsPayload) SetCategoryName(v SearchSKUsPayloadGetCategoryNameRetType) { + setSearchSKUsPayloadGetCategoryNameAttributeType(&o.CategoryName, v) +} + +// GetClass returns the Class field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetClass() (res SearchSKUsPayloadGetClassRetType) { + res, _ = o.GetClassOk() + return +} + +// GetClassOk returns a tuple with the Class field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetClassOk() (ret SearchSKUsPayloadGetClassRetType, ok bool) { + return getSearchSKUsPayloadGetClassAttributeTypeOk(o.Class) +} + +// HasClass returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasClass() bool { + _, ok := o.GetClassOk() + return ok +} + +// SetClass gets a reference to the given string and assigns it to the Class field. +func (o *SearchSKUsPayload) SetClass(v SearchSKUsPayloadGetClassRetType) { + setSearchSKUsPayloadGetClassAttributeType(&o.Class, v) +} + +// GetCommunicationChannel returns the CommunicationChannel field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetCommunicationChannel() (res SearchSKUsPayloadGetCommunicationChannelRetType) { + res, _ = o.GetCommunicationChannelOk() + return +} + +// GetCommunicationChannelOk returns a tuple with the CommunicationChannel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetCommunicationChannelOk() (ret SearchSKUsPayloadGetCommunicationChannelRetType, ok bool) { + return getSearchSKUsPayloadGetCommunicationChannelAttributeTypeOk(o.CommunicationChannel) +} + +// HasCommunicationChannel returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasCommunicationChannel() bool { + _, ok := o.GetCommunicationChannelOk() + return ok +} + +// SetCommunicationChannel gets a reference to the given string and assigns it to the CommunicationChannel field. +func (o *SearchSKUsPayload) SetCommunicationChannel(v SearchSKUsPayloadGetCommunicationChannelRetType) { + setSearchSKUsPayloadGetCommunicationChannelAttributeType(&o.CommunicationChannel, v) +} + +// GetConnectionLimitPerLoadBalancer returns the ConnectionLimitPerLoadBalancer field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetConnectionLimitPerLoadBalancer() (res SearchSKUsPayloadGetConnectionLimitPerLoadBalancerRetType) { + res, _ = o.GetConnectionLimitPerLoadBalancerOk() + return +} + +// GetConnectionLimitPerLoadBalancerOk returns a tuple with the ConnectionLimitPerLoadBalancer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetConnectionLimitPerLoadBalancerOk() (ret SearchSKUsPayloadGetConnectionLimitPerLoadBalancerRetType, ok bool) { + return getSearchSKUsPayloadGetConnectionLimitPerLoadBalancerAttributeTypeOk(o.ConnectionLimitPerLoadBalancer) +} + +// HasConnectionLimitPerLoadBalancer returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasConnectionLimitPerLoadBalancer() bool { + _, ok := o.GetConnectionLimitPerLoadBalancerOk() + return ok +} + +// SetConnectionLimitPerLoadBalancer gets a reference to the given float64 and assigns it to the ConnectionLimitPerLoadBalancer field. +func (o *SearchSKUsPayload) SetConnectionLimitPerLoadBalancer(v SearchSKUsPayloadGetConnectionLimitPerLoadBalancerRetType) { + setSearchSKUsPayloadGetConnectionLimitPerLoadBalancerAttributeType(&o.ConnectionLimitPerLoadBalancer, v) +} + +// GetContractNoticePeriodInDays returns the ContractNoticePeriodInDays field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetContractNoticePeriodInDays() (res SearchSKUsPayloadGetContractNoticePeriodInDaysRetType) { + res, _ = o.GetContractNoticePeriodInDaysOk() + return +} + +// GetContractNoticePeriodInDaysOk returns a tuple with the ContractNoticePeriodInDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetContractNoticePeriodInDaysOk() (ret SearchSKUsPayloadGetContractNoticePeriodInDaysRetType, ok bool) { + return getSearchSKUsPayloadGetContractNoticePeriodInDaysAttributeTypeOk(o.ContractNoticePeriodInDays) +} + +// HasContractNoticePeriodInDays returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasContractNoticePeriodInDays() bool { + _, ok := o.GetContractNoticePeriodInDaysOk() + return ok +} + +// SetContractNoticePeriodInDays gets a reference to the given int64 and assigns it to the ContractNoticePeriodInDays field. +func (o *SearchSKUsPayload) SetContractNoticePeriodInDays(v SearchSKUsPayloadGetContractNoticePeriodInDaysRetType) { + setSearchSKUsPayloadGetContractNoticePeriodInDaysAttributeType(&o.ContractNoticePeriodInDays, v) +} + +// SetContractNoticePeriodInDaysNil sets the value for ContractNoticePeriodInDays to be an explicit nil +func (o *SearchSKUsPayload) SetContractNoticePeriodInDaysNil() { + o.ContractNoticePeriodInDays = nil +} + +// UnsetContractNoticePeriodInDays ensures that no value is present for ContractNoticePeriodInDays, not even an explicit nil +func (o *SearchSKUsPayload) UnsetContractNoticePeriodInDays() { + o.ContractNoticePeriodInDays = nil +} + +// GetDeprecated returns the Deprecated field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetDeprecated() (res SearchSKUsPayloadGetDeprecatedRetType) { + res, _ = o.GetDeprecatedOk() + return +} + +// GetDeprecatedOk returns a tuple with the Deprecated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetDeprecatedOk() (ret SearchSKUsPayloadGetDeprecatedRetType, ok bool) { + return getSearchSKUsPayloadGetDeprecatedAttributeTypeOk(o.Deprecated) +} + +// HasDeprecated returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasDeprecated() bool { + _, ok := o.GetDeprecatedOk() + return ok +} + +// SetDeprecated gets a reference to the given string and assigns it to the Deprecated field. +func (o *SearchSKUsPayload) SetDeprecated(v SearchSKUsPayloadGetDeprecatedRetType) { + setSearchSKUsPayloadGetDeprecatedAttributeType(&o.Deprecated, v) +} + +// GetDiskStoragePerNode returns the DiskStoragePerNode field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetDiskStoragePerNode() (res SearchSKUsPayloadGetDiskStoragePerNodeRetType) { + res, _ = o.GetDiskStoragePerNodeOk() + return +} + +// GetDiskStoragePerNodeOk returns a tuple with the DiskStoragePerNode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetDiskStoragePerNodeOk() (ret SearchSKUsPayloadGetDiskStoragePerNodeRetType, ok bool) { + return getSearchSKUsPayloadGetDiskStoragePerNodeAttributeTypeOk(o.DiskStoragePerNode) +} + +// HasDiskStoragePerNode returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasDiskStoragePerNode() bool { + _, ok := o.GetDiskStoragePerNodeOk() + return ok +} + +// SetDiskStoragePerNode gets a reference to the given string and assigns it to the DiskStoragePerNode field. +func (o *SearchSKUsPayload) SetDiskStoragePerNode(v SearchSKUsPayloadGetDiskStoragePerNodeRetType) { + setSearchSKUsPayloadGetDiskStoragePerNodeAttributeType(&o.DiskStoragePerNode, v) +} + +// GetDocumentation returns the Documentation field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetDocumentation() (res SearchSKUsPayloadGetDocumentationRetType) { + res, _ = o.GetDocumentationOk() + return +} + +// GetDocumentationOk returns a tuple with the Documentation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetDocumentationOk() (ret SearchSKUsPayloadGetDocumentationRetType, ok bool) { + return getSearchSKUsPayloadGetDocumentationAttributeTypeOk(o.Documentation) +} + +// HasDocumentation returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasDocumentation() bool { + _, ok := o.GetDocumentationOk() + return ok +} + +// SetDocumentation gets a reference to the given string and assigns it to the Documentation field. +func (o *SearchSKUsPayload) SetDocumentation(v SearchSKUsPayloadGetDocumentationRetType) { + setSearchSKUsPayloadGetDocumentationAttributeType(&o.Documentation, v) +} + +// GetEscalationAvailabilityBCINC returns the EscalationAvailabilityBCINC field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetEscalationAvailabilityBCINC() (res SearchSKUsPayloadGetEscalationAvailabilityBCINCRetType) { + res, _ = o.GetEscalationAvailabilityBCINCOk() + return +} + +// GetEscalationAvailabilityBCINCOk returns a tuple with the EscalationAvailabilityBCINC field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetEscalationAvailabilityBCINCOk() (ret SearchSKUsPayloadGetEscalationAvailabilityBCINCRetType, ok bool) { + return getSearchSKUsPayloadGetEscalationAvailabilityBCINCAttributeTypeOk(o.EscalationAvailabilityBCINC) +} + +// HasEscalationAvailabilityBCINC returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasEscalationAvailabilityBCINC() bool { + _, ok := o.GetEscalationAvailabilityBCINCOk() + return ok +} + +// SetEscalationAvailabilityBCINC gets a reference to the given string and assigns it to the EscalationAvailabilityBCINC field. +func (o *SearchSKUsPayload) SetEscalationAvailabilityBCINC(v SearchSKUsPayloadGetEscalationAvailabilityBCINCRetType) { + setSearchSKUsPayloadGetEscalationAvailabilityBCINCAttributeType(&o.EscalationAvailabilityBCINC, v) +} + +// SetEscalationAvailabilityBCINCNil sets the value for EscalationAvailabilityBCINC to be an explicit nil +func (o *SearchSKUsPayload) SetEscalationAvailabilityBCINCNil() { + o.EscalationAvailabilityBCINC = nil +} + +// UnsetEscalationAvailabilityBCINC ensures that no value is present for EscalationAvailabilityBCINC, not even an explicit nil +func (o *SearchSKUsPayload) UnsetEscalationAvailabilityBCINC() { + o.EscalationAvailabilityBCINC = nil +} + +// GetEscalationAvailabilityINC returns the EscalationAvailabilityINC field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetEscalationAvailabilityINC() (res SearchSKUsPayloadGetEscalationAvailabilityINCRetType) { + res, _ = o.GetEscalationAvailabilityINCOk() + return +} + +// GetEscalationAvailabilityINCOk returns a tuple with the EscalationAvailabilityINC field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetEscalationAvailabilityINCOk() (ret SearchSKUsPayloadGetEscalationAvailabilityINCRetType, ok bool) { + return getSearchSKUsPayloadGetEscalationAvailabilityINCAttributeTypeOk(o.EscalationAvailabilityINC) +} + +// HasEscalationAvailabilityINC returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasEscalationAvailabilityINC() bool { + _, ok := o.GetEscalationAvailabilityINCOk() + return ok +} + +// SetEscalationAvailabilityINC gets a reference to the given string and assigns it to the EscalationAvailabilityINC field. +func (o *SearchSKUsPayload) SetEscalationAvailabilityINC(v SearchSKUsPayloadGetEscalationAvailabilityINCRetType) { + setSearchSKUsPayloadGetEscalationAvailabilityINCAttributeType(&o.EscalationAvailabilityINC, v) +} + +// SetEscalationAvailabilityINCNil sets the value for EscalationAvailabilityINC to be an explicit nil +func (o *SearchSKUsPayload) SetEscalationAvailabilityINCNil() { + o.EscalationAvailabilityINC = nil +} + +// UnsetEscalationAvailabilityINC ensures that no value is present for EscalationAvailabilityINC, not even an explicit nil +func (o *SearchSKUsPayload) UnsetEscalationAvailabilityINC() { + o.EscalationAvailabilityINC = nil +} + +// GetEscalationAvailabilitySR returns the EscalationAvailabilitySR field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetEscalationAvailabilitySR() (res SearchSKUsPayloadGetEscalationAvailabilitySRRetType) { + res, _ = o.GetEscalationAvailabilitySROk() + return +} + +// GetEscalationAvailabilitySROk returns a tuple with the EscalationAvailabilitySR field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetEscalationAvailabilitySROk() (ret SearchSKUsPayloadGetEscalationAvailabilitySRRetType, ok bool) { + return getSearchSKUsPayloadGetEscalationAvailabilitySRAttributeTypeOk(o.EscalationAvailabilitySR) +} + +// HasEscalationAvailabilitySR returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasEscalationAvailabilitySR() bool { + _, ok := o.GetEscalationAvailabilitySROk() + return ok +} + +// SetEscalationAvailabilitySR gets a reference to the given string and assigns it to the EscalationAvailabilitySR field. +func (o *SearchSKUsPayload) SetEscalationAvailabilitySR(v SearchSKUsPayloadGetEscalationAvailabilitySRRetType) { + setSearchSKUsPayloadGetEscalationAvailabilitySRAttributeType(&o.EscalationAvailabilitySR, v) +} + +// SetEscalationAvailabilitySRNil sets the value for EscalationAvailabilitySR to be an explicit nil +func (o *SearchSKUsPayload) SetEscalationAvailabilitySRNil() { + o.EscalationAvailabilitySR = nil +} + +// UnsetEscalationAvailabilitySR ensures that no value is present for EscalationAvailabilitySR, not even an explicit nil +func (o *SearchSKUsPayload) UnsetEscalationAvailabilitySR() { + o.EscalationAvailabilitySR = nil +} + +// GetEscalationThresholdBCINCInMins returns the EscalationThresholdBCINCInMins field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetEscalationThresholdBCINCInMins() (res SearchSKUsPayloadGetEscalationThresholdBCINCInMinsRetType) { + res, _ = o.GetEscalationThresholdBCINCInMinsOk() + return +} + +// GetEscalationThresholdBCINCInMinsOk returns a tuple with the EscalationThresholdBCINCInMins field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetEscalationThresholdBCINCInMinsOk() (ret SearchSKUsPayloadGetEscalationThresholdBCINCInMinsRetType, ok bool) { + return getSearchSKUsPayloadGetEscalationThresholdBCINCInMinsAttributeTypeOk(o.EscalationThresholdBCINCInMins) +} + +// HasEscalationThresholdBCINCInMins returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasEscalationThresholdBCINCInMins() bool { + _, ok := o.GetEscalationThresholdBCINCInMinsOk() + return ok +} + +// SetEscalationThresholdBCINCInMins gets a reference to the given int64 and assigns it to the EscalationThresholdBCINCInMins field. +func (o *SearchSKUsPayload) SetEscalationThresholdBCINCInMins(v SearchSKUsPayloadGetEscalationThresholdBCINCInMinsRetType) { + setSearchSKUsPayloadGetEscalationThresholdBCINCInMinsAttributeType(&o.EscalationThresholdBCINCInMins, v) +} + +// SetEscalationThresholdBCINCInMinsNil sets the value for EscalationThresholdBCINCInMins to be an explicit nil +func (o *SearchSKUsPayload) SetEscalationThresholdBCINCInMinsNil() { + o.EscalationThresholdBCINCInMins = nil +} + +// UnsetEscalationThresholdBCINCInMins ensures that no value is present for EscalationThresholdBCINCInMins, not even an explicit nil +func (o *SearchSKUsPayload) UnsetEscalationThresholdBCINCInMins() { + o.EscalationThresholdBCINCInMins = nil +} + +// GetEscalationThresholdINCInMins returns the EscalationThresholdINCInMins field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetEscalationThresholdINCInMins() (res SearchSKUsPayloadGetEscalationThresholdINCInMinsRetType) { + res, _ = o.GetEscalationThresholdINCInMinsOk() + return +} + +// GetEscalationThresholdINCInMinsOk returns a tuple with the EscalationThresholdINCInMins field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetEscalationThresholdINCInMinsOk() (ret SearchSKUsPayloadGetEscalationThresholdINCInMinsRetType, ok bool) { + return getSearchSKUsPayloadGetEscalationThresholdINCInMinsAttributeTypeOk(o.EscalationThresholdINCInMins) +} + +// HasEscalationThresholdINCInMins returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasEscalationThresholdINCInMins() bool { + _, ok := o.GetEscalationThresholdINCInMinsOk() + return ok +} + +// SetEscalationThresholdINCInMins gets a reference to the given int64 and assigns it to the EscalationThresholdINCInMins field. +func (o *SearchSKUsPayload) SetEscalationThresholdINCInMins(v SearchSKUsPayloadGetEscalationThresholdINCInMinsRetType) { + setSearchSKUsPayloadGetEscalationThresholdINCInMinsAttributeType(&o.EscalationThresholdINCInMins, v) +} + +// SetEscalationThresholdINCInMinsNil sets the value for EscalationThresholdINCInMins to be an explicit nil +func (o *SearchSKUsPayload) SetEscalationThresholdINCInMinsNil() { + o.EscalationThresholdINCInMins = nil +} + +// UnsetEscalationThresholdINCInMins ensures that no value is present for EscalationThresholdINCInMins, not even an explicit nil +func (o *SearchSKUsPayload) UnsetEscalationThresholdINCInMins() { + o.EscalationThresholdINCInMins = nil +} + +// GetEscalationThresholdSRInMins returns the EscalationThresholdSRInMins field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetEscalationThresholdSRInMins() (res SearchSKUsPayloadGetEscalationThresholdSRInMinsRetType) { + res, _ = o.GetEscalationThresholdSRInMinsOk() + return +} + +// GetEscalationThresholdSRInMinsOk returns a tuple with the EscalationThresholdSRInMins field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetEscalationThresholdSRInMinsOk() (ret SearchSKUsPayloadGetEscalationThresholdSRInMinsRetType, ok bool) { + return getSearchSKUsPayloadGetEscalationThresholdSRInMinsAttributeTypeOk(o.EscalationThresholdSRInMins) +} + +// HasEscalationThresholdSRInMins returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasEscalationThresholdSRInMins() bool { + _, ok := o.GetEscalationThresholdSRInMinsOk() + return ok +} + +// SetEscalationThresholdSRInMins gets a reference to the given int64 and assigns it to the EscalationThresholdSRInMins field. +func (o *SearchSKUsPayload) SetEscalationThresholdSRInMins(v SearchSKUsPayloadGetEscalationThresholdSRInMinsRetType) { + setSearchSKUsPayloadGetEscalationThresholdSRInMinsAttributeType(&o.EscalationThresholdSRInMins, v) +} + +// SetEscalationThresholdSRInMinsNil sets the value for EscalationThresholdSRInMins to be an explicit nil +func (o *SearchSKUsPayload) SetEscalationThresholdSRInMinsNil() { + o.EscalationThresholdSRInMins = nil +} + +// UnsetEscalationThresholdSRInMins ensures that no value is present for EscalationThresholdSRInMins, not even an explicit nil +func (o *SearchSKUsPayload) UnsetEscalationThresholdSRInMins() { + o.EscalationThresholdSRInMins = nil +} + +// GetFinPenaltySLAVio80Pct returns the FinPenaltySLAVio80Pct field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetFinPenaltySLAVio80Pct() (res SearchSKUsPayloadGetFinPenaltySLAVio80PctRetType) { + res, _ = o.GetFinPenaltySLAVio80PctOk() + return +} + +// GetFinPenaltySLAVio80PctOk returns a tuple with the FinPenaltySLAVio80Pct field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetFinPenaltySLAVio80PctOk() (ret SearchSKUsPayloadGetFinPenaltySLAVio80PctRetType, ok bool) { + return getSearchSKUsPayloadGetFinPenaltySLAVio80PctAttributeTypeOk(o.FinPenaltySLAVio80Pct) +} + +// HasFinPenaltySLAVio80Pct returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasFinPenaltySLAVio80Pct() bool { + _, ok := o.GetFinPenaltySLAVio80PctOk() + return ok +} + +// SetFinPenaltySLAVio80Pct gets a reference to the given int64 and assigns it to the FinPenaltySLAVio80Pct field. +func (o *SearchSKUsPayload) SetFinPenaltySLAVio80Pct(v SearchSKUsPayloadGetFinPenaltySLAVio80PctRetType) { + setSearchSKUsPayloadGetFinPenaltySLAVio80PctAttributeType(&o.FinPenaltySLAVio80Pct, v) +} + +// SetFinPenaltySLAVio80PctNil sets the value for FinPenaltySLAVio80Pct to be an explicit nil +func (o *SearchSKUsPayload) SetFinPenaltySLAVio80PctNil() { + o.FinPenaltySLAVio80Pct = nil +} + +// UnsetFinPenaltySLAVio80Pct ensures that no value is present for FinPenaltySLAVio80Pct, not even an explicit nil +func (o *SearchSKUsPayload) UnsetFinPenaltySLAVio80Pct() { + o.FinPenaltySLAVio80Pct = nil +} + +// GetFinPenaltySLAVio9080Pct returns the FinPenaltySLAVio9080Pct field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetFinPenaltySLAVio9080Pct() (res SearchSKUsPayloadGetFinPenaltySLAVio9080PctRetType) { + res, _ = o.GetFinPenaltySLAVio9080PctOk() + return +} + +// GetFinPenaltySLAVio9080PctOk returns a tuple with the FinPenaltySLAVio9080Pct field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetFinPenaltySLAVio9080PctOk() (ret SearchSKUsPayloadGetFinPenaltySLAVio9080PctRetType, ok bool) { + return getSearchSKUsPayloadGetFinPenaltySLAVio9080PctAttributeTypeOk(o.FinPenaltySLAVio9080Pct) +} + +// HasFinPenaltySLAVio9080Pct returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasFinPenaltySLAVio9080Pct() bool { + _, ok := o.GetFinPenaltySLAVio9080PctOk() + return ok +} + +// SetFinPenaltySLAVio9080Pct gets a reference to the given int64 and assigns it to the FinPenaltySLAVio9080Pct field. +func (o *SearchSKUsPayload) SetFinPenaltySLAVio9080Pct(v SearchSKUsPayloadGetFinPenaltySLAVio9080PctRetType) { + setSearchSKUsPayloadGetFinPenaltySLAVio9080PctAttributeType(&o.FinPenaltySLAVio9080Pct, v) +} + +// SetFinPenaltySLAVio9080PctNil sets the value for FinPenaltySLAVio9080Pct to be an explicit nil +func (o *SearchSKUsPayload) SetFinPenaltySLAVio9080PctNil() { + o.FinPenaltySLAVio9080Pct = nil +} + +// UnsetFinPenaltySLAVio9080Pct ensures that no value is present for FinPenaltySLAVio9080Pct, not even an explicit nil +func (o *SearchSKUsPayload) UnsetFinPenaltySLAVio9080Pct() { + o.FinPenaltySLAVio9080Pct = nil +} + +// GetFlavor returns the Flavor field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetFlavor() (res SearchSKUsPayloadGetFlavorRetType) { + res, _ = o.GetFlavorOk() + return +} + +// GetFlavorOk returns a tuple with the Flavor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetFlavorOk() (ret SearchSKUsPayloadGetFlavorRetType, ok bool) { + return getSearchSKUsPayloadGetFlavorAttributeTypeOk(o.Flavor) +} + +// HasFlavor returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasFlavor() bool { + _, ok := o.GetFlavorOk() + return ok +} + +// SetFlavor gets a reference to the given string and assigns it to the Flavor field. +func (o *SearchSKUsPayload) SetFlavor(v SearchSKUsPayloadGetFlavorRetType) { + setSearchSKUsPayloadGetFlavorAttributeType(&o.Flavor, v) +} + +// GetGeneralProductGroup returns the GeneralProductGroup field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetGeneralProductGroup() (res SearchSKUsPayloadGetGeneralProductGroupRetType) { + res, _ = o.GetGeneralProductGroupOk() + return +} + +// GetGeneralProductGroupOk returns a tuple with the GeneralProductGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetGeneralProductGroupOk() (ret SearchSKUsPayloadGetGeneralProductGroupRetType, ok bool) { + return getSearchSKUsPayloadGetGeneralProductGroupAttributeTypeOk(o.GeneralProductGroup) +} + +// HasGeneralProductGroup returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasGeneralProductGroup() bool { + _, ok := o.GetGeneralProductGroupOk() + return ok +} + +// SetGeneralProductGroup gets a reference to the given string and assigns it to the GeneralProductGroup field. +func (o *SearchSKUsPayload) SetGeneralProductGroup(v SearchSKUsPayloadGetGeneralProductGroupRetType) { + setSearchSKUsPayloadGetGeneralProductGroupAttributeType(&o.GeneralProductGroup, v) +} + +// GetHardware returns the Hardware field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetHardware() (res SearchSKUsPayloadGetHardwareRetType) { + res, _ = o.GetHardwareOk() + return +} + +// GetHardwareOk returns a tuple with the Hardware field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetHardwareOk() (ret SearchSKUsPayloadGetHardwareRetType, ok bool) { + return getSearchSKUsPayloadGetHardwareAttributeTypeOk(o.Hardware) +} + +// HasHardware returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasHardware() bool { + _, ok := o.GetHardwareOk() + return ok +} + +// SetHardware gets a reference to the given string and assigns it to the Hardware field. +func (o *SearchSKUsPayload) SetHardware(v SearchSKUsPayloadGetHardwareRetType) { + setSearchSKUsPayloadGetHardwareAttributeType(&o.Hardware, v) +} + +// GetInitialRuntimeInMonths returns the InitialRuntimeInMonths field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetInitialRuntimeInMonths() (res SearchSKUsPayloadGetInitialRuntimeInMonthsRetType) { + res, _ = o.GetInitialRuntimeInMonthsOk() + return +} + +// GetInitialRuntimeInMonthsOk returns a tuple with the InitialRuntimeInMonths field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetInitialRuntimeInMonthsOk() (ret SearchSKUsPayloadGetInitialRuntimeInMonthsRetType, ok bool) { + return getSearchSKUsPayloadGetInitialRuntimeInMonthsAttributeTypeOk(o.InitialRuntimeInMonths) +} + +// HasInitialRuntimeInMonths returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasInitialRuntimeInMonths() bool { + _, ok := o.GetInitialRuntimeInMonthsOk() + return ok +} + +// SetInitialRuntimeInMonths gets a reference to the given int64 and assigns it to the InitialRuntimeInMonths field. +func (o *SearchSKUsPayload) SetInitialRuntimeInMonths(v SearchSKUsPayloadGetInitialRuntimeInMonthsRetType) { + setSearchSKUsPayloadGetInitialRuntimeInMonthsAttributeType(&o.InitialRuntimeInMonths, v) +} + +// SetInitialRuntimeInMonthsNil sets the value for InitialRuntimeInMonths to be an explicit nil +func (o *SearchSKUsPayload) SetInitialRuntimeInMonthsNil() { + o.InitialRuntimeInMonths = nil +} + +// UnsetInitialRuntimeInMonths ensures that no value is present for InitialRuntimeInMonths, not even an explicit nil +func (o *SearchSKUsPayload) UnsetInitialRuntimeInMonths() { + o.InitialRuntimeInMonths = nil +} + +// GetLeadTimeInWorkDays returns the LeadTimeInWorkDays field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetLeadTimeInWorkDays() (res SearchSKUsPayloadGetLeadTimeInWorkDaysRetType) { + res, _ = o.GetLeadTimeInWorkDaysOk() + return +} + +// GetLeadTimeInWorkDaysOk returns a tuple with the LeadTimeInWorkDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetLeadTimeInWorkDaysOk() (ret SearchSKUsPayloadGetLeadTimeInWorkDaysRetType, ok bool) { + return getSearchSKUsPayloadGetLeadTimeInWorkDaysAttributeTypeOk(o.LeadTimeInWorkDays) +} + +// HasLeadTimeInWorkDays returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasLeadTimeInWorkDays() bool { + _, ok := o.GetLeadTimeInWorkDaysOk() + return ok +} + +// SetLeadTimeInWorkDays gets a reference to the given int64 and assigns it to the LeadTimeInWorkDays field. +func (o *SearchSKUsPayload) SetLeadTimeInWorkDays(v SearchSKUsPayloadGetLeadTimeInWorkDaysRetType) { + setSearchSKUsPayloadGetLeadTimeInWorkDaysAttributeType(&o.LeadTimeInWorkDays, v) +} + +// SetLeadTimeInWorkDaysNil sets the value for LeadTimeInWorkDays to be an explicit nil +func (o *SearchSKUsPayload) SetLeadTimeInWorkDaysNil() { + o.LeadTimeInWorkDays = nil +} + +// UnsetLeadTimeInWorkDays ensures that no value is present for LeadTimeInWorkDays, not even an explicit nil +func (o *SearchSKUsPayload) UnsetLeadTimeInWorkDays() { + o.LeadTimeInWorkDays = nil +} + +// GetLocation returns the Location field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetLocation() (res SearchSKUsPayloadGetLocationRetType) { + res, _ = o.GetLocationOk() + return +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetLocationOk() (ret SearchSKUsPayloadGetLocationRetType, ok bool) { + return getSearchSKUsPayloadGetLocationAttributeTypeOk(o.Location) +} + +// HasLocation returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasLocation() bool { + _, ok := o.GetLocationOk() + return ok +} + +// SetLocation gets a reference to the given string and assigns it to the Location field. +func (o *SearchSKUsPayload) SetLocation(v SearchSKUsPayloadGetLocationRetType) { + setSearchSKUsPayloadGetLocationAttributeType(&o.Location, v) +} + +// SetLocationNil sets the value for Location to be an explicit nil +func (o *SearchSKUsPayload) SetLocationNil() { + o.Location = nil +} + +// UnsetLocation ensures that no value is present for Location, not even an explicit nil +func (o *SearchSKUsPayload) UnsetLocation() { + o.Location = nil +} + +// GetMaturityModelState returns the MaturityModelState field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetMaturityModelState() (res SearchSKUsPayloadGetMaturityModelStateRetType) { + res, _ = o.GetMaturityModelStateOk() + return +} + +// GetMaturityModelStateOk returns a tuple with the MaturityModelState field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetMaturityModelStateOk() (ret SearchSKUsPayloadGetMaturityModelStateRetType, ok bool) { + return getSearchSKUsPayloadGetMaturityModelStateAttributeTypeOk(o.MaturityModelState) +} + +// HasMaturityModelState returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasMaturityModelState() bool { + _, ok := o.GetMaturityModelStateOk() + return ok +} + +// SetMaturityModelState gets a reference to the given string and assigns it to the MaturityModelState field. +func (o *SearchSKUsPayload) SetMaturityModelState(v SearchSKUsPayloadGetMaturityModelStateRetType) { + setSearchSKUsPayloadGetMaturityModelStateAttributeType(&o.MaturityModelState, v) +} + +// GetMaxIOPerSec returns the MaxIOPerSec field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetMaxIOPerSec() (res SearchSKUsPayloadGetMaxIOPerSecRetType) { + res, _ = o.GetMaxIOPerSecOk() + return +} + +// GetMaxIOPerSecOk returns a tuple with the MaxIOPerSec field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetMaxIOPerSecOk() (ret SearchSKUsPayloadGetMaxIOPerSecRetType, ok bool) { + return getSearchSKUsPayloadGetMaxIOPerSecAttributeTypeOk(o.MaxIOPerSec) +} + +// HasMaxIOPerSec returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasMaxIOPerSec() bool { + _, ok := o.GetMaxIOPerSecOk() + return ok +} + +// SetMaxIOPerSec gets a reference to the given int64 and assigns it to the MaxIOPerSec field. +func (o *SearchSKUsPayload) SetMaxIOPerSec(v SearchSKUsPayloadGetMaxIOPerSecRetType) { + setSearchSKUsPayloadGetMaxIOPerSecAttributeType(&o.MaxIOPerSec, v) +} + +// GetMaxTroughInMB returns the MaxTroughInMB field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetMaxTroughInMB() (res SearchSKUsPayloadGetMaxTroughInMBRetType) { + res, _ = o.GetMaxTroughInMBOk() + return +} + +// GetMaxTroughInMBOk returns a tuple with the MaxTroughInMB field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetMaxTroughInMBOk() (ret SearchSKUsPayloadGetMaxTroughInMBRetType, ok bool) { + return getSearchSKUsPayloadGetMaxTroughInMBAttributeTypeOk(o.MaxTroughInMB) +} + +// HasMaxTroughInMB returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasMaxTroughInMB() bool { + _, ok := o.GetMaxTroughInMBOk() + return ok +} + +// SetMaxTroughInMB gets a reference to the given int64 and assigns it to the MaxTroughInMB field. +func (o *SearchSKUsPayload) SetMaxTroughInMB(v SearchSKUsPayloadGetMaxTroughInMBRetType) { + setSearchSKUsPayloadGetMaxTroughInMBAttributeType(&o.MaxTroughInMB, v) +} + +// GetMetricPerMin returns the MetricPerMin field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetMetricPerMin() (res SearchSKUsPayloadGetMetricPerMinRetType) { + res, _ = o.GetMetricPerMinOk() + return +} + +// GetMetricPerMinOk returns a tuple with the MetricPerMin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetMetricPerMinOk() (ret SearchSKUsPayloadGetMetricPerMinRetType, ok bool) { + return getSearchSKUsPayloadGetMetricPerMinAttributeTypeOk(o.MetricPerMin) +} + +// HasMetricPerMin returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasMetricPerMin() bool { + _, ok := o.GetMetricPerMinOk() + return ok +} + +// SetMetricPerMin gets a reference to the given int64 and assigns it to the MetricPerMin field. +func (o *SearchSKUsPayload) SetMetricPerMin(v SearchSKUsPayloadGetMetricPerMinRetType) { + setSearchSKUsPayloadGetMetricPerMinAttributeType(&o.MetricPerMin, v) +} + +// GetMetro returns the Metro field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetMetro() (res SearchSKUsPayloadgetMetroRetType) { + res, _ = o.GetMetroOk() + return +} + +// GetMetroOk returns a tuple with the Metro field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetMetroOk() (ret SearchSKUsPayloadgetMetroRetType, ok bool) { + return getSearchSKUsPayloadgetMetroAttributeTypeOk(o.Metro) +} + +// HasMetro returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasMetro() bool { + _, ok := o.GetMetroOk() + return ok +} + +// SetMetro gets a reference to the given bool and assigns it to the Metro field. +func (o *SearchSKUsPayload) SetMetro(v SearchSKUsPayloadgetMetroRetType) { + setSearchSKUsPayloadgetMetroAttributeType(&o.Metro, v) +} + +// GetMonthlyPrice returns the MonthlyPrice field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetMonthlyPrice() (res SearchSKUsPayloadGetMonthlyPriceRetType) { + res, _ = o.GetMonthlyPriceOk() + return +} + +// GetMonthlyPriceOk returns a tuple with the MonthlyPrice field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetMonthlyPriceOk() (ret SearchSKUsPayloadGetMonthlyPriceRetType, ok bool) { + return getSearchSKUsPayloadGetMonthlyPriceAttributeTypeOk(o.MonthlyPrice) +} + +// HasMonthlyPrice returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasMonthlyPrice() bool { + _, ok := o.GetMonthlyPriceOk() + return ok +} + +// SetMonthlyPrice gets a reference to the given float64 and assigns it to the MonthlyPrice field. +func (o *SearchSKUsPayload) SetMonthlyPrice(v SearchSKUsPayloadGetMonthlyPriceRetType) { + setSearchSKUsPayloadGetMonthlyPriceAttributeType(&o.MonthlyPrice, v) +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetName() (res SearchSKUsPayloadGetNameRetType) { + res, _ = o.GetNameOk() + return +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetNameOk() (ret SearchSKUsPayloadGetNameRetType, ok bool) { + return getSearchSKUsPayloadGetNameAttributeTypeOk(o.Name) +} + +// HasName returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasName() bool { + _, ok := o.GetNameOk() + return ok +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *SearchSKUsPayload) SetName(v SearchSKUsPayloadGetNameRetType) { + setSearchSKUsPayloadGetNameAttributeType(&o.Name, v) +} + +// GetNodes returns the Nodes field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetNodes() (res SearchSKUsPayloadGetNodesRetType) { + res, _ = o.GetNodesOk() + return +} + +// GetNodesOk returns a tuple with the Nodes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetNodesOk() (ret SearchSKUsPayloadGetNodesRetType, ok bool) { + return getSearchSKUsPayloadGetNodesAttributeTypeOk(o.Nodes) +} + +// HasNodes returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasNodes() bool { + _, ok := o.GetNodesOk() + return ok +} + +// SetNodes gets a reference to the given int64 and assigns it to the Nodes field. +func (o *SearchSKUsPayload) SetNodes(v SearchSKUsPayloadGetNodesRetType) { + setSearchSKUsPayloadGetNodesAttributeType(&o.Nodes, v) +} + +// GetOs returns the Os field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetOs() (res SearchSKUsPayloadGetOsRetType) { + res, _ = o.GetOsOk() + return +} + +// GetOsOk returns a tuple with the Os field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetOsOk() (ret SearchSKUsPayloadGetOsRetType, ok bool) { + return getSearchSKUsPayloadGetOsAttributeTypeOk(o.Os) +} + +// HasOs returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasOs() bool { + _, ok := o.GetOsOk() + return ok +} + +// SetOs gets a reference to the given string and assigns it to the Os field. +func (o *SearchSKUsPayload) SetOs(v SearchSKUsPayloadGetOsRetType) { + setSearchSKUsPayloadGetOsAttributeType(&o.Os, v) +} + +// GetPriceListVisibility returns the PriceListVisibility field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetPriceListVisibility() (res SearchSKUsPayloadGetPriceListVisibilityRetType) { + res, _ = o.GetPriceListVisibilityOk() + return +} + +// GetPriceListVisibilityOk returns a tuple with the PriceListVisibility field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetPriceListVisibilityOk() (ret SearchSKUsPayloadGetPriceListVisibilityRetType, ok bool) { + return getSearchSKUsPayloadGetPriceListVisibilityAttributeTypeOk(o.PriceListVisibility) +} + +// HasPriceListVisibility returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasPriceListVisibility() bool { + _, ok := o.GetPriceListVisibilityOk() + return ok +} + +// SetPriceListVisibility gets a reference to the given string and assigns it to the PriceListVisibility field. +func (o *SearchSKUsPayload) SetPriceListVisibility(v SearchSKUsPayloadGetPriceListVisibilityRetType) { + setSearchSKUsPayloadGetPriceListVisibilityAttributeType(&o.PriceListVisibility, v) +} + +// GetProductName returns the ProductName field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetProductName() (res SearchSKUsPayloadGetProductNameRetType) { + res, _ = o.GetProductNameOk() + return +} + +// GetProductNameOk returns a tuple with the ProductName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetProductNameOk() (ret SearchSKUsPayloadGetProductNameRetType, ok bool) { + return getSearchSKUsPayloadGetProductNameAttributeTypeOk(o.ProductName) +} + +// HasProductName returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasProductName() bool { + _, ok := o.GetProductNameOk() + return ok +} + +// SetProductName gets a reference to the given string and assigns it to the ProductName field. +func (o *SearchSKUsPayload) SetProductName(v SearchSKUsPayloadGetProductNameRetType) { + setSearchSKUsPayloadGetProductNameAttributeType(&o.ProductName, v) +} + +// GetProjectNoticePeriodInWorkDays returns the ProjectNoticePeriodInWorkDays field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetProjectNoticePeriodInWorkDays() (res SearchSKUsPayloadGetProjectNoticePeriodInWorkDaysRetType) { + res, _ = o.GetProjectNoticePeriodInWorkDaysOk() + return +} + +// GetProjectNoticePeriodInWorkDaysOk returns a tuple with the ProjectNoticePeriodInWorkDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetProjectNoticePeriodInWorkDaysOk() (ret SearchSKUsPayloadGetProjectNoticePeriodInWorkDaysRetType, ok bool) { + return getSearchSKUsPayloadGetProjectNoticePeriodInWorkDaysAttributeTypeOk(o.ProjectNoticePeriodInWorkDays) +} + +// HasProjectNoticePeriodInWorkDays returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasProjectNoticePeriodInWorkDays() bool { + _, ok := o.GetProjectNoticePeriodInWorkDaysOk() + return ok +} + +// SetProjectNoticePeriodInWorkDays gets a reference to the given int64 and assigns it to the ProjectNoticePeriodInWorkDays field. +func (o *SearchSKUsPayload) SetProjectNoticePeriodInWorkDays(v SearchSKUsPayloadGetProjectNoticePeriodInWorkDaysRetType) { + setSearchSKUsPayloadGetProjectNoticePeriodInWorkDaysAttributeType(&o.ProjectNoticePeriodInWorkDays, v) +} + +// SetProjectNoticePeriodInWorkDaysNil sets the value for ProjectNoticePeriodInWorkDays to be an explicit nil +func (o *SearchSKUsPayload) SetProjectNoticePeriodInWorkDaysNil() { + o.ProjectNoticePeriodInWorkDays = nil +} + +// UnsetProjectNoticePeriodInWorkDays ensures that no value is present for ProjectNoticePeriodInWorkDays, not even an explicit nil +func (o *SearchSKUsPayload) UnsetProjectNoticePeriodInWorkDays() { + o.ProjectNoticePeriodInWorkDays = nil +} + +// GetRam returns the Ram field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetRam() (res SearchSKUsPayloadGetRamRetType) { + res, _ = o.GetRamOk() + return +} + +// GetRamOk returns a tuple with the Ram field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetRamOk() (ret SearchSKUsPayloadGetRamRetType, ok bool) { + return getSearchSKUsPayloadGetRamAttributeTypeOk(o.Ram) +} + +// HasRam returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasRam() bool { + _, ok := o.GetRamOk() + return ok +} + +// SetRam gets a reference to the given float64 and assigns it to the Ram field. +func (o *SearchSKUsPayload) SetRam(v SearchSKUsPayloadGetRamRetType) { + setSearchSKUsPayloadGetRamAttributeType(&o.Ram, v) +} + +// GetReactionTimeInMins returns the ReactionTimeInMins field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetReactionTimeInMins() (res SearchSKUsPayloadGetReactionTimeInMinsRetType) { + res, _ = o.GetReactionTimeInMinsOk() + return +} + +// GetReactionTimeInMinsOk returns a tuple with the ReactionTimeInMins field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetReactionTimeInMinsOk() (ret SearchSKUsPayloadGetReactionTimeInMinsRetType, ok bool) { + return getSearchSKUsPayloadGetReactionTimeInMinsAttributeTypeOk(o.ReactionTimeInMins) +} + +// HasReactionTimeInMins returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasReactionTimeInMins() bool { + _, ok := o.GetReactionTimeInMinsOk() + return ok +} + +// SetReactionTimeInMins gets a reference to the given int64 and assigns it to the ReactionTimeInMins field. +func (o *SearchSKUsPayload) SetReactionTimeInMins(v SearchSKUsPayloadGetReactionTimeInMinsRetType) { + setSearchSKUsPayloadGetReactionTimeInMinsAttributeType(&o.ReactionTimeInMins, v) +} + +// SetReactionTimeInMinsNil sets the value for ReactionTimeInMins to be an explicit nil +func (o *SearchSKUsPayload) SetReactionTimeInMinsNil() { + o.ReactionTimeInMins = nil +} + +// UnsetReactionTimeInMins ensures that no value is present for ReactionTimeInMins, not even an explicit nil +func (o *SearchSKUsPayload) UnsetReactionTimeInMins() { + o.ReactionTimeInMins = nil +} + +// GetRecordLimitPerZone returns the RecordLimitPerZone field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetRecordLimitPerZone() (res SearchSKUsPayloadGetRecordLimitPerZoneRetType) { + res, _ = o.GetRecordLimitPerZoneOk() + return +} + +// GetRecordLimitPerZoneOk returns a tuple with the RecordLimitPerZone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetRecordLimitPerZoneOk() (ret SearchSKUsPayloadGetRecordLimitPerZoneRetType, ok bool) { + return getSearchSKUsPayloadGetRecordLimitPerZoneAttributeTypeOk(o.RecordLimitPerZone) +} + +// HasRecordLimitPerZone returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasRecordLimitPerZone() bool { + _, ok := o.GetRecordLimitPerZoneOk() + return ok +} + +// SetRecordLimitPerZone gets a reference to the given float64 and assigns it to the RecordLimitPerZone field. +func (o *SearchSKUsPayload) SetRecordLimitPerZone(v SearchSKUsPayloadGetRecordLimitPerZoneRetType) { + setSearchSKUsPayloadGetRecordLimitPerZoneAttributeType(&o.RecordLimitPerZone, v) +} + +// GetRegion returns the Region field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetRegion() (res SearchSKUsPayloadGetRegionRetType) { + res, _ = o.GetRegionOk() + return +} + +// GetRegionOk returns a tuple with the Region field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetRegionOk() (ret SearchSKUsPayloadGetRegionRetType, ok bool) { + return getSearchSKUsPayloadGetRegionAttributeTypeOk(o.Region) +} + +// HasRegion returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasRegion() bool { + _, ok := o.GetRegionOk() + return ok +} + +// SetRegion gets a reference to the given string and assigns it to the Region field. +func (o *SearchSKUsPayload) SetRegion(v SearchSKUsPayloadGetRegionRetType) { + setSearchSKUsPayloadGetRegionAttributeType(&o.Region, v) +} + +// GetRepeatedRuntimeInMonths returns the RepeatedRuntimeInMonths field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetRepeatedRuntimeInMonths() (res SearchSKUsPayloadGetRepeatedRuntimeInMonthsRetType) { + res, _ = o.GetRepeatedRuntimeInMonthsOk() + return +} + +// GetRepeatedRuntimeInMonthsOk returns a tuple with the RepeatedRuntimeInMonths field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetRepeatedRuntimeInMonthsOk() (ret SearchSKUsPayloadGetRepeatedRuntimeInMonthsRetType, ok bool) { + return getSearchSKUsPayloadGetRepeatedRuntimeInMonthsAttributeTypeOk(o.RepeatedRuntimeInMonths) +} + +// HasRepeatedRuntimeInMonths returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasRepeatedRuntimeInMonths() bool { + _, ok := o.GetRepeatedRuntimeInMonthsOk() + return ok +} + +// SetRepeatedRuntimeInMonths gets a reference to the given int64 and assigns it to the RepeatedRuntimeInMonths field. +func (o *SearchSKUsPayload) SetRepeatedRuntimeInMonths(v SearchSKUsPayloadGetRepeatedRuntimeInMonthsRetType) { + setSearchSKUsPayloadGetRepeatedRuntimeInMonthsAttributeType(&o.RepeatedRuntimeInMonths, v) +} + +// SetRepeatedRuntimeInMonthsNil sets the value for RepeatedRuntimeInMonths to be an explicit nil +func (o *SearchSKUsPayload) SetRepeatedRuntimeInMonthsNil() { + o.RepeatedRuntimeInMonths = nil +} + +// UnsetRepeatedRuntimeInMonths ensures that no value is present for RepeatedRuntimeInMonths, not even an explicit nil +func (o *SearchSKUsPayload) UnsetRepeatedRuntimeInMonths() { + o.RepeatedRuntimeInMonths = nil +} + +// GetResponseTimeBCINCInMins returns the ResponseTimeBCINCInMins field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetResponseTimeBCINCInMins() (res SearchSKUsPayloadGetResponseTimeBCINCInMinsRetType) { + res, _ = o.GetResponseTimeBCINCInMinsOk() + return +} + +// GetResponseTimeBCINCInMinsOk returns a tuple with the ResponseTimeBCINCInMins field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetResponseTimeBCINCInMinsOk() (ret SearchSKUsPayloadGetResponseTimeBCINCInMinsRetType, ok bool) { + return getSearchSKUsPayloadGetResponseTimeBCINCInMinsAttributeTypeOk(o.ResponseTimeBCINCInMins) +} + +// HasResponseTimeBCINCInMins returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasResponseTimeBCINCInMins() bool { + _, ok := o.GetResponseTimeBCINCInMinsOk() + return ok +} + +// SetResponseTimeBCINCInMins gets a reference to the given int64 and assigns it to the ResponseTimeBCINCInMins field. +func (o *SearchSKUsPayload) SetResponseTimeBCINCInMins(v SearchSKUsPayloadGetResponseTimeBCINCInMinsRetType) { + setSearchSKUsPayloadGetResponseTimeBCINCInMinsAttributeType(&o.ResponseTimeBCINCInMins, v) +} + +// SetResponseTimeBCINCInMinsNil sets the value for ResponseTimeBCINCInMins to be an explicit nil +func (o *SearchSKUsPayload) SetResponseTimeBCINCInMinsNil() { + o.ResponseTimeBCINCInMins = nil +} + +// UnsetResponseTimeBCINCInMins ensures that no value is present for ResponseTimeBCINCInMins, not even an explicit nil +func (o *SearchSKUsPayload) UnsetResponseTimeBCINCInMins() { + o.ResponseTimeBCINCInMins = nil +} + +// GetResponseTimeINCInMins returns the ResponseTimeINCInMins field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetResponseTimeINCInMins() (res SearchSKUsPayloadGetResponseTimeINCInMinsRetType) { + res, _ = o.GetResponseTimeINCInMinsOk() + return +} + +// GetResponseTimeINCInMinsOk returns a tuple with the ResponseTimeINCInMins field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetResponseTimeINCInMinsOk() (ret SearchSKUsPayloadGetResponseTimeINCInMinsRetType, ok bool) { + return getSearchSKUsPayloadGetResponseTimeINCInMinsAttributeTypeOk(o.ResponseTimeINCInMins) +} + +// HasResponseTimeINCInMins returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasResponseTimeINCInMins() bool { + _, ok := o.GetResponseTimeINCInMinsOk() + return ok +} + +// SetResponseTimeINCInMins gets a reference to the given int64 and assigns it to the ResponseTimeINCInMins field. +func (o *SearchSKUsPayload) SetResponseTimeINCInMins(v SearchSKUsPayloadGetResponseTimeINCInMinsRetType) { + setSearchSKUsPayloadGetResponseTimeINCInMinsAttributeType(&o.ResponseTimeINCInMins, v) +} + +// SetResponseTimeINCInMinsNil sets the value for ResponseTimeINCInMins to be an explicit nil +func (o *SearchSKUsPayload) SetResponseTimeINCInMinsNil() { + o.ResponseTimeINCInMins = nil +} + +// UnsetResponseTimeINCInMins ensures that no value is present for ResponseTimeINCInMins, not even an explicit nil +func (o *SearchSKUsPayload) UnsetResponseTimeINCInMins() { + o.ResponseTimeINCInMins = nil +} + +// GetResponseTimeSRInMins returns the ResponseTimeSRInMins field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetResponseTimeSRInMins() (res SearchSKUsPayloadGetResponseTimeSRInMinsRetType) { + res, _ = o.GetResponseTimeSRInMinsOk() + return +} + +// GetResponseTimeSRInMinsOk returns a tuple with the ResponseTimeSRInMins field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetResponseTimeSRInMinsOk() (ret SearchSKUsPayloadGetResponseTimeSRInMinsRetType, ok bool) { + return getSearchSKUsPayloadGetResponseTimeSRInMinsAttributeTypeOk(o.ResponseTimeSRInMins) +} + +// HasResponseTimeSRInMins returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasResponseTimeSRInMins() bool { + _, ok := o.GetResponseTimeSRInMinsOk() + return ok +} + +// SetResponseTimeSRInMins gets a reference to the given int64 and assigns it to the ResponseTimeSRInMins field. +func (o *SearchSKUsPayload) SetResponseTimeSRInMins(v SearchSKUsPayloadGetResponseTimeSRInMinsRetType) { + setSearchSKUsPayloadGetResponseTimeSRInMinsAttributeType(&o.ResponseTimeSRInMins, v) +} + +// SetResponseTimeSRInMinsNil sets the value for ResponseTimeSRInMins to be an explicit nil +func (o *SearchSKUsPayload) SetResponseTimeSRInMinsNil() { + o.ResponseTimeSRInMins = nil +} + +// UnsetResponseTimeSRInMins ensures that no value is present for ResponseTimeSRInMins, not even an explicit nil +func (o *SearchSKUsPayload) UnsetResponseTimeSRInMins() { + o.ResponseTimeSRInMins = nil +} + +// GetServiceHoursBCINC returns the ServiceHoursBCINC field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetServiceHoursBCINC() (res SearchSKUsPayloadGetServiceHoursBCINCRetType) { + res, _ = o.GetServiceHoursBCINCOk() + return +} + +// GetServiceHoursBCINCOk returns a tuple with the ServiceHoursBCINC field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetServiceHoursBCINCOk() (ret SearchSKUsPayloadGetServiceHoursBCINCRetType, ok bool) { + return getSearchSKUsPayloadGetServiceHoursBCINCAttributeTypeOk(o.ServiceHoursBCINC) +} + +// HasServiceHoursBCINC returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasServiceHoursBCINC() bool { + _, ok := o.GetServiceHoursBCINCOk() + return ok +} + +// SetServiceHoursBCINC gets a reference to the given string and assigns it to the ServiceHoursBCINC field. +func (o *SearchSKUsPayload) SetServiceHoursBCINC(v SearchSKUsPayloadGetServiceHoursBCINCRetType) { + setSearchSKUsPayloadGetServiceHoursBCINCAttributeType(&o.ServiceHoursBCINC, v) +} + +// SetServiceHoursBCINCNil sets the value for ServiceHoursBCINC to be an explicit nil +func (o *SearchSKUsPayload) SetServiceHoursBCINCNil() { + o.ServiceHoursBCINC = nil +} + +// UnsetServiceHoursBCINC ensures that no value is present for ServiceHoursBCINC, not even an explicit nil +func (o *SearchSKUsPayload) UnsetServiceHoursBCINC() { + o.ServiceHoursBCINC = nil +} + +// GetServiceHoursINC returns the ServiceHoursINC field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetServiceHoursINC() (res SearchSKUsPayloadGetServiceHoursINCRetType) { + res, _ = o.GetServiceHoursINCOk() + return +} + +// GetServiceHoursINCOk returns a tuple with the ServiceHoursINC field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetServiceHoursINCOk() (ret SearchSKUsPayloadGetServiceHoursINCRetType, ok bool) { + return getSearchSKUsPayloadGetServiceHoursINCAttributeTypeOk(o.ServiceHoursINC) +} + +// HasServiceHoursINC returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasServiceHoursINC() bool { + _, ok := o.GetServiceHoursINCOk() + return ok +} + +// SetServiceHoursINC gets a reference to the given string and assigns it to the ServiceHoursINC field. +func (o *SearchSKUsPayload) SetServiceHoursINC(v SearchSKUsPayloadGetServiceHoursINCRetType) { + setSearchSKUsPayloadGetServiceHoursINCAttributeType(&o.ServiceHoursINC, v) +} + +// SetServiceHoursINCNil sets the value for ServiceHoursINC to be an explicit nil +func (o *SearchSKUsPayload) SetServiceHoursINCNil() { + o.ServiceHoursINC = nil +} + +// UnsetServiceHoursINC ensures that no value is present for ServiceHoursINC, not even an explicit nil +func (o *SearchSKUsPayload) UnsetServiceHoursINC() { + o.ServiceHoursINC = nil +} + +// GetServiceHoursSR returns the ServiceHoursSR field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetServiceHoursSR() (res SearchSKUsPayloadGetServiceHoursSRRetType) { + res, _ = o.GetServiceHoursSROk() + return +} + +// GetServiceHoursSROk returns a tuple with the ServiceHoursSR field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetServiceHoursSROk() (ret SearchSKUsPayloadGetServiceHoursSRRetType, ok bool) { + return getSearchSKUsPayloadGetServiceHoursSRAttributeTypeOk(o.ServiceHoursSR) +} + +// HasServiceHoursSR returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasServiceHoursSR() bool { + _, ok := o.GetServiceHoursSROk() + return ok +} + +// SetServiceHoursSR gets a reference to the given string and assigns it to the ServiceHoursSR field. +func (o *SearchSKUsPayload) SetServiceHoursSR(v SearchSKUsPayloadGetServiceHoursSRRetType) { + setSearchSKUsPayloadGetServiceHoursSRAttributeType(&o.ServiceHoursSR, v) +} + +// SetServiceHoursSRNil sets the value for ServiceHoursSR to be an explicit nil +func (o *SearchSKUsPayload) SetServiceHoursSRNil() { + o.ServiceHoursSR = nil +} + +// UnsetServiceHoursSR ensures that no value is present for ServiceHoursSR, not even an explicit nil +func (o *SearchSKUsPayload) UnsetServiceHoursSR() { + o.ServiceHoursSR = nil +} + +// GetServiceId returns the ServiceId field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetServiceId() (res SearchSKUsPayloadGetServiceIdRetType) { + res, _ = o.GetServiceIdOk() + return +} + +// GetServiceIdOk returns a tuple with the ServiceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetServiceIdOk() (ret SearchSKUsPayloadGetServiceIdRetType, ok bool) { + return getSearchSKUsPayloadGetServiceIdAttributeTypeOk(o.ServiceId) +} + +// HasServiceId returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasServiceId() bool { + _, ok := o.GetServiceIdOk() + return ok +} + +// SetServiceId gets a reference to the given string and assigns it to the ServiceId field. +func (o *SearchSKUsPayload) SetServiceId(v SearchSKUsPayloadGetServiceIdRetType) { + setSearchSKUsPayloadGetServiceIdAttributeType(&o.ServiceId, v) +} + +// GetSku returns the Sku field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetSku() (res SearchSKUsPayloadGetSkuRetType) { + res, _ = o.GetSkuOk() + return +} + +// GetSkuOk returns a tuple with the Sku field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetSkuOk() (ret SearchSKUsPayloadGetSkuRetType, ok bool) { + return getSearchSKUsPayloadGetSkuAttributeTypeOk(o.Sku) +} + +// HasSku returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasSku() bool { + _, ok := o.GetSkuOk() + return ok +} + +// SetSku gets a reference to the given string and assigns it to the Sku field. +func (o *SearchSKUsPayload) SetSku(v SearchSKUsPayloadGetSkuRetType) { + setSearchSKUsPayloadGetSkuAttributeType(&o.Sku, v) +} + +// GetSlaGoalInPercentage returns the SlaGoalInPercentage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SearchSKUsPayload) GetSlaGoalInPercentage() (res SearchSKUsPayloadGetSlaGoalInPercentageRetType) { + res, _ = o.GetSlaGoalInPercentageOk() + return +} + +// GetSlaGoalInPercentageOk returns a tuple with the SlaGoalInPercentage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchSKUsPayload) GetSlaGoalInPercentageOk() (ret SearchSKUsPayloadGetSlaGoalInPercentageRetType, ok bool) { + return getSearchSKUsPayloadGetSlaGoalInPercentageAttributeTypeOk(o.SlaGoalInPercentage) +} + +// HasSlaGoalInPercentage returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasSlaGoalInPercentage() bool { + _, ok := o.GetSlaGoalInPercentageOk() + return ok +} + +// SetSlaGoalInPercentage gets a reference to the given int64 and assigns it to the SlaGoalInPercentage field. +func (o *SearchSKUsPayload) SetSlaGoalInPercentage(v SearchSKUsPayloadGetSlaGoalInPercentageRetType) { + setSearchSKUsPayloadGetSlaGoalInPercentageAttributeType(&o.SlaGoalInPercentage, v) +} + +// SetSlaGoalInPercentageNil sets the value for SlaGoalInPercentage to be an explicit nil +func (o *SearchSKUsPayload) SetSlaGoalInPercentageNil() { + o.SlaGoalInPercentage = nil +} + +// UnsetSlaGoalInPercentage ensures that no value is present for SlaGoalInPercentage, not even an explicit nil +func (o *SearchSKUsPayload) UnsetSlaGoalInPercentage() { + o.SlaGoalInPercentage = nil +} + +// GetStorage returns the Storage field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetStorage() (res SearchSKUsPayloadGetStorageRetType) { + res, _ = o.GetStorageOk() + return +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetStorageOk() (ret SearchSKUsPayloadGetStorageRetType, ok bool) { + return getSearchSKUsPayloadGetStorageAttributeTypeOk(o.Storage) +} + +// HasStorage returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasStorage() bool { + _, ok := o.GetStorageOk() + return ok +} + +// SetStorage gets a reference to the given string and assigns it to the Storage field. +func (o *SearchSKUsPayload) SetStorage(v SearchSKUsPayloadGetStorageRetType) { + setSearchSKUsPayloadGetStorageAttributeType(&o.Storage, v) +} + +// GetStorageMaxGb returns the StorageMaxGb field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetStorageMaxGb() (res SearchSKUsPayloadGetStorageMaxGbRetType) { + res, _ = o.GetStorageMaxGbOk() + return +} + +// GetStorageMaxGbOk returns a tuple with the StorageMaxGb field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetStorageMaxGbOk() (ret SearchSKUsPayloadGetStorageMaxGbRetType, ok bool) { + return getSearchSKUsPayloadGetStorageMaxGbAttributeTypeOk(o.StorageMaxGb) +} + +// HasStorageMaxGb returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasStorageMaxGb() bool { + _, ok := o.GetStorageMaxGbOk() + return ok +} + +// SetStorageMaxGb gets a reference to the given int64 and assigns it to the StorageMaxGb field. +func (o *SearchSKUsPayload) SetStorageMaxGb(v SearchSKUsPayloadGetStorageMaxGbRetType) { + setSearchSKUsPayloadGetStorageMaxGbAttributeType(&o.StorageMaxGb, v) +} + +// GetStorageMinGb returns the StorageMinGb field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetStorageMinGb() (res SearchSKUsPayloadGetStorageMinGbRetType) { + res, _ = o.GetStorageMinGbOk() + return +} + +// GetStorageMinGbOk returns a tuple with the StorageMinGb field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetStorageMinGbOk() (ret SearchSKUsPayloadGetStorageMinGbRetType, ok bool) { + return getSearchSKUsPayloadGetStorageMinGbAttributeTypeOk(o.StorageMinGb) +} + +// HasStorageMinGb returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasStorageMinGb() bool { + _, ok := o.GetStorageMinGbOk() + return ok +} + +// SetStorageMinGb gets a reference to the given int64 and assigns it to the StorageMinGb field. +func (o *SearchSKUsPayload) SetStorageMinGb(v SearchSKUsPayloadGetStorageMinGbRetType) { + setSearchSKUsPayloadGetStorageMinGbAttributeType(&o.StorageMinGb, v) +} + +// GetTargets returns the Targets field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetTargets() (res SearchSKUsPayloadGetTargetsRetType) { + res, _ = o.GetTargetsOk() + return +} + +// GetTargetsOk returns a tuple with the Targets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetTargetsOk() (ret SearchSKUsPayloadGetTargetsRetType, ok bool) { + return getSearchSKUsPayloadGetTargetsAttributeTypeOk(o.Targets) +} + +// HasTargets returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasTargets() bool { + _, ok := o.GetTargetsOk() + return ok +} + +// SetTargets gets a reference to the given int64 and assigns it to the Targets field. +func (o *SearchSKUsPayload) SetTargets(v SearchSKUsPayloadGetTargetsRetType) { + setSearchSKUsPayloadGetTargetsAttributeType(&o.Targets, v) +} + +// GetTechnicalProductGroup returns the TechnicalProductGroup field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetTechnicalProductGroup() (res SearchSKUsPayloadGetTechnicalProductGroupRetType) { + res, _ = o.GetTechnicalProductGroupOk() + return +} + +// GetTechnicalProductGroupOk returns a tuple with the TechnicalProductGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetTechnicalProductGroupOk() (ret SearchSKUsPayloadGetTechnicalProductGroupRetType, ok bool) { + return getSearchSKUsPayloadGetTechnicalProductGroupAttributeTypeOk(o.TechnicalProductGroup) +} + +// HasTechnicalProductGroup returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasTechnicalProductGroup() bool { + _, ok := o.GetTechnicalProductGroupOk() + return ok +} + +// SetTechnicalProductGroup gets a reference to the given string and assigns it to the TechnicalProductGroup field. +func (o *SearchSKUsPayload) SetTechnicalProductGroup(v SearchSKUsPayloadGetTechnicalProductGroupRetType) { + setSearchSKUsPayloadGetTechnicalProductGroupAttributeType(&o.TechnicalProductGroup, v) +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetTitle() (res SearchSKUsPayloadGetTitleRetType) { + res, _ = o.GetTitleOk() + return +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetTitleOk() (ret SearchSKUsPayloadGetTitleRetType, ok bool) { + return getSearchSKUsPayloadGetTitleAttributeTypeOk(o.Title) +} + +// HasTitle returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasTitle() bool { + _, ok := o.GetTitleOk() + return ok +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *SearchSKUsPayload) SetTitle(v SearchSKUsPayloadGetTitleRetType) { + setSearchSKUsPayloadGetTitleAttributeType(&o.Title, v) +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetType() (res SearchSKUsPayloadGetTypeRetType) { + 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 *SearchSKUsPayload) GetTypeOk() (ret SearchSKUsPayloadGetTypeRetType, ok bool) { + return getSearchSKUsPayloadGetTypeAttributeTypeOk(o.Type) +} + +// HasType returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasType() bool { + _, ok := o.GetTypeOk() + return ok +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *SearchSKUsPayload) SetType(v SearchSKUsPayloadGetTypeRetType) { + setSearchSKUsPayloadGetTypeAttributeType(&o.Type, v) +} + +// GetUnit returns the Unit field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetUnit() (res SearchSKUsPayloadGetUnitRetType) { + 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 *SearchSKUsPayload) GetUnitOk() (ret SearchSKUsPayloadGetUnitRetType, ok bool) { + return getSearchSKUsPayloadGetUnitAttributeTypeOk(o.Unit) +} + +// HasUnit returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasUnit() bool { + _, ok := o.GetUnitOk() + return ok +} + +// SetUnit gets a reference to the given string and assigns it to the Unit field. +func (o *SearchSKUsPayload) SetUnit(v SearchSKUsPayloadGetUnitRetType) { + setSearchSKUsPayloadGetUnitAttributeType(&o.Unit, v) +} + +// GetUnitBilling returns the UnitBilling field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetUnitBilling() (res SearchSKUsPayloadGetUnitBillingRetType) { + res, _ = o.GetUnitBillingOk() + return +} + +// GetUnitBillingOk returns a tuple with the UnitBilling field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetUnitBillingOk() (ret SearchSKUsPayloadGetUnitBillingRetType, ok bool) { + return getSearchSKUsPayloadGetUnitBillingAttributeTypeOk(o.UnitBilling) +} + +// HasUnitBilling returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasUnitBilling() bool { + _, ok := o.GetUnitBillingOk() + return ok +} + +// SetUnitBilling gets a reference to the given string and assigns it to the UnitBilling field. +func (o *SearchSKUsPayload) SetUnitBilling(v SearchSKUsPayloadGetUnitBillingRetType) { + setSearchSKUsPayloadGetUnitBillingAttributeType(&o.UnitBilling, v) +} + +// GetVCPU returns the VCPU field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetVCPU() (res SearchSKUsPayloadGetVCPURetType) { + res, _ = o.GetVCPUOk() + return +} + +// GetVCPUOk returns a tuple with the VCPU field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SearchSKUsPayload) GetVCPUOk() (ret SearchSKUsPayloadGetVCPURetType, ok bool) { + return getSearchSKUsPayloadGetVCPUAttributeTypeOk(o.VCPU) +} + +// HasVCPU returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasVCPU() bool { + _, ok := o.GetVCPUOk() + return ok +} + +// SetVCPU gets a reference to the given int64 and assigns it to the VCPU field. +func (o *SearchSKUsPayload) SetVCPU(v SearchSKUsPayloadGetVCPURetType) { + setSearchSKUsPayloadGetVCPUAttributeType(&o.VCPU, v) +} + +// GetValidFrom returns the ValidFrom field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetValidFrom() (res SearchSKUsPayloadGetValidFromRetType) { + res, _ = o.GetValidFromOk() + return +} + +// 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 *SearchSKUsPayload) GetValidFromOk() (ret SearchSKUsPayloadGetValidFromRetType, ok bool) { + return getSearchSKUsPayloadGetValidFromAttributeTypeOk(o.ValidFrom) +} + +// HasValidFrom returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasValidFrom() bool { + _, ok := o.GetValidFromOk() + return ok +} + +// SetValidFrom gets a reference to the given time.Time and assigns it to the ValidFrom field. +func (o *SearchSKUsPayload) SetValidFrom(v SearchSKUsPayloadGetValidFromRetType) { + setSearchSKUsPayloadGetValidFromAttributeType(&o.ValidFrom, v) +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *SearchSKUsPayload) GetValue() (res SearchSKUsPayloadGetValueRetType) { + 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 *SearchSKUsPayload) GetValueOk() (ret SearchSKUsPayloadGetValueRetType, ok bool) { + return getSearchSKUsPayloadGetValueAttributeTypeOk(o.Value) +} + +// HasValue returns a boolean if a field has been set. +func (o *SearchSKUsPayload) HasValue() bool { + _, ok := o.GetValueOk() + return ok +} + +// SetValue gets a reference to the given float64 and assigns it to the Value field. +func (o *SearchSKUsPayload) SetValue(v SearchSKUsPayloadGetValueRetType) { + setSearchSKUsPayloadGetValueAttributeType(&o.Value, v) +} + +func (o SearchSKUsPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getSearchSKUsPayloadGetCategoryNameAttributeTypeOk(o.CategoryName); ok { + toSerialize["CategoryName"] = val + } + if val, ok := getSearchSKUsPayloadGetClassAttributeTypeOk(o.Class); ok { + toSerialize["Class"] = val + } + if val, ok := getSearchSKUsPayloadGetCommunicationChannelAttributeTypeOk(o.CommunicationChannel); ok { + toSerialize["CommunicationChannel"] = val + } + if val, ok := getSearchSKUsPayloadGetConnectionLimitPerLoadBalancerAttributeTypeOk(o.ConnectionLimitPerLoadBalancer); ok { + toSerialize["ConnectionLimitPerLoadBalancer"] = val + } + if val, ok := getSearchSKUsPayloadGetContractNoticePeriodInDaysAttributeTypeOk(o.ContractNoticePeriodInDays); ok { + toSerialize["ContractNoticePeriodInDays"] = val + } + if val, ok := getSearchSKUsPayloadGetDeprecatedAttributeTypeOk(o.Deprecated); ok { + toSerialize["Deprecated"] = val + } + if val, ok := getSearchSKUsPayloadGetDiskStoragePerNodeAttributeTypeOk(o.DiskStoragePerNode); ok { + toSerialize["DiskStoragePerNode"] = val + } + if val, ok := getSearchSKUsPayloadGetDocumentationAttributeTypeOk(o.Documentation); ok { + toSerialize["Documentation"] = val + } + if val, ok := getSearchSKUsPayloadGetEscalationAvailabilityBCINCAttributeTypeOk(o.EscalationAvailabilityBCINC); ok { + toSerialize["EscalationAvailabilityBCINC"] = val + } + if val, ok := getSearchSKUsPayloadGetEscalationAvailabilityINCAttributeTypeOk(o.EscalationAvailabilityINC); ok { + toSerialize["EscalationAvailabilityINC"] = val + } + if val, ok := getSearchSKUsPayloadGetEscalationAvailabilitySRAttributeTypeOk(o.EscalationAvailabilitySR); ok { + toSerialize["EscalationAvailabilitySR"] = val + } + if val, ok := getSearchSKUsPayloadGetEscalationThresholdBCINCInMinsAttributeTypeOk(o.EscalationThresholdBCINCInMins); ok { + toSerialize["EscalationThresholdBCINCInMins"] = val + } + if val, ok := getSearchSKUsPayloadGetEscalationThresholdINCInMinsAttributeTypeOk(o.EscalationThresholdINCInMins); ok { + toSerialize["EscalationThresholdINCInMins"] = val + } + if val, ok := getSearchSKUsPayloadGetEscalationThresholdSRInMinsAttributeTypeOk(o.EscalationThresholdSRInMins); ok { + toSerialize["EscalationThresholdSRInMins"] = val + } + if val, ok := getSearchSKUsPayloadGetFinPenaltySLAVio80PctAttributeTypeOk(o.FinPenaltySLAVio80Pct); ok { + toSerialize["FinPenaltySLAVio80Pct"] = val + } + if val, ok := getSearchSKUsPayloadGetFinPenaltySLAVio9080PctAttributeTypeOk(o.FinPenaltySLAVio9080Pct); ok { + toSerialize["FinPenaltySLAVio9080Pct"] = val + } + if val, ok := getSearchSKUsPayloadGetFlavorAttributeTypeOk(o.Flavor); ok { + toSerialize["Flavor"] = val + } + if val, ok := getSearchSKUsPayloadGetGeneralProductGroupAttributeTypeOk(o.GeneralProductGroup); ok { + toSerialize["GeneralProductGroup"] = val + } + if val, ok := getSearchSKUsPayloadGetHardwareAttributeTypeOk(o.Hardware); ok { + toSerialize["Hardware"] = val + } + if val, ok := getSearchSKUsPayloadGetInitialRuntimeInMonthsAttributeTypeOk(o.InitialRuntimeInMonths); ok { + toSerialize["InitialRuntimeInMonths"] = val + } + if val, ok := getSearchSKUsPayloadGetLeadTimeInWorkDaysAttributeTypeOk(o.LeadTimeInWorkDays); ok { + toSerialize["LeadTimeInWorkDays"] = val + } + if val, ok := getSearchSKUsPayloadGetLocationAttributeTypeOk(o.Location); ok { + toSerialize["Location"] = val + } + if val, ok := getSearchSKUsPayloadGetMaturityModelStateAttributeTypeOk(o.MaturityModelState); ok { + toSerialize["MaturityModelState"] = val + } + if val, ok := getSearchSKUsPayloadGetMaxIOPerSecAttributeTypeOk(o.MaxIOPerSec); ok { + toSerialize["MaxIOPerSec"] = val + } + if val, ok := getSearchSKUsPayloadGetMaxTroughInMBAttributeTypeOk(o.MaxTroughInMB); ok { + toSerialize["MaxTroughInMB"] = val + } + if val, ok := getSearchSKUsPayloadGetMetricPerMinAttributeTypeOk(o.MetricPerMin); ok { + toSerialize["MetricPerMin"] = val + } + if val, ok := getSearchSKUsPayloadgetMetroAttributeTypeOk(o.Metro); ok { + toSerialize["Metro"] = val + } + if val, ok := getSearchSKUsPayloadGetMonthlyPriceAttributeTypeOk(o.MonthlyPrice); ok { + toSerialize["MonthlyPrice"] = val + } + if val, ok := getSearchSKUsPayloadGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getSearchSKUsPayloadGetNodesAttributeTypeOk(o.Nodes); ok { + toSerialize["Nodes"] = val + } + if val, ok := getSearchSKUsPayloadGetOsAttributeTypeOk(o.Os); ok { + toSerialize["Os"] = val + } + if val, ok := getSearchSKUsPayloadGetPriceListVisibilityAttributeTypeOk(o.PriceListVisibility); ok { + toSerialize["PriceListVisibility"] = val + } + if val, ok := getSearchSKUsPayloadGetProductNameAttributeTypeOk(o.ProductName); ok { + toSerialize["ProductName"] = val + } + if val, ok := getSearchSKUsPayloadGetProjectNoticePeriodInWorkDaysAttributeTypeOk(o.ProjectNoticePeriodInWorkDays); ok { + toSerialize["ProjectNoticePeriodInWorkDays"] = val + } + if val, ok := getSearchSKUsPayloadGetRamAttributeTypeOk(o.Ram); ok { + toSerialize["Ram"] = val + } + if val, ok := getSearchSKUsPayloadGetReactionTimeInMinsAttributeTypeOk(o.ReactionTimeInMins); ok { + toSerialize["ReactionTimeInMins"] = val + } + if val, ok := getSearchSKUsPayloadGetRecordLimitPerZoneAttributeTypeOk(o.RecordLimitPerZone); ok { + toSerialize["RecordLimitPerZone"] = val + } + if val, ok := getSearchSKUsPayloadGetRegionAttributeTypeOk(o.Region); ok { + toSerialize["Region"] = val + } + if val, ok := getSearchSKUsPayloadGetRepeatedRuntimeInMonthsAttributeTypeOk(o.RepeatedRuntimeInMonths); ok { + toSerialize["RepeatedRuntimeInMonths"] = val + } + if val, ok := getSearchSKUsPayloadGetResponseTimeBCINCInMinsAttributeTypeOk(o.ResponseTimeBCINCInMins); ok { + toSerialize["ResponseTimeBCINCInMins"] = val + } + if val, ok := getSearchSKUsPayloadGetResponseTimeINCInMinsAttributeTypeOk(o.ResponseTimeINCInMins); ok { + toSerialize["ResponseTimeINCInMins"] = val + } + if val, ok := getSearchSKUsPayloadGetResponseTimeSRInMinsAttributeTypeOk(o.ResponseTimeSRInMins); ok { + toSerialize["ResponseTimeSRInMins"] = val + } + if val, ok := getSearchSKUsPayloadGetServiceHoursBCINCAttributeTypeOk(o.ServiceHoursBCINC); ok { + toSerialize["ServiceHoursBCINC"] = val + } + if val, ok := getSearchSKUsPayloadGetServiceHoursINCAttributeTypeOk(o.ServiceHoursINC); ok { + toSerialize["ServiceHoursINC"] = val + } + if val, ok := getSearchSKUsPayloadGetServiceHoursSRAttributeTypeOk(o.ServiceHoursSR); ok { + toSerialize["ServiceHoursSR"] = val + } + if val, ok := getSearchSKUsPayloadGetServiceIdAttributeTypeOk(o.ServiceId); ok { + toSerialize["ServiceId"] = val + } + if val, ok := getSearchSKUsPayloadGetSkuAttributeTypeOk(o.Sku); ok { + toSerialize["Sku"] = val + } + if val, ok := getSearchSKUsPayloadGetSlaGoalInPercentageAttributeTypeOk(o.SlaGoalInPercentage); ok { + toSerialize["SlaGoalInPercentage"] = val + } + if val, ok := getSearchSKUsPayloadGetStorageAttributeTypeOk(o.Storage); ok { + toSerialize["Storage"] = val + } + if val, ok := getSearchSKUsPayloadGetStorageMaxGbAttributeTypeOk(o.StorageMaxGb); ok { + toSerialize["StorageMaxGb"] = val + } + if val, ok := getSearchSKUsPayloadGetStorageMinGbAttributeTypeOk(o.StorageMinGb); ok { + toSerialize["StorageMinGb"] = val + } + if val, ok := getSearchSKUsPayloadGetTargetsAttributeTypeOk(o.Targets); ok { + toSerialize["Targets"] = val + } + if val, ok := getSearchSKUsPayloadGetTechnicalProductGroupAttributeTypeOk(o.TechnicalProductGroup); ok { + toSerialize["TechnicalProductGroup"] = val + } + if val, ok := getSearchSKUsPayloadGetTitleAttributeTypeOk(o.Title); ok { + toSerialize["Title"] = val + } + if val, ok := getSearchSKUsPayloadGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + if val, ok := getSearchSKUsPayloadGetUnitAttributeTypeOk(o.Unit); ok { + toSerialize["Unit"] = val + } + if val, ok := getSearchSKUsPayloadGetUnitBillingAttributeTypeOk(o.UnitBilling); ok { + toSerialize["UnitBilling"] = val + } + if val, ok := getSearchSKUsPayloadGetVCPUAttributeTypeOk(o.VCPU); ok { + toSerialize["VCPU"] = val + } + if val, ok := getSearchSKUsPayloadGetValidFromAttributeTypeOk(o.ValidFrom); ok { + toSerialize["ValidFrom"] = val + } + if val, ok := getSearchSKUsPayloadGetValueAttributeTypeOk(o.Value); ok { + toSerialize["Value"] = val + } + return toSerialize, nil +} + +type NullableSearchSKUsPayload struct { + value *SearchSKUsPayload + isSet bool +} + +func (v NullableSearchSKUsPayload) Get() *SearchSKUsPayload { + return v.value +} + +func (v *NullableSearchSKUsPayload) Set(val *SearchSKUsPayload) { + v.value = val + v.isSet = true +} + +func (v NullableSearchSKUsPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableSearchSKUsPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSearchSKUsPayload(val *SearchSKUsPayload) *NullableSearchSKUsPayload { + return &NullableSearchSKUsPayload{value: val, isSet: true} +} + +func (v NullableSearchSKUsPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSearchSKUsPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_search_skus_payload_test.go b/services/pim/model_search_skus_payload_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_search_skus_payload_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_sku.go b/services/pim/model_sku.go new file mode 100644 index 000000000..9acd2fbfd --- /dev/null +++ b/services/pim/model_sku.go @@ -0,0 +1,1688 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" + "time" +) + +// checks if the SKU type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SKU{} + +/* + types and functions for categoryId +*/ + +// isNullableString +type SKUGetCategoryIdAttributeType = *NullableString + +func getSKUGetCategoryIdAttributeTypeOk(arg SKUGetCategoryIdAttributeType) (ret SKUGetCategoryIdRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSKUGetCategoryIdAttributeType(arg *SKUGetCategoryIdAttributeType, val SKUGetCategoryIdRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SKUGetCategoryIdArgType = *string +type SKUGetCategoryIdRetType = *string + +/* + types and functions for categoryName +*/ + +// isNullableString +type SKUGetCategoryNameAttributeType = *NullableString + +func getSKUGetCategoryNameAttributeTypeOk(arg SKUGetCategoryNameAttributeType) (ret SKUGetCategoryNameRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSKUGetCategoryNameAttributeType(arg *SKUGetCategoryNameAttributeType, val SKUGetCategoryNameRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SKUGetCategoryNameArgType = *string +type SKUGetCategoryNameRetType = *string + +/* + types and functions for cpuOverprovisioning +*/ + +// isBoolean +type SKUgetCpuOverprovisioningAttributeType = *bool +type SKUgetCpuOverprovisioningArgType = *bool +type SKUgetCpuOverprovisioningRetType = *bool + +func getSKUgetCpuOverprovisioningAttributeTypeOk(arg SKUgetCpuOverprovisioningAttributeType) (ret SKUgetCpuOverprovisioningRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSKUgetCpuOverprovisioningAttributeType(arg *SKUgetCpuOverprovisioningAttributeType, val SKUgetCpuOverprovisioningRetType) { + *arg = val +} + +/* + types and functions for deprecated +*/ + +// isNullableString +type SKUGetDeprecatedAttributeType = *NullableString + +func getSKUGetDeprecatedAttributeTypeOk(arg SKUGetDeprecatedAttributeType) (ret SKUGetDeprecatedRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSKUGetDeprecatedAttributeType(arg *SKUGetDeprecatedAttributeType, val SKUGetDeprecatedRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SKUGetDeprecatedArgType = *string +type SKUGetDeprecatedRetType = *string + +/* + types and functions for documentation +*/ + +// isNullableString +type SKUGetDocumentationAttributeType = *NullableString + +func getSKUGetDocumentationAttributeTypeOk(arg SKUGetDocumentationAttributeType) (ret SKUGetDocumentationRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSKUGetDocumentationAttributeType(arg *SKUGetDocumentationAttributeType, val SKUGetDocumentationRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SKUGetDocumentationArgType = *string +type SKUGetDocumentationRetType = *string + +/* + types and functions for finOpsFocus +*/ + +// isModel +type SKUGetFinOpsFocusAttributeType = *FinOpsFocus +type SKUGetFinOpsFocusArgType = FinOpsFocus +type SKUGetFinOpsFocusRetType = FinOpsFocus + +func getSKUGetFinOpsFocusAttributeTypeOk(arg SKUGetFinOpsFocusAttributeType) (ret SKUGetFinOpsFocusRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSKUGetFinOpsFocusAttributeType(arg *SKUGetFinOpsFocusAttributeType, val SKUGetFinOpsFocusRetType) { + *arg = &val +} + +/* + types and functions for generalProductGroup +*/ + +// isNullableString +type SKUGetGeneralProductGroupAttributeType = *NullableString + +func getSKUGetGeneralProductGroupAttributeTypeOk(arg SKUGetGeneralProductGroupAttributeType) (ret SKUGetGeneralProductGroupRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSKUGetGeneralProductGroupAttributeType(arg *SKUGetGeneralProductGroupAttributeType, val SKUGetGeneralProductGroupRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SKUGetGeneralProductGroupArgType = *string +type SKUGetGeneralProductGroupRetType = *string + +/* + types and functions for id +*/ + +// isNotNullableString +type SKUGetIdAttributeType = *string + +func getSKUGetIdAttributeTypeOk(arg SKUGetIdAttributeType) (ret SKUGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSKUGetIdAttributeType(arg *SKUGetIdAttributeType, val SKUGetIdRetType) { + *arg = &val +} + +type SKUGetIdArgType = string +type SKUGetIdRetType = string + +/* + types and functions for language +*/ + +// isNotNullableString +type SKUGetLanguageAttributeType = *string + +func getSKUGetLanguageAttributeTypeOk(arg SKUGetLanguageAttributeType) (ret SKUGetLanguageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSKUGetLanguageAttributeType(arg *SKUGetLanguageAttributeType, val SKUGetLanguageRetType) { + *arg = &val +} + +type SKUGetLanguageArgType = string +type SKUGetLanguageRetType = string + +/* + types and functions for licenseName +*/ + +// isNullableString +type SKUGetLicenseNameAttributeType = *NullableString + +func getSKUGetLicenseNameAttributeTypeOk(arg SKUGetLicenseNameAttributeType) (ret SKUGetLicenseNameRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSKUGetLicenseNameAttributeType(arg *SKUGetLicenseNameAttributeType, val SKUGetLicenseNameRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SKUGetLicenseNameArgType = *string +type SKUGetLicenseNameRetType = *string + +/* + types and functions for maturityModelState +*/ + +// isNullableString +type SKUGetMaturityModelStateAttributeType = *NullableString + +func getSKUGetMaturityModelStateAttributeTypeOk(arg SKUGetMaturityModelStateAttributeType) (ret SKUGetMaturityModelStateRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSKUGetMaturityModelStateAttributeType(arg *SKUGetMaturityModelStateAttributeType, val SKUGetMaturityModelStateRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SKUGetMaturityModelStateArgType = *string +type SKUGetMaturityModelStateRetType = *string + +/* + types and functions for metric +*/ + +// isNullableString +type SKUGetMetricAttributeType = *NullableString + +func getSKUGetMetricAttributeTypeOk(arg SKUGetMetricAttributeType) (ret SKUGetMetricRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSKUGetMetricAttributeType(arg *SKUGetMetricAttributeType, val SKUGetMetricRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SKUGetMetricArgType = *string +type SKUGetMetricRetType = *string + +/* + types and functions for name +*/ + +// isNullableString +type SKUGetNameAttributeType = *NullableString + +func getSKUGetNameAttributeTypeOk(arg SKUGetNameAttributeType) (ret SKUGetNameRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSKUGetNameAttributeType(arg *SKUGetNameAttributeType, val SKUGetNameRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SKUGetNameArgType = *string +type SKUGetNameRetType = *string + +/* + types and functions for priceListVisibility +*/ + +// isNullableString +type SKUGetPriceListVisibilityAttributeType = *NullableString + +func getSKUGetPriceListVisibilityAttributeTypeOk(arg SKUGetPriceListVisibilityAttributeType) (ret SKUGetPriceListVisibilityRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSKUGetPriceListVisibilityAttributeType(arg *SKUGetPriceListVisibilityAttributeType, val SKUGetPriceListVisibilityRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SKUGetPriceListVisibilityArgType = *string +type SKUGetPriceListVisibilityRetType = *string + +/* + types and functions for prices +*/ + +// isArray +type SKUGetPricesAttributeType = *[]Price +type SKUGetPricesArgType = []Price +type SKUGetPricesRetType = []Price + +func getSKUGetPricesAttributeTypeOk(arg SKUGetPricesAttributeType) (ret SKUGetPricesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSKUGetPricesAttributeType(arg *SKUGetPricesAttributeType, val SKUGetPricesRetType) { + *arg = &val +} + +/* + types and functions for productId +*/ + +// isNullableString +type SKUGetProductIdAttributeType = *NullableString + +func getSKUGetProductIdAttributeTypeOk(arg SKUGetProductIdAttributeType) (ret SKUGetProductIdRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSKUGetProductIdAttributeType(arg *SKUGetProductIdAttributeType, val SKUGetProductIdRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SKUGetProductIdArgType = *string +type SKUGetProductIdRetType = *string + +/* + types and functions for productName +*/ + +// isNullableString +type SKUGetProductNameAttributeType = *NullableString + +func getSKUGetProductNameAttributeTypeOk(arg SKUGetProductNameAttributeType) (ret SKUGetProductNameRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSKUGetProductNameAttributeType(arg *SKUGetProductNameAttributeType, val SKUGetProductNameRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SKUGetProductNameArgType = *string +type SKUGetProductNameRetType = *string + +/* + types and functions for rateType +*/ + +// isNullableString +type SKUGetRateTypeAttributeType = *NullableString + +func getSKUGetRateTypeAttributeTypeOk(arg SKUGetRateTypeAttributeType) (ret SKUGetRateTypeRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSKUGetRateTypeAttributeType(arg *SKUGetRateTypeAttributeType, val SKUGetRateTypeRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SKUGetRateTypeArgType = *string +type SKUGetRateTypeRetType = *string + +/* + types and functions for region +*/ + +// isNotNullableString +type SKUGetRegionAttributeType = *string + +func getSKUGetRegionAttributeTypeOk(arg SKUGetRegionAttributeType) (ret SKUGetRegionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSKUGetRegionAttributeType(arg *SKUGetRegionAttributeType, val SKUGetRegionRetType) { + *arg = &val +} + +type SKUGetRegionArgType = string +type SKUGetRegionRetType = string + +/* + types and functions for serviceId +*/ + +// isArray +type SKUGetServiceIdAttributeType = *[]string +type SKUGetServiceIdArgType = []string +type SKUGetServiceIdRetType = []string + +func getSKUGetServiceIdAttributeTypeOk(arg SKUGetServiceIdAttributeType) (ret SKUGetServiceIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSKUGetServiceIdAttributeType(arg *SKUGetServiceIdAttributeType, val SKUGetServiceIdRetType) { + *arg = &val +} + +/* + types and functions for technicalProductGroup +*/ + +// isNullableString +type SKUGetTechnicalProductGroupAttributeType = *NullableString + +func getSKUGetTechnicalProductGroupAttributeTypeOk(arg SKUGetTechnicalProductGroupAttributeType) (ret SKUGetTechnicalProductGroupRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSKUGetTechnicalProductGroupAttributeType(arg *SKUGetTechnicalProductGroupAttributeType, val SKUGetTechnicalProductGroupRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SKUGetTechnicalProductGroupArgType = *string +type SKUGetTechnicalProductGroupRetType = *string + +/* + types and functions for tierMaxValue +*/ + +// isLong +type SKUGetTierMaxValueAttributeType = *int64 +type SKUGetTierMaxValueArgType = *int64 +type SKUGetTierMaxValueRetType = *int64 + +func getSKUGetTierMaxValueAttributeTypeOk(arg SKUGetTierMaxValueAttributeType) (ret SKUGetTierMaxValueRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSKUGetTierMaxValueAttributeType(arg *SKUGetTierMaxValueAttributeType, val SKUGetTierMaxValueRetType) { + *arg = val +} + +/* + types and functions for tierMinValue +*/ + +// isLong +type SKUGetTierMinValueAttributeType = *int64 +type SKUGetTierMinValueArgType = *int64 +type SKUGetTierMinValueRetType = *int64 + +func getSKUGetTierMinValueAttributeTypeOk(arg SKUGetTierMinValueAttributeType) (ret SKUGetTierMinValueRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSKUGetTierMinValueAttributeType(arg *SKUGetTierMinValueAttributeType, val SKUGetTierMinValueRetType) { + *arg = val +} + +/* + types and functions for title +*/ + +// isNotNullableString +type SKUGetTitleAttributeType = *string + +func getSKUGetTitleAttributeTypeOk(arg SKUGetTitleAttributeType) (ret SKUGetTitleRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSKUGetTitleAttributeType(arg *SKUGetTitleAttributeType, val SKUGetTitleRetType) { + *arg = &val +} + +type SKUGetTitleArgType = string +type SKUGetTitleRetType = string + +/* + types and functions for unit +*/ + +// isNotNullableString +type SKUGetUnitAttributeType = *string + +func getSKUGetUnitAttributeTypeOk(arg SKUGetUnitAttributeType) (ret SKUGetUnitRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSKUGetUnitAttributeType(arg *SKUGetUnitAttributeType, val SKUGetUnitRetType) { + *arg = &val +} + +type SKUGetUnitArgType = string +type SKUGetUnitRetType = string + +/* + types and functions for unitBilling +*/ + +// isNotNullableString +type SKUGetUnitBillingAttributeType = *string + +func getSKUGetUnitBillingAttributeTypeOk(arg SKUGetUnitBillingAttributeType) (ret SKUGetUnitBillingRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSKUGetUnitBillingAttributeType(arg *SKUGetUnitBillingAttributeType, val SKUGetUnitBillingRetType) { + *arg = &val +} + +type SKUGetUnitBillingArgType = string +type SKUGetUnitBillingRetType = string + +/* + types and functions for validStart +*/ + +// isDateTime +type SKUGetValidStartAttributeType = *time.Time +type SKUGetValidStartArgType = time.Time +type SKUGetValidStartRetType = time.Time + +func getSKUGetValidStartAttributeTypeOk(arg SKUGetValidStartAttributeType) (ret SKUGetValidStartRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSKUGetValidStartAttributeType(arg *SKUGetValidStartAttributeType, val SKUGetValidStartRetType) { + *arg = &val +} + +/* + types and functions for version +*/ + +// isNotNullableString +type SKUGetVersionAttributeType = *string + +func getSKUGetVersionAttributeTypeOk(arg SKUGetVersionAttributeType) (ret SKUGetVersionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSKUGetVersionAttributeType(arg *SKUGetVersionAttributeType, val SKUGetVersionRetType) { + *arg = &val +} + +type SKUGetVersionArgType = string +type SKUGetVersionRetType = string + +// SKU struct for SKU +type SKU struct { + // The unique identifier for the category, which is object id from MongoDB + CategoryId SKUGetCategoryIdAttributeType `json:"categoryId,omitempty"` + // Generic categorization to structure the customer's invoice transparently (e.g. `Compute Engine`, `Database`, `Storage`) + CategoryName SKUGetCategoryNameAttributeType `json:"categoryName,omitempty"` + // CPU overprovisioning + CpuOverprovisioning SKUgetCpuOverprovisioningAttributeType `json:"cpuOverprovisioning,omitempty"` + // Attribute that indicates if product is deprecated or not. + Deprecated SKUGetDeprecatedAttributeType `json:"deprecated,omitempty"` + // Documentation URL + Documentation SKUGetDocumentationAttributeType `json:"documentation,omitempty"` + FinOpsFocus SKUGetFinOpsFocusAttributeType `json:"finOpsFocus,omitempty"` + // Category designation one level below the generic designation that describes the overall product group to which all the SKUs are allocated to. + GeneralProductGroup SKUGetGeneralProductGroupAttributeType `json:"generalProductGroup,omitempty"` + // SKU ID \\ Complete SAP article number with prefix. Will be shown on the invoice like this + Id SKUGetIdAttributeType `json:"id,omitempty"` + // Language of sku + Language SKUGetLanguageAttributeType `json:"language,omitempty"` + // Name of license + LicenseName SKUGetLicenseNameAttributeType `json:"licenseName,omitempty"` + // State of the SKU following the mandatory product‘s maturity model progress (e.g. `beta`, `ga`) + MaturityModelState SKUGetMaturityModelStateAttributeType `json:"maturityModelState,omitempty"` + // Metric of service + Metric SKUGetMetricAttributeType `json:"metric,omitempty"` + // How the line item will appear on the bill + Name SKUGetNameAttributeType `json:"name,omitempty"` + // Attribute that indicates if PriceList is visible or not. + PriceListVisibility SKUGetPriceListVisibilityAttributeType `json:"priceListVisibility,omitempty"` + // List of prices + Prices SKUGetPricesAttributeType `json:"prices,omitempty"` + // The unique identifier for the product, which is object id from MongoDB + ProductId SKUGetProductIdAttributeType `json:"productId,omitempty"` + // Generic product (e.g. `Windows Server`, `Server Backup Management`, `Server`) + ProductName SKUGetProductNameAttributeType `json:"productName,omitempty"` + // Rate type of service + RateType SKUGetRateTypeAttributeType `json:"rateType,omitempty"` + // Region of sku + Region SKUGetRegionAttributeType `json:"region,omitempty"` + // List of unique service look up ids + ServiceId SKUGetServiceIdAttributeType `json:"serviceId,omitempty"` + // Technical differentiation + TechnicalProductGroup SKUGetTechnicalProductGroupAttributeType `json:"technicalProductGroup,omitempty"` + // Tier max value + TierMaxValue SKUGetTierMaxValueAttributeType `json:"tierMaxValue,omitempty"` + // Tier min value + TierMinValue SKUGetTierMinValueAttributeType `json:"tierMinValue,omitempty"` + // Service name + Title SKUGetTitleAttributeType `json:"title,omitempty"` + // Full SAP article number with prefix. Will appear on the invoice like that + Unit SKUGetUnitAttributeType `json:"unit,omitempty"` + // Unit billing + UnitBilling SKUGetUnitBillingAttributeType `json:"unitBilling,omitempty"` + // Date when the current version was approved and became valid in PIM + ValidStart SKUGetValidStartAttributeType `json:"validStart,omitempty"` + // Number of the revision from PIM + Version SKUGetVersionAttributeType `json:"version,omitempty"` +} + +// NewSKU instantiates a new SKU 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 NewSKU() *SKU { + this := SKU{} + return &this +} + +// NewSKUWithDefaults instantiates a new SKU 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 NewSKUWithDefaults() *SKU { + this := SKU{} + return &this +} + +// GetCategoryId returns the CategoryId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SKU) GetCategoryId() (res SKUGetCategoryIdRetType) { + res, _ = o.GetCategoryIdOk() + return +} + +// GetCategoryIdOk returns a tuple with the CategoryId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SKU) GetCategoryIdOk() (ret SKUGetCategoryIdRetType, ok bool) { + return getSKUGetCategoryIdAttributeTypeOk(o.CategoryId) +} + +// HasCategoryId returns a boolean if a field has been set. +func (o *SKU) HasCategoryId() bool { + _, ok := o.GetCategoryIdOk() + return ok +} + +// SetCategoryId gets a reference to the given string and assigns it to the CategoryId field. +func (o *SKU) SetCategoryId(v SKUGetCategoryIdRetType) { + setSKUGetCategoryIdAttributeType(&o.CategoryId, v) +} + +// SetCategoryIdNil sets the value for CategoryId to be an explicit nil +func (o *SKU) SetCategoryIdNil() { + o.CategoryId = nil +} + +// UnsetCategoryId ensures that no value is present for CategoryId, not even an explicit nil +func (o *SKU) UnsetCategoryId() { + o.CategoryId = nil +} + +// GetCategoryName returns the CategoryName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SKU) GetCategoryName() (res SKUGetCategoryNameRetType) { + res, _ = o.GetCategoryNameOk() + return +} + +// GetCategoryNameOk returns a tuple with the CategoryName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SKU) GetCategoryNameOk() (ret SKUGetCategoryNameRetType, ok bool) { + return getSKUGetCategoryNameAttributeTypeOk(o.CategoryName) +} + +// HasCategoryName returns a boolean if a field has been set. +func (o *SKU) HasCategoryName() bool { + _, ok := o.GetCategoryNameOk() + return ok +} + +// SetCategoryName gets a reference to the given string and assigns it to the CategoryName field. +func (o *SKU) SetCategoryName(v SKUGetCategoryNameRetType) { + setSKUGetCategoryNameAttributeType(&o.CategoryName, v) +} + +// SetCategoryNameNil sets the value for CategoryName to be an explicit nil +func (o *SKU) SetCategoryNameNil() { + o.CategoryName = nil +} + +// UnsetCategoryName ensures that no value is present for CategoryName, not even an explicit nil +func (o *SKU) UnsetCategoryName() { + o.CategoryName = nil +} + +// GetCpuOverprovisioning returns the CpuOverprovisioning field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SKU) GetCpuOverprovisioning() (res SKUgetCpuOverprovisioningRetType) { + res, _ = o.GetCpuOverprovisioningOk() + return +} + +// GetCpuOverprovisioningOk returns a tuple with the CpuOverprovisioning field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SKU) GetCpuOverprovisioningOk() (ret SKUgetCpuOverprovisioningRetType, ok bool) { + return getSKUgetCpuOverprovisioningAttributeTypeOk(o.CpuOverprovisioning) +} + +// HasCpuOverprovisioning returns a boolean if a field has been set. +func (o *SKU) HasCpuOverprovisioning() bool { + _, ok := o.GetCpuOverprovisioningOk() + return ok +} + +// SetCpuOverprovisioning gets a reference to the given bool and assigns it to the CpuOverprovisioning field. +func (o *SKU) SetCpuOverprovisioning(v SKUgetCpuOverprovisioningRetType) { + setSKUgetCpuOverprovisioningAttributeType(&o.CpuOverprovisioning, v) +} + +// SetCpuOverprovisioningNil sets the value for CpuOverprovisioning to be an explicit nil +func (o *SKU) SetCpuOverprovisioningNil() { + o.CpuOverprovisioning = nil +} + +// UnsetCpuOverprovisioning ensures that no value is present for CpuOverprovisioning, not even an explicit nil +func (o *SKU) UnsetCpuOverprovisioning() { + o.CpuOverprovisioning = nil +} + +// GetDeprecated returns the Deprecated field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SKU) GetDeprecated() (res SKUGetDeprecatedRetType) { + res, _ = o.GetDeprecatedOk() + return +} + +// GetDeprecatedOk returns a tuple with the Deprecated field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SKU) GetDeprecatedOk() (ret SKUGetDeprecatedRetType, ok bool) { + return getSKUGetDeprecatedAttributeTypeOk(o.Deprecated) +} + +// HasDeprecated returns a boolean if a field has been set. +func (o *SKU) HasDeprecated() bool { + _, ok := o.GetDeprecatedOk() + return ok +} + +// SetDeprecated gets a reference to the given string and assigns it to the Deprecated field. +func (o *SKU) SetDeprecated(v SKUGetDeprecatedRetType) { + setSKUGetDeprecatedAttributeType(&o.Deprecated, v) +} + +// SetDeprecatedNil sets the value for Deprecated to be an explicit nil +func (o *SKU) SetDeprecatedNil() { + o.Deprecated = nil +} + +// UnsetDeprecated ensures that no value is present for Deprecated, not even an explicit nil +func (o *SKU) UnsetDeprecated() { + o.Deprecated = nil +} + +// GetDocumentation returns the Documentation field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SKU) GetDocumentation() (res SKUGetDocumentationRetType) { + res, _ = o.GetDocumentationOk() + return +} + +// GetDocumentationOk returns a tuple with the Documentation field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SKU) GetDocumentationOk() (ret SKUGetDocumentationRetType, ok bool) { + return getSKUGetDocumentationAttributeTypeOk(o.Documentation) +} + +// HasDocumentation returns a boolean if a field has been set. +func (o *SKU) HasDocumentation() bool { + _, ok := o.GetDocumentationOk() + return ok +} + +// SetDocumentation gets a reference to the given string and assigns it to the Documentation field. +func (o *SKU) SetDocumentation(v SKUGetDocumentationRetType) { + setSKUGetDocumentationAttributeType(&o.Documentation, v) +} + +// SetDocumentationNil sets the value for Documentation to be an explicit nil +func (o *SKU) SetDocumentationNil() { + o.Documentation = nil +} + +// UnsetDocumentation ensures that no value is present for Documentation, not even an explicit nil +func (o *SKU) UnsetDocumentation() { + o.Documentation = nil +} + +// GetFinOpsFocus returns the FinOpsFocus field value if set, zero value otherwise. +func (o *SKU) GetFinOpsFocus() (res SKUGetFinOpsFocusRetType) { + res, _ = o.GetFinOpsFocusOk() + return +} + +// GetFinOpsFocusOk returns a tuple with the FinOpsFocus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SKU) GetFinOpsFocusOk() (ret SKUGetFinOpsFocusRetType, ok bool) { + return getSKUGetFinOpsFocusAttributeTypeOk(o.FinOpsFocus) +} + +// HasFinOpsFocus returns a boolean if a field has been set. +func (o *SKU) HasFinOpsFocus() bool { + _, ok := o.GetFinOpsFocusOk() + return ok +} + +// SetFinOpsFocus gets a reference to the given FinOpsFocus and assigns it to the FinOpsFocus field. +func (o *SKU) SetFinOpsFocus(v SKUGetFinOpsFocusRetType) { + setSKUGetFinOpsFocusAttributeType(&o.FinOpsFocus, v) +} + +// GetGeneralProductGroup returns the GeneralProductGroup field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SKU) GetGeneralProductGroup() (res SKUGetGeneralProductGroupRetType) { + res, _ = o.GetGeneralProductGroupOk() + return +} + +// GetGeneralProductGroupOk returns a tuple with the GeneralProductGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SKU) GetGeneralProductGroupOk() (ret SKUGetGeneralProductGroupRetType, ok bool) { + return getSKUGetGeneralProductGroupAttributeTypeOk(o.GeneralProductGroup) +} + +// HasGeneralProductGroup returns a boolean if a field has been set. +func (o *SKU) HasGeneralProductGroup() bool { + _, ok := o.GetGeneralProductGroupOk() + return ok +} + +// SetGeneralProductGroup gets a reference to the given string and assigns it to the GeneralProductGroup field. +func (o *SKU) SetGeneralProductGroup(v SKUGetGeneralProductGroupRetType) { + setSKUGetGeneralProductGroupAttributeType(&o.GeneralProductGroup, v) +} + +// SetGeneralProductGroupNil sets the value for GeneralProductGroup to be an explicit nil +func (o *SKU) SetGeneralProductGroupNil() { + o.GeneralProductGroup = nil +} + +// UnsetGeneralProductGroup ensures that no value is present for GeneralProductGroup, not even an explicit nil +func (o *SKU) UnsetGeneralProductGroup() { + o.GeneralProductGroup = nil +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *SKU) GetId() (res SKUGetIdRetType) { + res, _ = o.GetIdOk() + return +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SKU) GetIdOk() (ret SKUGetIdRetType, ok bool) { + return getSKUGetIdAttributeTypeOk(o.Id) +} + +// HasId returns a boolean if a field has been set. +func (o *SKU) HasId() bool { + _, ok := o.GetIdOk() + return ok +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *SKU) SetId(v SKUGetIdRetType) { + setSKUGetIdAttributeType(&o.Id, v) +} + +// GetLanguage returns the Language field value if set, zero value otherwise. +func (o *SKU) GetLanguage() (res SKUGetLanguageRetType) { + res, _ = o.GetLanguageOk() + return +} + +// GetLanguageOk returns a tuple with the Language field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SKU) GetLanguageOk() (ret SKUGetLanguageRetType, ok bool) { + return getSKUGetLanguageAttributeTypeOk(o.Language) +} + +// HasLanguage returns a boolean if a field has been set. +func (o *SKU) HasLanguage() bool { + _, ok := o.GetLanguageOk() + return ok +} + +// SetLanguage gets a reference to the given string and assigns it to the Language field. +func (o *SKU) SetLanguage(v SKUGetLanguageRetType) { + setSKUGetLanguageAttributeType(&o.Language, v) +} + +// GetLicenseName returns the LicenseName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SKU) GetLicenseName() (res SKUGetLicenseNameRetType) { + res, _ = o.GetLicenseNameOk() + return +} + +// GetLicenseNameOk returns a tuple with the LicenseName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SKU) GetLicenseNameOk() (ret SKUGetLicenseNameRetType, ok bool) { + return getSKUGetLicenseNameAttributeTypeOk(o.LicenseName) +} + +// HasLicenseName returns a boolean if a field has been set. +func (o *SKU) HasLicenseName() bool { + _, ok := o.GetLicenseNameOk() + return ok +} + +// SetLicenseName gets a reference to the given string and assigns it to the LicenseName field. +func (o *SKU) SetLicenseName(v SKUGetLicenseNameRetType) { + setSKUGetLicenseNameAttributeType(&o.LicenseName, v) +} + +// SetLicenseNameNil sets the value for LicenseName to be an explicit nil +func (o *SKU) SetLicenseNameNil() { + o.LicenseName = nil +} + +// UnsetLicenseName ensures that no value is present for LicenseName, not even an explicit nil +func (o *SKU) UnsetLicenseName() { + o.LicenseName = nil +} + +// GetMaturityModelState returns the MaturityModelState field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SKU) GetMaturityModelState() (res SKUGetMaturityModelStateRetType) { + res, _ = o.GetMaturityModelStateOk() + return +} + +// GetMaturityModelStateOk returns a tuple with the MaturityModelState field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SKU) GetMaturityModelStateOk() (ret SKUGetMaturityModelStateRetType, ok bool) { + return getSKUGetMaturityModelStateAttributeTypeOk(o.MaturityModelState) +} + +// HasMaturityModelState returns a boolean if a field has been set. +func (o *SKU) HasMaturityModelState() bool { + _, ok := o.GetMaturityModelStateOk() + return ok +} + +// SetMaturityModelState gets a reference to the given string and assigns it to the MaturityModelState field. +func (o *SKU) SetMaturityModelState(v SKUGetMaturityModelStateRetType) { + setSKUGetMaturityModelStateAttributeType(&o.MaturityModelState, v) +} + +// SetMaturityModelStateNil sets the value for MaturityModelState to be an explicit nil +func (o *SKU) SetMaturityModelStateNil() { + o.MaturityModelState = nil +} + +// UnsetMaturityModelState ensures that no value is present for MaturityModelState, not even an explicit nil +func (o *SKU) UnsetMaturityModelState() { + o.MaturityModelState = nil +} + +// GetMetric returns the Metric field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SKU) GetMetric() (res SKUGetMetricRetType) { + res, _ = o.GetMetricOk() + return +} + +// GetMetricOk returns a tuple with the Metric field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SKU) GetMetricOk() (ret SKUGetMetricRetType, ok bool) { + return getSKUGetMetricAttributeTypeOk(o.Metric) +} + +// HasMetric returns a boolean if a field has been set. +func (o *SKU) HasMetric() bool { + _, ok := o.GetMetricOk() + return ok +} + +// SetMetric gets a reference to the given string and assigns it to the Metric field. +func (o *SKU) SetMetric(v SKUGetMetricRetType) { + setSKUGetMetricAttributeType(&o.Metric, v) +} + +// SetMetricNil sets the value for Metric to be an explicit nil +func (o *SKU) SetMetricNil() { + o.Metric = nil +} + +// UnsetMetric ensures that no value is present for Metric, not even an explicit nil +func (o *SKU) UnsetMetric() { + o.Metric = nil +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SKU) GetName() (res SKUGetNameRetType) { + res, _ = o.GetNameOk() + return +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SKU) GetNameOk() (ret SKUGetNameRetType, ok bool) { + return getSKUGetNameAttributeTypeOk(o.Name) +} + +// HasName returns a boolean if a field has been set. +func (o *SKU) HasName() bool { + _, ok := o.GetNameOk() + return ok +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *SKU) SetName(v SKUGetNameRetType) { + setSKUGetNameAttributeType(&o.Name, v) +} + +// SetNameNil sets the value for Name to be an explicit nil +func (o *SKU) SetNameNil() { + o.Name = nil +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *SKU) UnsetName() { + o.Name = nil +} + +// GetPriceListVisibility returns the PriceListVisibility field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SKU) GetPriceListVisibility() (res SKUGetPriceListVisibilityRetType) { + res, _ = o.GetPriceListVisibilityOk() + return +} + +// GetPriceListVisibilityOk returns a tuple with the PriceListVisibility field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SKU) GetPriceListVisibilityOk() (ret SKUGetPriceListVisibilityRetType, ok bool) { + return getSKUGetPriceListVisibilityAttributeTypeOk(o.PriceListVisibility) +} + +// HasPriceListVisibility returns a boolean if a field has been set. +func (o *SKU) HasPriceListVisibility() bool { + _, ok := o.GetPriceListVisibilityOk() + return ok +} + +// SetPriceListVisibility gets a reference to the given string and assigns it to the PriceListVisibility field. +func (o *SKU) SetPriceListVisibility(v SKUGetPriceListVisibilityRetType) { + setSKUGetPriceListVisibilityAttributeType(&o.PriceListVisibility, v) +} + +// SetPriceListVisibilityNil sets the value for PriceListVisibility to be an explicit nil +func (o *SKU) SetPriceListVisibilityNil() { + o.PriceListVisibility = nil +} + +// UnsetPriceListVisibility ensures that no value is present for PriceListVisibility, not even an explicit nil +func (o *SKU) UnsetPriceListVisibility() { + o.PriceListVisibility = nil +} + +// GetPrices returns the Prices field value if set, zero value otherwise. +func (o *SKU) GetPrices() (res SKUGetPricesRetType) { + res, _ = o.GetPricesOk() + return +} + +// GetPricesOk returns a tuple with the Prices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SKU) GetPricesOk() (ret SKUGetPricesRetType, ok bool) { + return getSKUGetPricesAttributeTypeOk(o.Prices) +} + +// HasPrices returns a boolean if a field has been set. +func (o *SKU) HasPrices() bool { + _, ok := o.GetPricesOk() + return ok +} + +// SetPrices gets a reference to the given []Price and assigns it to the Prices field. +func (o *SKU) SetPrices(v SKUGetPricesRetType) { + setSKUGetPricesAttributeType(&o.Prices, v) +} + +// GetProductId returns the ProductId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SKU) GetProductId() (res SKUGetProductIdRetType) { + res, _ = o.GetProductIdOk() + return +} + +// GetProductIdOk returns a tuple with the ProductId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SKU) GetProductIdOk() (ret SKUGetProductIdRetType, ok bool) { + return getSKUGetProductIdAttributeTypeOk(o.ProductId) +} + +// HasProductId returns a boolean if a field has been set. +func (o *SKU) HasProductId() bool { + _, ok := o.GetProductIdOk() + return ok +} + +// SetProductId gets a reference to the given string and assigns it to the ProductId field. +func (o *SKU) SetProductId(v SKUGetProductIdRetType) { + setSKUGetProductIdAttributeType(&o.ProductId, v) +} + +// SetProductIdNil sets the value for ProductId to be an explicit nil +func (o *SKU) SetProductIdNil() { + o.ProductId = nil +} + +// UnsetProductId ensures that no value is present for ProductId, not even an explicit nil +func (o *SKU) UnsetProductId() { + o.ProductId = nil +} + +// GetProductName returns the ProductName field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SKU) GetProductName() (res SKUGetProductNameRetType) { + res, _ = o.GetProductNameOk() + return +} + +// GetProductNameOk returns a tuple with the ProductName field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SKU) GetProductNameOk() (ret SKUGetProductNameRetType, ok bool) { + return getSKUGetProductNameAttributeTypeOk(o.ProductName) +} + +// HasProductName returns a boolean if a field has been set. +func (o *SKU) HasProductName() bool { + _, ok := o.GetProductNameOk() + return ok +} + +// SetProductName gets a reference to the given string and assigns it to the ProductName field. +func (o *SKU) SetProductName(v SKUGetProductNameRetType) { + setSKUGetProductNameAttributeType(&o.ProductName, v) +} + +// SetProductNameNil sets the value for ProductName to be an explicit nil +func (o *SKU) SetProductNameNil() { + o.ProductName = nil +} + +// UnsetProductName ensures that no value is present for ProductName, not even an explicit nil +func (o *SKU) UnsetProductName() { + o.ProductName = nil +} + +// GetRateType returns the RateType field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SKU) GetRateType() (res SKUGetRateTypeRetType) { + res, _ = o.GetRateTypeOk() + return +} + +// GetRateTypeOk returns a tuple with the RateType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SKU) GetRateTypeOk() (ret SKUGetRateTypeRetType, ok bool) { + return getSKUGetRateTypeAttributeTypeOk(o.RateType) +} + +// HasRateType returns a boolean if a field has been set. +func (o *SKU) HasRateType() bool { + _, ok := o.GetRateTypeOk() + return ok +} + +// SetRateType gets a reference to the given string and assigns it to the RateType field. +func (o *SKU) SetRateType(v SKUGetRateTypeRetType) { + setSKUGetRateTypeAttributeType(&o.RateType, v) +} + +// SetRateTypeNil sets the value for RateType to be an explicit nil +func (o *SKU) SetRateTypeNil() { + o.RateType = nil +} + +// UnsetRateType ensures that no value is present for RateType, not even an explicit nil +func (o *SKU) UnsetRateType() { + o.RateType = nil +} + +// GetRegion returns the Region field value if set, zero value otherwise. +func (o *SKU) GetRegion() (res SKUGetRegionRetType) { + res, _ = o.GetRegionOk() + return +} + +// GetRegionOk returns a tuple with the Region field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SKU) GetRegionOk() (ret SKUGetRegionRetType, ok bool) { + return getSKUGetRegionAttributeTypeOk(o.Region) +} + +// HasRegion returns a boolean if a field has been set. +func (o *SKU) HasRegion() bool { + _, ok := o.GetRegionOk() + return ok +} + +// SetRegion gets a reference to the given string and assigns it to the Region field. +func (o *SKU) SetRegion(v SKUGetRegionRetType) { + setSKUGetRegionAttributeType(&o.Region, v) +} + +// GetServiceId returns the ServiceId field value if set, zero value otherwise. +func (o *SKU) GetServiceId() (res SKUGetServiceIdRetType) { + res, _ = o.GetServiceIdOk() + return +} + +// GetServiceIdOk returns a tuple with the ServiceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SKU) GetServiceIdOk() (ret SKUGetServiceIdRetType, ok bool) { + return getSKUGetServiceIdAttributeTypeOk(o.ServiceId) +} + +// HasServiceId returns a boolean if a field has been set. +func (o *SKU) HasServiceId() bool { + _, ok := o.GetServiceIdOk() + return ok +} + +// SetServiceId gets a reference to the given []string and assigns it to the ServiceId field. +func (o *SKU) SetServiceId(v SKUGetServiceIdRetType) { + setSKUGetServiceIdAttributeType(&o.ServiceId, v) +} + +// GetTechnicalProductGroup returns the TechnicalProductGroup field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SKU) GetTechnicalProductGroup() (res SKUGetTechnicalProductGroupRetType) { + res, _ = o.GetTechnicalProductGroupOk() + return +} + +// GetTechnicalProductGroupOk returns a tuple with the TechnicalProductGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SKU) GetTechnicalProductGroupOk() (ret SKUGetTechnicalProductGroupRetType, ok bool) { + return getSKUGetTechnicalProductGroupAttributeTypeOk(o.TechnicalProductGroup) +} + +// HasTechnicalProductGroup returns a boolean if a field has been set. +func (o *SKU) HasTechnicalProductGroup() bool { + _, ok := o.GetTechnicalProductGroupOk() + return ok +} + +// SetTechnicalProductGroup gets a reference to the given string and assigns it to the TechnicalProductGroup field. +func (o *SKU) SetTechnicalProductGroup(v SKUGetTechnicalProductGroupRetType) { + setSKUGetTechnicalProductGroupAttributeType(&o.TechnicalProductGroup, v) +} + +// SetTechnicalProductGroupNil sets the value for TechnicalProductGroup to be an explicit nil +func (o *SKU) SetTechnicalProductGroupNil() { + o.TechnicalProductGroup = nil +} + +// UnsetTechnicalProductGroup ensures that no value is present for TechnicalProductGroup, not even an explicit nil +func (o *SKU) UnsetTechnicalProductGroup() { + o.TechnicalProductGroup = nil +} + +// GetTierMaxValue returns the TierMaxValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SKU) GetTierMaxValue() (res SKUGetTierMaxValueRetType) { + res, _ = o.GetTierMaxValueOk() + return +} + +// GetTierMaxValueOk returns a tuple with the TierMaxValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SKU) GetTierMaxValueOk() (ret SKUGetTierMaxValueRetType, ok bool) { + return getSKUGetTierMaxValueAttributeTypeOk(o.TierMaxValue) +} + +// HasTierMaxValue returns a boolean if a field has been set. +func (o *SKU) HasTierMaxValue() bool { + _, ok := o.GetTierMaxValueOk() + return ok +} + +// SetTierMaxValue gets a reference to the given int64 and assigns it to the TierMaxValue field. +func (o *SKU) SetTierMaxValue(v SKUGetTierMaxValueRetType) { + setSKUGetTierMaxValueAttributeType(&o.TierMaxValue, v) +} + +// SetTierMaxValueNil sets the value for TierMaxValue to be an explicit nil +func (o *SKU) SetTierMaxValueNil() { + o.TierMaxValue = nil +} + +// UnsetTierMaxValue ensures that no value is present for TierMaxValue, not even an explicit nil +func (o *SKU) UnsetTierMaxValue() { + o.TierMaxValue = nil +} + +// GetTierMinValue returns the TierMinValue field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SKU) GetTierMinValue() (res SKUGetTierMinValueRetType) { + res, _ = o.GetTierMinValueOk() + return +} + +// GetTierMinValueOk returns a tuple with the TierMinValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SKU) GetTierMinValueOk() (ret SKUGetTierMinValueRetType, ok bool) { + return getSKUGetTierMinValueAttributeTypeOk(o.TierMinValue) +} + +// HasTierMinValue returns a boolean if a field has been set. +func (o *SKU) HasTierMinValue() bool { + _, ok := o.GetTierMinValueOk() + return ok +} + +// SetTierMinValue gets a reference to the given int64 and assigns it to the TierMinValue field. +func (o *SKU) SetTierMinValue(v SKUGetTierMinValueRetType) { + setSKUGetTierMinValueAttributeType(&o.TierMinValue, v) +} + +// SetTierMinValueNil sets the value for TierMinValue to be an explicit nil +func (o *SKU) SetTierMinValueNil() { + o.TierMinValue = nil +} + +// UnsetTierMinValue ensures that no value is present for TierMinValue, not even an explicit nil +func (o *SKU) UnsetTierMinValue() { + o.TierMinValue = nil +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *SKU) GetTitle() (res SKUGetTitleRetType) { + res, _ = o.GetTitleOk() + return +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SKU) GetTitleOk() (ret SKUGetTitleRetType, ok bool) { + return getSKUGetTitleAttributeTypeOk(o.Title) +} + +// HasTitle returns a boolean if a field has been set. +func (o *SKU) HasTitle() bool { + _, ok := o.GetTitleOk() + return ok +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *SKU) SetTitle(v SKUGetTitleRetType) { + setSKUGetTitleAttributeType(&o.Title, v) +} + +// GetUnit returns the Unit field value if set, zero value otherwise. +func (o *SKU) GetUnit() (res SKUGetUnitRetType) { + 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 *SKU) GetUnitOk() (ret SKUGetUnitRetType, ok bool) { + return getSKUGetUnitAttributeTypeOk(o.Unit) +} + +// HasUnit returns a boolean if a field has been set. +func (o *SKU) HasUnit() bool { + _, ok := o.GetUnitOk() + return ok +} + +// SetUnit gets a reference to the given string and assigns it to the Unit field. +func (o *SKU) SetUnit(v SKUGetUnitRetType) { + setSKUGetUnitAttributeType(&o.Unit, v) +} + +// GetUnitBilling returns the UnitBilling field value if set, zero value otherwise. +func (o *SKU) GetUnitBilling() (res SKUGetUnitBillingRetType) { + res, _ = o.GetUnitBillingOk() + return +} + +// GetUnitBillingOk returns a tuple with the UnitBilling field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SKU) GetUnitBillingOk() (ret SKUGetUnitBillingRetType, ok bool) { + return getSKUGetUnitBillingAttributeTypeOk(o.UnitBilling) +} + +// HasUnitBilling returns a boolean if a field has been set. +func (o *SKU) HasUnitBilling() bool { + _, ok := o.GetUnitBillingOk() + return ok +} + +// SetUnitBilling gets a reference to the given string and assigns it to the UnitBilling field. +func (o *SKU) SetUnitBilling(v SKUGetUnitBillingRetType) { + setSKUGetUnitBillingAttributeType(&o.UnitBilling, v) +} + +// GetValidStart returns the ValidStart field value if set, zero value otherwise. +func (o *SKU) GetValidStart() (res SKUGetValidStartRetType) { + res, _ = o.GetValidStartOk() + return +} + +// GetValidStartOk returns a tuple with the ValidStart field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SKU) GetValidStartOk() (ret SKUGetValidStartRetType, ok bool) { + return getSKUGetValidStartAttributeTypeOk(o.ValidStart) +} + +// HasValidStart returns a boolean if a field has been set. +func (o *SKU) HasValidStart() bool { + _, ok := o.GetValidStartOk() + return ok +} + +// SetValidStart gets a reference to the given time.Time and assigns it to the ValidStart field. +func (o *SKU) SetValidStart(v SKUGetValidStartRetType) { + setSKUGetValidStartAttributeType(&o.ValidStart, v) +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *SKU) GetVersion() (res SKUGetVersionRetType) { + 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 *SKU) GetVersionOk() (ret SKUGetVersionRetType, ok bool) { + return getSKUGetVersionAttributeTypeOk(o.Version) +} + +// HasVersion returns a boolean if a field has been set. +func (o *SKU) HasVersion() bool { + _, ok := o.GetVersionOk() + return ok +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *SKU) SetVersion(v SKUGetVersionRetType) { + setSKUGetVersionAttributeType(&o.Version, v) +} + +func (o SKU) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getSKUGetCategoryIdAttributeTypeOk(o.CategoryId); ok { + toSerialize["CategoryId"] = val + } + if val, ok := getSKUGetCategoryNameAttributeTypeOk(o.CategoryName); ok { + toSerialize["CategoryName"] = val + } + if val, ok := getSKUgetCpuOverprovisioningAttributeTypeOk(o.CpuOverprovisioning); ok { + toSerialize["CpuOverprovisioning"] = val + } + if val, ok := getSKUGetDeprecatedAttributeTypeOk(o.Deprecated); ok { + toSerialize["Deprecated"] = val + } + if val, ok := getSKUGetDocumentationAttributeTypeOk(o.Documentation); ok { + toSerialize["Documentation"] = val + } + if val, ok := getSKUGetFinOpsFocusAttributeTypeOk(o.FinOpsFocus); ok { + toSerialize["FinOpsFocus"] = val + } + if val, ok := getSKUGetGeneralProductGroupAttributeTypeOk(o.GeneralProductGroup); ok { + toSerialize["GeneralProductGroup"] = val + } + if val, ok := getSKUGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getSKUGetLanguageAttributeTypeOk(o.Language); ok { + toSerialize["Language"] = val + } + if val, ok := getSKUGetLicenseNameAttributeTypeOk(o.LicenseName); ok { + toSerialize["LicenseName"] = val + } + if val, ok := getSKUGetMaturityModelStateAttributeTypeOk(o.MaturityModelState); ok { + toSerialize["MaturityModelState"] = val + } + if val, ok := getSKUGetMetricAttributeTypeOk(o.Metric); ok { + toSerialize["Metric"] = val + } + if val, ok := getSKUGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getSKUGetPriceListVisibilityAttributeTypeOk(o.PriceListVisibility); ok { + toSerialize["PriceListVisibility"] = val + } + if val, ok := getSKUGetPricesAttributeTypeOk(o.Prices); ok { + toSerialize["Prices"] = val + } + if val, ok := getSKUGetProductIdAttributeTypeOk(o.ProductId); ok { + toSerialize["ProductId"] = val + } + if val, ok := getSKUGetProductNameAttributeTypeOk(o.ProductName); ok { + toSerialize["ProductName"] = val + } + if val, ok := getSKUGetRateTypeAttributeTypeOk(o.RateType); ok { + toSerialize["RateType"] = val + } + if val, ok := getSKUGetRegionAttributeTypeOk(o.Region); ok { + toSerialize["Region"] = val + } + if val, ok := getSKUGetServiceIdAttributeTypeOk(o.ServiceId); ok { + toSerialize["ServiceId"] = val + } + if val, ok := getSKUGetTechnicalProductGroupAttributeTypeOk(o.TechnicalProductGroup); ok { + toSerialize["TechnicalProductGroup"] = val + } + if val, ok := getSKUGetTierMaxValueAttributeTypeOk(o.TierMaxValue); ok { + toSerialize["TierMaxValue"] = val + } + if val, ok := getSKUGetTierMinValueAttributeTypeOk(o.TierMinValue); ok { + toSerialize["TierMinValue"] = val + } + if val, ok := getSKUGetTitleAttributeTypeOk(o.Title); ok { + toSerialize["Title"] = val + } + if val, ok := getSKUGetUnitAttributeTypeOk(o.Unit); ok { + toSerialize["Unit"] = val + } + if val, ok := getSKUGetUnitBillingAttributeTypeOk(o.UnitBilling); ok { + toSerialize["UnitBilling"] = val + } + if val, ok := getSKUGetValidStartAttributeTypeOk(o.ValidStart); ok { + toSerialize["ValidStart"] = val + } + if val, ok := getSKUGetVersionAttributeTypeOk(o.Version); ok { + toSerialize["Version"] = val + } + return toSerialize, nil +} + +type NullableSKU struct { + value *SKU + isSet bool +} + +func (v NullableSKU) Get() *SKU { + return v.value +} + +func (v *NullableSKU) Set(val *SKU) { + v.value = val + v.isSet = true +} + +func (v NullableSKU) IsSet() bool { + return v.isSet +} + +func (v *NullableSKU) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSKU(val *SKU) *NullableSKU { + return &NullableSKU{value: val, isSet: true} +} + +func (v NullableSKU) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSKU) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_sku_test.go b/services/pim/model_sku_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_sku_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_storage_specific_attributes.go b/services/pim/model_storage_specific_attributes.go new file mode 100644 index 000000000..3f8075875 --- /dev/null +++ b/services/pim/model_storage_specific_attributes.go @@ -0,0 +1,495 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the StorageSpecificAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StorageSpecificAttributes{} + +/* + types and functions for class +*/ + +// isNullableString +type StorageSpecificAttributesGetClassAttributeType = *NullableString + +func getStorageSpecificAttributesGetClassAttributeTypeOk(arg StorageSpecificAttributesGetClassAttributeType) (ret StorageSpecificAttributesGetClassRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setStorageSpecificAttributesGetClassAttributeType(arg *StorageSpecificAttributesGetClassAttributeType, val StorageSpecificAttributesGetClassRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type StorageSpecificAttributesGetClassArgType = *string +type StorageSpecificAttributesGetClassRetType = *string + +/* + types and functions for discriminator +*/ + +// isNotNullableString +type StorageSpecificAttributesGetDiscriminatorAttributeType = *string + +func getStorageSpecificAttributesGetDiscriminatorAttributeTypeOk(arg StorageSpecificAttributesGetDiscriminatorAttributeType) (ret StorageSpecificAttributesGetDiscriminatorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setStorageSpecificAttributesGetDiscriminatorAttributeType(arg *StorageSpecificAttributesGetDiscriminatorAttributeType, val StorageSpecificAttributesGetDiscriminatorRetType) { + *arg = &val +} + +type StorageSpecificAttributesGetDiscriminatorArgType = string +type StorageSpecificAttributesGetDiscriminatorRetType = string + +/* + types and functions for maxIOPerSec +*/ + +// isLong +type StorageSpecificAttributesGetMaxIOPerSecAttributeType = *int64 +type StorageSpecificAttributesGetMaxIOPerSecArgType = *int64 +type StorageSpecificAttributesGetMaxIOPerSecRetType = *int64 + +func getStorageSpecificAttributesGetMaxIOPerSecAttributeTypeOk(arg StorageSpecificAttributesGetMaxIOPerSecAttributeType) (ret StorageSpecificAttributesGetMaxIOPerSecRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setStorageSpecificAttributesGetMaxIOPerSecAttributeType(arg *StorageSpecificAttributesGetMaxIOPerSecAttributeType, val StorageSpecificAttributesGetMaxIOPerSecRetType) { + *arg = val +} + +/* + types and functions for maxTroughInMB +*/ + +// isLong +type StorageSpecificAttributesGetMaxTroughInMBAttributeType = *int64 +type StorageSpecificAttributesGetMaxTroughInMBArgType = *int64 +type StorageSpecificAttributesGetMaxTroughInMBRetType = *int64 + +func getStorageSpecificAttributesGetMaxTroughInMBAttributeTypeOk(arg StorageSpecificAttributesGetMaxTroughInMBAttributeType) (ret StorageSpecificAttributesGetMaxTroughInMBRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setStorageSpecificAttributesGetMaxTroughInMBAttributeType(arg *StorageSpecificAttributesGetMaxTroughInMBAttributeType, val StorageSpecificAttributesGetMaxTroughInMBRetType) { + *arg = val +} + +/* + types and functions for metro +*/ + +// isBoolean +type StorageSpecificAttributesgetMetroAttributeType = *bool +type StorageSpecificAttributesgetMetroArgType = *bool +type StorageSpecificAttributesgetMetroRetType = *bool + +func getStorageSpecificAttributesgetMetroAttributeTypeOk(arg StorageSpecificAttributesgetMetroAttributeType) (ret StorageSpecificAttributesgetMetroRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setStorageSpecificAttributesgetMetroAttributeType(arg *StorageSpecificAttributesgetMetroAttributeType, val StorageSpecificAttributesgetMetroRetType) { + *arg = val +} + +/* + types and functions for storage +*/ + +// isNullableString +type StorageSpecificAttributesGetStorageAttributeType = *NullableString + +func getStorageSpecificAttributesGetStorageAttributeTypeOk(arg StorageSpecificAttributesGetStorageAttributeType) (ret StorageSpecificAttributesGetStorageRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setStorageSpecificAttributesGetStorageAttributeType(arg *StorageSpecificAttributesGetStorageAttributeType, val StorageSpecificAttributesGetStorageRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type StorageSpecificAttributesGetStorageArgType = *string +type StorageSpecificAttributesGetStorageRetType = *string + +/* + types and functions for type +*/ + +// isNullableString +type StorageSpecificAttributesGetTypeAttributeType = *NullableString + +func getStorageSpecificAttributesGetTypeAttributeTypeOk(arg StorageSpecificAttributesGetTypeAttributeType) (ret StorageSpecificAttributesGetTypeRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setStorageSpecificAttributesGetTypeAttributeType(arg *StorageSpecificAttributesGetTypeAttributeType, val StorageSpecificAttributesGetTypeRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type StorageSpecificAttributesGetTypeArgType = *string +type StorageSpecificAttributesGetTypeRetType = *string + +// StorageSpecificAttributes struct for StorageSpecificAttributes +type StorageSpecificAttributes struct { + // Storage Class type + Class StorageSpecificAttributesGetClassAttributeType `json:"class,omitempty"` + // REQUIRED + Discriminator StorageSpecificAttributesGetDiscriminatorAttributeType `json:"discriminator" required:"true"` + // Storage maxIOPerSec + MaxIOPerSec StorageSpecificAttributesGetMaxIOPerSecAttributeType `json:"maxIOPerSec,omitempty"` + // Storage maxTroughInMB + MaxTroughInMB StorageSpecificAttributesGetMaxTroughInMBAttributeType `json:"maxTroughInMB,omitempty"` + // metro + Metro StorageSpecificAttributesgetMetroAttributeType `json:"metro,omitempty"` + // Storage (e.g. `image`, `postgresql`, `snapshot`, `volume`) + Storage StorageSpecificAttributesGetStorageAttributeType `json:"storage,omitempty"` + // Type (e.g. 'capacity', 'input') + Type StorageSpecificAttributesGetTypeAttributeType `json:"type,omitempty"` +} + +type _StorageSpecificAttributes StorageSpecificAttributes + +// NewStorageSpecificAttributes instantiates a new StorageSpecificAttributes 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 NewStorageSpecificAttributes(discriminator StorageSpecificAttributesGetDiscriminatorArgType) *StorageSpecificAttributes { + this := StorageSpecificAttributes{} + setStorageSpecificAttributesGetDiscriminatorAttributeType(&this.Discriminator, discriminator) + return &this +} + +// NewStorageSpecificAttributesWithDefaults instantiates a new StorageSpecificAttributes 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 NewStorageSpecificAttributesWithDefaults() *StorageSpecificAttributes { + this := StorageSpecificAttributes{} + return &this +} + +// GetClass returns the Class field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *StorageSpecificAttributes) GetClass() (res StorageSpecificAttributesGetClassRetType) { + res, _ = o.GetClassOk() + return +} + +// GetClassOk returns a tuple with the Class field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *StorageSpecificAttributes) GetClassOk() (ret StorageSpecificAttributesGetClassRetType, ok bool) { + return getStorageSpecificAttributesGetClassAttributeTypeOk(o.Class) +} + +// HasClass returns a boolean if a field has been set. +func (o *StorageSpecificAttributes) HasClass() bool { + _, ok := o.GetClassOk() + return ok +} + +// SetClass gets a reference to the given string and assigns it to the Class field. +func (o *StorageSpecificAttributes) SetClass(v StorageSpecificAttributesGetClassRetType) { + setStorageSpecificAttributesGetClassAttributeType(&o.Class, v) +} + +// SetClassNil sets the value for Class to be an explicit nil +func (o *StorageSpecificAttributes) SetClassNil() { + o.Class = nil +} + +// UnsetClass ensures that no value is present for Class, not even an explicit nil +func (o *StorageSpecificAttributes) UnsetClass() { + o.Class = nil +} + +// GetDiscriminator returns the Discriminator field value +func (o *StorageSpecificAttributes) GetDiscriminator() (ret StorageSpecificAttributesGetDiscriminatorRetType) { + ret, _ = o.GetDiscriminatorOk() + return ret +} + +// GetDiscriminatorOk returns a tuple with the Discriminator field value +// and a boolean to check if the value has been set. +func (o *StorageSpecificAttributes) GetDiscriminatorOk() (ret StorageSpecificAttributesGetDiscriminatorRetType, ok bool) { + return getStorageSpecificAttributesGetDiscriminatorAttributeTypeOk(o.Discriminator) +} + +// SetDiscriminator sets field value +func (o *StorageSpecificAttributes) SetDiscriminator(v StorageSpecificAttributesGetDiscriminatorRetType) { + setStorageSpecificAttributesGetDiscriminatorAttributeType(&o.Discriminator, v) +} + +// GetMaxIOPerSec returns the MaxIOPerSec field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *StorageSpecificAttributes) GetMaxIOPerSec() (res StorageSpecificAttributesGetMaxIOPerSecRetType) { + res, _ = o.GetMaxIOPerSecOk() + return +} + +// GetMaxIOPerSecOk returns a tuple with the MaxIOPerSec field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *StorageSpecificAttributes) GetMaxIOPerSecOk() (ret StorageSpecificAttributesGetMaxIOPerSecRetType, ok bool) { + return getStorageSpecificAttributesGetMaxIOPerSecAttributeTypeOk(o.MaxIOPerSec) +} + +// HasMaxIOPerSec returns a boolean if a field has been set. +func (o *StorageSpecificAttributes) HasMaxIOPerSec() bool { + _, ok := o.GetMaxIOPerSecOk() + return ok +} + +// SetMaxIOPerSec gets a reference to the given int64 and assigns it to the MaxIOPerSec field. +func (o *StorageSpecificAttributes) SetMaxIOPerSec(v StorageSpecificAttributesGetMaxIOPerSecRetType) { + setStorageSpecificAttributesGetMaxIOPerSecAttributeType(&o.MaxIOPerSec, v) +} + +// SetMaxIOPerSecNil sets the value for MaxIOPerSec to be an explicit nil +func (o *StorageSpecificAttributes) SetMaxIOPerSecNil() { + o.MaxIOPerSec = nil +} + +// UnsetMaxIOPerSec ensures that no value is present for MaxIOPerSec, not even an explicit nil +func (o *StorageSpecificAttributes) UnsetMaxIOPerSec() { + o.MaxIOPerSec = nil +} + +// GetMaxTroughInMB returns the MaxTroughInMB field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *StorageSpecificAttributes) GetMaxTroughInMB() (res StorageSpecificAttributesGetMaxTroughInMBRetType) { + res, _ = o.GetMaxTroughInMBOk() + return +} + +// GetMaxTroughInMBOk returns a tuple with the MaxTroughInMB field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *StorageSpecificAttributes) GetMaxTroughInMBOk() (ret StorageSpecificAttributesGetMaxTroughInMBRetType, ok bool) { + return getStorageSpecificAttributesGetMaxTroughInMBAttributeTypeOk(o.MaxTroughInMB) +} + +// HasMaxTroughInMB returns a boolean if a field has been set. +func (o *StorageSpecificAttributes) HasMaxTroughInMB() bool { + _, ok := o.GetMaxTroughInMBOk() + return ok +} + +// SetMaxTroughInMB gets a reference to the given int64 and assigns it to the MaxTroughInMB field. +func (o *StorageSpecificAttributes) SetMaxTroughInMB(v StorageSpecificAttributesGetMaxTroughInMBRetType) { + setStorageSpecificAttributesGetMaxTroughInMBAttributeType(&o.MaxTroughInMB, v) +} + +// SetMaxTroughInMBNil sets the value for MaxTroughInMB to be an explicit nil +func (o *StorageSpecificAttributes) SetMaxTroughInMBNil() { + o.MaxTroughInMB = nil +} + +// UnsetMaxTroughInMB ensures that no value is present for MaxTroughInMB, not even an explicit nil +func (o *StorageSpecificAttributes) UnsetMaxTroughInMB() { + o.MaxTroughInMB = nil +} + +// GetMetro returns the Metro field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *StorageSpecificAttributes) GetMetro() (res StorageSpecificAttributesgetMetroRetType) { + res, _ = o.GetMetroOk() + return +} + +// GetMetroOk returns a tuple with the Metro field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *StorageSpecificAttributes) GetMetroOk() (ret StorageSpecificAttributesgetMetroRetType, ok bool) { + return getStorageSpecificAttributesgetMetroAttributeTypeOk(o.Metro) +} + +// HasMetro returns a boolean if a field has been set. +func (o *StorageSpecificAttributes) HasMetro() bool { + _, ok := o.GetMetroOk() + return ok +} + +// SetMetro gets a reference to the given bool and assigns it to the Metro field. +func (o *StorageSpecificAttributes) SetMetro(v StorageSpecificAttributesgetMetroRetType) { + setStorageSpecificAttributesgetMetroAttributeType(&o.Metro, v) +} + +// SetMetroNil sets the value for Metro to be an explicit nil +func (o *StorageSpecificAttributes) SetMetroNil() { + o.Metro = nil +} + +// UnsetMetro ensures that no value is present for Metro, not even an explicit nil +func (o *StorageSpecificAttributes) UnsetMetro() { + o.Metro = nil +} + +// GetStorage returns the Storage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *StorageSpecificAttributes) GetStorage() (res StorageSpecificAttributesGetStorageRetType) { + res, _ = o.GetStorageOk() + return +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *StorageSpecificAttributes) GetStorageOk() (ret StorageSpecificAttributesGetStorageRetType, ok bool) { + return getStorageSpecificAttributesGetStorageAttributeTypeOk(o.Storage) +} + +// HasStorage returns a boolean if a field has been set. +func (o *StorageSpecificAttributes) HasStorage() bool { + _, ok := o.GetStorageOk() + return ok +} + +// SetStorage gets a reference to the given string and assigns it to the Storage field. +func (o *StorageSpecificAttributes) SetStorage(v StorageSpecificAttributesGetStorageRetType) { + setStorageSpecificAttributesGetStorageAttributeType(&o.Storage, v) +} + +// SetStorageNil sets the value for Storage to be an explicit nil +func (o *StorageSpecificAttributes) SetStorageNil() { + o.Storage = nil +} + +// UnsetStorage ensures that no value is present for Storage, not even an explicit nil +func (o *StorageSpecificAttributes) UnsetStorage() { + o.Storage = nil +} + +// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *StorageSpecificAttributes) GetType() (res StorageSpecificAttributesGetTypeRetType) { + 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. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *StorageSpecificAttributes) GetTypeOk() (ret StorageSpecificAttributesGetTypeRetType, ok bool) { + return getStorageSpecificAttributesGetTypeAttributeTypeOk(o.Type) +} + +// HasType returns a boolean if a field has been set. +func (o *StorageSpecificAttributes) HasType() bool { + _, ok := o.GetTypeOk() + return ok +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *StorageSpecificAttributes) SetType(v StorageSpecificAttributesGetTypeRetType) { + setStorageSpecificAttributesGetTypeAttributeType(&o.Type, v) +} + +// SetTypeNil sets the value for Type to be an explicit nil +func (o *StorageSpecificAttributes) SetTypeNil() { + o.Type = nil +} + +// UnsetType ensures that no value is present for Type, not even an explicit nil +func (o *StorageSpecificAttributes) UnsetType() { + o.Type = nil +} + +func (o StorageSpecificAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getStorageSpecificAttributesGetClassAttributeTypeOk(o.Class); ok { + toSerialize["Class"] = val + } + if val, ok := getStorageSpecificAttributesGetDiscriminatorAttributeTypeOk(o.Discriminator); ok { + toSerialize["Discriminator"] = val + } + if val, ok := getStorageSpecificAttributesGetMaxIOPerSecAttributeTypeOk(o.MaxIOPerSec); ok { + toSerialize["MaxIOPerSec"] = val + } + if val, ok := getStorageSpecificAttributesGetMaxTroughInMBAttributeTypeOk(o.MaxTroughInMB); ok { + toSerialize["MaxTroughInMB"] = val + } + if val, ok := getStorageSpecificAttributesgetMetroAttributeTypeOk(o.Metro); ok { + toSerialize["Metro"] = val + } + if val, ok := getStorageSpecificAttributesGetStorageAttributeTypeOk(o.Storage); ok { + toSerialize["Storage"] = val + } + if val, ok := getStorageSpecificAttributesGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableStorageSpecificAttributes struct { + value *StorageSpecificAttributes + isSet bool +} + +func (v NullableStorageSpecificAttributes) Get() *StorageSpecificAttributes { + return v.value +} + +func (v *NullableStorageSpecificAttributes) Set(val *StorageSpecificAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableStorageSpecificAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableStorageSpecificAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStorageSpecificAttributes(val *StorageSpecificAttributes) *NullableStorageSpecificAttributes { + return &NullableStorageSpecificAttributes{value: val, isSet: true} +} + +func (v NullableStorageSpecificAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStorageSpecificAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_storage_specific_attributes_test.go b/services/pim/model_storage_specific_attributes_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_storage_specific_attributes_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/model_support_specific_attributes.go b/services/pim/model_support_specific_attributes.go new file mode 100644 index 000000000..ddecd0d79 --- /dev/null +++ b/services/pim/model_support_specific_attributes.go @@ -0,0 +1,1507 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" +) + +// checks if the SupportSpecificAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SupportSpecificAttributes{} + +/* + types and functions for communicationChannel +*/ + +// isArray +type SupportSpecificAttributesGetCommunicationChannelAttributeType = *[]string +type SupportSpecificAttributesGetCommunicationChannelArgType = []string +type SupportSpecificAttributesGetCommunicationChannelRetType = []string + +func getSupportSpecificAttributesGetCommunicationChannelAttributeTypeOk(arg SupportSpecificAttributesGetCommunicationChannelAttributeType) (ret SupportSpecificAttributesGetCommunicationChannelRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSupportSpecificAttributesGetCommunicationChannelAttributeType(arg *SupportSpecificAttributesGetCommunicationChannelAttributeType, val SupportSpecificAttributesGetCommunicationChannelRetType) { + *arg = &val +} + +/* + types and functions for contractNoticePeriodInDays +*/ + +// isLong +type SupportSpecificAttributesGetContractNoticePeriodInDaysAttributeType = *int64 +type SupportSpecificAttributesGetContractNoticePeriodInDaysArgType = *int64 +type SupportSpecificAttributesGetContractNoticePeriodInDaysRetType = *int64 + +func getSupportSpecificAttributesGetContractNoticePeriodInDaysAttributeTypeOk(arg SupportSpecificAttributesGetContractNoticePeriodInDaysAttributeType) (ret SupportSpecificAttributesGetContractNoticePeriodInDaysRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSupportSpecificAttributesGetContractNoticePeriodInDaysAttributeType(arg *SupportSpecificAttributesGetContractNoticePeriodInDaysAttributeType, val SupportSpecificAttributesGetContractNoticePeriodInDaysRetType) { + *arg = val +} + +/* + types and functions for discriminator +*/ + +// isNotNullableString +type SupportSpecificAttributesGetDiscriminatorAttributeType = *string + +func getSupportSpecificAttributesGetDiscriminatorAttributeTypeOk(arg SupportSpecificAttributesGetDiscriminatorAttributeType) (ret SupportSpecificAttributesGetDiscriminatorRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setSupportSpecificAttributesGetDiscriminatorAttributeType(arg *SupportSpecificAttributesGetDiscriminatorAttributeType, val SupportSpecificAttributesGetDiscriminatorRetType) { + *arg = &val +} + +type SupportSpecificAttributesGetDiscriminatorArgType = string +type SupportSpecificAttributesGetDiscriminatorRetType = string + +/* + types and functions for escalationAvailabilityBCINC +*/ + +// isNullableString +type SupportSpecificAttributesGetEscalationAvailabilityBCINCAttributeType = *NullableString + +func getSupportSpecificAttributesGetEscalationAvailabilityBCINCAttributeTypeOk(arg SupportSpecificAttributesGetEscalationAvailabilityBCINCAttributeType) (ret SupportSpecificAttributesGetEscalationAvailabilityBCINCRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSupportSpecificAttributesGetEscalationAvailabilityBCINCAttributeType(arg *SupportSpecificAttributesGetEscalationAvailabilityBCINCAttributeType, val SupportSpecificAttributesGetEscalationAvailabilityBCINCRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SupportSpecificAttributesGetEscalationAvailabilityBCINCArgType = *string +type SupportSpecificAttributesGetEscalationAvailabilityBCINCRetType = *string + +/* + types and functions for escalationAvailabilityINC +*/ + +// isNullableString +type SupportSpecificAttributesGetEscalationAvailabilityINCAttributeType = *NullableString + +func getSupportSpecificAttributesGetEscalationAvailabilityINCAttributeTypeOk(arg SupportSpecificAttributesGetEscalationAvailabilityINCAttributeType) (ret SupportSpecificAttributesGetEscalationAvailabilityINCRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSupportSpecificAttributesGetEscalationAvailabilityINCAttributeType(arg *SupportSpecificAttributesGetEscalationAvailabilityINCAttributeType, val SupportSpecificAttributesGetEscalationAvailabilityINCRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SupportSpecificAttributesGetEscalationAvailabilityINCArgType = *string +type SupportSpecificAttributesGetEscalationAvailabilityINCRetType = *string + +/* + types and functions for escalationAvailabilitySR +*/ + +// isNullableString +type SupportSpecificAttributesGetEscalationAvailabilitySRAttributeType = *NullableString + +func getSupportSpecificAttributesGetEscalationAvailabilitySRAttributeTypeOk(arg SupportSpecificAttributesGetEscalationAvailabilitySRAttributeType) (ret SupportSpecificAttributesGetEscalationAvailabilitySRRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSupportSpecificAttributesGetEscalationAvailabilitySRAttributeType(arg *SupportSpecificAttributesGetEscalationAvailabilitySRAttributeType, val SupportSpecificAttributesGetEscalationAvailabilitySRRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SupportSpecificAttributesGetEscalationAvailabilitySRArgType = *string +type SupportSpecificAttributesGetEscalationAvailabilitySRRetType = *string + +/* + types and functions for escalationThresholdBCINCInMins +*/ + +// isLong +type SupportSpecificAttributesGetEscalationThresholdBCINCInMinsAttributeType = *int64 +type SupportSpecificAttributesGetEscalationThresholdBCINCInMinsArgType = *int64 +type SupportSpecificAttributesGetEscalationThresholdBCINCInMinsRetType = *int64 + +func getSupportSpecificAttributesGetEscalationThresholdBCINCInMinsAttributeTypeOk(arg SupportSpecificAttributesGetEscalationThresholdBCINCInMinsAttributeType) (ret SupportSpecificAttributesGetEscalationThresholdBCINCInMinsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSupportSpecificAttributesGetEscalationThresholdBCINCInMinsAttributeType(arg *SupportSpecificAttributesGetEscalationThresholdBCINCInMinsAttributeType, val SupportSpecificAttributesGetEscalationThresholdBCINCInMinsRetType) { + *arg = val +} + +/* + types and functions for escalationThresholdINCInMins +*/ + +// isLong +type SupportSpecificAttributesGetEscalationThresholdINCInMinsAttributeType = *int64 +type SupportSpecificAttributesGetEscalationThresholdINCInMinsArgType = *int64 +type SupportSpecificAttributesGetEscalationThresholdINCInMinsRetType = *int64 + +func getSupportSpecificAttributesGetEscalationThresholdINCInMinsAttributeTypeOk(arg SupportSpecificAttributesGetEscalationThresholdINCInMinsAttributeType) (ret SupportSpecificAttributesGetEscalationThresholdINCInMinsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSupportSpecificAttributesGetEscalationThresholdINCInMinsAttributeType(arg *SupportSpecificAttributesGetEscalationThresholdINCInMinsAttributeType, val SupportSpecificAttributesGetEscalationThresholdINCInMinsRetType) { + *arg = val +} + +/* + types and functions for escalationThresholdSRInMins +*/ + +// isLong +type SupportSpecificAttributesGetEscalationThresholdSRInMinsAttributeType = *int64 +type SupportSpecificAttributesGetEscalationThresholdSRInMinsArgType = *int64 +type SupportSpecificAttributesGetEscalationThresholdSRInMinsRetType = *int64 + +func getSupportSpecificAttributesGetEscalationThresholdSRInMinsAttributeTypeOk(arg SupportSpecificAttributesGetEscalationThresholdSRInMinsAttributeType) (ret SupportSpecificAttributesGetEscalationThresholdSRInMinsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSupportSpecificAttributesGetEscalationThresholdSRInMinsAttributeType(arg *SupportSpecificAttributesGetEscalationThresholdSRInMinsAttributeType, val SupportSpecificAttributesGetEscalationThresholdSRInMinsRetType) { + *arg = val +} + +/* + types and functions for finPenaltySLAVio80Pct +*/ + +// isLong +type SupportSpecificAttributesGetFinPenaltySLAVio80PctAttributeType = *int64 +type SupportSpecificAttributesGetFinPenaltySLAVio80PctArgType = *int64 +type SupportSpecificAttributesGetFinPenaltySLAVio80PctRetType = *int64 + +func getSupportSpecificAttributesGetFinPenaltySLAVio80PctAttributeTypeOk(arg SupportSpecificAttributesGetFinPenaltySLAVio80PctAttributeType) (ret SupportSpecificAttributesGetFinPenaltySLAVio80PctRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSupportSpecificAttributesGetFinPenaltySLAVio80PctAttributeType(arg *SupportSpecificAttributesGetFinPenaltySLAVio80PctAttributeType, val SupportSpecificAttributesGetFinPenaltySLAVio80PctRetType) { + *arg = val +} + +/* + types and functions for finPenaltySLAVio90-80Pct +*/ + +// isLong +type SupportSpecificAttributesGetFinPenaltySLAVio9080PctAttributeType = *int64 +type SupportSpecificAttributesGetFinPenaltySLAVio9080PctArgType = *int64 +type SupportSpecificAttributesGetFinPenaltySLAVio9080PctRetType = *int64 + +func getSupportSpecificAttributesGetFinPenaltySLAVio9080PctAttributeTypeOk(arg SupportSpecificAttributesGetFinPenaltySLAVio9080PctAttributeType) (ret SupportSpecificAttributesGetFinPenaltySLAVio9080PctRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSupportSpecificAttributesGetFinPenaltySLAVio9080PctAttributeType(arg *SupportSpecificAttributesGetFinPenaltySLAVio9080PctAttributeType, val SupportSpecificAttributesGetFinPenaltySLAVio9080PctRetType) { + *arg = val +} + +/* + types and functions for initialRuntimeInMonths +*/ + +// isLong +type SupportSpecificAttributesGetInitialRuntimeInMonthsAttributeType = *int64 +type SupportSpecificAttributesGetInitialRuntimeInMonthsArgType = *int64 +type SupportSpecificAttributesGetInitialRuntimeInMonthsRetType = *int64 + +func getSupportSpecificAttributesGetInitialRuntimeInMonthsAttributeTypeOk(arg SupportSpecificAttributesGetInitialRuntimeInMonthsAttributeType) (ret SupportSpecificAttributesGetInitialRuntimeInMonthsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSupportSpecificAttributesGetInitialRuntimeInMonthsAttributeType(arg *SupportSpecificAttributesGetInitialRuntimeInMonthsAttributeType, val SupportSpecificAttributesGetInitialRuntimeInMonthsRetType) { + *arg = val +} + +/* + types and functions for leadTimeInWorkDays +*/ + +// isLong +type SupportSpecificAttributesGetLeadTimeInWorkDaysAttributeType = *int64 +type SupportSpecificAttributesGetLeadTimeInWorkDaysArgType = *int64 +type SupportSpecificAttributesGetLeadTimeInWorkDaysRetType = *int64 + +func getSupportSpecificAttributesGetLeadTimeInWorkDaysAttributeTypeOk(arg SupportSpecificAttributesGetLeadTimeInWorkDaysAttributeType) (ret SupportSpecificAttributesGetLeadTimeInWorkDaysRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSupportSpecificAttributesGetLeadTimeInWorkDaysAttributeType(arg *SupportSpecificAttributesGetLeadTimeInWorkDaysAttributeType, val SupportSpecificAttributesGetLeadTimeInWorkDaysRetType) { + *arg = val +} + +/* + types and functions for location +*/ + +// isNullableString +type SupportSpecificAttributesGetLocationAttributeType = *NullableString + +func getSupportSpecificAttributesGetLocationAttributeTypeOk(arg SupportSpecificAttributesGetLocationAttributeType) (ret SupportSpecificAttributesGetLocationRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSupportSpecificAttributesGetLocationAttributeType(arg *SupportSpecificAttributesGetLocationAttributeType, val SupportSpecificAttributesGetLocationRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SupportSpecificAttributesGetLocationArgType = *string +type SupportSpecificAttributesGetLocationRetType = *string + +/* + types and functions for projectNoticePeriodInWorkDays +*/ + +// isLong +type SupportSpecificAttributesGetProjectNoticePeriodInWorkDaysAttributeType = *int64 +type SupportSpecificAttributesGetProjectNoticePeriodInWorkDaysArgType = *int64 +type SupportSpecificAttributesGetProjectNoticePeriodInWorkDaysRetType = *int64 + +func getSupportSpecificAttributesGetProjectNoticePeriodInWorkDaysAttributeTypeOk(arg SupportSpecificAttributesGetProjectNoticePeriodInWorkDaysAttributeType) (ret SupportSpecificAttributesGetProjectNoticePeriodInWorkDaysRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSupportSpecificAttributesGetProjectNoticePeriodInWorkDaysAttributeType(arg *SupportSpecificAttributesGetProjectNoticePeriodInWorkDaysAttributeType, val SupportSpecificAttributesGetProjectNoticePeriodInWorkDaysRetType) { + *arg = val +} + +/* + types and functions for reactionTimeInMins +*/ + +// isLong +type SupportSpecificAttributesGetReactionTimeInMinsAttributeType = *int64 +type SupportSpecificAttributesGetReactionTimeInMinsArgType = *int64 +type SupportSpecificAttributesGetReactionTimeInMinsRetType = *int64 + +func getSupportSpecificAttributesGetReactionTimeInMinsAttributeTypeOk(arg SupportSpecificAttributesGetReactionTimeInMinsAttributeType) (ret SupportSpecificAttributesGetReactionTimeInMinsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSupportSpecificAttributesGetReactionTimeInMinsAttributeType(arg *SupportSpecificAttributesGetReactionTimeInMinsAttributeType, val SupportSpecificAttributesGetReactionTimeInMinsRetType) { + *arg = val +} + +/* + types and functions for repeatedRuntimeInMonths +*/ + +// isLong +type SupportSpecificAttributesGetRepeatedRuntimeInMonthsAttributeType = *int64 +type SupportSpecificAttributesGetRepeatedRuntimeInMonthsArgType = *int64 +type SupportSpecificAttributesGetRepeatedRuntimeInMonthsRetType = *int64 + +func getSupportSpecificAttributesGetRepeatedRuntimeInMonthsAttributeTypeOk(arg SupportSpecificAttributesGetRepeatedRuntimeInMonthsAttributeType) (ret SupportSpecificAttributesGetRepeatedRuntimeInMonthsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSupportSpecificAttributesGetRepeatedRuntimeInMonthsAttributeType(arg *SupportSpecificAttributesGetRepeatedRuntimeInMonthsAttributeType, val SupportSpecificAttributesGetRepeatedRuntimeInMonthsRetType) { + *arg = val +} + +/* + types and functions for responseTimeBCINCInMins +*/ + +// isLong +type SupportSpecificAttributesGetResponseTimeBCINCInMinsAttributeType = *int64 +type SupportSpecificAttributesGetResponseTimeBCINCInMinsArgType = *int64 +type SupportSpecificAttributesGetResponseTimeBCINCInMinsRetType = *int64 + +func getSupportSpecificAttributesGetResponseTimeBCINCInMinsAttributeTypeOk(arg SupportSpecificAttributesGetResponseTimeBCINCInMinsAttributeType) (ret SupportSpecificAttributesGetResponseTimeBCINCInMinsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSupportSpecificAttributesGetResponseTimeBCINCInMinsAttributeType(arg *SupportSpecificAttributesGetResponseTimeBCINCInMinsAttributeType, val SupportSpecificAttributesGetResponseTimeBCINCInMinsRetType) { + *arg = val +} + +/* + types and functions for responseTimeINCInMins +*/ + +// isLong +type SupportSpecificAttributesGetResponseTimeINCInMinsAttributeType = *int64 +type SupportSpecificAttributesGetResponseTimeINCInMinsArgType = *int64 +type SupportSpecificAttributesGetResponseTimeINCInMinsRetType = *int64 + +func getSupportSpecificAttributesGetResponseTimeINCInMinsAttributeTypeOk(arg SupportSpecificAttributesGetResponseTimeINCInMinsAttributeType) (ret SupportSpecificAttributesGetResponseTimeINCInMinsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSupportSpecificAttributesGetResponseTimeINCInMinsAttributeType(arg *SupportSpecificAttributesGetResponseTimeINCInMinsAttributeType, val SupportSpecificAttributesGetResponseTimeINCInMinsRetType) { + *arg = val +} + +/* + types and functions for responseTimeSRInMins +*/ + +// isLong +type SupportSpecificAttributesGetResponseTimeSRInMinsAttributeType = *int64 +type SupportSpecificAttributesGetResponseTimeSRInMinsArgType = *int64 +type SupportSpecificAttributesGetResponseTimeSRInMinsRetType = *int64 + +func getSupportSpecificAttributesGetResponseTimeSRInMinsAttributeTypeOk(arg SupportSpecificAttributesGetResponseTimeSRInMinsAttributeType) (ret SupportSpecificAttributesGetResponseTimeSRInMinsRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSupportSpecificAttributesGetResponseTimeSRInMinsAttributeType(arg *SupportSpecificAttributesGetResponseTimeSRInMinsAttributeType, val SupportSpecificAttributesGetResponseTimeSRInMinsRetType) { + *arg = val +} + +/* + types and functions for serviceHoursBCINC +*/ + +// isNullableString +type SupportSpecificAttributesGetServiceHoursBCINCAttributeType = *NullableString + +func getSupportSpecificAttributesGetServiceHoursBCINCAttributeTypeOk(arg SupportSpecificAttributesGetServiceHoursBCINCAttributeType) (ret SupportSpecificAttributesGetServiceHoursBCINCRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSupportSpecificAttributesGetServiceHoursBCINCAttributeType(arg *SupportSpecificAttributesGetServiceHoursBCINCAttributeType, val SupportSpecificAttributesGetServiceHoursBCINCRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SupportSpecificAttributesGetServiceHoursBCINCArgType = *string +type SupportSpecificAttributesGetServiceHoursBCINCRetType = *string + +/* + types and functions for serviceHoursINC +*/ + +// isNullableString +type SupportSpecificAttributesGetServiceHoursINCAttributeType = *NullableString + +func getSupportSpecificAttributesGetServiceHoursINCAttributeTypeOk(arg SupportSpecificAttributesGetServiceHoursINCAttributeType) (ret SupportSpecificAttributesGetServiceHoursINCRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSupportSpecificAttributesGetServiceHoursINCAttributeType(arg *SupportSpecificAttributesGetServiceHoursINCAttributeType, val SupportSpecificAttributesGetServiceHoursINCRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SupportSpecificAttributesGetServiceHoursINCArgType = *string +type SupportSpecificAttributesGetServiceHoursINCRetType = *string + +/* + types and functions for serviceHoursSR +*/ + +// isNullableString +type SupportSpecificAttributesGetServiceHoursSRAttributeType = *NullableString + +func getSupportSpecificAttributesGetServiceHoursSRAttributeTypeOk(arg SupportSpecificAttributesGetServiceHoursSRAttributeType) (ret SupportSpecificAttributesGetServiceHoursSRRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg.Get(), true +} + +func setSupportSpecificAttributesGetServiceHoursSRAttributeType(arg *SupportSpecificAttributesGetServiceHoursSRAttributeType, val SupportSpecificAttributesGetServiceHoursSRRetType) { + if IsNil(*arg) { + *arg = NewNullableString(val) + } else { + (*arg).Set(val) + } +} + +type SupportSpecificAttributesGetServiceHoursSRArgType = *string +type SupportSpecificAttributesGetServiceHoursSRRetType = *string + +/* + types and functions for slaGoalInPercentage +*/ + +// isLong +type SupportSpecificAttributesGetSlaGoalInPercentageAttributeType = *int64 +type SupportSpecificAttributesGetSlaGoalInPercentageArgType = *int64 +type SupportSpecificAttributesGetSlaGoalInPercentageRetType = *int64 + +func getSupportSpecificAttributesGetSlaGoalInPercentageAttributeTypeOk(arg SupportSpecificAttributesGetSlaGoalInPercentageAttributeType) (ret SupportSpecificAttributesGetSlaGoalInPercentageRetType, ok bool) { + if arg == nil { + return nil, false + } + return arg, true +} + +func setSupportSpecificAttributesGetSlaGoalInPercentageAttributeType(arg *SupportSpecificAttributesGetSlaGoalInPercentageAttributeType, val SupportSpecificAttributesGetSlaGoalInPercentageRetType) { + *arg = val +} + +// SupportSpecificAttributes struct for SupportSpecificAttributes +type SupportSpecificAttributes struct { + // Communication Channel + CommunicationChannel SupportSpecificAttributesGetCommunicationChannelAttributeType `json:"communicationChannel,omitempty"` + // Contract notice period in days + ContractNoticePeriodInDays SupportSpecificAttributesGetContractNoticePeriodInDaysAttributeType `json:"contractNoticePeriodInDays,omitempty"` + // REQUIRED + Discriminator SupportSpecificAttributesGetDiscriminatorAttributeType `json:"discriminator" required:"true"` + // Escalation availability BC INC + EscalationAvailabilityBCINC SupportSpecificAttributesGetEscalationAvailabilityBCINCAttributeType `json:"escalationAvailabilityBCINC,omitempty"` + // Escalation availability INC + EscalationAvailabilityINC SupportSpecificAttributesGetEscalationAvailabilityINCAttributeType `json:"escalationAvailabilityINC,omitempty"` + // Escalation availability for Service Requests + EscalationAvailabilitySR SupportSpecificAttributesGetEscalationAvailabilitySRAttributeType `json:"escalationAvailabilitySR,omitempty"` + // Escalation threshold BC INC (in minutes) + EscalationThresholdBCINCInMins SupportSpecificAttributesGetEscalationThresholdBCINCInMinsAttributeType `json:"escalationThresholdBCINCInMins,omitempty"` + // Escalation threshold INC (in minutes) + EscalationThresholdINCInMins SupportSpecificAttributesGetEscalationThresholdINCInMinsAttributeType `json:"escalationThresholdINCInMins,omitempty"` + // Escalation threshold for Service Requests + EscalationThresholdSRInMins SupportSpecificAttributesGetEscalationThresholdSRInMinsAttributeType `json:"escalationThresholdSRInMins,omitempty"` + // Financial Penalty for SLA Violation <80 (in %) + FinPenaltySLAVio80Pct SupportSpecificAttributesGetFinPenaltySLAVio80PctAttributeType `json:"finPenaltySLAVio80Pct,omitempty"` + // Financial Penalty for SLA Violation <90 - 80 (in %) + FinPenaltySLAVio9080Pct SupportSpecificAttributesGetFinPenaltySLAVio9080PctAttributeType `json:"finPenaltySLAVio90-80Pct,omitempty"` + // Initial runtime in months + InitialRuntimeInMonths SupportSpecificAttributesGetInitialRuntimeInMonthsAttributeType `json:"initialRuntimeInMonths,omitempty"` + // Lead time in workdays + LeadTimeInWorkDays SupportSpecificAttributesGetLeadTimeInWorkDaysAttributeType `json:"leadTimeInWorkDays,omitempty"` + // Location + Location SupportSpecificAttributesGetLocationAttributeType `json:"location,omitempty"` + // Project notice period in workdays + ProjectNoticePeriodInWorkDays SupportSpecificAttributesGetProjectNoticePeriodInWorkDaysAttributeType `json:"projectNoticePeriodInWorkDays,omitempty"` + // Reaction time (in minutes) + ReactionTimeInMins SupportSpecificAttributesGetReactionTimeInMinsAttributeType `json:"reactionTimeInMins,omitempty"` + // Repeated runtime in months + RepeatedRuntimeInMonths SupportSpecificAttributesGetRepeatedRuntimeInMonthsAttributeType `json:"repeatedRuntimeInMonths,omitempty"` + // Response time BC INC (in minutes) + ResponseTimeBCINCInMins SupportSpecificAttributesGetResponseTimeBCINCInMinsAttributeType `json:"responseTimeBCINCInMins,omitempty"` + // Response time INC (in minutes) + ResponseTimeINCInMins SupportSpecificAttributesGetResponseTimeINCInMinsAttributeType `json:"responseTimeINCInMins,omitempty"` + // Response time (in minutes) for Service Requests + ResponseTimeSRInMins SupportSpecificAttributesGetResponseTimeSRInMinsAttributeType `json:"responseTimeSRInMins,omitempty"` + // Service hours BC INC + ServiceHoursBCINC SupportSpecificAttributesGetServiceHoursBCINCAttributeType `json:"serviceHoursBCINC,omitempty"` + // Service hours INC + ServiceHoursINC SupportSpecificAttributesGetServiceHoursINCAttributeType `json:"serviceHoursINC,omitempty"` + // Service hours for Service Requests + ServiceHoursSR SupportSpecificAttributesGetServiceHoursSRAttributeType `json:"serviceHoursSR,omitempty"` + // SLA goal in percentage + SlaGoalInPercentage SupportSpecificAttributesGetSlaGoalInPercentageAttributeType `json:"slaGoalInPercentage,omitempty"` +} + +type _SupportSpecificAttributes SupportSpecificAttributes + +// NewSupportSpecificAttributes instantiates a new SupportSpecificAttributes 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 NewSupportSpecificAttributes(discriminator SupportSpecificAttributesGetDiscriminatorArgType) *SupportSpecificAttributes { + this := SupportSpecificAttributes{} + setSupportSpecificAttributesGetDiscriminatorAttributeType(&this.Discriminator, discriminator) + return &this +} + +// NewSupportSpecificAttributesWithDefaults instantiates a new SupportSpecificAttributes 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 NewSupportSpecificAttributesWithDefaults() *SupportSpecificAttributes { + this := SupportSpecificAttributes{} + return &this +} + +// GetCommunicationChannel returns the CommunicationChannel field value if set, zero value otherwise. +func (o *SupportSpecificAttributes) GetCommunicationChannel() (res SupportSpecificAttributesGetCommunicationChannelRetType) { + res, _ = o.GetCommunicationChannelOk() + return +} + +// GetCommunicationChannelOk returns a tuple with the CommunicationChannel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SupportSpecificAttributes) GetCommunicationChannelOk() (ret SupportSpecificAttributesGetCommunicationChannelRetType, ok bool) { + return getSupportSpecificAttributesGetCommunicationChannelAttributeTypeOk(o.CommunicationChannel) +} + +// HasCommunicationChannel returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasCommunicationChannel() bool { + _, ok := o.GetCommunicationChannelOk() + return ok +} + +// SetCommunicationChannel gets a reference to the given []string and assigns it to the CommunicationChannel field. +func (o *SupportSpecificAttributes) SetCommunicationChannel(v SupportSpecificAttributesGetCommunicationChannelRetType) { + setSupportSpecificAttributesGetCommunicationChannelAttributeType(&o.CommunicationChannel, v) +} + +// GetContractNoticePeriodInDays returns the ContractNoticePeriodInDays field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetContractNoticePeriodInDays() (res SupportSpecificAttributesGetContractNoticePeriodInDaysRetType) { + res, _ = o.GetContractNoticePeriodInDaysOk() + return +} + +// GetContractNoticePeriodInDaysOk returns a tuple with the ContractNoticePeriodInDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetContractNoticePeriodInDaysOk() (ret SupportSpecificAttributesGetContractNoticePeriodInDaysRetType, ok bool) { + return getSupportSpecificAttributesGetContractNoticePeriodInDaysAttributeTypeOk(o.ContractNoticePeriodInDays) +} + +// HasContractNoticePeriodInDays returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasContractNoticePeriodInDays() bool { + _, ok := o.GetContractNoticePeriodInDaysOk() + return ok +} + +// SetContractNoticePeriodInDays gets a reference to the given int64 and assigns it to the ContractNoticePeriodInDays field. +func (o *SupportSpecificAttributes) SetContractNoticePeriodInDays(v SupportSpecificAttributesGetContractNoticePeriodInDaysRetType) { + setSupportSpecificAttributesGetContractNoticePeriodInDaysAttributeType(&o.ContractNoticePeriodInDays, v) +} + +// SetContractNoticePeriodInDaysNil sets the value for ContractNoticePeriodInDays to be an explicit nil +func (o *SupportSpecificAttributes) SetContractNoticePeriodInDaysNil() { + o.ContractNoticePeriodInDays = nil +} + +// UnsetContractNoticePeriodInDays ensures that no value is present for ContractNoticePeriodInDays, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetContractNoticePeriodInDays() { + o.ContractNoticePeriodInDays = nil +} + +// GetDiscriminator returns the Discriminator field value +func (o *SupportSpecificAttributes) GetDiscriminator() (ret SupportSpecificAttributesGetDiscriminatorRetType) { + ret, _ = o.GetDiscriminatorOk() + return ret +} + +// GetDiscriminatorOk returns a tuple with the Discriminator field value +// and a boolean to check if the value has been set. +func (o *SupportSpecificAttributes) GetDiscriminatorOk() (ret SupportSpecificAttributesGetDiscriminatorRetType, ok bool) { + return getSupportSpecificAttributesGetDiscriminatorAttributeTypeOk(o.Discriminator) +} + +// SetDiscriminator sets field value +func (o *SupportSpecificAttributes) SetDiscriminator(v SupportSpecificAttributesGetDiscriminatorRetType) { + setSupportSpecificAttributesGetDiscriminatorAttributeType(&o.Discriminator, v) +} + +// GetEscalationAvailabilityBCINC returns the EscalationAvailabilityBCINC field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetEscalationAvailabilityBCINC() (res SupportSpecificAttributesGetEscalationAvailabilityBCINCRetType) { + res, _ = o.GetEscalationAvailabilityBCINCOk() + return +} + +// GetEscalationAvailabilityBCINCOk returns a tuple with the EscalationAvailabilityBCINC field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetEscalationAvailabilityBCINCOk() (ret SupportSpecificAttributesGetEscalationAvailabilityBCINCRetType, ok bool) { + return getSupportSpecificAttributesGetEscalationAvailabilityBCINCAttributeTypeOk(o.EscalationAvailabilityBCINC) +} + +// HasEscalationAvailabilityBCINC returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasEscalationAvailabilityBCINC() bool { + _, ok := o.GetEscalationAvailabilityBCINCOk() + return ok +} + +// SetEscalationAvailabilityBCINC gets a reference to the given string and assigns it to the EscalationAvailabilityBCINC field. +func (o *SupportSpecificAttributes) SetEscalationAvailabilityBCINC(v SupportSpecificAttributesGetEscalationAvailabilityBCINCRetType) { + setSupportSpecificAttributesGetEscalationAvailabilityBCINCAttributeType(&o.EscalationAvailabilityBCINC, v) +} + +// SetEscalationAvailabilityBCINCNil sets the value for EscalationAvailabilityBCINC to be an explicit nil +func (o *SupportSpecificAttributes) SetEscalationAvailabilityBCINCNil() { + o.EscalationAvailabilityBCINC = nil +} + +// UnsetEscalationAvailabilityBCINC ensures that no value is present for EscalationAvailabilityBCINC, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetEscalationAvailabilityBCINC() { + o.EscalationAvailabilityBCINC = nil +} + +// GetEscalationAvailabilityINC returns the EscalationAvailabilityINC field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetEscalationAvailabilityINC() (res SupportSpecificAttributesGetEscalationAvailabilityINCRetType) { + res, _ = o.GetEscalationAvailabilityINCOk() + return +} + +// GetEscalationAvailabilityINCOk returns a tuple with the EscalationAvailabilityINC field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetEscalationAvailabilityINCOk() (ret SupportSpecificAttributesGetEscalationAvailabilityINCRetType, ok bool) { + return getSupportSpecificAttributesGetEscalationAvailabilityINCAttributeTypeOk(o.EscalationAvailabilityINC) +} + +// HasEscalationAvailabilityINC returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasEscalationAvailabilityINC() bool { + _, ok := o.GetEscalationAvailabilityINCOk() + return ok +} + +// SetEscalationAvailabilityINC gets a reference to the given string and assigns it to the EscalationAvailabilityINC field. +func (o *SupportSpecificAttributes) SetEscalationAvailabilityINC(v SupportSpecificAttributesGetEscalationAvailabilityINCRetType) { + setSupportSpecificAttributesGetEscalationAvailabilityINCAttributeType(&o.EscalationAvailabilityINC, v) +} + +// SetEscalationAvailabilityINCNil sets the value for EscalationAvailabilityINC to be an explicit nil +func (o *SupportSpecificAttributes) SetEscalationAvailabilityINCNil() { + o.EscalationAvailabilityINC = nil +} + +// UnsetEscalationAvailabilityINC ensures that no value is present for EscalationAvailabilityINC, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetEscalationAvailabilityINC() { + o.EscalationAvailabilityINC = nil +} + +// GetEscalationAvailabilitySR returns the EscalationAvailabilitySR field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetEscalationAvailabilitySR() (res SupportSpecificAttributesGetEscalationAvailabilitySRRetType) { + res, _ = o.GetEscalationAvailabilitySROk() + return +} + +// GetEscalationAvailabilitySROk returns a tuple with the EscalationAvailabilitySR field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetEscalationAvailabilitySROk() (ret SupportSpecificAttributesGetEscalationAvailabilitySRRetType, ok bool) { + return getSupportSpecificAttributesGetEscalationAvailabilitySRAttributeTypeOk(o.EscalationAvailabilitySR) +} + +// HasEscalationAvailabilitySR returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasEscalationAvailabilitySR() bool { + _, ok := o.GetEscalationAvailabilitySROk() + return ok +} + +// SetEscalationAvailabilitySR gets a reference to the given string and assigns it to the EscalationAvailabilitySR field. +func (o *SupportSpecificAttributes) SetEscalationAvailabilitySR(v SupportSpecificAttributesGetEscalationAvailabilitySRRetType) { + setSupportSpecificAttributesGetEscalationAvailabilitySRAttributeType(&o.EscalationAvailabilitySR, v) +} + +// SetEscalationAvailabilitySRNil sets the value for EscalationAvailabilitySR to be an explicit nil +func (o *SupportSpecificAttributes) SetEscalationAvailabilitySRNil() { + o.EscalationAvailabilitySR = nil +} + +// UnsetEscalationAvailabilitySR ensures that no value is present for EscalationAvailabilitySR, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetEscalationAvailabilitySR() { + o.EscalationAvailabilitySR = nil +} + +// GetEscalationThresholdBCINCInMins returns the EscalationThresholdBCINCInMins field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetEscalationThresholdBCINCInMins() (res SupportSpecificAttributesGetEscalationThresholdBCINCInMinsRetType) { + res, _ = o.GetEscalationThresholdBCINCInMinsOk() + return +} + +// GetEscalationThresholdBCINCInMinsOk returns a tuple with the EscalationThresholdBCINCInMins field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetEscalationThresholdBCINCInMinsOk() (ret SupportSpecificAttributesGetEscalationThresholdBCINCInMinsRetType, ok bool) { + return getSupportSpecificAttributesGetEscalationThresholdBCINCInMinsAttributeTypeOk(o.EscalationThresholdBCINCInMins) +} + +// HasEscalationThresholdBCINCInMins returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasEscalationThresholdBCINCInMins() bool { + _, ok := o.GetEscalationThresholdBCINCInMinsOk() + return ok +} + +// SetEscalationThresholdBCINCInMins gets a reference to the given int64 and assigns it to the EscalationThresholdBCINCInMins field. +func (o *SupportSpecificAttributes) SetEscalationThresholdBCINCInMins(v SupportSpecificAttributesGetEscalationThresholdBCINCInMinsRetType) { + setSupportSpecificAttributesGetEscalationThresholdBCINCInMinsAttributeType(&o.EscalationThresholdBCINCInMins, v) +} + +// SetEscalationThresholdBCINCInMinsNil sets the value for EscalationThresholdBCINCInMins to be an explicit nil +func (o *SupportSpecificAttributes) SetEscalationThresholdBCINCInMinsNil() { + o.EscalationThresholdBCINCInMins = nil +} + +// UnsetEscalationThresholdBCINCInMins ensures that no value is present for EscalationThresholdBCINCInMins, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetEscalationThresholdBCINCInMins() { + o.EscalationThresholdBCINCInMins = nil +} + +// GetEscalationThresholdINCInMins returns the EscalationThresholdINCInMins field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetEscalationThresholdINCInMins() (res SupportSpecificAttributesGetEscalationThresholdINCInMinsRetType) { + res, _ = o.GetEscalationThresholdINCInMinsOk() + return +} + +// GetEscalationThresholdINCInMinsOk returns a tuple with the EscalationThresholdINCInMins field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetEscalationThresholdINCInMinsOk() (ret SupportSpecificAttributesGetEscalationThresholdINCInMinsRetType, ok bool) { + return getSupportSpecificAttributesGetEscalationThresholdINCInMinsAttributeTypeOk(o.EscalationThresholdINCInMins) +} + +// HasEscalationThresholdINCInMins returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasEscalationThresholdINCInMins() bool { + _, ok := o.GetEscalationThresholdINCInMinsOk() + return ok +} + +// SetEscalationThresholdINCInMins gets a reference to the given int64 and assigns it to the EscalationThresholdINCInMins field. +func (o *SupportSpecificAttributes) SetEscalationThresholdINCInMins(v SupportSpecificAttributesGetEscalationThresholdINCInMinsRetType) { + setSupportSpecificAttributesGetEscalationThresholdINCInMinsAttributeType(&o.EscalationThresholdINCInMins, v) +} + +// SetEscalationThresholdINCInMinsNil sets the value for EscalationThresholdINCInMins to be an explicit nil +func (o *SupportSpecificAttributes) SetEscalationThresholdINCInMinsNil() { + o.EscalationThresholdINCInMins = nil +} + +// UnsetEscalationThresholdINCInMins ensures that no value is present for EscalationThresholdINCInMins, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetEscalationThresholdINCInMins() { + o.EscalationThresholdINCInMins = nil +} + +// GetEscalationThresholdSRInMins returns the EscalationThresholdSRInMins field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetEscalationThresholdSRInMins() (res SupportSpecificAttributesGetEscalationThresholdSRInMinsRetType) { + res, _ = o.GetEscalationThresholdSRInMinsOk() + return +} + +// GetEscalationThresholdSRInMinsOk returns a tuple with the EscalationThresholdSRInMins field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetEscalationThresholdSRInMinsOk() (ret SupportSpecificAttributesGetEscalationThresholdSRInMinsRetType, ok bool) { + return getSupportSpecificAttributesGetEscalationThresholdSRInMinsAttributeTypeOk(o.EscalationThresholdSRInMins) +} + +// HasEscalationThresholdSRInMins returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasEscalationThresholdSRInMins() bool { + _, ok := o.GetEscalationThresholdSRInMinsOk() + return ok +} + +// SetEscalationThresholdSRInMins gets a reference to the given int64 and assigns it to the EscalationThresholdSRInMins field. +func (o *SupportSpecificAttributes) SetEscalationThresholdSRInMins(v SupportSpecificAttributesGetEscalationThresholdSRInMinsRetType) { + setSupportSpecificAttributesGetEscalationThresholdSRInMinsAttributeType(&o.EscalationThresholdSRInMins, v) +} + +// SetEscalationThresholdSRInMinsNil sets the value for EscalationThresholdSRInMins to be an explicit nil +func (o *SupportSpecificAttributes) SetEscalationThresholdSRInMinsNil() { + o.EscalationThresholdSRInMins = nil +} + +// UnsetEscalationThresholdSRInMins ensures that no value is present for EscalationThresholdSRInMins, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetEscalationThresholdSRInMins() { + o.EscalationThresholdSRInMins = nil +} + +// GetFinPenaltySLAVio80Pct returns the FinPenaltySLAVio80Pct field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetFinPenaltySLAVio80Pct() (res SupportSpecificAttributesGetFinPenaltySLAVio80PctRetType) { + res, _ = o.GetFinPenaltySLAVio80PctOk() + return +} + +// GetFinPenaltySLAVio80PctOk returns a tuple with the FinPenaltySLAVio80Pct field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetFinPenaltySLAVio80PctOk() (ret SupportSpecificAttributesGetFinPenaltySLAVio80PctRetType, ok bool) { + return getSupportSpecificAttributesGetFinPenaltySLAVio80PctAttributeTypeOk(o.FinPenaltySLAVio80Pct) +} + +// HasFinPenaltySLAVio80Pct returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasFinPenaltySLAVio80Pct() bool { + _, ok := o.GetFinPenaltySLAVio80PctOk() + return ok +} + +// SetFinPenaltySLAVio80Pct gets a reference to the given int64 and assigns it to the FinPenaltySLAVio80Pct field. +func (o *SupportSpecificAttributes) SetFinPenaltySLAVio80Pct(v SupportSpecificAttributesGetFinPenaltySLAVio80PctRetType) { + setSupportSpecificAttributesGetFinPenaltySLAVio80PctAttributeType(&o.FinPenaltySLAVio80Pct, v) +} + +// SetFinPenaltySLAVio80PctNil sets the value for FinPenaltySLAVio80Pct to be an explicit nil +func (o *SupportSpecificAttributes) SetFinPenaltySLAVio80PctNil() { + o.FinPenaltySLAVio80Pct = nil +} + +// UnsetFinPenaltySLAVio80Pct ensures that no value is present for FinPenaltySLAVio80Pct, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetFinPenaltySLAVio80Pct() { + o.FinPenaltySLAVio80Pct = nil +} + +// GetFinPenaltySLAVio9080Pct returns the FinPenaltySLAVio9080Pct field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetFinPenaltySLAVio9080Pct() (res SupportSpecificAttributesGetFinPenaltySLAVio9080PctRetType) { + res, _ = o.GetFinPenaltySLAVio9080PctOk() + return +} + +// GetFinPenaltySLAVio9080PctOk returns a tuple with the FinPenaltySLAVio9080Pct field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetFinPenaltySLAVio9080PctOk() (ret SupportSpecificAttributesGetFinPenaltySLAVio9080PctRetType, ok bool) { + return getSupportSpecificAttributesGetFinPenaltySLAVio9080PctAttributeTypeOk(o.FinPenaltySLAVio9080Pct) +} + +// HasFinPenaltySLAVio9080Pct returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasFinPenaltySLAVio9080Pct() bool { + _, ok := o.GetFinPenaltySLAVio9080PctOk() + return ok +} + +// SetFinPenaltySLAVio9080Pct gets a reference to the given int64 and assigns it to the FinPenaltySLAVio9080Pct field. +func (o *SupportSpecificAttributes) SetFinPenaltySLAVio9080Pct(v SupportSpecificAttributesGetFinPenaltySLAVio9080PctRetType) { + setSupportSpecificAttributesGetFinPenaltySLAVio9080PctAttributeType(&o.FinPenaltySLAVio9080Pct, v) +} + +// SetFinPenaltySLAVio9080PctNil sets the value for FinPenaltySLAVio9080Pct to be an explicit nil +func (o *SupportSpecificAttributes) SetFinPenaltySLAVio9080PctNil() { + o.FinPenaltySLAVio9080Pct = nil +} + +// UnsetFinPenaltySLAVio9080Pct ensures that no value is present for FinPenaltySLAVio9080Pct, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetFinPenaltySLAVio9080Pct() { + o.FinPenaltySLAVio9080Pct = nil +} + +// GetInitialRuntimeInMonths returns the InitialRuntimeInMonths field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetInitialRuntimeInMonths() (res SupportSpecificAttributesGetInitialRuntimeInMonthsRetType) { + res, _ = o.GetInitialRuntimeInMonthsOk() + return +} + +// GetInitialRuntimeInMonthsOk returns a tuple with the InitialRuntimeInMonths field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetInitialRuntimeInMonthsOk() (ret SupportSpecificAttributesGetInitialRuntimeInMonthsRetType, ok bool) { + return getSupportSpecificAttributesGetInitialRuntimeInMonthsAttributeTypeOk(o.InitialRuntimeInMonths) +} + +// HasInitialRuntimeInMonths returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasInitialRuntimeInMonths() bool { + _, ok := o.GetInitialRuntimeInMonthsOk() + return ok +} + +// SetInitialRuntimeInMonths gets a reference to the given int64 and assigns it to the InitialRuntimeInMonths field. +func (o *SupportSpecificAttributes) SetInitialRuntimeInMonths(v SupportSpecificAttributesGetInitialRuntimeInMonthsRetType) { + setSupportSpecificAttributesGetInitialRuntimeInMonthsAttributeType(&o.InitialRuntimeInMonths, v) +} + +// SetInitialRuntimeInMonthsNil sets the value for InitialRuntimeInMonths to be an explicit nil +func (o *SupportSpecificAttributes) SetInitialRuntimeInMonthsNil() { + o.InitialRuntimeInMonths = nil +} + +// UnsetInitialRuntimeInMonths ensures that no value is present for InitialRuntimeInMonths, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetInitialRuntimeInMonths() { + o.InitialRuntimeInMonths = nil +} + +// GetLeadTimeInWorkDays returns the LeadTimeInWorkDays field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetLeadTimeInWorkDays() (res SupportSpecificAttributesGetLeadTimeInWorkDaysRetType) { + res, _ = o.GetLeadTimeInWorkDaysOk() + return +} + +// GetLeadTimeInWorkDaysOk returns a tuple with the LeadTimeInWorkDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetLeadTimeInWorkDaysOk() (ret SupportSpecificAttributesGetLeadTimeInWorkDaysRetType, ok bool) { + return getSupportSpecificAttributesGetLeadTimeInWorkDaysAttributeTypeOk(o.LeadTimeInWorkDays) +} + +// HasLeadTimeInWorkDays returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasLeadTimeInWorkDays() bool { + _, ok := o.GetLeadTimeInWorkDaysOk() + return ok +} + +// SetLeadTimeInWorkDays gets a reference to the given int64 and assigns it to the LeadTimeInWorkDays field. +func (o *SupportSpecificAttributes) SetLeadTimeInWorkDays(v SupportSpecificAttributesGetLeadTimeInWorkDaysRetType) { + setSupportSpecificAttributesGetLeadTimeInWorkDaysAttributeType(&o.LeadTimeInWorkDays, v) +} + +// SetLeadTimeInWorkDaysNil sets the value for LeadTimeInWorkDays to be an explicit nil +func (o *SupportSpecificAttributes) SetLeadTimeInWorkDaysNil() { + o.LeadTimeInWorkDays = nil +} + +// UnsetLeadTimeInWorkDays ensures that no value is present for LeadTimeInWorkDays, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetLeadTimeInWorkDays() { + o.LeadTimeInWorkDays = nil +} + +// GetLocation returns the Location field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetLocation() (res SupportSpecificAttributesGetLocationRetType) { + res, _ = o.GetLocationOk() + return +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetLocationOk() (ret SupportSpecificAttributesGetLocationRetType, ok bool) { + return getSupportSpecificAttributesGetLocationAttributeTypeOk(o.Location) +} + +// HasLocation returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasLocation() bool { + _, ok := o.GetLocationOk() + return ok +} + +// SetLocation gets a reference to the given string and assigns it to the Location field. +func (o *SupportSpecificAttributes) SetLocation(v SupportSpecificAttributesGetLocationRetType) { + setSupportSpecificAttributesGetLocationAttributeType(&o.Location, v) +} + +// SetLocationNil sets the value for Location to be an explicit nil +func (o *SupportSpecificAttributes) SetLocationNil() { + o.Location = nil +} + +// UnsetLocation ensures that no value is present for Location, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetLocation() { + o.Location = nil +} + +// GetProjectNoticePeriodInWorkDays returns the ProjectNoticePeriodInWorkDays field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetProjectNoticePeriodInWorkDays() (res SupportSpecificAttributesGetProjectNoticePeriodInWorkDaysRetType) { + res, _ = o.GetProjectNoticePeriodInWorkDaysOk() + return +} + +// GetProjectNoticePeriodInWorkDaysOk returns a tuple with the ProjectNoticePeriodInWorkDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetProjectNoticePeriodInWorkDaysOk() (ret SupportSpecificAttributesGetProjectNoticePeriodInWorkDaysRetType, ok bool) { + return getSupportSpecificAttributesGetProjectNoticePeriodInWorkDaysAttributeTypeOk(o.ProjectNoticePeriodInWorkDays) +} + +// HasProjectNoticePeriodInWorkDays returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasProjectNoticePeriodInWorkDays() bool { + _, ok := o.GetProjectNoticePeriodInWorkDaysOk() + return ok +} + +// SetProjectNoticePeriodInWorkDays gets a reference to the given int64 and assigns it to the ProjectNoticePeriodInWorkDays field. +func (o *SupportSpecificAttributes) SetProjectNoticePeriodInWorkDays(v SupportSpecificAttributesGetProjectNoticePeriodInWorkDaysRetType) { + setSupportSpecificAttributesGetProjectNoticePeriodInWorkDaysAttributeType(&o.ProjectNoticePeriodInWorkDays, v) +} + +// SetProjectNoticePeriodInWorkDaysNil sets the value for ProjectNoticePeriodInWorkDays to be an explicit nil +func (o *SupportSpecificAttributes) SetProjectNoticePeriodInWorkDaysNil() { + o.ProjectNoticePeriodInWorkDays = nil +} + +// UnsetProjectNoticePeriodInWorkDays ensures that no value is present for ProjectNoticePeriodInWorkDays, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetProjectNoticePeriodInWorkDays() { + o.ProjectNoticePeriodInWorkDays = nil +} + +// GetReactionTimeInMins returns the ReactionTimeInMins field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetReactionTimeInMins() (res SupportSpecificAttributesGetReactionTimeInMinsRetType) { + res, _ = o.GetReactionTimeInMinsOk() + return +} + +// GetReactionTimeInMinsOk returns a tuple with the ReactionTimeInMins field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetReactionTimeInMinsOk() (ret SupportSpecificAttributesGetReactionTimeInMinsRetType, ok bool) { + return getSupportSpecificAttributesGetReactionTimeInMinsAttributeTypeOk(o.ReactionTimeInMins) +} + +// HasReactionTimeInMins returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasReactionTimeInMins() bool { + _, ok := o.GetReactionTimeInMinsOk() + return ok +} + +// SetReactionTimeInMins gets a reference to the given int64 and assigns it to the ReactionTimeInMins field. +func (o *SupportSpecificAttributes) SetReactionTimeInMins(v SupportSpecificAttributesGetReactionTimeInMinsRetType) { + setSupportSpecificAttributesGetReactionTimeInMinsAttributeType(&o.ReactionTimeInMins, v) +} + +// SetReactionTimeInMinsNil sets the value for ReactionTimeInMins to be an explicit nil +func (o *SupportSpecificAttributes) SetReactionTimeInMinsNil() { + o.ReactionTimeInMins = nil +} + +// UnsetReactionTimeInMins ensures that no value is present for ReactionTimeInMins, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetReactionTimeInMins() { + o.ReactionTimeInMins = nil +} + +// GetRepeatedRuntimeInMonths returns the RepeatedRuntimeInMonths field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetRepeatedRuntimeInMonths() (res SupportSpecificAttributesGetRepeatedRuntimeInMonthsRetType) { + res, _ = o.GetRepeatedRuntimeInMonthsOk() + return +} + +// GetRepeatedRuntimeInMonthsOk returns a tuple with the RepeatedRuntimeInMonths field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetRepeatedRuntimeInMonthsOk() (ret SupportSpecificAttributesGetRepeatedRuntimeInMonthsRetType, ok bool) { + return getSupportSpecificAttributesGetRepeatedRuntimeInMonthsAttributeTypeOk(o.RepeatedRuntimeInMonths) +} + +// HasRepeatedRuntimeInMonths returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasRepeatedRuntimeInMonths() bool { + _, ok := o.GetRepeatedRuntimeInMonthsOk() + return ok +} + +// SetRepeatedRuntimeInMonths gets a reference to the given int64 and assigns it to the RepeatedRuntimeInMonths field. +func (o *SupportSpecificAttributes) SetRepeatedRuntimeInMonths(v SupportSpecificAttributesGetRepeatedRuntimeInMonthsRetType) { + setSupportSpecificAttributesGetRepeatedRuntimeInMonthsAttributeType(&o.RepeatedRuntimeInMonths, v) +} + +// SetRepeatedRuntimeInMonthsNil sets the value for RepeatedRuntimeInMonths to be an explicit nil +func (o *SupportSpecificAttributes) SetRepeatedRuntimeInMonthsNil() { + o.RepeatedRuntimeInMonths = nil +} + +// UnsetRepeatedRuntimeInMonths ensures that no value is present for RepeatedRuntimeInMonths, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetRepeatedRuntimeInMonths() { + o.RepeatedRuntimeInMonths = nil +} + +// GetResponseTimeBCINCInMins returns the ResponseTimeBCINCInMins field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetResponseTimeBCINCInMins() (res SupportSpecificAttributesGetResponseTimeBCINCInMinsRetType) { + res, _ = o.GetResponseTimeBCINCInMinsOk() + return +} + +// GetResponseTimeBCINCInMinsOk returns a tuple with the ResponseTimeBCINCInMins field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetResponseTimeBCINCInMinsOk() (ret SupportSpecificAttributesGetResponseTimeBCINCInMinsRetType, ok bool) { + return getSupportSpecificAttributesGetResponseTimeBCINCInMinsAttributeTypeOk(o.ResponseTimeBCINCInMins) +} + +// HasResponseTimeBCINCInMins returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasResponseTimeBCINCInMins() bool { + _, ok := o.GetResponseTimeBCINCInMinsOk() + return ok +} + +// SetResponseTimeBCINCInMins gets a reference to the given int64 and assigns it to the ResponseTimeBCINCInMins field. +func (o *SupportSpecificAttributes) SetResponseTimeBCINCInMins(v SupportSpecificAttributesGetResponseTimeBCINCInMinsRetType) { + setSupportSpecificAttributesGetResponseTimeBCINCInMinsAttributeType(&o.ResponseTimeBCINCInMins, v) +} + +// SetResponseTimeBCINCInMinsNil sets the value for ResponseTimeBCINCInMins to be an explicit nil +func (o *SupportSpecificAttributes) SetResponseTimeBCINCInMinsNil() { + o.ResponseTimeBCINCInMins = nil +} + +// UnsetResponseTimeBCINCInMins ensures that no value is present for ResponseTimeBCINCInMins, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetResponseTimeBCINCInMins() { + o.ResponseTimeBCINCInMins = nil +} + +// GetResponseTimeINCInMins returns the ResponseTimeINCInMins field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetResponseTimeINCInMins() (res SupportSpecificAttributesGetResponseTimeINCInMinsRetType) { + res, _ = o.GetResponseTimeINCInMinsOk() + return +} + +// GetResponseTimeINCInMinsOk returns a tuple with the ResponseTimeINCInMins field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetResponseTimeINCInMinsOk() (ret SupportSpecificAttributesGetResponseTimeINCInMinsRetType, ok bool) { + return getSupportSpecificAttributesGetResponseTimeINCInMinsAttributeTypeOk(o.ResponseTimeINCInMins) +} + +// HasResponseTimeINCInMins returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasResponseTimeINCInMins() bool { + _, ok := o.GetResponseTimeINCInMinsOk() + return ok +} + +// SetResponseTimeINCInMins gets a reference to the given int64 and assigns it to the ResponseTimeINCInMins field. +func (o *SupportSpecificAttributes) SetResponseTimeINCInMins(v SupportSpecificAttributesGetResponseTimeINCInMinsRetType) { + setSupportSpecificAttributesGetResponseTimeINCInMinsAttributeType(&o.ResponseTimeINCInMins, v) +} + +// SetResponseTimeINCInMinsNil sets the value for ResponseTimeINCInMins to be an explicit nil +func (o *SupportSpecificAttributes) SetResponseTimeINCInMinsNil() { + o.ResponseTimeINCInMins = nil +} + +// UnsetResponseTimeINCInMins ensures that no value is present for ResponseTimeINCInMins, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetResponseTimeINCInMins() { + o.ResponseTimeINCInMins = nil +} + +// GetResponseTimeSRInMins returns the ResponseTimeSRInMins field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetResponseTimeSRInMins() (res SupportSpecificAttributesGetResponseTimeSRInMinsRetType) { + res, _ = o.GetResponseTimeSRInMinsOk() + return +} + +// GetResponseTimeSRInMinsOk returns a tuple with the ResponseTimeSRInMins field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetResponseTimeSRInMinsOk() (ret SupportSpecificAttributesGetResponseTimeSRInMinsRetType, ok bool) { + return getSupportSpecificAttributesGetResponseTimeSRInMinsAttributeTypeOk(o.ResponseTimeSRInMins) +} + +// HasResponseTimeSRInMins returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasResponseTimeSRInMins() bool { + _, ok := o.GetResponseTimeSRInMinsOk() + return ok +} + +// SetResponseTimeSRInMins gets a reference to the given int64 and assigns it to the ResponseTimeSRInMins field. +func (o *SupportSpecificAttributes) SetResponseTimeSRInMins(v SupportSpecificAttributesGetResponseTimeSRInMinsRetType) { + setSupportSpecificAttributesGetResponseTimeSRInMinsAttributeType(&o.ResponseTimeSRInMins, v) +} + +// SetResponseTimeSRInMinsNil sets the value for ResponseTimeSRInMins to be an explicit nil +func (o *SupportSpecificAttributes) SetResponseTimeSRInMinsNil() { + o.ResponseTimeSRInMins = nil +} + +// UnsetResponseTimeSRInMins ensures that no value is present for ResponseTimeSRInMins, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetResponseTimeSRInMins() { + o.ResponseTimeSRInMins = nil +} + +// GetServiceHoursBCINC returns the ServiceHoursBCINC field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetServiceHoursBCINC() (res SupportSpecificAttributesGetServiceHoursBCINCRetType) { + res, _ = o.GetServiceHoursBCINCOk() + return +} + +// GetServiceHoursBCINCOk returns a tuple with the ServiceHoursBCINC field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetServiceHoursBCINCOk() (ret SupportSpecificAttributesGetServiceHoursBCINCRetType, ok bool) { + return getSupportSpecificAttributesGetServiceHoursBCINCAttributeTypeOk(o.ServiceHoursBCINC) +} + +// HasServiceHoursBCINC returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasServiceHoursBCINC() bool { + _, ok := o.GetServiceHoursBCINCOk() + return ok +} + +// SetServiceHoursBCINC gets a reference to the given string and assigns it to the ServiceHoursBCINC field. +func (o *SupportSpecificAttributes) SetServiceHoursBCINC(v SupportSpecificAttributesGetServiceHoursBCINCRetType) { + setSupportSpecificAttributesGetServiceHoursBCINCAttributeType(&o.ServiceHoursBCINC, v) +} + +// SetServiceHoursBCINCNil sets the value for ServiceHoursBCINC to be an explicit nil +func (o *SupportSpecificAttributes) SetServiceHoursBCINCNil() { + o.ServiceHoursBCINC = nil +} + +// UnsetServiceHoursBCINC ensures that no value is present for ServiceHoursBCINC, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetServiceHoursBCINC() { + o.ServiceHoursBCINC = nil +} + +// GetServiceHoursINC returns the ServiceHoursINC field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetServiceHoursINC() (res SupportSpecificAttributesGetServiceHoursINCRetType) { + res, _ = o.GetServiceHoursINCOk() + return +} + +// GetServiceHoursINCOk returns a tuple with the ServiceHoursINC field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetServiceHoursINCOk() (ret SupportSpecificAttributesGetServiceHoursINCRetType, ok bool) { + return getSupportSpecificAttributesGetServiceHoursINCAttributeTypeOk(o.ServiceHoursINC) +} + +// HasServiceHoursINC returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasServiceHoursINC() bool { + _, ok := o.GetServiceHoursINCOk() + return ok +} + +// SetServiceHoursINC gets a reference to the given string and assigns it to the ServiceHoursINC field. +func (o *SupportSpecificAttributes) SetServiceHoursINC(v SupportSpecificAttributesGetServiceHoursINCRetType) { + setSupportSpecificAttributesGetServiceHoursINCAttributeType(&o.ServiceHoursINC, v) +} + +// SetServiceHoursINCNil sets the value for ServiceHoursINC to be an explicit nil +func (o *SupportSpecificAttributes) SetServiceHoursINCNil() { + o.ServiceHoursINC = nil +} + +// UnsetServiceHoursINC ensures that no value is present for ServiceHoursINC, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetServiceHoursINC() { + o.ServiceHoursINC = nil +} + +// GetServiceHoursSR returns the ServiceHoursSR field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetServiceHoursSR() (res SupportSpecificAttributesGetServiceHoursSRRetType) { + res, _ = o.GetServiceHoursSROk() + return +} + +// GetServiceHoursSROk returns a tuple with the ServiceHoursSR field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetServiceHoursSROk() (ret SupportSpecificAttributesGetServiceHoursSRRetType, ok bool) { + return getSupportSpecificAttributesGetServiceHoursSRAttributeTypeOk(o.ServiceHoursSR) +} + +// HasServiceHoursSR returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasServiceHoursSR() bool { + _, ok := o.GetServiceHoursSROk() + return ok +} + +// SetServiceHoursSR gets a reference to the given string and assigns it to the ServiceHoursSR field. +func (o *SupportSpecificAttributes) SetServiceHoursSR(v SupportSpecificAttributesGetServiceHoursSRRetType) { + setSupportSpecificAttributesGetServiceHoursSRAttributeType(&o.ServiceHoursSR, v) +} + +// SetServiceHoursSRNil sets the value for ServiceHoursSR to be an explicit nil +func (o *SupportSpecificAttributes) SetServiceHoursSRNil() { + o.ServiceHoursSR = nil +} + +// UnsetServiceHoursSR ensures that no value is present for ServiceHoursSR, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetServiceHoursSR() { + o.ServiceHoursSR = nil +} + +// GetSlaGoalInPercentage returns the SlaGoalInPercentage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SupportSpecificAttributes) GetSlaGoalInPercentage() (res SupportSpecificAttributesGetSlaGoalInPercentageRetType) { + res, _ = o.GetSlaGoalInPercentageOk() + return +} + +// GetSlaGoalInPercentageOk returns a tuple with the SlaGoalInPercentage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SupportSpecificAttributes) GetSlaGoalInPercentageOk() (ret SupportSpecificAttributesGetSlaGoalInPercentageRetType, ok bool) { + return getSupportSpecificAttributesGetSlaGoalInPercentageAttributeTypeOk(o.SlaGoalInPercentage) +} + +// HasSlaGoalInPercentage returns a boolean if a field has been set. +func (o *SupportSpecificAttributes) HasSlaGoalInPercentage() bool { + _, ok := o.GetSlaGoalInPercentageOk() + return ok +} + +// SetSlaGoalInPercentage gets a reference to the given int64 and assigns it to the SlaGoalInPercentage field. +func (o *SupportSpecificAttributes) SetSlaGoalInPercentage(v SupportSpecificAttributesGetSlaGoalInPercentageRetType) { + setSupportSpecificAttributesGetSlaGoalInPercentageAttributeType(&o.SlaGoalInPercentage, v) +} + +// SetSlaGoalInPercentageNil sets the value for SlaGoalInPercentage to be an explicit nil +func (o *SupportSpecificAttributes) SetSlaGoalInPercentageNil() { + o.SlaGoalInPercentage = nil +} + +// UnsetSlaGoalInPercentage ensures that no value is present for SlaGoalInPercentage, not even an explicit nil +func (o *SupportSpecificAttributes) UnsetSlaGoalInPercentage() { + o.SlaGoalInPercentage = nil +} + +func (o SupportSpecificAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getSupportSpecificAttributesGetCommunicationChannelAttributeTypeOk(o.CommunicationChannel); ok { + toSerialize["CommunicationChannel"] = val + } + if val, ok := getSupportSpecificAttributesGetContractNoticePeriodInDaysAttributeTypeOk(o.ContractNoticePeriodInDays); ok { + toSerialize["ContractNoticePeriodInDays"] = val + } + if val, ok := getSupportSpecificAttributesGetDiscriminatorAttributeTypeOk(o.Discriminator); ok { + toSerialize["Discriminator"] = val + } + if val, ok := getSupportSpecificAttributesGetEscalationAvailabilityBCINCAttributeTypeOk(o.EscalationAvailabilityBCINC); ok { + toSerialize["EscalationAvailabilityBCINC"] = val + } + if val, ok := getSupportSpecificAttributesGetEscalationAvailabilityINCAttributeTypeOk(o.EscalationAvailabilityINC); ok { + toSerialize["EscalationAvailabilityINC"] = val + } + if val, ok := getSupportSpecificAttributesGetEscalationAvailabilitySRAttributeTypeOk(o.EscalationAvailabilitySR); ok { + toSerialize["EscalationAvailabilitySR"] = val + } + if val, ok := getSupportSpecificAttributesGetEscalationThresholdBCINCInMinsAttributeTypeOk(o.EscalationThresholdBCINCInMins); ok { + toSerialize["EscalationThresholdBCINCInMins"] = val + } + if val, ok := getSupportSpecificAttributesGetEscalationThresholdINCInMinsAttributeTypeOk(o.EscalationThresholdINCInMins); ok { + toSerialize["EscalationThresholdINCInMins"] = val + } + if val, ok := getSupportSpecificAttributesGetEscalationThresholdSRInMinsAttributeTypeOk(o.EscalationThresholdSRInMins); ok { + toSerialize["EscalationThresholdSRInMins"] = val + } + if val, ok := getSupportSpecificAttributesGetFinPenaltySLAVio80PctAttributeTypeOk(o.FinPenaltySLAVio80Pct); ok { + toSerialize["FinPenaltySLAVio80Pct"] = val + } + if val, ok := getSupportSpecificAttributesGetFinPenaltySLAVio9080PctAttributeTypeOk(o.FinPenaltySLAVio9080Pct); ok { + toSerialize["FinPenaltySLAVio9080Pct"] = val + } + if val, ok := getSupportSpecificAttributesGetInitialRuntimeInMonthsAttributeTypeOk(o.InitialRuntimeInMonths); ok { + toSerialize["InitialRuntimeInMonths"] = val + } + if val, ok := getSupportSpecificAttributesGetLeadTimeInWorkDaysAttributeTypeOk(o.LeadTimeInWorkDays); ok { + toSerialize["LeadTimeInWorkDays"] = val + } + if val, ok := getSupportSpecificAttributesGetLocationAttributeTypeOk(o.Location); ok { + toSerialize["Location"] = val + } + if val, ok := getSupportSpecificAttributesGetProjectNoticePeriodInWorkDaysAttributeTypeOk(o.ProjectNoticePeriodInWorkDays); ok { + toSerialize["ProjectNoticePeriodInWorkDays"] = val + } + if val, ok := getSupportSpecificAttributesGetReactionTimeInMinsAttributeTypeOk(o.ReactionTimeInMins); ok { + toSerialize["ReactionTimeInMins"] = val + } + if val, ok := getSupportSpecificAttributesGetRepeatedRuntimeInMonthsAttributeTypeOk(o.RepeatedRuntimeInMonths); ok { + toSerialize["RepeatedRuntimeInMonths"] = val + } + if val, ok := getSupportSpecificAttributesGetResponseTimeBCINCInMinsAttributeTypeOk(o.ResponseTimeBCINCInMins); ok { + toSerialize["ResponseTimeBCINCInMins"] = val + } + if val, ok := getSupportSpecificAttributesGetResponseTimeINCInMinsAttributeTypeOk(o.ResponseTimeINCInMins); ok { + toSerialize["ResponseTimeINCInMins"] = val + } + if val, ok := getSupportSpecificAttributesGetResponseTimeSRInMinsAttributeTypeOk(o.ResponseTimeSRInMins); ok { + toSerialize["ResponseTimeSRInMins"] = val + } + if val, ok := getSupportSpecificAttributesGetServiceHoursBCINCAttributeTypeOk(o.ServiceHoursBCINC); ok { + toSerialize["ServiceHoursBCINC"] = val + } + if val, ok := getSupportSpecificAttributesGetServiceHoursINCAttributeTypeOk(o.ServiceHoursINC); ok { + toSerialize["ServiceHoursINC"] = val + } + if val, ok := getSupportSpecificAttributesGetServiceHoursSRAttributeTypeOk(o.ServiceHoursSR); ok { + toSerialize["ServiceHoursSR"] = val + } + if val, ok := getSupportSpecificAttributesGetSlaGoalInPercentageAttributeTypeOk(o.SlaGoalInPercentage); ok { + toSerialize["SlaGoalInPercentage"] = val + } + return toSerialize, nil +} + +type NullableSupportSpecificAttributes struct { + value *SupportSpecificAttributes + isSet bool +} + +func (v NullableSupportSpecificAttributes) Get() *SupportSpecificAttributes { + return v.value +} + +func (v *NullableSupportSpecificAttributes) Set(val *SupportSpecificAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableSupportSpecificAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableSupportSpecificAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSupportSpecificAttributes(val *SupportSpecificAttributes) *NullableSupportSpecificAttributes { + return &NullableSupportSpecificAttributes{value: val, isSet: true} +} + +func (v NullableSupportSpecificAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSupportSpecificAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/pim/model_support_specific_attributes_test.go b/services/pim/model_support_specific_attributes_test.go new file mode 100644 index 000000000..754d951bd --- /dev/null +++ b/services/pim/model_support_specific_attributes_test.go @@ -0,0 +1,11 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim diff --git a/services/pim/utils.go b/services/pim/utils.go new file mode 100644 index 000000000..559b56e3c --- /dev/null +++ b/services/pim/utils.go @@ -0,0 +1,385 @@ +/* +STACKIT PIM API + +API that provides PIM data regarding STACKIT Cloud SKUs, Products and Categories + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package pim + +import ( + "encoding/json" + "math/rand" + "reflect" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +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 +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return v.value.MarshalJSON() +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// IsNil checks if an input is nil +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() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} + +const letterRunes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" + +// 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) +}