From fe11d141b2d6917088cbb8ed4e074a30be78d316 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Mon, 1 Dec 2025 10:33:45 +0000 Subject: [PATCH 1/2] Generate cdn --- services/cdn/api_default.go | 255 ++++++- services/cdn/api_default_test.go | 83 ++- services/cdn/client.go | 4 +- services/cdn/configuration.go | 2 +- services/cdn/model_bucket_backend.go | 2 +- services/cdn/model_bucket_backend_create.go | 2 +- .../cdn/model_bucket_backend_create_test.go | 2 +- services/cdn/model_bucket_backend_patch.go | 2 +- .../cdn/model_bucket_backend_patch_test.go | 2 +- services/cdn/model_bucket_backend_test.go | 2 +- services/cdn/model_bucket_credentials.go | 2 +- services/cdn/model_bucket_credentials_test.go | 2 +- services/cdn/model_config.go | 2 +- services/cdn/model_config_backend.go | 2 +- services/cdn/model_config_backend_test.go | 2 +- services/cdn/model_config_log_sink.go | 2 +- services/cdn/model_config_log_sink_test.go | 2 +- services/cdn/model_config_patch.go | 2 +- services/cdn/model_config_patch_backend.go | 2 +- .../cdn/model_config_patch_backend_test.go | 2 +- services/cdn/model_config_patch_log_sink.go | 2 +- .../cdn/model_config_patch_log_sink_test.go | 2 +- services/cdn/model_config_patch_test.go | 2 +- services/cdn/model_config_test.go | 2 +- .../cdn/model_create_distribution_payload.go | 2 +- ...del_create_distribution_payload_backend.go | 2 +- ...reate_distribution_payload_backend_test.go | 2 +- ...el_create_distribution_payload_log_sink.go | 2 +- ...eate_distribution_payload_log_sink_test.go | 2 +- .../model_create_distribution_payload_test.go | 2 +- .../cdn/model_create_distribution_response.go | 2 +- ...model_create_distribution_response_test.go | 2 +- services/cdn/model_custom_domain.go | 2 +- services/cdn/model_custom_domain_test.go | 2 +- .../model_delete_custom_domain_response.go | 2 +- ...odel_delete_custom_domain_response_test.go | 2 +- .../cdn/model_delete_distribution_response.go | 2 +- ...model_delete_distribution_response_test.go | 2 +- services/cdn/model_distribution.go | 2 +- .../cdn/model_distribution_logs_record.go | 51 +- .../model_distribution_logs_record_test.go | 2 +- .../model_distribution_statistics_record.go | 2 +- ...l_distribution_statistics_record_all_of.go | 2 +- ...tribution_statistics_record_all_of_test.go | 2 +- ...el_distribution_statistics_record_entry.go | 2 +- ...stribution_statistics_record_entry_test.go | 2 +- ..._distribution_statistics_record_regions.go | 2 +- ...ribution_statistics_record_regions_test.go | 2 +- ...del_distribution_statistics_record_test.go | 2 +- services/cdn/model_distribution_test.go | 2 +- services/cdn/model_distribution_waf.go | 2 +- services/cdn/model_distribution_waf_test.go | 2 +- services/cdn/model_domain.go | 2 +- services/cdn/model_domain_status.go | 2 +- services/cdn/model_domain_status_test.go | 2 +- services/cdn/model_domain_test.go | 2 +- services/cdn/model_error_details.go | 10 +- services/cdn/model_error_details_test.go | 9 +- .../cdn/model_find_cache_paths_response.go | 2 +- .../model_find_cache_paths_response_entry.go | 2 +- ...el_find_cache_paths_response_entry_test.go | 2 +- .../model_find_cache_paths_response_test.go | 2 +- services/cdn/model_generic_json_response.go | 2 +- .../cdn/model_generic_json_response_test.go | 2 +- services/cdn/model_get_cache_info_response.go | 2 +- ...l_get_cache_info_response_history_entry.go | 2 +- ..._cache_info_response_history_entry_test.go | 2 +- .../cdn/model_get_cache_info_response_test.go | 2 +- ...el_get_custom_domain_custom_certificate.go | 2 +- ...t_custom_domain_custom_certificate_test.go | 2 +- ...l_get_custom_domain_managed_certificate.go | 2 +- ..._custom_domain_managed_certificate_test.go | 2 +- .../cdn/model_get_custom_domain_response.go | 2 +- ..._get_custom_domain_response_certificate.go | 2 +- ...custom_domain_response_certificate_test.go | 2 +- .../model_get_custom_domain_response_test.go | 2 +- .../cdn/model_get_distribution_response.go | 2 +- .../model_get_distribution_response_test.go | 2 +- services/cdn/model_get_logs_response.go | 2 +- services/cdn/model_get_logs_response_test.go | 2 +- .../model_get_logs_search_filters_response.go | 256 +++++++ ...earch_filters_response_datacenter_block.go | 297 +++++++++ ..._filters_response_datacenter_block_item.go | 170 +++++ ...ers_response_datacenter_block_item_test.go | 11 + ..._filters_response_datacenter_block_test.go | 11 + ...l_get_logs_search_filters_response_test.go | 11 + services/cdn/model_get_statistics_response.go | 2 +- .../cdn/model_get_statistics_response_test.go | 2 +- services/cdn/model_http_backend.go | 2 +- services/cdn/model_http_backend_create.go | 2 +- .../cdn/model_http_backend_create_test.go | 2 +- services/cdn/model_http_backend_patch.go | 2 +- services/cdn/model_http_backend_patch_test.go | 2 +- services/cdn/model_http_backend_test.go | 2 +- .../cdn/model_list_distributions_response.go | 2 +- .../model_list_distributions_response_test.go | 2 +- .../model_list_waf_collections_response.go | 2 +- ...odel_list_waf_collections_response_test.go | 2 +- services/cdn/model_loki_log_sink.go | 2 +- services/cdn/model_loki_log_sink_create.go | 2 +- .../cdn/model_loki_log_sink_create_test.go | 2 +- .../cdn/model_loki_log_sink_credentials.go | 2 +- .../model_loki_log_sink_credentials_test.go | 2 +- services/cdn/model_loki_log_sink_patch.go | 2 +- .../cdn/model_loki_log_sink_patch_test.go | 2 +- services/cdn/model_loki_log_sink_test.go | 2 +- services/cdn/model_optimizer.go | 2 +- services/cdn/model_optimizer_patch.go | 2 +- services/cdn/model_optimizer_patch_test.go | 2 +- services/cdn/model_optimizer_test.go | 2 +- .../cdn/model_patch_distribution_payload.go | 2 +- .../model_patch_distribution_payload_test.go | 2 +- .../cdn/model_patch_distribution_response.go | 2 +- .../model_patch_distribution_response_test.go | 2 +- services/cdn/model_purge_cache_payload.go | 2 +- .../cdn/model_purge_cache_payload_test.go | 2 +- ...el_put_custom_domain_custom_certificate.go | 2 +- ...t_custom_domain_custom_certificate_test.go | 2 +- ...l_put_custom_domain_managed_certificate.go | 2 +- ..._custom_domain_managed_certificate_test.go | 2 +- .../cdn/model_put_custom_domain_payload.go | 2 +- ...l_put_custom_domain_payload_certificate.go | 2 +- ..._custom_domain_payload_certificate_test.go | 2 +- .../model_put_custom_domain_payload_test.go | 2 +- .../cdn/model_put_custom_domain_response.go | 2 +- ..._put_custom_domain_response_certificate.go | 2 +- ...custom_domain_response_certificate_test.go | 2 +- .../model_put_custom_domain_response_test.go | 2 +- services/cdn/model_region.go | 2 +- services/cdn/model_region_test.go | 2 +- services/cdn/model_status_error.go | 12 +- services/cdn/model_status_error_test.go | 9 +- services/cdn/model_waf_config.go | 580 +++++++++++++++- services/cdn/model_waf_config_patch.go | 628 +++++++++++++++++- services/cdn/model_waf_config_patch_test.go | 2 +- services/cdn/model_waf_config_test.go | 2 +- services/cdn/model_waf_mode.go | 4 +- services/cdn/model_waf_mode_test.go | 2 +- services/cdn/model_waf_paranoia_level.go | 119 ++++ services/cdn/model_waf_paranoia_level_test.go | 11 + services/cdn/model_waf_rule.go | 2 +- services/cdn/model_waf_rule_action.go | 117 ++++ services/cdn/model_waf_rule_action_test.go | 11 + services/cdn/model_waf_rule_collection.go | 2 +- .../cdn/model_waf_rule_collection_test.go | 2 +- services/cdn/model_waf_rule_group.go | 2 +- services/cdn/model_waf_rule_group_test.go | 2 +- services/cdn/model_waf_rule_test.go | 2 +- services/cdn/model_waf_status_rule_block.go | 47 +- .../cdn/model_waf_status_rule_block_reason.go | 283 ++++++++ ...atus_rule_block_reason_directly_defined.go | 127 ++++ ...rule_block_reason_directly_defined_test.go | 11 + ..._block_reason_inherited_from_collection.go | 172 +++++ ...k_reason_inherited_from_collection_test.go | 11 + ..._rule_block_reason_inherited_from_group.go | 172 +++++ ..._block_reason_inherited_from_group_test.go | 11 + ...atus_rule_block_reason_invalid_waf_type.go | 171 +++++ ...rule_block_reason_invalid_waf_type_test.go | 11 + ..._status_rule_block_reason_never_defined.go | 127 ++++ ...us_rule_block_reason_never_defined_test.go | 11 + ...model_waf_status_rule_block_reason_test.go | 11 + .../cdn/model_waf_status_rule_block_test.go | 2 +- services/cdn/model_waf_type.go | 2 +- services/cdn/model_waf_type_test.go | 2 +- services/cdn/model_waf_violation.go | 348 ++++++++++ services/cdn/model_waf_violation_test.go | 11 + services/cdn/utils.go | 2 +- 167 files changed, 4259 insertions(+), 186 deletions(-) create mode 100644 services/cdn/model_get_logs_search_filters_response.go create mode 100644 services/cdn/model_get_logs_search_filters_response_datacenter_block.go create mode 100644 services/cdn/model_get_logs_search_filters_response_datacenter_block_item.go create mode 100644 services/cdn/model_get_logs_search_filters_response_datacenter_block_item_test.go create mode 100644 services/cdn/model_get_logs_search_filters_response_datacenter_block_test.go create mode 100644 services/cdn/model_get_logs_search_filters_response_test.go create mode 100644 services/cdn/model_waf_paranoia_level.go create mode 100644 services/cdn/model_waf_paranoia_level_test.go create mode 100644 services/cdn/model_waf_rule_action.go create mode 100644 services/cdn/model_waf_rule_action_test.go create mode 100644 services/cdn/model_waf_status_rule_block_reason.go create mode 100644 services/cdn/model_waf_status_rule_block_reason_directly_defined.go create mode 100644 services/cdn/model_waf_status_rule_block_reason_directly_defined_test.go create mode 100644 services/cdn/model_waf_status_rule_block_reason_inherited_from_collection.go create mode 100644 services/cdn/model_waf_status_rule_block_reason_inherited_from_collection_test.go create mode 100644 services/cdn/model_waf_status_rule_block_reason_inherited_from_group.go create mode 100644 services/cdn/model_waf_status_rule_block_reason_inherited_from_group_test.go create mode 100644 services/cdn/model_waf_status_rule_block_reason_invalid_waf_type.go create mode 100644 services/cdn/model_waf_status_rule_block_reason_invalid_waf_type_test.go create mode 100644 services/cdn/model_waf_status_rule_block_reason_never_defined.go create mode 100644 services/cdn/model_waf_status_rule_block_reason_never_defined_test.go create mode 100644 services/cdn/model_waf_status_rule_block_reason_test.go create mode 100644 services/cdn/model_waf_violation.go create mode 100644 services/cdn/model_waf_violation_test.go diff --git a/services/cdn/api_default.go b/services/cdn/api_default.go index 58dde3502..a67df7451 100644 --- a/services/cdn/api_default.go +++ b/services/cdn/api_default.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -207,6 +207,25 @@ type DefaultApi interface { */ GetLogsExecute(ctx context.Context, projectId string, distributionId string) (*GetLogsResponse, error) + /* + GetLogsSearchFilters Get relevant search filters for this distribution based on user input. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Your STACKIT Project ID. + @param distributionId Your CDN distribution ID. + @return ApiGetLogsSearchFiltersRequest + */ + GetLogsSearchFilters(ctx context.Context, projectId string, distributionId string) ApiGetLogsSearchFiltersRequest + /* + GetLogsSearchFiltersExecute executes the request + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Your STACKIT Project ID. + @param distributionId Your CDN distribution ID. + @return GetLogsSearchFiltersResponse + + */ + GetLogsSearchFiltersExecute(ctx context.Context, projectId string, distributionId string) (*GetLogsSearchFiltersResponse, error) /* GetStatistics Retrieve the statistics of a distribution Returns the statistics of the distribution in the given @@ -392,6 +411,8 @@ type ApiGetLogsRequest interface { // Sorts the log messages by a specific field. Defaults to `timestamp`. Supported sort options: - `timestamp` - `dataCenterRegion` - `requestCountryCode` - `statusCode` - `cacheHit` - `size` - `path` - `host` SortBy(sortBy string) ApiGetLogsRequest SortOrder(sortOrder string) ApiGetLogsRequest + // If this is set then only log entries with the chosen WAF rule action/outcome are returned. Specifically, if `ALLOWED` then all requests with no violation are returned. If `BLOCKED` then those where a WAF rule blocked a request and if `LOGGED` then only those requests where the WAF violation was only logged but the request not blocked + WafAction(wafAction WAFRuleAction) ApiGetLogsRequest // Filters by the CDN data center region that served the request. Can be combined with other filters DataCenterRegion(dataCenterRegion string) ApiGetLogsRequest // Filters by the originating country of the user request. Can be combined with other filters @@ -403,6 +424,12 @@ type ApiGetLogsRequest interface { Execute() (*GetLogsResponse, error) } +type ApiGetLogsSearchFiltersRequest interface { + // Optional search string. Will search the **values** for the text input. + Filter(filter string) ApiGetLogsSearchFiltersRequest + Execute() (*GetLogsSearchFiltersResponse, error) +} + type ApiGetStatisticsRequest interface { // the start of the time range for which statistics should be returned From(from time.Time) ApiGetStatisticsRequest @@ -477,7 +504,7 @@ func (r CreateDistributionRequest) Execute() (*CreateDistributionResponse, error return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta2/projects/{projectId}/distributions" + localVarPath := localBasePath + "/v1/projects/{projectId}/distributions" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarHeaderParams := make(map[string]string) @@ -663,7 +690,7 @@ func (r DeleteCustomDomainRequest) Execute() (*DeleteCustomDomainResponse, error return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta2/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}" + localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(ParameterValueToString(r.domain, "domain")), -1) @@ -848,7 +875,7 @@ func (r DeleteDistributionRequest) Execute() (*DeleteDistributionResponse, error return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta2/projects/{projectId}/distributions/{distributionId}" + localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) @@ -1026,7 +1053,7 @@ func (r FindCachePathsRequest) Execute() (*FindCachePathsResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta2/projects/{projectId}/distributions/{distributionId}/cache/paths" + localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}/cache/paths" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) @@ -1216,7 +1243,7 @@ func (r GetCacheInfoRequest) Execute() (*GetCacheInfoResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta2/projects/{projectId}/distributions/{distributionId}/cache" + localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}/cache" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) @@ -1390,7 +1417,7 @@ func (r GetCustomDomainRequest) Execute() (*GetCustomDomainResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta2/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}" + localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(ParameterValueToString(r.domain, "domain")), -1) @@ -1583,7 +1610,7 @@ func (r GetDistributionRequest) Execute() (*GetDistributionResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta2/projects/{projectId}/distributions/{distributionId}" + localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) @@ -1751,6 +1778,7 @@ type GetLogsRequest struct { pageIdentifier *string sortBy *string sortOrder *string + wafAction *WAFRuleAction dataCenterRegion *string requestCountryCode *string statusCode *int32 @@ -1797,6 +1825,13 @@ func (r GetLogsRequest) SortOrder(sortOrder string) ApiGetLogsRequest { return r } +// If this is set then only log entries with the chosen WAF rule action/outcome are returned. Specifically, if `ALLOWED` then all requests with no violation are returned. If `BLOCKED` then those where a WAF rule blocked a request and if `LOGGED` then only those requests where the WAF violation was only logged but the request not blocked + +func (r GetLogsRequest) WafAction(wafAction WAFRuleAction) ApiGetLogsRequest { + r.wafAction = &wafAction + return r +} + // Filters by the CDN data center region that served the request. Can be combined with other filters func (r GetLogsRequest) DataCenterRegion(dataCenterRegion string) ApiGetLogsRequest { @@ -1842,7 +1877,7 @@ func (r GetLogsRequest) Execute() (*GetLogsResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta2/projects/{projectId}/distributions/{distributionId}/logs" + localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}/logs" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) @@ -1868,6 +1903,9 @@ func (r GetLogsRequest) Execute() (*GetLogsResponse, error) { if r.sortOrder != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "sortOrder", r.sortOrder, "") } + if r.wafAction != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "wafAction", r.wafAction, "") + } if r.dataCenterRegion != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "dataCenterRegion", r.dataCenterRegion, "") } @@ -2013,6 +2051,193 @@ func (a *APIClient) GetLogsExecute(ctx context.Context, projectId string, distri return r.Execute() } +type GetLogsSearchFiltersRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + distributionId string + filter *string +} + +// Optional search string. Will search the **values** for the text input. + +func (r GetLogsSearchFiltersRequest) Filter(filter string) ApiGetLogsSearchFiltersRequest { + r.filter = &filter + return r +} + +func (r GetLogsSearchFiltersRequest) Execute() (*GetLogsSearchFiltersResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetLogsSearchFiltersResponse + ) + a := r.apiService + client, ok := a.client.(*APIClient) + if !ok { + return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") + } + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetLogsSearchFilters") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}/logs/searchFilters" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.filter != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filter", r.filter, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GenericJsonResponse + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v GenericJsonResponse + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GenericJsonResponse + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + var v GenericJsonResponse + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +/* +GetLogsSearchFilters: Get relevant search filters for this distribution based on user input. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId Your STACKIT Project ID. + @param distributionId Your CDN distribution ID. + @return ApiGetLogsSearchFiltersRequest +*/ +func (a *APIClient) GetLogsSearchFilters(ctx context.Context, projectId string, distributionId string) ApiGetLogsSearchFiltersRequest { + return GetLogsSearchFiltersRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + distributionId: distributionId, + } +} + +func (a *APIClient) GetLogsSearchFiltersExecute(ctx context.Context, projectId string, distributionId string) (*GetLogsSearchFiltersResponse, error) { + r := GetLogsSearchFiltersRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + distributionId: distributionId, + } + return r.Execute() +} + type GetStatisticsRequest struct { ctx context.Context apiService *DefaultApiService @@ -2061,7 +2286,7 @@ func (r GetStatisticsRequest) Execute() (*GetStatisticsResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta2/projects/{projectId}/distributions/{distributionId}/statistics" + localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}/statistics" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) @@ -2285,7 +2510,7 @@ func (r ListDistributionsRequest) Execute() (*ListDistributionsResponse, error) return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta2/projects/{projectId}/distributions" + localVarPath := localBasePath + "/v1/projects/{projectId}/distributions" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarHeaderParams := make(map[string]string) @@ -2463,7 +2688,7 @@ func (r ListWafCollectionsRequest) Execute() (*ListWafCollectionsResponse, error return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta2/projects/{projectId}/waf/collections" + localVarPath := localBasePath + "/v1/projects/{projectId}/waf/collections" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarHeaderParams := make(map[string]string) @@ -2632,7 +2857,7 @@ func (r PatchDistributionRequest) Execute() (*PatchDistributionResponse, error) return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta2/projects/{projectId}/distributions/{distributionId}" + localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) @@ -2807,7 +3032,7 @@ func (r PurgeCacheRequest) Execute() (map[string]interface{}, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta2/projects/{projectId}/distributions/{distributionId}/cache/purge" + localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}/cache/purge" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) @@ -2984,7 +3209,7 @@ func (r PutCustomDomainRequest) Execute() (*PutCustomDomainResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta2/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}" + localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(ParameterValueToString(r.domain, "domain")), -1) diff --git a/services/cdn/api_default_test.go b/services/cdn/api_default_test.go index a44fac2f6..19ae661e5 100644 --- a/services/cdn/api_default_test.go +++ b/services/cdn/api_default_test.go @@ -26,7 +26,7 @@ import ( func Test_cdn_DefaultApiService(t *testing.T) { t.Run("Test DefaultApiService CreateDistribution", func(t *testing.T) { - _apiUrlPath := "/v1beta2/projects/{projectId}/distributions" + _apiUrlPath := "/v1/projects/{projectId}/distributions" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) @@ -79,7 +79,7 @@ func Test_cdn_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService DeleteCustomDomain", func(t *testing.T) { - _apiUrlPath := "/v1beta2/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}" + _apiUrlPath := "/v1/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) distributionIdValue := uuid.NewString() @@ -137,7 +137,7 @@ func Test_cdn_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService DeleteDistribution", func(t *testing.T) { - _apiUrlPath := "/v1beta2/projects/{projectId}/distributions/{distributionId}" + _apiUrlPath := "/v1/projects/{projectId}/distributions/{distributionId}" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) distributionIdValue := uuid.NewString() @@ -192,7 +192,7 @@ func Test_cdn_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService FindCachePaths", func(t *testing.T) { - _apiUrlPath := "/v1beta2/projects/{projectId}/distributions/{distributionId}/cache/paths" + _apiUrlPath := "/v1/projects/{projectId}/distributions/{distributionId}/cache/paths" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) distributionIdValue := uuid.NewString() @@ -248,7 +248,7 @@ func Test_cdn_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService GetCacheInfo", func(t *testing.T) { - _apiUrlPath := "/v1beta2/projects/{projectId}/distributions/{distributionId}/cache" + _apiUrlPath := "/v1/projects/{projectId}/distributions/{distributionId}/cache" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) distributionIdValue := uuid.NewString() @@ -303,7 +303,7 @@ func Test_cdn_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService GetCustomDomain", func(t *testing.T) { - _apiUrlPath := "/v1beta2/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}" + _apiUrlPath := "/v1/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) distributionIdValue := uuid.NewString() @@ -361,7 +361,7 @@ func Test_cdn_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService GetDistribution", func(t *testing.T) { - _apiUrlPath := "/v1beta2/projects/{projectId}/distributions/{distributionId}" + _apiUrlPath := "/v1/projects/{projectId}/distributions/{distributionId}" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) distributionIdValue := uuid.NewString() @@ -416,7 +416,7 @@ func Test_cdn_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService GetLogs", func(t *testing.T) { - _apiUrlPath := "/v1beta2/projects/{projectId}/distributions/{distributionId}/logs" + _apiUrlPath := "/v1/projects/{projectId}/distributions/{distributionId}/logs" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) distributionIdValue := uuid.NewString() @@ -470,8 +470,63 @@ func Test_cdn_DefaultApiService(t *testing.T) { } }) + t.Run("Test DefaultApiService GetLogsSearchFilters", func(t *testing.T) { + _apiUrlPath := "/v1/projects/{projectId}/distributions/{distributionId}/logs/searchFilters" + projectIdValue := "projectId-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + distributionIdValue := uuid.NewString() + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(distributionIdValue, "distributionId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { + data := GetLogsSearchFiltersResponse{} + w.Header().Add("Content-Type", "application/json") + json.NewEncoder(w).Encode(data) + }) + testServer := httptest.NewServer(testDefaultApiServeMux) + defer testServer.Close() + + configuration := &config.Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Region: "test_region", + Servers: config.ServerConfigurations{ + { + URL: testServer.URL, + Description: "Localhost for cdn_DefaultApi", + Variables: map[string]config.ServerVariable{ + "region": { + DefaultValue: "test_region.", + EnumValues: []string{ + "test_region.", + }, + }, + }, + }, + }, + OperationServers: map[string]config.ServerConfigurations{}, + } + apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) + if err != nil { + t.Fatalf("creating API client: %v", err) + } + + projectId := projectIdValue + distributionId := distributionIdValue + + resp, reqErr := apiClient.GetLogsSearchFilters(context.Background(), projectId, distributionId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if IsNil(resp) { + t.Fatalf("response not present") + } + }) + t.Run("Test DefaultApiService GetStatistics", func(t *testing.T) { - _apiUrlPath := "/v1beta2/projects/{projectId}/distributions/{distributionId}/statistics" + _apiUrlPath := "/v1/projects/{projectId}/distributions/{distributionId}/statistics" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) distributionIdValue := uuid.NewString() @@ -527,7 +582,7 @@ func Test_cdn_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListDistributions", func(t *testing.T) { - _apiUrlPath := "/v1beta2/projects/{projectId}/distributions" + _apiUrlPath := "/v1/projects/{projectId}/distributions" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) @@ -579,7 +634,7 @@ func Test_cdn_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListWafCollections", func(t *testing.T) { - _apiUrlPath := "/v1beta2/projects/{projectId}/waf/collections" + _apiUrlPath := "/v1/projects/{projectId}/waf/collections" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) @@ -631,7 +686,7 @@ func Test_cdn_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService PatchDistribution", func(t *testing.T) { - _apiUrlPath := "/v1beta2/projects/{projectId}/distributions/{distributionId}" + _apiUrlPath := "/v1/projects/{projectId}/distributions/{distributionId}" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) distributionIdValue := "distributionId-value" @@ -686,7 +741,7 @@ func Test_cdn_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService PurgeCache", func(t *testing.T) { - _apiUrlPath := "/v1beta2/projects/{projectId}/distributions/{distributionId}/cache/purge" + _apiUrlPath := "/v1/projects/{projectId}/distributions/{distributionId}/cache/purge" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) distributionIdValue := uuid.NewString() @@ -741,7 +796,7 @@ func Test_cdn_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService PutCustomDomain", func(t *testing.T) { - _apiUrlPath := "/v1beta2/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}" + _apiUrlPath := "/v1/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) distributionIdValue := uuid.NewString() diff --git a/services/cdn/client.go b/services/cdn/client.go index 9108c8de5..99cbd65fa 100644 --- a/services/cdn/client.go +++ b/services/cdn/client.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -42,7 +42,7 @@ var ( queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") ) -// APIClient manages communication with the CDN API API v1beta2.0.0 +// APIClient manages communication with the CDN API API v1.0.0 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *config.Configuration diff --git a/services/cdn/configuration.go b/services/cdn/configuration.go index 863f74d2c..ae590d5e1 100644 --- a/services/cdn/configuration.go +++ b/services/cdn/configuration.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_bucket_backend.go b/services/cdn/model_bucket_backend.go index f33d320e1..2eb8ee844 100644 --- a/services/cdn/model_bucket_backend.go +++ b/services/cdn/model_bucket_backend.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_bucket_backend_create.go b/services/cdn/model_bucket_backend_create.go index aeb6dd7ea..6b431523d 100644 --- a/services/cdn/model_bucket_backend_create.go +++ b/services/cdn/model_bucket_backend_create.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_bucket_backend_create_test.go b/services/cdn/model_bucket_backend_create_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_bucket_backend_create_test.go +++ b/services/cdn/model_bucket_backend_create_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_bucket_backend_patch.go b/services/cdn/model_bucket_backend_patch.go index 1fce2e822..bc6a2c405 100644 --- a/services/cdn/model_bucket_backend_patch.go +++ b/services/cdn/model_bucket_backend_patch.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_bucket_backend_patch_test.go b/services/cdn/model_bucket_backend_patch_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_bucket_backend_patch_test.go +++ b/services/cdn/model_bucket_backend_patch_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_bucket_backend_test.go b/services/cdn/model_bucket_backend_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_bucket_backend_test.go +++ b/services/cdn/model_bucket_backend_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_bucket_credentials.go b/services/cdn/model_bucket_credentials.go index 8b6d65c37..9b6d31120 100644 --- a/services/cdn/model_bucket_credentials.go +++ b/services/cdn/model_bucket_credentials.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_bucket_credentials_test.go b/services/cdn/model_bucket_credentials_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_bucket_credentials_test.go +++ b/services/cdn/model_bucket_credentials_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_config.go b/services/cdn/model_config.go index 3327a506c..410af618a 100644 --- a/services/cdn/model_config.go +++ b/services/cdn/model_config.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_config_backend.go b/services/cdn/model_config_backend.go index dbb9618e1..47ac98402 100644 --- a/services/cdn/model_config_backend.go +++ b/services/cdn/model_config_backend.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_config_backend_test.go b/services/cdn/model_config_backend_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_config_backend_test.go +++ b/services/cdn/model_config_backend_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_config_log_sink.go b/services/cdn/model_config_log_sink.go index ff9b16e2f..4f97b7cff 100644 --- a/services/cdn/model_config_log_sink.go +++ b/services/cdn/model_config_log_sink.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_config_log_sink_test.go b/services/cdn/model_config_log_sink_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_config_log_sink_test.go +++ b/services/cdn/model_config_log_sink_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_config_patch.go b/services/cdn/model_config_patch.go index 815fb153b..87559e76e 100644 --- a/services/cdn/model_config_patch.go +++ b/services/cdn/model_config_patch.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_config_patch_backend.go b/services/cdn/model_config_patch_backend.go index 59dca714b..7fe10974d 100644 --- a/services/cdn/model_config_patch_backend.go +++ b/services/cdn/model_config_patch_backend.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_config_patch_backend_test.go b/services/cdn/model_config_patch_backend_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_config_patch_backend_test.go +++ b/services/cdn/model_config_patch_backend_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_config_patch_log_sink.go b/services/cdn/model_config_patch_log_sink.go index 8b3458db6..c5f6bd0db 100644 --- a/services/cdn/model_config_patch_log_sink.go +++ b/services/cdn/model_config_patch_log_sink.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_config_patch_log_sink_test.go b/services/cdn/model_config_patch_log_sink_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_config_patch_log_sink_test.go +++ b/services/cdn/model_config_patch_log_sink_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_config_patch_test.go b/services/cdn/model_config_patch_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_config_patch_test.go +++ b/services/cdn/model_config_patch_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_config_test.go b/services/cdn/model_config_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_config_test.go +++ b/services/cdn/model_config_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_create_distribution_payload.go b/services/cdn/model_create_distribution_payload.go index 2caafd7bc..db626dfba 100644 --- a/services/cdn/model_create_distribution_payload.go +++ b/services/cdn/model_create_distribution_payload.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_create_distribution_payload_backend.go b/services/cdn/model_create_distribution_payload_backend.go index 6ff634b14..bc9e1b4b3 100644 --- a/services/cdn/model_create_distribution_payload_backend.go +++ b/services/cdn/model_create_distribution_payload_backend.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_create_distribution_payload_backend_test.go b/services/cdn/model_create_distribution_payload_backend_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_create_distribution_payload_backend_test.go +++ b/services/cdn/model_create_distribution_payload_backend_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_create_distribution_payload_log_sink.go b/services/cdn/model_create_distribution_payload_log_sink.go index 985e625f0..351442cf7 100644 --- a/services/cdn/model_create_distribution_payload_log_sink.go +++ b/services/cdn/model_create_distribution_payload_log_sink.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_create_distribution_payload_log_sink_test.go b/services/cdn/model_create_distribution_payload_log_sink_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_create_distribution_payload_log_sink_test.go +++ b/services/cdn/model_create_distribution_payload_log_sink_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_create_distribution_payload_test.go b/services/cdn/model_create_distribution_payload_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_create_distribution_payload_test.go +++ b/services/cdn/model_create_distribution_payload_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_create_distribution_response.go b/services/cdn/model_create_distribution_response.go index 76da78897..92ee24f99 100644 --- a/services/cdn/model_create_distribution_response.go +++ b/services/cdn/model_create_distribution_response.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_create_distribution_response_test.go b/services/cdn/model_create_distribution_response_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_create_distribution_response_test.go +++ b/services/cdn/model_create_distribution_response_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_custom_domain.go b/services/cdn/model_custom_domain.go index 1f8f22ec9..9352a0759 100644 --- a/services/cdn/model_custom_domain.go +++ b/services/cdn/model_custom_domain.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_custom_domain_test.go b/services/cdn/model_custom_domain_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_custom_domain_test.go +++ b/services/cdn/model_custom_domain_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_delete_custom_domain_response.go b/services/cdn/model_delete_custom_domain_response.go index 3aad5e71f..3071d582a 100644 --- a/services/cdn/model_delete_custom_domain_response.go +++ b/services/cdn/model_delete_custom_domain_response.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_delete_custom_domain_response_test.go b/services/cdn/model_delete_custom_domain_response_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_delete_custom_domain_response_test.go +++ b/services/cdn/model_delete_custom_domain_response_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_delete_distribution_response.go b/services/cdn/model_delete_distribution_response.go index 419185c0e..eccd3d613 100644 --- a/services/cdn/model_delete_distribution_response.go +++ b/services/cdn/model_delete_distribution_response.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_delete_distribution_response_test.go b/services/cdn/model_delete_distribution_response_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_delete_distribution_response_test.go +++ b/services/cdn/model_delete_distribution_response_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_distribution.go b/services/cdn/model_distribution.go index cc9938069..76c4f930a 100644 --- a/services/cdn/model_distribution.go +++ b/services/cdn/model_distribution.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_distribution_logs_record.go b/services/cdn/model_distribution_logs_record.go index 256f392a6..19380d462 100644 --- a/services/cdn/model_distribution_logs_record.go +++ b/services/cdn/model_distribution_logs_record.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -203,6 +203,26 @@ func setDistributionLogsRecordGetTimestampAttributeType(arg *DistributionLogsRec *arg = &val } +/* + types and functions for wafViolation +*/ + +// isModel +type DistributionLogsRecordGetWafViolationAttributeType = *WAFViolation +type DistributionLogsRecordGetWafViolationArgType = WAFViolation +type DistributionLogsRecordGetWafViolationRetType = WAFViolation + +func getDistributionLogsRecordGetWafViolationAttributeTypeOk(arg DistributionLogsRecordGetWafViolationAttributeType) (ret DistributionLogsRecordGetWafViolationRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setDistributionLogsRecordGetWafViolationAttributeType(arg *DistributionLogsRecordGetWafViolationAttributeType, val DistributionLogsRecordGetWafViolationRetType) { + *arg = &val +} + // DistributionLogsRecord struct for DistributionLogsRecord type DistributionLogsRecord struct { // REQUIRED @@ -224,7 +244,8 @@ type DistributionLogsRecord struct { // REQUIRED StatusCode DistributionLogsRecordGetStatusCodeAttributeType `json:"statusCode" required:"true"` // REQUIRED - Timestamp DistributionLogsRecordGetTimestampAttributeType `json:"timestamp" required:"true"` + Timestamp DistributionLogsRecordGetTimestampAttributeType `json:"timestamp" required:"true"` + WafViolation DistributionLogsRecordGetWafViolationAttributeType `json:"wafViolation,omitempty"` } type _DistributionLogsRecord DistributionLogsRecord @@ -408,6 +429,29 @@ func (o *DistributionLogsRecord) SetTimestamp(v DistributionLogsRecordGetTimesta setDistributionLogsRecordGetTimestampAttributeType(&o.Timestamp, v) } +// GetWafViolation returns the WafViolation field value if set, zero value otherwise. +func (o *DistributionLogsRecord) GetWafViolation() (res DistributionLogsRecordGetWafViolationRetType) { + res, _ = o.GetWafViolationOk() + return +} + +// GetWafViolationOk returns a tuple with the WafViolation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DistributionLogsRecord) GetWafViolationOk() (ret DistributionLogsRecordGetWafViolationRetType, ok bool) { + return getDistributionLogsRecordGetWafViolationAttributeTypeOk(o.WafViolation) +} + +// HasWafViolation returns a boolean if a field has been set. +func (o *DistributionLogsRecord) HasWafViolation() bool { + _, ok := o.GetWafViolationOk() + return ok +} + +// SetWafViolation gets a reference to the given WAFViolation and assigns it to the WafViolation field. +func (o *DistributionLogsRecord) SetWafViolation(v DistributionLogsRecordGetWafViolationRetType) { + setDistributionLogsRecordGetWafViolationAttributeType(&o.WafViolation, v) +} + func (o DistributionLogsRecord) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getDistributionLogsRecordgetCacheHitAttributeTypeOk(o.CacheHit); ok { @@ -437,6 +481,9 @@ func (o DistributionLogsRecord) ToMap() (map[string]interface{}, error) { if val, ok := getDistributionLogsRecordGetTimestampAttributeTypeOk(o.Timestamp); ok { toSerialize["Timestamp"] = val } + if val, ok := getDistributionLogsRecordGetWafViolationAttributeTypeOk(o.WafViolation); ok { + toSerialize["WafViolation"] = val + } return toSerialize, nil } diff --git a/services/cdn/model_distribution_logs_record_test.go b/services/cdn/model_distribution_logs_record_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_distribution_logs_record_test.go +++ b/services/cdn/model_distribution_logs_record_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_distribution_statistics_record.go b/services/cdn/model_distribution_statistics_record.go index 9e069bad2..04f554f1b 100644 --- a/services/cdn/model_distribution_statistics_record.go +++ b/services/cdn/model_distribution_statistics_record.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_distribution_statistics_record_all_of.go b/services/cdn/model_distribution_statistics_record_all_of.go index 41b93dbcb..30fd07621 100644 --- a/services/cdn/model_distribution_statistics_record_all_of.go +++ b/services/cdn/model_distribution_statistics_record_all_of.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_distribution_statistics_record_all_of_test.go b/services/cdn/model_distribution_statistics_record_all_of_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_distribution_statistics_record_all_of_test.go +++ b/services/cdn/model_distribution_statistics_record_all_of_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_distribution_statistics_record_entry.go b/services/cdn/model_distribution_statistics_record_entry.go index 80e404a51..051904a63 100644 --- a/services/cdn/model_distribution_statistics_record_entry.go +++ b/services/cdn/model_distribution_statistics_record_entry.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_distribution_statistics_record_entry_test.go b/services/cdn/model_distribution_statistics_record_entry_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_distribution_statistics_record_entry_test.go +++ b/services/cdn/model_distribution_statistics_record_entry_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_distribution_statistics_record_regions.go b/services/cdn/model_distribution_statistics_record_regions.go index c9cc29dd0..358944df0 100644 --- a/services/cdn/model_distribution_statistics_record_regions.go +++ b/services/cdn/model_distribution_statistics_record_regions.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_distribution_statistics_record_regions_test.go b/services/cdn/model_distribution_statistics_record_regions_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_distribution_statistics_record_regions_test.go +++ b/services/cdn/model_distribution_statistics_record_regions_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_distribution_statistics_record_test.go b/services/cdn/model_distribution_statistics_record_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_distribution_statistics_record_test.go +++ b/services/cdn/model_distribution_statistics_record_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_distribution_test.go b/services/cdn/model_distribution_test.go index d79ea9980..70fbc98b7 100644 --- a/services/cdn/model_distribution_test.go +++ b/services/cdn/model_distribution_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_distribution_waf.go b/services/cdn/model_distribution_waf.go index dfa9b9bf1..46bc2b6e3 100644 --- a/services/cdn/model_distribution_waf.go +++ b/services/cdn/model_distribution_waf.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_distribution_waf_test.go b/services/cdn/model_distribution_waf_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_distribution_waf_test.go +++ b/services/cdn/model_distribution_waf_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_domain.go b/services/cdn/model_domain.go index 461af9a23..dc6f4e9f0 100644 --- a/services/cdn/model_domain.go +++ b/services/cdn/model_domain.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_domain_status.go b/services/cdn/model_domain_status.go index bce3c3bc8..ab899ac50 100644 --- a/services/cdn/model_domain_status.go +++ b/services/cdn/model_domain_status.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_domain_status_test.go b/services/cdn/model_domain_status_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_domain_status_test.go +++ b/services/cdn/model_domain_status_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_domain_test.go b/services/cdn/model_domain_test.go index afe3485ab..460b95f8a 100644 --- a/services/cdn/model_domain_test.go +++ b/services/cdn/model_domain_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_error_details.go b/services/cdn/model_error_details.go index 150f4b55e..8889ea340 100644 --- a/services/cdn/model_error_details.go +++ b/services/cdn/model_error_details.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -93,9 +93,10 @@ type ErrorDetailsKey string // List of Key const ( - ERRORDETAILSKEY_UNKNOWN ErrorDetailsKey = "UNKNOWN" - ERRORDETAILSKEY_CUSTOM_DOMAIN_CNAME_MISSING ErrorDetailsKey = "CUSTOM_DOMAIN_CNAME_MISSING" - ERRORDETAILSKEY_INVALID_ARGUMENT ErrorDetailsKey = "INVALID_ARGUMENT" + ERRORDETAILSKEY_UNKNOWN ErrorDetailsKey = "UNKNOWN" + ERRORDETAILSKEY_CUSTOM_DOMAIN_CNAME_MISSING ErrorDetailsKey = "CUSTOM_DOMAIN_CNAME_MISSING" + ERRORDETAILSKEY_INVALID_ARGUMENT ErrorDetailsKey = "INVALID_ARGUMENT" + ERRORDETAILSKEY_LOG_SINK_INSTANCE_UNAVAILABLE ErrorDetailsKey = "LOG_SINK_INSTANCE_UNAVAILABLE" ) // All allowed values of ErrorDetails enum @@ -103,6 +104,7 @@ var AllowedErrorDetailsKeyEnumValues = []ErrorDetailsKey{ "UNKNOWN", "CUSTOM_DOMAIN_CNAME_MISSING", "INVALID_ARGUMENT", + "LOG_SINK_INSTANCE_UNAVAILABLE", } func (v *ErrorDetailsKey) UnmarshalJSON(src []byte) error { diff --git a/services/cdn/model_error_details_test.go b/services/cdn/model_error_details_test.go index 0deff8875..efebf13a4 100644 --- a/services/cdn/model_error_details_test.go +++ b/services/cdn/model_error_details_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -46,6 +46,13 @@ func TestErrorDetailsKey_UnmarshalJSON(t *testing.T) { }, wantErr: false, }, + { + name: `success - possible enum value no. 4`, + args: args{ + src: []byte(`"LOG_SINK_INSTANCE_UNAVAILABLE"`), + }, + wantErr: false, + }, { name: "fail", args: args{ diff --git a/services/cdn/model_find_cache_paths_response.go b/services/cdn/model_find_cache_paths_response.go index 9b2d0dc4b..9f190cef9 100644 --- a/services/cdn/model_find_cache_paths_response.go +++ b/services/cdn/model_find_cache_paths_response.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_find_cache_paths_response_entry.go b/services/cdn/model_find_cache_paths_response_entry.go index 035569e93..c04a6330c 100644 --- a/services/cdn/model_find_cache_paths_response_entry.go +++ b/services/cdn/model_find_cache_paths_response_entry.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_find_cache_paths_response_entry_test.go b/services/cdn/model_find_cache_paths_response_entry_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_find_cache_paths_response_entry_test.go +++ b/services/cdn/model_find_cache_paths_response_entry_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_find_cache_paths_response_test.go b/services/cdn/model_find_cache_paths_response_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_find_cache_paths_response_test.go +++ b/services/cdn/model_find_cache_paths_response_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_generic_json_response.go b/services/cdn/model_generic_json_response.go index 2c3c400d4..0970e44c9 100644 --- a/services/cdn/model_generic_json_response.go +++ b/services/cdn/model_generic_json_response.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_generic_json_response_test.go b/services/cdn/model_generic_json_response_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_generic_json_response_test.go +++ b/services/cdn/model_generic_json_response_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_get_cache_info_response.go b/services/cdn/model_get_cache_info_response.go index 1bdcaf9be..c396e492c 100644 --- a/services/cdn/model_get_cache_info_response.go +++ b/services/cdn/model_get_cache_info_response.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_get_cache_info_response_history_entry.go b/services/cdn/model_get_cache_info_response_history_entry.go index bcb273bcb..564f0b533 100644 --- a/services/cdn/model_get_cache_info_response_history_entry.go +++ b/services/cdn/model_get_cache_info_response_history_entry.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_get_cache_info_response_history_entry_test.go b/services/cdn/model_get_cache_info_response_history_entry_test.go index 997859bae..a1f9f7227 100644 --- a/services/cdn/model_get_cache_info_response_history_entry_test.go +++ b/services/cdn/model_get_cache_info_response_history_entry_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_get_cache_info_response_test.go b/services/cdn/model_get_cache_info_response_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_get_cache_info_response_test.go +++ b/services/cdn/model_get_cache_info_response_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_get_custom_domain_custom_certificate.go b/services/cdn/model_get_custom_domain_custom_certificate.go index 23ef5b930..e2b6dc38c 100644 --- a/services/cdn/model_get_custom_domain_custom_certificate.go +++ b/services/cdn/model_get_custom_domain_custom_certificate.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_get_custom_domain_custom_certificate_test.go b/services/cdn/model_get_custom_domain_custom_certificate_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_get_custom_domain_custom_certificate_test.go +++ b/services/cdn/model_get_custom_domain_custom_certificate_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_get_custom_domain_managed_certificate.go b/services/cdn/model_get_custom_domain_managed_certificate.go index 2c8c801b7..50c67ab33 100644 --- a/services/cdn/model_get_custom_domain_managed_certificate.go +++ b/services/cdn/model_get_custom_domain_managed_certificate.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_get_custom_domain_managed_certificate_test.go b/services/cdn/model_get_custom_domain_managed_certificate_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_get_custom_domain_managed_certificate_test.go +++ b/services/cdn/model_get_custom_domain_managed_certificate_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_get_custom_domain_response.go b/services/cdn/model_get_custom_domain_response.go index 6f637ab4a..2d60686d2 100644 --- a/services/cdn/model_get_custom_domain_response.go +++ b/services/cdn/model_get_custom_domain_response.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_get_custom_domain_response_certificate.go b/services/cdn/model_get_custom_domain_response_certificate.go index 3b452d380..4f9cef48b 100644 --- a/services/cdn/model_get_custom_domain_response_certificate.go +++ b/services/cdn/model_get_custom_domain_response_certificate.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_get_custom_domain_response_certificate_test.go b/services/cdn/model_get_custom_domain_response_certificate_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_get_custom_domain_response_certificate_test.go +++ b/services/cdn/model_get_custom_domain_response_certificate_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_get_custom_domain_response_test.go b/services/cdn/model_get_custom_domain_response_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_get_custom_domain_response_test.go +++ b/services/cdn/model_get_custom_domain_response_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_get_distribution_response.go b/services/cdn/model_get_distribution_response.go index 070137ecb..153f3833b 100644 --- a/services/cdn/model_get_distribution_response.go +++ b/services/cdn/model_get_distribution_response.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_get_distribution_response_test.go b/services/cdn/model_get_distribution_response_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_get_distribution_response_test.go +++ b/services/cdn/model_get_distribution_response_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_get_logs_response.go b/services/cdn/model_get_logs_response.go index 6bd711f22..f061747dc 100644 --- a/services/cdn/model_get_logs_response.go +++ b/services/cdn/model_get_logs_response.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_get_logs_response_test.go b/services/cdn/model_get_logs_response_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_get_logs_response_test.go +++ b/services/cdn/model_get_logs_response_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_get_logs_search_filters_response.go b/services/cdn/model_get_logs_search_filters_response.go new file mode 100644 index 000000000..f6d7e7e3c --- /dev/null +++ b/services/cdn/model_get_logs_search_filters_response.go @@ -0,0 +1,256 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the GetLogsSearchFiltersResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetLogsSearchFiltersResponse{} + +/* + types and functions for cache +*/ + +// isArray +type GetLogsSearchFiltersResponseGetCacheAttributeType = *[]string +type GetLogsSearchFiltersResponseGetCacheArgType = []string +type GetLogsSearchFiltersResponseGetCacheRetType = []string + +func getGetLogsSearchFiltersResponseGetCacheAttributeTypeOk(arg GetLogsSearchFiltersResponseGetCacheAttributeType) (ret GetLogsSearchFiltersResponseGetCacheRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetLogsSearchFiltersResponseGetCacheAttributeType(arg *GetLogsSearchFiltersResponseGetCacheAttributeType, val GetLogsSearchFiltersResponseGetCacheRetType) { + *arg = &val +} + +/* + types and functions for dataCenter +*/ + +// isModel +type GetLogsSearchFiltersResponseGetDataCenterAttributeType = *GetLogsSearchFiltersResponseDatacenterBlock +type GetLogsSearchFiltersResponseGetDataCenterArgType = GetLogsSearchFiltersResponseDatacenterBlock +type GetLogsSearchFiltersResponseGetDataCenterRetType = GetLogsSearchFiltersResponseDatacenterBlock + +func getGetLogsSearchFiltersResponseGetDataCenterAttributeTypeOk(arg GetLogsSearchFiltersResponseGetDataCenterAttributeType) (ret GetLogsSearchFiltersResponseGetDataCenterRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetLogsSearchFiltersResponseGetDataCenterAttributeType(arg *GetLogsSearchFiltersResponseGetDataCenterAttributeType, val GetLogsSearchFiltersResponseGetDataCenterRetType) { + *arg = &val +} + +/* + types and functions for remoteCountry +*/ + +// isArray +type GetLogsSearchFiltersResponseGetRemoteCountryAttributeType = *[]string +type GetLogsSearchFiltersResponseGetRemoteCountryArgType = []string +type GetLogsSearchFiltersResponseGetRemoteCountryRetType = []string + +func getGetLogsSearchFiltersResponseGetRemoteCountryAttributeTypeOk(arg GetLogsSearchFiltersResponseGetRemoteCountryAttributeType) (ret GetLogsSearchFiltersResponseGetRemoteCountryRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetLogsSearchFiltersResponseGetRemoteCountryAttributeType(arg *GetLogsSearchFiltersResponseGetRemoteCountryAttributeType, val GetLogsSearchFiltersResponseGetRemoteCountryRetType) { + *arg = &val +} + +/* + types and functions for status +*/ + +// isArray +type GetLogsSearchFiltersResponseGetStatusAttributeType = *[]int32 +type GetLogsSearchFiltersResponseGetStatusArgType = []int32 +type GetLogsSearchFiltersResponseGetStatusRetType = []int32 + +func getGetLogsSearchFiltersResponseGetStatusAttributeTypeOk(arg GetLogsSearchFiltersResponseGetStatusAttributeType) (ret GetLogsSearchFiltersResponseGetStatusRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetLogsSearchFiltersResponseGetStatusAttributeType(arg *GetLogsSearchFiltersResponseGetStatusAttributeType, val GetLogsSearchFiltersResponseGetStatusRetType) { + *arg = &val +} + +// GetLogsSearchFiltersResponse struct for GetLogsSearchFiltersResponse +type GetLogsSearchFiltersResponse struct { + // REQUIRED + Cache GetLogsSearchFiltersResponseGetCacheAttributeType `json:"cache" required:"true"` + // REQUIRED + DataCenter GetLogsSearchFiltersResponseGetDataCenterAttributeType `json:"dataCenter" required:"true"` + // List of ISO-3166 Alpha2 Country Codes matching the input filter. Response is ordered in ascending order. For more Info about the country codes, see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 + // REQUIRED + RemoteCountry GetLogsSearchFiltersResponseGetRemoteCountryAttributeType `json:"remoteCountry" required:"true"` + // List of Status Codes matching the input filter. Response is ordered in ascending order. + // REQUIRED + Status GetLogsSearchFiltersResponseGetStatusAttributeType `json:"status" required:"true"` +} + +type _GetLogsSearchFiltersResponse GetLogsSearchFiltersResponse + +// NewGetLogsSearchFiltersResponse instantiates a new GetLogsSearchFiltersResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetLogsSearchFiltersResponse(cache GetLogsSearchFiltersResponseGetCacheArgType, dataCenter GetLogsSearchFiltersResponseGetDataCenterArgType, remoteCountry GetLogsSearchFiltersResponseGetRemoteCountryArgType, status GetLogsSearchFiltersResponseGetStatusArgType) *GetLogsSearchFiltersResponse { + this := GetLogsSearchFiltersResponse{} + setGetLogsSearchFiltersResponseGetCacheAttributeType(&this.Cache, cache) + setGetLogsSearchFiltersResponseGetDataCenterAttributeType(&this.DataCenter, dataCenter) + setGetLogsSearchFiltersResponseGetRemoteCountryAttributeType(&this.RemoteCountry, remoteCountry) + setGetLogsSearchFiltersResponseGetStatusAttributeType(&this.Status, status) + return &this +} + +// NewGetLogsSearchFiltersResponseWithDefaults instantiates a new GetLogsSearchFiltersResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetLogsSearchFiltersResponseWithDefaults() *GetLogsSearchFiltersResponse { + this := GetLogsSearchFiltersResponse{} + return &this +} + +// GetCache returns the Cache field value +func (o *GetLogsSearchFiltersResponse) GetCache() (ret GetLogsSearchFiltersResponseGetCacheRetType) { + ret, _ = o.GetCacheOk() + return ret +} + +// GetCacheOk returns a tuple with the Cache field value +// and a boolean to check if the value has been set. +func (o *GetLogsSearchFiltersResponse) GetCacheOk() (ret GetLogsSearchFiltersResponseGetCacheRetType, ok bool) { + return getGetLogsSearchFiltersResponseGetCacheAttributeTypeOk(o.Cache) +} + +// SetCache sets field value +func (o *GetLogsSearchFiltersResponse) SetCache(v GetLogsSearchFiltersResponseGetCacheRetType) { + setGetLogsSearchFiltersResponseGetCacheAttributeType(&o.Cache, v) +} + +// GetDataCenter returns the DataCenter field value +func (o *GetLogsSearchFiltersResponse) GetDataCenter() (ret GetLogsSearchFiltersResponseGetDataCenterRetType) { + ret, _ = o.GetDataCenterOk() + return ret +} + +// GetDataCenterOk returns a tuple with the DataCenter field value +// and a boolean to check if the value has been set. +func (o *GetLogsSearchFiltersResponse) GetDataCenterOk() (ret GetLogsSearchFiltersResponseGetDataCenterRetType, ok bool) { + return getGetLogsSearchFiltersResponseGetDataCenterAttributeTypeOk(o.DataCenter) +} + +// SetDataCenter sets field value +func (o *GetLogsSearchFiltersResponse) SetDataCenter(v GetLogsSearchFiltersResponseGetDataCenterRetType) { + setGetLogsSearchFiltersResponseGetDataCenterAttributeType(&o.DataCenter, v) +} + +// GetRemoteCountry returns the RemoteCountry field value +func (o *GetLogsSearchFiltersResponse) GetRemoteCountry() (ret GetLogsSearchFiltersResponseGetRemoteCountryRetType) { + ret, _ = o.GetRemoteCountryOk() + return ret +} + +// GetRemoteCountryOk returns a tuple with the RemoteCountry field value +// and a boolean to check if the value has been set. +func (o *GetLogsSearchFiltersResponse) GetRemoteCountryOk() (ret GetLogsSearchFiltersResponseGetRemoteCountryRetType, ok bool) { + return getGetLogsSearchFiltersResponseGetRemoteCountryAttributeTypeOk(o.RemoteCountry) +} + +// SetRemoteCountry sets field value +func (o *GetLogsSearchFiltersResponse) SetRemoteCountry(v GetLogsSearchFiltersResponseGetRemoteCountryRetType) { + setGetLogsSearchFiltersResponseGetRemoteCountryAttributeType(&o.RemoteCountry, v) +} + +// GetStatus returns the Status field value +func (o *GetLogsSearchFiltersResponse) GetStatus() (ret GetLogsSearchFiltersResponseGetStatusRetType) { + ret, _ = o.GetStatusOk() + return ret +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *GetLogsSearchFiltersResponse) GetStatusOk() (ret GetLogsSearchFiltersResponseGetStatusRetType, ok bool) { + return getGetLogsSearchFiltersResponseGetStatusAttributeTypeOk(o.Status) +} + +// SetStatus sets field value +func (o *GetLogsSearchFiltersResponse) SetStatus(v GetLogsSearchFiltersResponseGetStatusRetType) { + setGetLogsSearchFiltersResponseGetStatusAttributeType(&o.Status, v) +} + +func (o GetLogsSearchFiltersResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getGetLogsSearchFiltersResponseGetCacheAttributeTypeOk(o.Cache); ok { + toSerialize["Cache"] = val + } + if val, ok := getGetLogsSearchFiltersResponseGetDataCenterAttributeTypeOk(o.DataCenter); ok { + toSerialize["DataCenter"] = val + } + if val, ok := getGetLogsSearchFiltersResponseGetRemoteCountryAttributeTypeOk(o.RemoteCountry); ok { + toSerialize["RemoteCountry"] = val + } + if val, ok := getGetLogsSearchFiltersResponseGetStatusAttributeTypeOk(o.Status); ok { + toSerialize["Status"] = val + } + return toSerialize, nil +} + +type NullableGetLogsSearchFiltersResponse struct { + value *GetLogsSearchFiltersResponse + isSet bool +} + +func (v NullableGetLogsSearchFiltersResponse) Get() *GetLogsSearchFiltersResponse { + return v.value +} + +func (v *NullableGetLogsSearchFiltersResponse) Set(val *GetLogsSearchFiltersResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetLogsSearchFiltersResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetLogsSearchFiltersResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetLogsSearchFiltersResponse(val *GetLogsSearchFiltersResponse) *NullableGetLogsSearchFiltersResponse { + return &NullableGetLogsSearchFiltersResponse{value: val, isSet: true} +} + +func (v NullableGetLogsSearchFiltersResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetLogsSearchFiltersResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_get_logs_search_filters_response_datacenter_block.go b/services/cdn/model_get_logs_search_filters_response_datacenter_block.go new file mode 100644 index 000000000..9192b119d --- /dev/null +++ b/services/cdn/model_get_logs_search_filters_response_datacenter_block.go @@ -0,0 +1,297 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the GetLogsSearchFiltersResponseDatacenterBlock type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetLogsSearchFiltersResponseDatacenterBlock{} + +/* + types and functions for AF +*/ + +// isArray +type GetLogsSearchFiltersResponseDatacenterBlockGetAFAttributeType = *[]GetLogsSearchFiltersResponseDatacenterBlockItem +type GetLogsSearchFiltersResponseDatacenterBlockGetAFArgType = []GetLogsSearchFiltersResponseDatacenterBlockItem +type GetLogsSearchFiltersResponseDatacenterBlockGetAFRetType = []GetLogsSearchFiltersResponseDatacenterBlockItem + +func getGetLogsSearchFiltersResponseDatacenterBlockGetAFAttributeTypeOk(arg GetLogsSearchFiltersResponseDatacenterBlockGetAFAttributeType) (ret GetLogsSearchFiltersResponseDatacenterBlockGetAFRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetLogsSearchFiltersResponseDatacenterBlockGetAFAttributeType(arg *GetLogsSearchFiltersResponseDatacenterBlockGetAFAttributeType, val GetLogsSearchFiltersResponseDatacenterBlockGetAFRetType) { + *arg = &val +} + +/* + types and functions for ASIA +*/ + +// isArray +type GetLogsSearchFiltersResponseDatacenterBlockGetASIAAttributeType = *[]GetLogsSearchFiltersResponseDatacenterBlockItem +type GetLogsSearchFiltersResponseDatacenterBlockGetASIAArgType = []GetLogsSearchFiltersResponseDatacenterBlockItem +type GetLogsSearchFiltersResponseDatacenterBlockGetASIARetType = []GetLogsSearchFiltersResponseDatacenterBlockItem + +func getGetLogsSearchFiltersResponseDatacenterBlockGetASIAAttributeTypeOk(arg GetLogsSearchFiltersResponseDatacenterBlockGetASIAAttributeType) (ret GetLogsSearchFiltersResponseDatacenterBlockGetASIARetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetLogsSearchFiltersResponseDatacenterBlockGetASIAAttributeType(arg *GetLogsSearchFiltersResponseDatacenterBlockGetASIAAttributeType, val GetLogsSearchFiltersResponseDatacenterBlockGetASIARetType) { + *arg = &val +} + +/* + types and functions for EU +*/ + +// isArray +type GetLogsSearchFiltersResponseDatacenterBlockGetEUAttributeType = *[]GetLogsSearchFiltersResponseDatacenterBlockItem +type GetLogsSearchFiltersResponseDatacenterBlockGetEUArgType = []GetLogsSearchFiltersResponseDatacenterBlockItem +type GetLogsSearchFiltersResponseDatacenterBlockGetEURetType = []GetLogsSearchFiltersResponseDatacenterBlockItem + +func getGetLogsSearchFiltersResponseDatacenterBlockGetEUAttributeTypeOk(arg GetLogsSearchFiltersResponseDatacenterBlockGetEUAttributeType) (ret GetLogsSearchFiltersResponseDatacenterBlockGetEURetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetLogsSearchFiltersResponseDatacenterBlockGetEUAttributeType(arg *GetLogsSearchFiltersResponseDatacenterBlockGetEUAttributeType, val GetLogsSearchFiltersResponseDatacenterBlockGetEURetType) { + *arg = &val +} + +/* + types and functions for NA +*/ + +// isArray +type GetLogsSearchFiltersResponseDatacenterBlockGetNAAttributeType = *[]GetLogsSearchFiltersResponseDatacenterBlockItem +type GetLogsSearchFiltersResponseDatacenterBlockGetNAArgType = []GetLogsSearchFiltersResponseDatacenterBlockItem +type GetLogsSearchFiltersResponseDatacenterBlockGetNARetType = []GetLogsSearchFiltersResponseDatacenterBlockItem + +func getGetLogsSearchFiltersResponseDatacenterBlockGetNAAttributeTypeOk(arg GetLogsSearchFiltersResponseDatacenterBlockGetNAAttributeType) (ret GetLogsSearchFiltersResponseDatacenterBlockGetNARetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetLogsSearchFiltersResponseDatacenterBlockGetNAAttributeType(arg *GetLogsSearchFiltersResponseDatacenterBlockGetNAAttributeType, val GetLogsSearchFiltersResponseDatacenterBlockGetNARetType) { + *arg = &val +} + +/* + types and functions for SA +*/ + +// isArray +type GetLogsSearchFiltersResponseDatacenterBlockGetSAAttributeType = *[]GetLogsSearchFiltersResponseDatacenterBlockItem +type GetLogsSearchFiltersResponseDatacenterBlockGetSAArgType = []GetLogsSearchFiltersResponseDatacenterBlockItem +type GetLogsSearchFiltersResponseDatacenterBlockGetSARetType = []GetLogsSearchFiltersResponseDatacenterBlockItem + +func getGetLogsSearchFiltersResponseDatacenterBlockGetSAAttributeTypeOk(arg GetLogsSearchFiltersResponseDatacenterBlockGetSAAttributeType) (ret GetLogsSearchFiltersResponseDatacenterBlockGetSARetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetLogsSearchFiltersResponseDatacenterBlockGetSAAttributeType(arg *GetLogsSearchFiltersResponseDatacenterBlockGetSAAttributeType, val GetLogsSearchFiltersResponseDatacenterBlockGetSARetType) { + *arg = &val +} + +// GetLogsSearchFiltersResponseDatacenterBlock Object containing Datacenters to filter for. Each datacenter is grouped to the respective region. +type GetLogsSearchFiltersResponseDatacenterBlock struct { + // REQUIRED + AF GetLogsSearchFiltersResponseDatacenterBlockGetAFAttributeType `json:"AF" required:"true"` + // REQUIRED + ASIA GetLogsSearchFiltersResponseDatacenterBlockGetASIAAttributeType `json:"ASIA" required:"true"` + // REQUIRED + EU GetLogsSearchFiltersResponseDatacenterBlockGetEUAttributeType `json:"EU" required:"true"` + // REQUIRED + NA GetLogsSearchFiltersResponseDatacenterBlockGetNAAttributeType `json:"NA" required:"true"` + // REQUIRED + SA GetLogsSearchFiltersResponseDatacenterBlockGetSAAttributeType `json:"SA" required:"true"` +} + +type _GetLogsSearchFiltersResponseDatacenterBlock GetLogsSearchFiltersResponseDatacenterBlock + +// NewGetLogsSearchFiltersResponseDatacenterBlock instantiates a new GetLogsSearchFiltersResponseDatacenterBlock 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 NewGetLogsSearchFiltersResponseDatacenterBlock(aF GetLogsSearchFiltersResponseDatacenterBlockGetAFArgType, aSIA GetLogsSearchFiltersResponseDatacenterBlockGetASIAArgType, eU GetLogsSearchFiltersResponseDatacenterBlockGetEUArgType, nA GetLogsSearchFiltersResponseDatacenterBlockGetNAArgType, sA GetLogsSearchFiltersResponseDatacenterBlockGetSAArgType) *GetLogsSearchFiltersResponseDatacenterBlock { + this := GetLogsSearchFiltersResponseDatacenterBlock{} + setGetLogsSearchFiltersResponseDatacenterBlockGetAFAttributeType(&this.AF, aF) + setGetLogsSearchFiltersResponseDatacenterBlockGetASIAAttributeType(&this.ASIA, aSIA) + setGetLogsSearchFiltersResponseDatacenterBlockGetEUAttributeType(&this.EU, eU) + setGetLogsSearchFiltersResponseDatacenterBlockGetNAAttributeType(&this.NA, nA) + setGetLogsSearchFiltersResponseDatacenterBlockGetSAAttributeType(&this.SA, sA) + return &this +} + +// NewGetLogsSearchFiltersResponseDatacenterBlockWithDefaults instantiates a new GetLogsSearchFiltersResponseDatacenterBlock 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 NewGetLogsSearchFiltersResponseDatacenterBlockWithDefaults() *GetLogsSearchFiltersResponseDatacenterBlock { + this := GetLogsSearchFiltersResponseDatacenterBlock{} + return &this +} + +// GetAF returns the AF field value +func (o *GetLogsSearchFiltersResponseDatacenterBlock) GetAF() (ret GetLogsSearchFiltersResponseDatacenterBlockGetAFRetType) { + ret, _ = o.GetAFOk() + return ret +} + +// GetAFOk returns a tuple with the AF field value +// and a boolean to check if the value has been set. +func (o *GetLogsSearchFiltersResponseDatacenterBlock) GetAFOk() (ret GetLogsSearchFiltersResponseDatacenterBlockGetAFRetType, ok bool) { + return getGetLogsSearchFiltersResponseDatacenterBlockGetAFAttributeTypeOk(o.AF) +} + +// SetAF sets field value +func (o *GetLogsSearchFiltersResponseDatacenterBlock) SetAF(v GetLogsSearchFiltersResponseDatacenterBlockGetAFRetType) { + setGetLogsSearchFiltersResponseDatacenterBlockGetAFAttributeType(&o.AF, v) +} + +// GetASIA returns the ASIA field value +func (o *GetLogsSearchFiltersResponseDatacenterBlock) GetASIA() (ret GetLogsSearchFiltersResponseDatacenterBlockGetASIARetType) { + ret, _ = o.GetASIAOk() + return ret +} + +// GetASIAOk returns a tuple with the ASIA field value +// and a boolean to check if the value has been set. +func (o *GetLogsSearchFiltersResponseDatacenterBlock) GetASIAOk() (ret GetLogsSearchFiltersResponseDatacenterBlockGetASIARetType, ok bool) { + return getGetLogsSearchFiltersResponseDatacenterBlockGetASIAAttributeTypeOk(o.ASIA) +} + +// SetASIA sets field value +func (o *GetLogsSearchFiltersResponseDatacenterBlock) SetASIA(v GetLogsSearchFiltersResponseDatacenterBlockGetASIARetType) { + setGetLogsSearchFiltersResponseDatacenterBlockGetASIAAttributeType(&o.ASIA, v) +} + +// GetEU returns the EU field value +func (o *GetLogsSearchFiltersResponseDatacenterBlock) GetEU() (ret GetLogsSearchFiltersResponseDatacenterBlockGetEURetType) { + ret, _ = o.GetEUOk() + return ret +} + +// GetEUOk returns a tuple with the EU field value +// and a boolean to check if the value has been set. +func (o *GetLogsSearchFiltersResponseDatacenterBlock) GetEUOk() (ret GetLogsSearchFiltersResponseDatacenterBlockGetEURetType, ok bool) { + return getGetLogsSearchFiltersResponseDatacenterBlockGetEUAttributeTypeOk(o.EU) +} + +// SetEU sets field value +func (o *GetLogsSearchFiltersResponseDatacenterBlock) SetEU(v GetLogsSearchFiltersResponseDatacenterBlockGetEURetType) { + setGetLogsSearchFiltersResponseDatacenterBlockGetEUAttributeType(&o.EU, v) +} + +// GetNA returns the NA field value +func (o *GetLogsSearchFiltersResponseDatacenterBlock) GetNA() (ret GetLogsSearchFiltersResponseDatacenterBlockGetNARetType) { + ret, _ = o.GetNAOk() + return ret +} + +// GetNAOk returns a tuple with the NA field value +// and a boolean to check if the value has been set. +func (o *GetLogsSearchFiltersResponseDatacenterBlock) GetNAOk() (ret GetLogsSearchFiltersResponseDatacenterBlockGetNARetType, ok bool) { + return getGetLogsSearchFiltersResponseDatacenterBlockGetNAAttributeTypeOk(o.NA) +} + +// SetNA sets field value +func (o *GetLogsSearchFiltersResponseDatacenterBlock) SetNA(v GetLogsSearchFiltersResponseDatacenterBlockGetNARetType) { + setGetLogsSearchFiltersResponseDatacenterBlockGetNAAttributeType(&o.NA, v) +} + +// GetSA returns the SA field value +func (o *GetLogsSearchFiltersResponseDatacenterBlock) GetSA() (ret GetLogsSearchFiltersResponseDatacenterBlockGetSARetType) { + ret, _ = o.GetSAOk() + return ret +} + +// GetSAOk returns a tuple with the SA field value +// and a boolean to check if the value has been set. +func (o *GetLogsSearchFiltersResponseDatacenterBlock) GetSAOk() (ret GetLogsSearchFiltersResponseDatacenterBlockGetSARetType, ok bool) { + return getGetLogsSearchFiltersResponseDatacenterBlockGetSAAttributeTypeOk(o.SA) +} + +// SetSA sets field value +func (o *GetLogsSearchFiltersResponseDatacenterBlock) SetSA(v GetLogsSearchFiltersResponseDatacenterBlockGetSARetType) { + setGetLogsSearchFiltersResponseDatacenterBlockGetSAAttributeType(&o.SA, v) +} + +func (o GetLogsSearchFiltersResponseDatacenterBlock) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getGetLogsSearchFiltersResponseDatacenterBlockGetAFAttributeTypeOk(o.AF); ok { + toSerialize["AF"] = val + } + if val, ok := getGetLogsSearchFiltersResponseDatacenterBlockGetASIAAttributeTypeOk(o.ASIA); ok { + toSerialize["ASIA"] = val + } + if val, ok := getGetLogsSearchFiltersResponseDatacenterBlockGetEUAttributeTypeOk(o.EU); ok { + toSerialize["EU"] = val + } + if val, ok := getGetLogsSearchFiltersResponseDatacenterBlockGetNAAttributeTypeOk(o.NA); ok { + toSerialize["NA"] = val + } + if val, ok := getGetLogsSearchFiltersResponseDatacenterBlockGetSAAttributeTypeOk(o.SA); ok { + toSerialize["SA"] = val + } + return toSerialize, nil +} + +type NullableGetLogsSearchFiltersResponseDatacenterBlock struct { + value *GetLogsSearchFiltersResponseDatacenterBlock + isSet bool +} + +func (v NullableGetLogsSearchFiltersResponseDatacenterBlock) Get() *GetLogsSearchFiltersResponseDatacenterBlock { + return v.value +} + +func (v *NullableGetLogsSearchFiltersResponseDatacenterBlock) Set(val *GetLogsSearchFiltersResponseDatacenterBlock) { + v.value = val + v.isSet = true +} + +func (v NullableGetLogsSearchFiltersResponseDatacenterBlock) IsSet() bool { + return v.isSet +} + +func (v *NullableGetLogsSearchFiltersResponseDatacenterBlock) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetLogsSearchFiltersResponseDatacenterBlock(val *GetLogsSearchFiltersResponseDatacenterBlock) *NullableGetLogsSearchFiltersResponseDatacenterBlock { + return &NullableGetLogsSearchFiltersResponseDatacenterBlock{value: val, isSet: true} +} + +func (v NullableGetLogsSearchFiltersResponseDatacenterBlock) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetLogsSearchFiltersResponseDatacenterBlock) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_get_logs_search_filters_response_datacenter_block_item.go b/services/cdn/model_get_logs_search_filters_response_datacenter_block_item.go new file mode 100644 index 000000000..103c39081 --- /dev/null +++ b/services/cdn/model_get_logs_search_filters_response_datacenter_block_item.go @@ -0,0 +1,170 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the GetLogsSearchFiltersResponseDatacenterBlockItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetLogsSearchFiltersResponseDatacenterBlockItem{} + +/* + types and functions for displayName +*/ + +// isNotNullableString +type GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameAttributeType = *string + +func getGetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameAttributeTypeOk(arg GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameAttributeType) (ret GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameAttributeType(arg *GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameAttributeType, val GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameRetType) { + *arg = &val +} + +type GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameArgType = string +type GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameRetType = string + +/* + types and functions for id +*/ + +// isNotNullableString +type GetLogsSearchFiltersResponseDatacenterBlockItemGetIdAttributeType = *string + +func getGetLogsSearchFiltersResponseDatacenterBlockItemGetIdAttributeTypeOk(arg GetLogsSearchFiltersResponseDatacenterBlockItemGetIdAttributeType) (ret GetLogsSearchFiltersResponseDatacenterBlockItemGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setGetLogsSearchFiltersResponseDatacenterBlockItemGetIdAttributeType(arg *GetLogsSearchFiltersResponseDatacenterBlockItemGetIdAttributeType, val GetLogsSearchFiltersResponseDatacenterBlockItemGetIdRetType) { + *arg = &val +} + +type GetLogsSearchFiltersResponseDatacenterBlockItemGetIdArgType = string +type GetLogsSearchFiltersResponseDatacenterBlockItemGetIdRetType = string + +// GetLogsSearchFiltersResponseDatacenterBlockItem A datacenter. The `id` defines the key needed to filter against the logs endpoint, while the `displayName` defines a human-readable Name. +type GetLogsSearchFiltersResponseDatacenterBlockItem struct { + // REQUIRED + DisplayName GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameAttributeType `json:"displayName" required:"true"` + // REQUIRED + Id GetLogsSearchFiltersResponseDatacenterBlockItemGetIdAttributeType `json:"id" required:"true"` +} + +type _GetLogsSearchFiltersResponseDatacenterBlockItem GetLogsSearchFiltersResponseDatacenterBlockItem + +// NewGetLogsSearchFiltersResponseDatacenterBlockItem instantiates a new GetLogsSearchFiltersResponseDatacenterBlockItem 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 NewGetLogsSearchFiltersResponseDatacenterBlockItem(displayName GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameArgType, id GetLogsSearchFiltersResponseDatacenterBlockItemGetIdArgType) *GetLogsSearchFiltersResponseDatacenterBlockItem { + this := GetLogsSearchFiltersResponseDatacenterBlockItem{} + setGetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameAttributeType(&this.DisplayName, displayName) + setGetLogsSearchFiltersResponseDatacenterBlockItemGetIdAttributeType(&this.Id, id) + return &this +} + +// NewGetLogsSearchFiltersResponseDatacenterBlockItemWithDefaults instantiates a new GetLogsSearchFiltersResponseDatacenterBlockItem 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 NewGetLogsSearchFiltersResponseDatacenterBlockItemWithDefaults() *GetLogsSearchFiltersResponseDatacenterBlockItem { + this := GetLogsSearchFiltersResponseDatacenterBlockItem{} + return &this +} + +// GetDisplayName returns the DisplayName field value +func (o *GetLogsSearchFiltersResponseDatacenterBlockItem) GetDisplayName() (ret GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameRetType) { + ret, _ = o.GetDisplayNameOk() + return ret +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value +// and a boolean to check if the value has been set. +func (o *GetLogsSearchFiltersResponseDatacenterBlockItem) GetDisplayNameOk() (ret GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameRetType, ok bool) { + return getGetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameAttributeTypeOk(o.DisplayName) +} + +// SetDisplayName sets field value +func (o *GetLogsSearchFiltersResponseDatacenterBlockItem) SetDisplayName(v GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameRetType) { + setGetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameAttributeType(&o.DisplayName, v) +} + +// GetId returns the Id field value +func (o *GetLogsSearchFiltersResponseDatacenterBlockItem) GetId() (ret GetLogsSearchFiltersResponseDatacenterBlockItemGetIdRetType) { + ret, _ = o.GetIdOk() + return ret +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *GetLogsSearchFiltersResponseDatacenterBlockItem) GetIdOk() (ret GetLogsSearchFiltersResponseDatacenterBlockItemGetIdRetType, ok bool) { + return getGetLogsSearchFiltersResponseDatacenterBlockItemGetIdAttributeTypeOk(o.Id) +} + +// SetId sets field value +func (o *GetLogsSearchFiltersResponseDatacenterBlockItem) SetId(v GetLogsSearchFiltersResponseDatacenterBlockItemGetIdRetType) { + setGetLogsSearchFiltersResponseDatacenterBlockItemGetIdAttributeType(&o.Id, v) +} + +func (o GetLogsSearchFiltersResponseDatacenterBlockItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getGetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameAttributeTypeOk(o.DisplayName); ok { + toSerialize["DisplayName"] = val + } + if val, ok := getGetLogsSearchFiltersResponseDatacenterBlockItemGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + return toSerialize, nil +} + +type NullableGetLogsSearchFiltersResponseDatacenterBlockItem struct { + value *GetLogsSearchFiltersResponseDatacenterBlockItem + isSet bool +} + +func (v NullableGetLogsSearchFiltersResponseDatacenterBlockItem) Get() *GetLogsSearchFiltersResponseDatacenterBlockItem { + return v.value +} + +func (v *NullableGetLogsSearchFiltersResponseDatacenterBlockItem) Set(val *GetLogsSearchFiltersResponseDatacenterBlockItem) { + v.value = val + v.isSet = true +} + +func (v NullableGetLogsSearchFiltersResponseDatacenterBlockItem) IsSet() bool { + return v.isSet +} + +func (v *NullableGetLogsSearchFiltersResponseDatacenterBlockItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetLogsSearchFiltersResponseDatacenterBlockItem(val *GetLogsSearchFiltersResponseDatacenterBlockItem) *NullableGetLogsSearchFiltersResponseDatacenterBlockItem { + return &NullableGetLogsSearchFiltersResponseDatacenterBlockItem{value: val, isSet: true} +} + +func (v NullableGetLogsSearchFiltersResponseDatacenterBlockItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetLogsSearchFiltersResponseDatacenterBlockItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_get_logs_search_filters_response_datacenter_block_item_test.go b/services/cdn/model_get_logs_search_filters_response_datacenter_block_item_test.go new file mode 100644 index 000000000..d7e05bb41 --- /dev/null +++ b/services/cdn/model_get_logs_search_filters_response_datacenter_block_item_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_get_logs_search_filters_response_datacenter_block_test.go b/services/cdn/model_get_logs_search_filters_response_datacenter_block_test.go new file mode 100644 index 000000000..d7e05bb41 --- /dev/null +++ b/services/cdn/model_get_logs_search_filters_response_datacenter_block_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_get_logs_search_filters_response_test.go b/services/cdn/model_get_logs_search_filters_response_test.go new file mode 100644 index 000000000..d7e05bb41 --- /dev/null +++ b/services/cdn/model_get_logs_search_filters_response_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_get_statistics_response.go b/services/cdn/model_get_statistics_response.go index 2b36fbcd7..e554d5c41 100644 --- a/services/cdn/model_get_statistics_response.go +++ b/services/cdn/model_get_statistics_response.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_get_statistics_response_test.go b/services/cdn/model_get_statistics_response_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_get_statistics_response_test.go +++ b/services/cdn/model_get_statistics_response_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_http_backend.go b/services/cdn/model_http_backend.go index c93365452..425a753c7 100644 --- a/services/cdn/model_http_backend.go +++ b/services/cdn/model_http_backend.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_http_backend_create.go b/services/cdn/model_http_backend_create.go index 409d6218d..8e8435d56 100644 --- a/services/cdn/model_http_backend_create.go +++ b/services/cdn/model_http_backend_create.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_http_backend_create_test.go b/services/cdn/model_http_backend_create_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_http_backend_create_test.go +++ b/services/cdn/model_http_backend_create_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_http_backend_patch.go b/services/cdn/model_http_backend_patch.go index ec2f3fce9..ce2fe13a0 100644 --- a/services/cdn/model_http_backend_patch.go +++ b/services/cdn/model_http_backend_patch.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_http_backend_patch_test.go b/services/cdn/model_http_backend_patch_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_http_backend_patch_test.go +++ b/services/cdn/model_http_backend_patch_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_http_backend_test.go b/services/cdn/model_http_backend_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_http_backend_test.go +++ b/services/cdn/model_http_backend_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_list_distributions_response.go b/services/cdn/model_list_distributions_response.go index 6b3b46544..3cea183aa 100644 --- a/services/cdn/model_list_distributions_response.go +++ b/services/cdn/model_list_distributions_response.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_list_distributions_response_test.go b/services/cdn/model_list_distributions_response_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_list_distributions_response_test.go +++ b/services/cdn/model_list_distributions_response_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_list_waf_collections_response.go b/services/cdn/model_list_waf_collections_response.go index 1ab104c17..8a8227979 100644 --- a/services/cdn/model_list_waf_collections_response.go +++ b/services/cdn/model_list_waf_collections_response.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_list_waf_collections_response_test.go b/services/cdn/model_list_waf_collections_response_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_list_waf_collections_response_test.go +++ b/services/cdn/model_list_waf_collections_response_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_loki_log_sink.go b/services/cdn/model_loki_log_sink.go index 9672e6c55..b1bdc24aa 100644 --- a/services/cdn/model_loki_log_sink.go +++ b/services/cdn/model_loki_log_sink.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_loki_log_sink_create.go b/services/cdn/model_loki_log_sink_create.go index c1e14288c..ea1b895fd 100644 --- a/services/cdn/model_loki_log_sink_create.go +++ b/services/cdn/model_loki_log_sink_create.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_loki_log_sink_create_test.go b/services/cdn/model_loki_log_sink_create_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_loki_log_sink_create_test.go +++ b/services/cdn/model_loki_log_sink_create_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_loki_log_sink_credentials.go b/services/cdn/model_loki_log_sink_credentials.go index dad248b30..530f8c2d6 100644 --- a/services/cdn/model_loki_log_sink_credentials.go +++ b/services/cdn/model_loki_log_sink_credentials.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_loki_log_sink_credentials_test.go b/services/cdn/model_loki_log_sink_credentials_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_loki_log_sink_credentials_test.go +++ b/services/cdn/model_loki_log_sink_credentials_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_loki_log_sink_patch.go b/services/cdn/model_loki_log_sink_patch.go index 393e29d27..7d6d241a9 100644 --- a/services/cdn/model_loki_log_sink_patch.go +++ b/services/cdn/model_loki_log_sink_patch.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_loki_log_sink_patch_test.go b/services/cdn/model_loki_log_sink_patch_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_loki_log_sink_patch_test.go +++ b/services/cdn/model_loki_log_sink_patch_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_loki_log_sink_test.go b/services/cdn/model_loki_log_sink_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_loki_log_sink_test.go +++ b/services/cdn/model_loki_log_sink_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_optimizer.go b/services/cdn/model_optimizer.go index 9e6dee876..667f2158e 100644 --- a/services/cdn/model_optimizer.go +++ b/services/cdn/model_optimizer.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_optimizer_patch.go b/services/cdn/model_optimizer_patch.go index 23e80e31a..b5759d959 100644 --- a/services/cdn/model_optimizer_patch.go +++ b/services/cdn/model_optimizer_patch.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_optimizer_patch_test.go b/services/cdn/model_optimizer_patch_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_optimizer_patch_test.go +++ b/services/cdn/model_optimizer_patch_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_optimizer_test.go b/services/cdn/model_optimizer_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_optimizer_test.go +++ b/services/cdn/model_optimizer_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_patch_distribution_payload.go b/services/cdn/model_patch_distribution_payload.go index 84afc9fe6..143d9cc03 100644 --- a/services/cdn/model_patch_distribution_payload.go +++ b/services/cdn/model_patch_distribution_payload.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_patch_distribution_payload_test.go b/services/cdn/model_patch_distribution_payload_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_patch_distribution_payload_test.go +++ b/services/cdn/model_patch_distribution_payload_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_patch_distribution_response.go b/services/cdn/model_patch_distribution_response.go index 46e68decf..6628343bb 100644 --- a/services/cdn/model_patch_distribution_response.go +++ b/services/cdn/model_patch_distribution_response.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_patch_distribution_response_test.go b/services/cdn/model_patch_distribution_response_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_patch_distribution_response_test.go +++ b/services/cdn/model_patch_distribution_response_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_purge_cache_payload.go b/services/cdn/model_purge_cache_payload.go index ab1e7c9e4..162011f2f 100644 --- a/services/cdn/model_purge_cache_payload.go +++ b/services/cdn/model_purge_cache_payload.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_purge_cache_payload_test.go b/services/cdn/model_purge_cache_payload_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_purge_cache_payload_test.go +++ b/services/cdn/model_purge_cache_payload_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_put_custom_domain_custom_certificate.go b/services/cdn/model_put_custom_domain_custom_certificate.go index 5e60e6dbd..ac32b774a 100644 --- a/services/cdn/model_put_custom_domain_custom_certificate.go +++ b/services/cdn/model_put_custom_domain_custom_certificate.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_put_custom_domain_custom_certificate_test.go b/services/cdn/model_put_custom_domain_custom_certificate_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_put_custom_domain_custom_certificate_test.go +++ b/services/cdn/model_put_custom_domain_custom_certificate_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_put_custom_domain_managed_certificate.go b/services/cdn/model_put_custom_domain_managed_certificate.go index be69d8512..32865499f 100644 --- a/services/cdn/model_put_custom_domain_managed_certificate.go +++ b/services/cdn/model_put_custom_domain_managed_certificate.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_put_custom_domain_managed_certificate_test.go b/services/cdn/model_put_custom_domain_managed_certificate_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_put_custom_domain_managed_certificate_test.go +++ b/services/cdn/model_put_custom_domain_managed_certificate_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_put_custom_domain_payload.go b/services/cdn/model_put_custom_domain_payload.go index d1f3fc1ce..f1764f780 100644 --- a/services/cdn/model_put_custom_domain_payload.go +++ b/services/cdn/model_put_custom_domain_payload.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_put_custom_domain_payload_certificate.go b/services/cdn/model_put_custom_domain_payload_certificate.go index 03c5fd070..b502b765c 100644 --- a/services/cdn/model_put_custom_domain_payload_certificate.go +++ b/services/cdn/model_put_custom_domain_payload_certificate.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_put_custom_domain_payload_certificate_test.go b/services/cdn/model_put_custom_domain_payload_certificate_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_put_custom_domain_payload_certificate_test.go +++ b/services/cdn/model_put_custom_domain_payload_certificate_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_put_custom_domain_payload_test.go b/services/cdn/model_put_custom_domain_payload_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_put_custom_domain_payload_test.go +++ b/services/cdn/model_put_custom_domain_payload_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_put_custom_domain_response.go b/services/cdn/model_put_custom_domain_response.go index 77a396c7d..4d3968a01 100644 --- a/services/cdn/model_put_custom_domain_response.go +++ b/services/cdn/model_put_custom_domain_response.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_put_custom_domain_response_certificate.go b/services/cdn/model_put_custom_domain_response_certificate.go index ac42a7c36..87c506915 100644 --- a/services/cdn/model_put_custom_domain_response_certificate.go +++ b/services/cdn/model_put_custom_domain_response_certificate.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_put_custom_domain_response_certificate_test.go b/services/cdn/model_put_custom_domain_response_certificate_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_put_custom_domain_response_certificate_test.go +++ b/services/cdn/model_put_custom_domain_response_certificate_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_put_custom_domain_response_test.go b/services/cdn/model_put_custom_domain_response_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_put_custom_domain_response_test.go +++ b/services/cdn/model_put_custom_domain_response_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_region.go b/services/cdn/model_region.go index c55ae4ecd..9162b1808 100644 --- a/services/cdn/model_region.go +++ b/services/cdn/model_region.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_region_test.go b/services/cdn/model_region_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_region_test.go +++ b/services/cdn/model_region_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_status_error.go b/services/cdn/model_status_error.go index 10081f05c..139ea7cbf 100644 --- a/services/cdn/model_status_error.go +++ b/services/cdn/model_status_error.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -72,10 +72,11 @@ type StatusErrorKey string // List of Key const ( - STATUSERRORKEY_UNKNOWN StatusErrorKey = "UNKNOWN" - STATUSERRORKEY_CUSTOM_DOMAIN_CNAME_MISSING StatusErrorKey = "CUSTOM_DOMAIN_CNAME_MISSING" - STATUSERRORKEY_CUSTOM_DOMAIN_ALREADY_IN_USE StatusErrorKey = "CUSTOM_DOMAIN_ALREADY_IN_USE" - STATUSERRORKEY_PUBLIC_BETA_QUOTA_REACHED StatusErrorKey = "PUBLIC_BETA_QUOTA_REACHED" + STATUSERRORKEY_UNKNOWN StatusErrorKey = "UNKNOWN" + STATUSERRORKEY_CUSTOM_DOMAIN_CNAME_MISSING StatusErrorKey = "CUSTOM_DOMAIN_CNAME_MISSING" + STATUSERRORKEY_CUSTOM_DOMAIN_ALREADY_IN_USE StatusErrorKey = "CUSTOM_DOMAIN_ALREADY_IN_USE" + STATUSERRORKEY_PUBLIC_BETA_QUOTA_REACHED StatusErrorKey = "PUBLIC_BETA_QUOTA_REACHED" + STATUSERRORKEY_LOG_SINK_INSTANCE_UNAVAILABLE StatusErrorKey = "LOG_SINK_INSTANCE_UNAVAILABLE" ) // All allowed values of StatusError enum @@ -84,6 +85,7 @@ var AllowedStatusErrorKeyEnumValues = []StatusErrorKey{ "CUSTOM_DOMAIN_CNAME_MISSING", "CUSTOM_DOMAIN_ALREADY_IN_USE", "PUBLIC_BETA_QUOTA_REACHED", + "LOG_SINK_INSTANCE_UNAVAILABLE", } func (v *StatusErrorKey) UnmarshalJSON(src []byte) error { diff --git a/services/cdn/model_status_error_test.go b/services/cdn/model_status_error_test.go index 665db1bf5..4a43aa4d1 100644 --- a/services/cdn/model_status_error_test.go +++ b/services/cdn/model_status_error_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -53,6 +53,13 @@ func TestStatusErrorKey_UnmarshalJSON(t *testing.T) { }, wantErr: false, }, + { + name: `success - possible enum value no. 5`, + args: args{ + src: []byte(`"LOG_SINK_INSTANCE_UNAVAILABLE"`), + }, + wantErr: false, + }, { name: "fail", args: args{ diff --git a/services/cdn/model_waf_config.go b/services/cdn/model_waf_config.go index c9420fa29..edb54eaf8 100644 --- a/services/cdn/model_waf_config.go +++ b/services/cdn/model_waf_config.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -17,6 +17,166 @@ import ( // checks if the WafConfig type satisfies the MappedNullable interface at compile time var _ MappedNullable = &WafConfig{} +/* + types and functions for allowedHttpMethods +*/ + +// isArray +type WafConfigGetAllowedHttpMethodsAttributeType = *[]string +type WafConfigGetAllowedHttpMethodsArgType = []string +type WafConfigGetAllowedHttpMethodsRetType = []string + +func getWafConfigGetAllowedHttpMethodsAttributeTypeOk(arg WafConfigGetAllowedHttpMethodsAttributeType) (ret WafConfigGetAllowedHttpMethodsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigGetAllowedHttpMethodsAttributeType(arg *WafConfigGetAllowedHttpMethodsAttributeType, val WafConfigGetAllowedHttpMethodsRetType) { + *arg = &val +} + +/* + types and functions for allowedHttpVersions +*/ + +// isArray +type WafConfigGetAllowedHttpVersionsAttributeType = *[]string +type WafConfigGetAllowedHttpVersionsArgType = []string +type WafConfigGetAllowedHttpVersionsRetType = []string + +func getWafConfigGetAllowedHttpVersionsAttributeTypeOk(arg WafConfigGetAllowedHttpVersionsAttributeType) (ret WafConfigGetAllowedHttpVersionsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigGetAllowedHttpVersionsAttributeType(arg *WafConfigGetAllowedHttpVersionsAttributeType, val WafConfigGetAllowedHttpVersionsRetType) { + *arg = &val +} + +/* + types and functions for allowedRequestContentTypes +*/ + +// isArray +type WafConfigGetAllowedRequestContentTypesAttributeType = *[]string +type WafConfigGetAllowedRequestContentTypesArgType = []string +type WafConfigGetAllowedRequestContentTypesRetType = []string + +func getWafConfigGetAllowedRequestContentTypesAttributeTypeOk(arg WafConfigGetAllowedRequestContentTypesAttributeType) (ret WafConfigGetAllowedRequestContentTypesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigGetAllowedRequestContentTypesAttributeType(arg *WafConfigGetAllowedRequestContentTypesAttributeType, val WafConfigGetAllowedRequestContentTypesRetType) { + *arg = &val +} + +/* + types and functions for disabledRuleCollectionIds +*/ + +// isArray +type WafConfigGetDisabledRuleCollectionIdsAttributeType = *[]string +type WafConfigGetDisabledRuleCollectionIdsArgType = []string +type WafConfigGetDisabledRuleCollectionIdsRetType = []string + +func getWafConfigGetDisabledRuleCollectionIdsAttributeTypeOk(arg WafConfigGetDisabledRuleCollectionIdsAttributeType) (ret WafConfigGetDisabledRuleCollectionIdsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigGetDisabledRuleCollectionIdsAttributeType(arg *WafConfigGetDisabledRuleCollectionIdsAttributeType, val WafConfigGetDisabledRuleCollectionIdsRetType) { + *arg = &val +} + +/* + types and functions for disabledRuleGroupIds +*/ + +// isArray +type WafConfigGetDisabledRuleGroupIdsAttributeType = *[]string +type WafConfigGetDisabledRuleGroupIdsArgType = []string +type WafConfigGetDisabledRuleGroupIdsRetType = []string + +func getWafConfigGetDisabledRuleGroupIdsAttributeTypeOk(arg WafConfigGetDisabledRuleGroupIdsAttributeType) (ret WafConfigGetDisabledRuleGroupIdsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigGetDisabledRuleGroupIdsAttributeType(arg *WafConfigGetDisabledRuleGroupIdsAttributeType, val WafConfigGetDisabledRuleGroupIdsRetType) { + *arg = &val +} + +/* + types and functions for disabledRuleIds +*/ + +// isArray +type WafConfigGetDisabledRuleIdsAttributeType = *[]string +type WafConfigGetDisabledRuleIdsArgType = []string +type WafConfigGetDisabledRuleIdsRetType = []string + +func getWafConfigGetDisabledRuleIdsAttributeTypeOk(arg WafConfigGetDisabledRuleIdsAttributeType) (ret WafConfigGetDisabledRuleIdsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigGetDisabledRuleIdsAttributeType(arg *WafConfigGetDisabledRuleIdsAttributeType, val WafConfigGetDisabledRuleIdsRetType) { + *arg = &val +} + +/* + types and functions for enabledRuleCollectionIds +*/ + +// isArray +type WafConfigGetEnabledRuleCollectionIdsAttributeType = *[]string +type WafConfigGetEnabledRuleCollectionIdsArgType = []string +type WafConfigGetEnabledRuleCollectionIdsRetType = []string + +func getWafConfigGetEnabledRuleCollectionIdsAttributeTypeOk(arg WafConfigGetEnabledRuleCollectionIdsAttributeType) (ret WafConfigGetEnabledRuleCollectionIdsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigGetEnabledRuleCollectionIdsAttributeType(arg *WafConfigGetEnabledRuleCollectionIdsAttributeType, val WafConfigGetEnabledRuleCollectionIdsRetType) { + *arg = &val +} + +/* + types and functions for enabledRuleGroupIds +*/ + +// isArray +type WafConfigGetEnabledRuleGroupIdsAttributeType = *[]string +type WafConfigGetEnabledRuleGroupIdsArgType = []string +type WafConfigGetEnabledRuleGroupIdsRetType = []string + +func getWafConfigGetEnabledRuleGroupIdsAttributeTypeOk(arg WafConfigGetEnabledRuleGroupIdsAttributeType) (ret WafConfigGetEnabledRuleGroupIdsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigGetEnabledRuleGroupIdsAttributeType(arg *WafConfigGetEnabledRuleGroupIdsAttributeType, val WafConfigGetEnabledRuleGroupIdsRetType) { + *arg = &val +} + /* types and functions for enabledRuleIds */ @@ -37,6 +197,66 @@ func setWafConfigGetEnabledRuleIdsAttributeType(arg *WafConfigGetEnabledRuleIdsA *arg = &val } +/* + types and functions for logOnlyRuleCollectionIds +*/ + +// isArray +type WafConfigGetLogOnlyRuleCollectionIdsAttributeType = *[]string +type WafConfigGetLogOnlyRuleCollectionIdsArgType = []string +type WafConfigGetLogOnlyRuleCollectionIdsRetType = []string + +func getWafConfigGetLogOnlyRuleCollectionIdsAttributeTypeOk(arg WafConfigGetLogOnlyRuleCollectionIdsAttributeType) (ret WafConfigGetLogOnlyRuleCollectionIdsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigGetLogOnlyRuleCollectionIdsAttributeType(arg *WafConfigGetLogOnlyRuleCollectionIdsAttributeType, val WafConfigGetLogOnlyRuleCollectionIdsRetType) { + *arg = &val +} + +/* + types and functions for logOnlyRuleGroupIds +*/ + +// isArray +type WafConfigGetLogOnlyRuleGroupIdsAttributeType = *[]string +type WafConfigGetLogOnlyRuleGroupIdsArgType = []string +type WafConfigGetLogOnlyRuleGroupIdsRetType = []string + +func getWafConfigGetLogOnlyRuleGroupIdsAttributeTypeOk(arg WafConfigGetLogOnlyRuleGroupIdsAttributeType) (ret WafConfigGetLogOnlyRuleGroupIdsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigGetLogOnlyRuleGroupIdsAttributeType(arg *WafConfigGetLogOnlyRuleGroupIdsAttributeType, val WafConfigGetLogOnlyRuleGroupIdsRetType) { + *arg = &val +} + +/* + types and functions for logOnlyRuleIds +*/ + +// isArray +type WafConfigGetLogOnlyRuleIdsAttributeType = *[]string +type WafConfigGetLogOnlyRuleIdsArgType = []string +type WafConfigGetLogOnlyRuleIdsRetType = []string + +func getWafConfigGetLogOnlyRuleIdsAttributeTypeOk(arg WafConfigGetLogOnlyRuleIdsAttributeType) (ret WafConfigGetLogOnlyRuleIdsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigGetLogOnlyRuleIdsAttributeType(arg *WafConfigGetLogOnlyRuleIdsAttributeType, val WafConfigGetLogOnlyRuleIdsRetType) { + *arg = &val +} + /* types and functions for mode */ @@ -57,6 +277,26 @@ func setWafConfigGetModeAttributeType(arg *WafConfigGetModeAttributeType, val Wa *arg = &val } +/* + types and functions for paranoiaLevel +*/ + +// isEnumRef +type WafConfigGetParanoiaLevelAttributeType = *WafParanoiaLevel +type WafConfigGetParanoiaLevelArgType = WafParanoiaLevel +type WafConfigGetParanoiaLevelRetType = WafParanoiaLevel + +func getWafConfigGetParanoiaLevelAttributeTypeOk(arg WafConfigGetParanoiaLevelAttributeType) (ret WafConfigGetParanoiaLevelRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigGetParanoiaLevelAttributeType(arg *WafConfigGetParanoiaLevelAttributeType, val WafConfigGetParanoiaLevelRetType) { + *arg = &val +} + /* types and functions for type */ @@ -77,13 +317,35 @@ func setWafConfigGetTypeAttributeType(arg *WafConfigGetTypeAttributeType, val Wa *arg = &val } -// WafConfig Configuration of the WAF of a distribution +// WafConfig Configuration of the WAF of a distribution A WAF Config always contains a WAF Mode and Type. If a WAF was never enabled, most of the properties are not present. To **enable** the WAF for your Distribution, you must set the `mode` to `ENABLED` or `LOG_ONLY`. This causes the other properties to be populated. ## Rules There are 9 properties used to control which Rules are enabled, disabled or set to Log-Only. These properties can be grouped in 3 groups of 3. Each of these groups varies in specificity: Rules are more specific than Rule Groups, which in turn are more specific than Collections. More specific definitions override more generic definitions. ### Collections - `enabledRuleCollectionIds` - `disabledRuleCollectionIds` - `logOnlyRuleCollectionIds` These are the least specific selectors. As of 2025, only two collections exist: - `@builtin/crs/response`, containing all Rules regarding Responses - `@builtin/crs/request`, containing all Rules regarding Requests More collections may be added in the future ### Rule Groups - `enabledRuleGroupIds` - `disabledRuleGroupIds` - `logOnlyRuleGroupIds` These are more specific than Collections and will override their selector. You can find all available Rule Groups by calling the `ListWafCollections` Operation. ### Rules - `enabledRuleIds` - `disabledRuleIds` - `logOnlyRuleGds` Being the most specific selectors, these will override both Collection and Rule Group selectors. You can find all available Rule Groups by calling the `ListWafCollections` Operation. ### TIP: Review resolved config If you call `GetDistribution` with `?withWafStatus=true`, you get back a resolved WAF Rules Config which contains a `waf` property which you can inspect to see why a Rule is either enabled, disabled or logOnly. type WafConfig struct { + // This whitelist restricts which HTTP methods the distribution accepts. Requests using non-whitelisted methods are blocked by the WAF before reaching the origin. Common methods: `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS`, `CONNECT`, `TRACE` Validation ensures: 1. At least one method is allowed 2. No duplicate methods (e.g., `GET` appearing twice) 3. Each method is valid per HTTP standards + AllowedHttpMethods WafConfigGetAllowedHttpMethodsAttributeType `json:"allowedHttpMethods,omitempty"` + AllowedHttpVersions WafConfigGetAllowedHttpVersionsAttributeType `json:"allowedHttpVersions,omitempty"` + // This allow list restricts which Content-Type headers are accepted in request bodies. Format: Must be `type/subtype` with no spaces. Common content types: - `application/json` - `application/x-www-form-urlencoded` - `multipart/form-data` - `text/html` - `text/plain` - `application/xml` + AllowedRequestContentTypes WafConfigGetAllowedRequestContentTypesAttributeType `json:"allowedRequestContentTypes,omitempty"` + // Ids of WAF Collections to mark as disabled + DisabledRuleCollectionIds WafConfigGetDisabledRuleCollectionIdsAttributeType `json:"disabledRuleCollectionIds,omitempty"` + // Ids of WAF Rule Groups to mark as disabled + DisabledRuleGroupIds WafConfigGetDisabledRuleGroupIdsAttributeType `json:"disabledRuleGroupIds,omitempty"` + // Ids of WAF Rules that are **explicitly** disabled for this distribution. + DisabledRuleIds WafConfigGetDisabledRuleIdsAttributeType `json:"disabledRuleIds,omitempty"` + // Ids of WAF Collections to mark as enabled + EnabledRuleCollectionIds WafConfigGetEnabledRuleCollectionIdsAttributeType `json:"enabledRuleCollectionIds,omitempty"` + // Ids of WAF Rule Groups to mark as enabled + EnabledRuleGroupIds WafConfigGetEnabledRuleGroupIdsAttributeType `json:"enabledRuleGroupIds,omitempty"` // Ids of the WAF rules that are **explicitly** enabled for this distribution. If this rule is in a disabled / log Only RuleGroup or Collection, it will be enabled regardless as `enabledRuleIds` overrides those in specificity. Do note that rules can also be enabled because a Rulegroup or Collection is enabled. **DO NOT** use this property to find all active rules. Instead, pass `?withWafStatus=true` as a query parameter to `GetDistribution` or `ListDistributions`. This will expose the `waf` Property on distribution Level. From there you can `$.waf.enabledRules.map(e => e.id)` to get a list of all enabled rules. // REQUIRED EnabledRuleIds WafConfigGetEnabledRuleIdsAttributeType `json:"enabledRuleIds" required:"true"` + // Ids of WAF Collections to mark as log Only. + LogOnlyRuleCollectionIds WafConfigGetLogOnlyRuleCollectionIdsAttributeType `json:"logOnlyRuleCollectionIds,omitempty"` + // Ids of WAF Rule Groups to mark as log Only. + LogOnlyRuleGroupIds WafConfigGetLogOnlyRuleGroupIdsAttributeType `json:"logOnlyRuleGroupIds,omitempty"` + // Ids of WAF Rules that are **explicitly** marked as Log Only for this distribution. + LogOnlyRuleIds WafConfigGetLogOnlyRuleIdsAttributeType `json:"logOnlyRuleIds,omitempty"` // REQUIRED - Mode WafConfigGetModeAttributeType `json:"mode" required:"true"` + Mode WafConfigGetModeAttributeType `json:"mode" required:"true"` + ParanoiaLevel WafConfigGetParanoiaLevelAttributeType `json:"paranoiaLevel,omitempty"` // REQUIRED Type WafConfigGetTypeAttributeType `json:"type" required:"true"` } @@ -110,6 +372,190 @@ func NewWafConfigWithDefaults() *WafConfig { return &this } +// GetAllowedHttpMethods returns the AllowedHttpMethods field value if set, zero value otherwise. +func (o *WafConfig) GetAllowedHttpMethods() (res WafConfigGetAllowedHttpMethodsRetType) { + res, _ = o.GetAllowedHttpMethodsOk() + return +} + +// GetAllowedHttpMethodsOk returns a tuple with the AllowedHttpMethods field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfig) GetAllowedHttpMethodsOk() (ret WafConfigGetAllowedHttpMethodsRetType, ok bool) { + return getWafConfigGetAllowedHttpMethodsAttributeTypeOk(o.AllowedHttpMethods) +} + +// HasAllowedHttpMethods returns a boolean if a field has been set. +func (o *WafConfig) HasAllowedHttpMethods() bool { + _, ok := o.GetAllowedHttpMethodsOk() + return ok +} + +// SetAllowedHttpMethods gets a reference to the given []string and assigns it to the AllowedHttpMethods field. +func (o *WafConfig) SetAllowedHttpMethods(v WafConfigGetAllowedHttpMethodsRetType) { + setWafConfigGetAllowedHttpMethodsAttributeType(&o.AllowedHttpMethods, v) +} + +// GetAllowedHttpVersions returns the AllowedHttpVersions field value if set, zero value otherwise. +func (o *WafConfig) GetAllowedHttpVersions() (res WafConfigGetAllowedHttpVersionsRetType) { + res, _ = o.GetAllowedHttpVersionsOk() + return +} + +// GetAllowedHttpVersionsOk returns a tuple with the AllowedHttpVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfig) GetAllowedHttpVersionsOk() (ret WafConfigGetAllowedHttpVersionsRetType, ok bool) { + return getWafConfigGetAllowedHttpVersionsAttributeTypeOk(o.AllowedHttpVersions) +} + +// HasAllowedHttpVersions returns a boolean if a field has been set. +func (o *WafConfig) HasAllowedHttpVersions() bool { + _, ok := o.GetAllowedHttpVersionsOk() + return ok +} + +// SetAllowedHttpVersions gets a reference to the given []string and assigns it to the AllowedHttpVersions field. +func (o *WafConfig) SetAllowedHttpVersions(v WafConfigGetAllowedHttpVersionsRetType) { + setWafConfigGetAllowedHttpVersionsAttributeType(&o.AllowedHttpVersions, v) +} + +// GetAllowedRequestContentTypes returns the AllowedRequestContentTypes field value if set, zero value otherwise. +func (o *WafConfig) GetAllowedRequestContentTypes() (res WafConfigGetAllowedRequestContentTypesRetType) { + res, _ = o.GetAllowedRequestContentTypesOk() + return +} + +// GetAllowedRequestContentTypesOk returns a tuple with the AllowedRequestContentTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfig) GetAllowedRequestContentTypesOk() (ret WafConfigGetAllowedRequestContentTypesRetType, ok bool) { + return getWafConfigGetAllowedRequestContentTypesAttributeTypeOk(o.AllowedRequestContentTypes) +} + +// HasAllowedRequestContentTypes returns a boolean if a field has been set. +func (o *WafConfig) HasAllowedRequestContentTypes() bool { + _, ok := o.GetAllowedRequestContentTypesOk() + return ok +} + +// SetAllowedRequestContentTypes gets a reference to the given []string and assigns it to the AllowedRequestContentTypes field. +func (o *WafConfig) SetAllowedRequestContentTypes(v WafConfigGetAllowedRequestContentTypesRetType) { + setWafConfigGetAllowedRequestContentTypesAttributeType(&o.AllowedRequestContentTypes, v) +} + +// GetDisabledRuleCollectionIds returns the DisabledRuleCollectionIds field value if set, zero value otherwise. +func (o *WafConfig) GetDisabledRuleCollectionIds() (res WafConfigGetDisabledRuleCollectionIdsRetType) { + res, _ = o.GetDisabledRuleCollectionIdsOk() + return +} + +// GetDisabledRuleCollectionIdsOk returns a tuple with the DisabledRuleCollectionIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfig) GetDisabledRuleCollectionIdsOk() (ret WafConfigGetDisabledRuleCollectionIdsRetType, ok bool) { + return getWafConfigGetDisabledRuleCollectionIdsAttributeTypeOk(o.DisabledRuleCollectionIds) +} + +// HasDisabledRuleCollectionIds returns a boolean if a field has been set. +func (o *WafConfig) HasDisabledRuleCollectionIds() bool { + _, ok := o.GetDisabledRuleCollectionIdsOk() + return ok +} + +// SetDisabledRuleCollectionIds gets a reference to the given []string and assigns it to the DisabledRuleCollectionIds field. +func (o *WafConfig) SetDisabledRuleCollectionIds(v WafConfigGetDisabledRuleCollectionIdsRetType) { + setWafConfigGetDisabledRuleCollectionIdsAttributeType(&o.DisabledRuleCollectionIds, v) +} + +// GetDisabledRuleGroupIds returns the DisabledRuleGroupIds field value if set, zero value otherwise. +func (o *WafConfig) GetDisabledRuleGroupIds() (res WafConfigGetDisabledRuleGroupIdsRetType) { + res, _ = o.GetDisabledRuleGroupIdsOk() + return +} + +// GetDisabledRuleGroupIdsOk returns a tuple with the DisabledRuleGroupIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfig) GetDisabledRuleGroupIdsOk() (ret WafConfigGetDisabledRuleGroupIdsRetType, ok bool) { + return getWafConfigGetDisabledRuleGroupIdsAttributeTypeOk(o.DisabledRuleGroupIds) +} + +// HasDisabledRuleGroupIds returns a boolean if a field has been set. +func (o *WafConfig) HasDisabledRuleGroupIds() bool { + _, ok := o.GetDisabledRuleGroupIdsOk() + return ok +} + +// SetDisabledRuleGroupIds gets a reference to the given []string and assigns it to the DisabledRuleGroupIds field. +func (o *WafConfig) SetDisabledRuleGroupIds(v WafConfigGetDisabledRuleGroupIdsRetType) { + setWafConfigGetDisabledRuleGroupIdsAttributeType(&o.DisabledRuleGroupIds, v) +} + +// GetDisabledRuleIds returns the DisabledRuleIds field value if set, zero value otherwise. +func (o *WafConfig) GetDisabledRuleIds() (res WafConfigGetDisabledRuleIdsRetType) { + res, _ = o.GetDisabledRuleIdsOk() + return +} + +// GetDisabledRuleIdsOk returns a tuple with the DisabledRuleIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfig) GetDisabledRuleIdsOk() (ret WafConfigGetDisabledRuleIdsRetType, ok bool) { + return getWafConfigGetDisabledRuleIdsAttributeTypeOk(o.DisabledRuleIds) +} + +// HasDisabledRuleIds returns a boolean if a field has been set. +func (o *WafConfig) HasDisabledRuleIds() bool { + _, ok := o.GetDisabledRuleIdsOk() + return ok +} + +// SetDisabledRuleIds gets a reference to the given []string and assigns it to the DisabledRuleIds field. +func (o *WafConfig) SetDisabledRuleIds(v WafConfigGetDisabledRuleIdsRetType) { + setWafConfigGetDisabledRuleIdsAttributeType(&o.DisabledRuleIds, v) +} + +// GetEnabledRuleCollectionIds returns the EnabledRuleCollectionIds field value if set, zero value otherwise. +func (o *WafConfig) GetEnabledRuleCollectionIds() (res WafConfigGetEnabledRuleCollectionIdsRetType) { + res, _ = o.GetEnabledRuleCollectionIdsOk() + return +} + +// GetEnabledRuleCollectionIdsOk returns a tuple with the EnabledRuleCollectionIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfig) GetEnabledRuleCollectionIdsOk() (ret WafConfigGetEnabledRuleCollectionIdsRetType, ok bool) { + return getWafConfigGetEnabledRuleCollectionIdsAttributeTypeOk(o.EnabledRuleCollectionIds) +} + +// HasEnabledRuleCollectionIds returns a boolean if a field has been set. +func (o *WafConfig) HasEnabledRuleCollectionIds() bool { + _, ok := o.GetEnabledRuleCollectionIdsOk() + return ok +} + +// SetEnabledRuleCollectionIds gets a reference to the given []string and assigns it to the EnabledRuleCollectionIds field. +func (o *WafConfig) SetEnabledRuleCollectionIds(v WafConfigGetEnabledRuleCollectionIdsRetType) { + setWafConfigGetEnabledRuleCollectionIdsAttributeType(&o.EnabledRuleCollectionIds, v) +} + +// GetEnabledRuleGroupIds returns the EnabledRuleGroupIds field value if set, zero value otherwise. +func (o *WafConfig) GetEnabledRuleGroupIds() (res WafConfigGetEnabledRuleGroupIdsRetType) { + res, _ = o.GetEnabledRuleGroupIdsOk() + return +} + +// GetEnabledRuleGroupIdsOk returns a tuple with the EnabledRuleGroupIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfig) GetEnabledRuleGroupIdsOk() (ret WafConfigGetEnabledRuleGroupIdsRetType, ok bool) { + return getWafConfigGetEnabledRuleGroupIdsAttributeTypeOk(o.EnabledRuleGroupIds) +} + +// HasEnabledRuleGroupIds returns a boolean if a field has been set. +func (o *WafConfig) HasEnabledRuleGroupIds() bool { + _, ok := o.GetEnabledRuleGroupIdsOk() + return ok +} + +// SetEnabledRuleGroupIds gets a reference to the given []string and assigns it to the EnabledRuleGroupIds field. +func (o *WafConfig) SetEnabledRuleGroupIds(v WafConfigGetEnabledRuleGroupIdsRetType) { + setWafConfigGetEnabledRuleGroupIdsAttributeType(&o.EnabledRuleGroupIds, v) +} + // GetEnabledRuleIds returns the EnabledRuleIds field value func (o *WafConfig) GetEnabledRuleIds() (ret WafConfigGetEnabledRuleIdsRetType) { ret, _ = o.GetEnabledRuleIdsOk() @@ -127,6 +573,75 @@ func (o *WafConfig) SetEnabledRuleIds(v WafConfigGetEnabledRuleIdsRetType) { setWafConfigGetEnabledRuleIdsAttributeType(&o.EnabledRuleIds, v) } +// GetLogOnlyRuleCollectionIds returns the LogOnlyRuleCollectionIds field value if set, zero value otherwise. +func (o *WafConfig) GetLogOnlyRuleCollectionIds() (res WafConfigGetLogOnlyRuleCollectionIdsRetType) { + res, _ = o.GetLogOnlyRuleCollectionIdsOk() + return +} + +// GetLogOnlyRuleCollectionIdsOk returns a tuple with the LogOnlyRuleCollectionIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfig) GetLogOnlyRuleCollectionIdsOk() (ret WafConfigGetLogOnlyRuleCollectionIdsRetType, ok bool) { + return getWafConfigGetLogOnlyRuleCollectionIdsAttributeTypeOk(o.LogOnlyRuleCollectionIds) +} + +// HasLogOnlyRuleCollectionIds returns a boolean if a field has been set. +func (o *WafConfig) HasLogOnlyRuleCollectionIds() bool { + _, ok := o.GetLogOnlyRuleCollectionIdsOk() + return ok +} + +// SetLogOnlyRuleCollectionIds gets a reference to the given []string and assigns it to the LogOnlyRuleCollectionIds field. +func (o *WafConfig) SetLogOnlyRuleCollectionIds(v WafConfigGetLogOnlyRuleCollectionIdsRetType) { + setWafConfigGetLogOnlyRuleCollectionIdsAttributeType(&o.LogOnlyRuleCollectionIds, v) +} + +// GetLogOnlyRuleGroupIds returns the LogOnlyRuleGroupIds field value if set, zero value otherwise. +func (o *WafConfig) GetLogOnlyRuleGroupIds() (res WafConfigGetLogOnlyRuleGroupIdsRetType) { + res, _ = o.GetLogOnlyRuleGroupIdsOk() + return +} + +// GetLogOnlyRuleGroupIdsOk returns a tuple with the LogOnlyRuleGroupIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfig) GetLogOnlyRuleGroupIdsOk() (ret WafConfigGetLogOnlyRuleGroupIdsRetType, ok bool) { + return getWafConfigGetLogOnlyRuleGroupIdsAttributeTypeOk(o.LogOnlyRuleGroupIds) +} + +// HasLogOnlyRuleGroupIds returns a boolean if a field has been set. +func (o *WafConfig) HasLogOnlyRuleGroupIds() bool { + _, ok := o.GetLogOnlyRuleGroupIdsOk() + return ok +} + +// SetLogOnlyRuleGroupIds gets a reference to the given []string and assigns it to the LogOnlyRuleGroupIds field. +func (o *WafConfig) SetLogOnlyRuleGroupIds(v WafConfigGetLogOnlyRuleGroupIdsRetType) { + setWafConfigGetLogOnlyRuleGroupIdsAttributeType(&o.LogOnlyRuleGroupIds, v) +} + +// GetLogOnlyRuleIds returns the LogOnlyRuleIds field value if set, zero value otherwise. +func (o *WafConfig) GetLogOnlyRuleIds() (res WafConfigGetLogOnlyRuleIdsRetType) { + res, _ = o.GetLogOnlyRuleIdsOk() + return +} + +// GetLogOnlyRuleIdsOk returns a tuple with the LogOnlyRuleIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfig) GetLogOnlyRuleIdsOk() (ret WafConfigGetLogOnlyRuleIdsRetType, ok bool) { + return getWafConfigGetLogOnlyRuleIdsAttributeTypeOk(o.LogOnlyRuleIds) +} + +// HasLogOnlyRuleIds returns a boolean if a field has been set. +func (o *WafConfig) HasLogOnlyRuleIds() bool { + _, ok := o.GetLogOnlyRuleIdsOk() + return ok +} + +// SetLogOnlyRuleIds gets a reference to the given []string and assigns it to the LogOnlyRuleIds field. +func (o *WafConfig) SetLogOnlyRuleIds(v WafConfigGetLogOnlyRuleIdsRetType) { + setWafConfigGetLogOnlyRuleIdsAttributeType(&o.LogOnlyRuleIds, v) +} + // GetMode returns the Mode field value func (o *WafConfig) GetMode() (ret WafConfigGetModeRetType) { ret, _ = o.GetModeOk() @@ -144,6 +659,29 @@ func (o *WafConfig) SetMode(v WafConfigGetModeRetType) { setWafConfigGetModeAttributeType(&o.Mode, v) } +// GetParanoiaLevel returns the ParanoiaLevel field value if set, zero value otherwise. +func (o *WafConfig) GetParanoiaLevel() (res WafConfigGetParanoiaLevelRetType) { + res, _ = o.GetParanoiaLevelOk() + return +} + +// GetParanoiaLevelOk returns a tuple with the ParanoiaLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfig) GetParanoiaLevelOk() (ret WafConfigGetParanoiaLevelRetType, ok bool) { + return getWafConfigGetParanoiaLevelAttributeTypeOk(o.ParanoiaLevel) +} + +// HasParanoiaLevel returns a boolean if a field has been set. +func (o *WafConfig) HasParanoiaLevel() bool { + _, ok := o.GetParanoiaLevelOk() + return ok +} + +// SetParanoiaLevel gets a reference to the given WafParanoiaLevel and assigns it to the ParanoiaLevel field. +func (o *WafConfig) SetParanoiaLevel(v WafConfigGetParanoiaLevelRetType) { + setWafConfigGetParanoiaLevelAttributeType(&o.ParanoiaLevel, v) +} + // GetType returns the Type field value func (o *WafConfig) GetType() (ret WafConfigGetTypeRetType) { ret, _ = o.GetTypeOk() @@ -163,12 +701,48 @@ func (o *WafConfig) SetType(v WafConfigGetTypeRetType) { func (o WafConfig) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getWafConfigGetAllowedHttpMethodsAttributeTypeOk(o.AllowedHttpMethods); ok { + toSerialize["AllowedHttpMethods"] = val + } + if val, ok := getWafConfigGetAllowedHttpVersionsAttributeTypeOk(o.AllowedHttpVersions); ok { + toSerialize["AllowedHttpVersions"] = val + } + if val, ok := getWafConfigGetAllowedRequestContentTypesAttributeTypeOk(o.AllowedRequestContentTypes); ok { + toSerialize["AllowedRequestContentTypes"] = val + } + if val, ok := getWafConfigGetDisabledRuleCollectionIdsAttributeTypeOk(o.DisabledRuleCollectionIds); ok { + toSerialize["DisabledRuleCollectionIds"] = val + } + if val, ok := getWafConfigGetDisabledRuleGroupIdsAttributeTypeOk(o.DisabledRuleGroupIds); ok { + toSerialize["DisabledRuleGroupIds"] = val + } + if val, ok := getWafConfigGetDisabledRuleIdsAttributeTypeOk(o.DisabledRuleIds); ok { + toSerialize["DisabledRuleIds"] = val + } + if val, ok := getWafConfigGetEnabledRuleCollectionIdsAttributeTypeOk(o.EnabledRuleCollectionIds); ok { + toSerialize["EnabledRuleCollectionIds"] = val + } + if val, ok := getWafConfigGetEnabledRuleGroupIdsAttributeTypeOk(o.EnabledRuleGroupIds); ok { + toSerialize["EnabledRuleGroupIds"] = val + } if val, ok := getWafConfigGetEnabledRuleIdsAttributeTypeOk(o.EnabledRuleIds); ok { toSerialize["EnabledRuleIds"] = val } + if val, ok := getWafConfigGetLogOnlyRuleCollectionIdsAttributeTypeOk(o.LogOnlyRuleCollectionIds); ok { + toSerialize["LogOnlyRuleCollectionIds"] = val + } + if val, ok := getWafConfigGetLogOnlyRuleGroupIdsAttributeTypeOk(o.LogOnlyRuleGroupIds); ok { + toSerialize["LogOnlyRuleGroupIds"] = val + } + if val, ok := getWafConfigGetLogOnlyRuleIdsAttributeTypeOk(o.LogOnlyRuleIds); ok { + toSerialize["LogOnlyRuleIds"] = val + } if val, ok := getWafConfigGetModeAttributeTypeOk(o.Mode); ok { toSerialize["Mode"] = val } + if val, ok := getWafConfigGetParanoiaLevelAttributeTypeOk(o.ParanoiaLevel); ok { + toSerialize["ParanoiaLevel"] = val + } if val, ok := getWafConfigGetTypeAttributeTypeOk(o.Type); ok { toSerialize["Type"] = val } diff --git a/services/cdn/model_waf_config_patch.go b/services/cdn/model_waf_config_patch.go index 545baa19b..255ce1352 100644 --- a/services/cdn/model_waf_config_patch.go +++ b/services/cdn/model_waf_config_patch.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -17,6 +17,246 @@ import ( // checks if the WafConfigPatch type satisfies the MappedNullable interface at compile time var _ MappedNullable = &WafConfigPatch{} +/* + types and functions for allowedHttpMethods +*/ + +// isArray +type WafConfigPatchGetAllowedHttpMethodsAttributeType = *[]string +type WafConfigPatchGetAllowedHttpMethodsArgType = []string +type WafConfigPatchGetAllowedHttpMethodsRetType = []string + +func getWafConfigPatchGetAllowedHttpMethodsAttributeTypeOk(arg WafConfigPatchGetAllowedHttpMethodsAttributeType) (ret WafConfigPatchGetAllowedHttpMethodsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigPatchGetAllowedHttpMethodsAttributeType(arg *WafConfigPatchGetAllowedHttpMethodsAttributeType, val WafConfigPatchGetAllowedHttpMethodsRetType) { + *arg = &val +} + +/* + types and functions for allowedHttpVersions +*/ + +// isArray +type WafConfigPatchGetAllowedHttpVersionsAttributeType = *[]string +type WafConfigPatchGetAllowedHttpVersionsArgType = []string +type WafConfigPatchGetAllowedHttpVersionsRetType = []string + +func getWafConfigPatchGetAllowedHttpVersionsAttributeTypeOk(arg WafConfigPatchGetAllowedHttpVersionsAttributeType) (ret WafConfigPatchGetAllowedHttpVersionsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigPatchGetAllowedHttpVersionsAttributeType(arg *WafConfigPatchGetAllowedHttpVersionsAttributeType, val WafConfigPatchGetAllowedHttpVersionsRetType) { + *arg = &val +} + +/* + types and functions for allowedRequestContentTypes +*/ + +// isArray +type WafConfigPatchGetAllowedRequestContentTypesAttributeType = *[]string +type WafConfigPatchGetAllowedRequestContentTypesArgType = []string +type WafConfigPatchGetAllowedRequestContentTypesRetType = []string + +func getWafConfigPatchGetAllowedRequestContentTypesAttributeTypeOk(arg WafConfigPatchGetAllowedRequestContentTypesAttributeType) (ret WafConfigPatchGetAllowedRequestContentTypesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigPatchGetAllowedRequestContentTypesAttributeType(arg *WafConfigPatchGetAllowedRequestContentTypesAttributeType, val WafConfigPatchGetAllowedRequestContentTypesRetType) { + *arg = &val +} + +/* + types and functions for disabledRuleCollectionIds +*/ + +// isArray +type WafConfigPatchGetDisabledRuleCollectionIdsAttributeType = *[]string +type WafConfigPatchGetDisabledRuleCollectionIdsArgType = []string +type WafConfigPatchGetDisabledRuleCollectionIdsRetType = []string + +func getWafConfigPatchGetDisabledRuleCollectionIdsAttributeTypeOk(arg WafConfigPatchGetDisabledRuleCollectionIdsAttributeType) (ret WafConfigPatchGetDisabledRuleCollectionIdsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigPatchGetDisabledRuleCollectionIdsAttributeType(arg *WafConfigPatchGetDisabledRuleCollectionIdsAttributeType, val WafConfigPatchGetDisabledRuleCollectionIdsRetType) { + *arg = &val +} + +/* + types and functions for disabledRuleGroupIds +*/ + +// isArray +type WafConfigPatchGetDisabledRuleGroupIdsAttributeType = *[]string +type WafConfigPatchGetDisabledRuleGroupIdsArgType = []string +type WafConfigPatchGetDisabledRuleGroupIdsRetType = []string + +func getWafConfigPatchGetDisabledRuleGroupIdsAttributeTypeOk(arg WafConfigPatchGetDisabledRuleGroupIdsAttributeType) (ret WafConfigPatchGetDisabledRuleGroupIdsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigPatchGetDisabledRuleGroupIdsAttributeType(arg *WafConfigPatchGetDisabledRuleGroupIdsAttributeType, val WafConfigPatchGetDisabledRuleGroupIdsRetType) { + *arg = &val +} + +/* + types and functions for disabledRuleIds +*/ + +// isArray +type WafConfigPatchGetDisabledRuleIdsAttributeType = *[]string +type WafConfigPatchGetDisabledRuleIdsArgType = []string +type WafConfigPatchGetDisabledRuleIdsRetType = []string + +func getWafConfigPatchGetDisabledRuleIdsAttributeTypeOk(arg WafConfigPatchGetDisabledRuleIdsAttributeType) (ret WafConfigPatchGetDisabledRuleIdsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigPatchGetDisabledRuleIdsAttributeType(arg *WafConfigPatchGetDisabledRuleIdsAttributeType, val WafConfigPatchGetDisabledRuleIdsRetType) { + *arg = &val +} + +/* + types and functions for enabledRuleCollectionIds +*/ + +// isArray +type WafConfigPatchGetEnabledRuleCollectionIdsAttributeType = *[]string +type WafConfigPatchGetEnabledRuleCollectionIdsArgType = []string +type WafConfigPatchGetEnabledRuleCollectionIdsRetType = []string + +func getWafConfigPatchGetEnabledRuleCollectionIdsAttributeTypeOk(arg WafConfigPatchGetEnabledRuleCollectionIdsAttributeType) (ret WafConfigPatchGetEnabledRuleCollectionIdsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigPatchGetEnabledRuleCollectionIdsAttributeType(arg *WafConfigPatchGetEnabledRuleCollectionIdsAttributeType, val WafConfigPatchGetEnabledRuleCollectionIdsRetType) { + *arg = &val +} + +/* + types and functions for enabledRuleGroupIds +*/ + +// isArray +type WafConfigPatchGetEnabledRuleGroupIdsAttributeType = *[]string +type WafConfigPatchGetEnabledRuleGroupIdsArgType = []string +type WafConfigPatchGetEnabledRuleGroupIdsRetType = []string + +func getWafConfigPatchGetEnabledRuleGroupIdsAttributeTypeOk(arg WafConfigPatchGetEnabledRuleGroupIdsAttributeType) (ret WafConfigPatchGetEnabledRuleGroupIdsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigPatchGetEnabledRuleGroupIdsAttributeType(arg *WafConfigPatchGetEnabledRuleGroupIdsAttributeType, val WafConfigPatchGetEnabledRuleGroupIdsRetType) { + *arg = &val +} + +/* + types and functions for enabledRuleIds +*/ + +// isArray +type WafConfigPatchGetEnabledRuleIdsAttributeType = *[]string +type WafConfigPatchGetEnabledRuleIdsArgType = []string +type WafConfigPatchGetEnabledRuleIdsRetType = []string + +func getWafConfigPatchGetEnabledRuleIdsAttributeTypeOk(arg WafConfigPatchGetEnabledRuleIdsAttributeType) (ret WafConfigPatchGetEnabledRuleIdsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigPatchGetEnabledRuleIdsAttributeType(arg *WafConfigPatchGetEnabledRuleIdsAttributeType, val WafConfigPatchGetEnabledRuleIdsRetType) { + *arg = &val +} + +/* + types and functions for logOnlyRuleCollectionIds +*/ + +// isArray +type WafConfigPatchGetLogOnlyRuleCollectionIdsAttributeType = *[]string +type WafConfigPatchGetLogOnlyRuleCollectionIdsArgType = []string +type WafConfigPatchGetLogOnlyRuleCollectionIdsRetType = []string + +func getWafConfigPatchGetLogOnlyRuleCollectionIdsAttributeTypeOk(arg WafConfigPatchGetLogOnlyRuleCollectionIdsAttributeType) (ret WafConfigPatchGetLogOnlyRuleCollectionIdsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigPatchGetLogOnlyRuleCollectionIdsAttributeType(arg *WafConfigPatchGetLogOnlyRuleCollectionIdsAttributeType, val WafConfigPatchGetLogOnlyRuleCollectionIdsRetType) { + *arg = &val +} + +/* + types and functions for logOnlyRuleGroupIds +*/ + +// isArray +type WafConfigPatchGetLogOnlyRuleGroupIdsAttributeType = *[]string +type WafConfigPatchGetLogOnlyRuleGroupIdsArgType = []string +type WafConfigPatchGetLogOnlyRuleGroupIdsRetType = []string + +func getWafConfigPatchGetLogOnlyRuleGroupIdsAttributeTypeOk(arg WafConfigPatchGetLogOnlyRuleGroupIdsAttributeType) (ret WafConfigPatchGetLogOnlyRuleGroupIdsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigPatchGetLogOnlyRuleGroupIdsAttributeType(arg *WafConfigPatchGetLogOnlyRuleGroupIdsAttributeType, val WafConfigPatchGetLogOnlyRuleGroupIdsRetType) { + *arg = &val +} + +/* + types and functions for logOnlyRuleIds +*/ + +// isArray +type WafConfigPatchGetLogOnlyRuleIdsAttributeType = *[]string +type WafConfigPatchGetLogOnlyRuleIdsArgType = []string +type WafConfigPatchGetLogOnlyRuleIdsRetType = []string + +func getWafConfigPatchGetLogOnlyRuleIdsAttributeTypeOk(arg WafConfigPatchGetLogOnlyRuleIdsAttributeType) (ret WafConfigPatchGetLogOnlyRuleIdsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigPatchGetLogOnlyRuleIdsAttributeType(arg *WafConfigPatchGetLogOnlyRuleIdsAttributeType, val WafConfigPatchGetLogOnlyRuleIdsRetType) { + *arg = &val +} + /* types and functions for mode */ @@ -37,6 +277,26 @@ func setWafConfigPatchGetModeAttributeType(arg *WafConfigPatchGetModeAttributeTy *arg = &val } +/* + types and functions for paranoiaLevel +*/ + +// isEnumRef +type WafConfigPatchGetParanoiaLevelAttributeType = *WafParanoiaLevel +type WafConfigPatchGetParanoiaLevelArgType = WafParanoiaLevel +type WafConfigPatchGetParanoiaLevelRetType = WafParanoiaLevel + +func getWafConfigPatchGetParanoiaLevelAttributeTypeOk(arg WafConfigPatchGetParanoiaLevelAttributeType) (ret WafConfigPatchGetParanoiaLevelRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafConfigPatchGetParanoiaLevelAttributeType(arg *WafConfigPatchGetParanoiaLevelAttributeType, val WafConfigPatchGetParanoiaLevelRetType) { + *arg = &val +} + /* types and functions for type */ @@ -57,10 +317,32 @@ func setWafConfigPatchGetTypeAttributeType(arg *WafConfigPatchGetTypeAttributeTy *arg = &val } -// WafConfigPatch struct for WafConfigPatch +// WafConfigPatch Modify the WAF Configuration ## WAF Rules You can modify the set of enabled, disabled and log-only Rules by modifying these 9 properties: - enabledRuleIds - disabledRuleIds - logOnlyRuleIds - enabledRuleGroupIds - disabledRuleGroupIds - logOnlyRuleGroupIds - enabledRuleCollectionIds - disabledRuleCollectionIds - logOnlyRuleCollectionIds Please inquire the `WafConfig` Description on how the effective configuration is determined. For patching, if an ID is already used in one of the properties, it will be removed (and effectively moved) to the new property. If patching multiple properties with the same ID (e.g. writing `@builtin/crs/response` to `logOnlyRuleCollectionIds` and `enabledRuleCollectionIds`), the request will be rejected with a 400. type WafConfigPatch struct { - Mode WafConfigPatchGetModeAttributeType `json:"mode,omitempty"` - Type WafConfigPatchGetTypeAttributeType `json:"type,omitempty"` + AllowedHttpMethods WafConfigPatchGetAllowedHttpMethodsAttributeType `json:"allowedHttpMethods,omitempty"` + AllowedHttpVersions WafConfigPatchGetAllowedHttpVersionsAttributeType `json:"allowedHttpVersions,omitempty"` + AllowedRequestContentTypes WafConfigPatchGetAllowedRequestContentTypesAttributeType `json:"allowedRequestContentTypes,omitempty"` + // Ids of WAF Collections to mark as disabled + DisabledRuleCollectionIds WafConfigPatchGetDisabledRuleCollectionIdsAttributeType `json:"disabledRuleCollectionIds,omitempty"` + // Ids of WAF Rule Groups to mark as disabled + DisabledRuleGroupIds WafConfigPatchGetDisabledRuleGroupIdsAttributeType `json:"disabledRuleGroupIds,omitempty"` + // Ids of WAF Rules that are **explicitly** disabled for this distribution. + DisabledRuleIds WafConfigPatchGetDisabledRuleIdsAttributeType `json:"disabledRuleIds,omitempty"` + // Ids of WAF Collections to mark as enabled + EnabledRuleCollectionIds WafConfigPatchGetEnabledRuleCollectionIdsAttributeType `json:"enabledRuleCollectionIds,omitempty"` + // Ids of WAF Rule Groups to mark as enabled + EnabledRuleGroupIds WafConfigPatchGetEnabledRuleGroupIdsAttributeType `json:"enabledRuleGroupIds,omitempty"` + // Ids of WAF Rules that are **explicitly** enabled for this distribution. + EnabledRuleIds WafConfigPatchGetEnabledRuleIdsAttributeType `json:"enabledRuleIds,omitempty"` + // Ids of WAF Collections to mark as log Only. + LogOnlyRuleCollectionIds WafConfigPatchGetLogOnlyRuleCollectionIdsAttributeType `json:"logOnlyRuleCollectionIds,omitempty"` + // Ids of WAF Rule Groups to mark as log Only. + LogOnlyRuleGroupIds WafConfigPatchGetLogOnlyRuleGroupIdsAttributeType `json:"logOnlyRuleGroupIds,omitempty"` + // Ids of WAF Rules that are **explicitly** marked as Log Only for this distribution. + LogOnlyRuleIds WafConfigPatchGetLogOnlyRuleIdsAttributeType `json:"logOnlyRuleIds,omitempty"` + Mode WafConfigPatchGetModeAttributeType `json:"mode,omitempty"` + ParanoiaLevel WafConfigPatchGetParanoiaLevelAttributeType `json:"paranoiaLevel,omitempty"` + Type WafConfigPatchGetTypeAttributeType `json:"type,omitempty"` } // NewWafConfigPatch instantiates a new WafConfigPatch object @@ -80,6 +362,282 @@ func NewWafConfigPatchWithDefaults() *WafConfigPatch { return &this } +// GetAllowedHttpMethods returns the AllowedHttpMethods field value if set, zero value otherwise. +func (o *WafConfigPatch) GetAllowedHttpMethods() (res WafConfigPatchGetAllowedHttpMethodsRetType) { + res, _ = o.GetAllowedHttpMethodsOk() + return +} + +// GetAllowedHttpMethodsOk returns a tuple with the AllowedHttpMethods field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfigPatch) GetAllowedHttpMethodsOk() (ret WafConfigPatchGetAllowedHttpMethodsRetType, ok bool) { + return getWafConfigPatchGetAllowedHttpMethodsAttributeTypeOk(o.AllowedHttpMethods) +} + +// HasAllowedHttpMethods returns a boolean if a field has been set. +func (o *WafConfigPatch) HasAllowedHttpMethods() bool { + _, ok := o.GetAllowedHttpMethodsOk() + return ok +} + +// SetAllowedHttpMethods gets a reference to the given []string and assigns it to the AllowedHttpMethods field. +func (o *WafConfigPatch) SetAllowedHttpMethods(v WafConfigPatchGetAllowedHttpMethodsRetType) { + setWafConfigPatchGetAllowedHttpMethodsAttributeType(&o.AllowedHttpMethods, v) +} + +// GetAllowedHttpVersions returns the AllowedHttpVersions field value if set, zero value otherwise. +func (o *WafConfigPatch) GetAllowedHttpVersions() (res WafConfigPatchGetAllowedHttpVersionsRetType) { + res, _ = o.GetAllowedHttpVersionsOk() + return +} + +// GetAllowedHttpVersionsOk returns a tuple with the AllowedHttpVersions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfigPatch) GetAllowedHttpVersionsOk() (ret WafConfigPatchGetAllowedHttpVersionsRetType, ok bool) { + return getWafConfigPatchGetAllowedHttpVersionsAttributeTypeOk(o.AllowedHttpVersions) +} + +// HasAllowedHttpVersions returns a boolean if a field has been set. +func (o *WafConfigPatch) HasAllowedHttpVersions() bool { + _, ok := o.GetAllowedHttpVersionsOk() + return ok +} + +// SetAllowedHttpVersions gets a reference to the given []string and assigns it to the AllowedHttpVersions field. +func (o *WafConfigPatch) SetAllowedHttpVersions(v WafConfigPatchGetAllowedHttpVersionsRetType) { + setWafConfigPatchGetAllowedHttpVersionsAttributeType(&o.AllowedHttpVersions, v) +} + +// GetAllowedRequestContentTypes returns the AllowedRequestContentTypes field value if set, zero value otherwise. +func (o *WafConfigPatch) GetAllowedRequestContentTypes() (res WafConfigPatchGetAllowedRequestContentTypesRetType) { + res, _ = o.GetAllowedRequestContentTypesOk() + return +} + +// GetAllowedRequestContentTypesOk returns a tuple with the AllowedRequestContentTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfigPatch) GetAllowedRequestContentTypesOk() (ret WafConfigPatchGetAllowedRequestContentTypesRetType, ok bool) { + return getWafConfigPatchGetAllowedRequestContentTypesAttributeTypeOk(o.AllowedRequestContentTypes) +} + +// HasAllowedRequestContentTypes returns a boolean if a field has been set. +func (o *WafConfigPatch) HasAllowedRequestContentTypes() bool { + _, ok := o.GetAllowedRequestContentTypesOk() + return ok +} + +// SetAllowedRequestContentTypes gets a reference to the given []string and assigns it to the AllowedRequestContentTypes field. +func (o *WafConfigPatch) SetAllowedRequestContentTypes(v WafConfigPatchGetAllowedRequestContentTypesRetType) { + setWafConfigPatchGetAllowedRequestContentTypesAttributeType(&o.AllowedRequestContentTypes, v) +} + +// GetDisabledRuleCollectionIds returns the DisabledRuleCollectionIds field value if set, zero value otherwise. +func (o *WafConfigPatch) GetDisabledRuleCollectionIds() (res WafConfigPatchGetDisabledRuleCollectionIdsRetType) { + res, _ = o.GetDisabledRuleCollectionIdsOk() + return +} + +// GetDisabledRuleCollectionIdsOk returns a tuple with the DisabledRuleCollectionIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfigPatch) GetDisabledRuleCollectionIdsOk() (ret WafConfigPatchGetDisabledRuleCollectionIdsRetType, ok bool) { + return getWafConfigPatchGetDisabledRuleCollectionIdsAttributeTypeOk(o.DisabledRuleCollectionIds) +} + +// HasDisabledRuleCollectionIds returns a boolean if a field has been set. +func (o *WafConfigPatch) HasDisabledRuleCollectionIds() bool { + _, ok := o.GetDisabledRuleCollectionIdsOk() + return ok +} + +// SetDisabledRuleCollectionIds gets a reference to the given []string and assigns it to the DisabledRuleCollectionIds field. +func (o *WafConfigPatch) SetDisabledRuleCollectionIds(v WafConfigPatchGetDisabledRuleCollectionIdsRetType) { + setWafConfigPatchGetDisabledRuleCollectionIdsAttributeType(&o.DisabledRuleCollectionIds, v) +} + +// GetDisabledRuleGroupIds returns the DisabledRuleGroupIds field value if set, zero value otherwise. +func (o *WafConfigPatch) GetDisabledRuleGroupIds() (res WafConfigPatchGetDisabledRuleGroupIdsRetType) { + res, _ = o.GetDisabledRuleGroupIdsOk() + return +} + +// GetDisabledRuleGroupIdsOk returns a tuple with the DisabledRuleGroupIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfigPatch) GetDisabledRuleGroupIdsOk() (ret WafConfigPatchGetDisabledRuleGroupIdsRetType, ok bool) { + return getWafConfigPatchGetDisabledRuleGroupIdsAttributeTypeOk(o.DisabledRuleGroupIds) +} + +// HasDisabledRuleGroupIds returns a boolean if a field has been set. +func (o *WafConfigPatch) HasDisabledRuleGroupIds() bool { + _, ok := o.GetDisabledRuleGroupIdsOk() + return ok +} + +// SetDisabledRuleGroupIds gets a reference to the given []string and assigns it to the DisabledRuleGroupIds field. +func (o *WafConfigPatch) SetDisabledRuleGroupIds(v WafConfigPatchGetDisabledRuleGroupIdsRetType) { + setWafConfigPatchGetDisabledRuleGroupIdsAttributeType(&o.DisabledRuleGroupIds, v) +} + +// GetDisabledRuleIds returns the DisabledRuleIds field value if set, zero value otherwise. +func (o *WafConfigPatch) GetDisabledRuleIds() (res WafConfigPatchGetDisabledRuleIdsRetType) { + res, _ = o.GetDisabledRuleIdsOk() + return +} + +// GetDisabledRuleIdsOk returns a tuple with the DisabledRuleIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfigPatch) GetDisabledRuleIdsOk() (ret WafConfigPatchGetDisabledRuleIdsRetType, ok bool) { + return getWafConfigPatchGetDisabledRuleIdsAttributeTypeOk(o.DisabledRuleIds) +} + +// HasDisabledRuleIds returns a boolean if a field has been set. +func (o *WafConfigPatch) HasDisabledRuleIds() bool { + _, ok := o.GetDisabledRuleIdsOk() + return ok +} + +// SetDisabledRuleIds gets a reference to the given []string and assigns it to the DisabledRuleIds field. +func (o *WafConfigPatch) SetDisabledRuleIds(v WafConfigPatchGetDisabledRuleIdsRetType) { + setWafConfigPatchGetDisabledRuleIdsAttributeType(&o.DisabledRuleIds, v) +} + +// GetEnabledRuleCollectionIds returns the EnabledRuleCollectionIds field value if set, zero value otherwise. +func (o *WafConfigPatch) GetEnabledRuleCollectionIds() (res WafConfigPatchGetEnabledRuleCollectionIdsRetType) { + res, _ = o.GetEnabledRuleCollectionIdsOk() + return +} + +// GetEnabledRuleCollectionIdsOk returns a tuple with the EnabledRuleCollectionIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfigPatch) GetEnabledRuleCollectionIdsOk() (ret WafConfigPatchGetEnabledRuleCollectionIdsRetType, ok bool) { + return getWafConfigPatchGetEnabledRuleCollectionIdsAttributeTypeOk(o.EnabledRuleCollectionIds) +} + +// HasEnabledRuleCollectionIds returns a boolean if a field has been set. +func (o *WafConfigPatch) HasEnabledRuleCollectionIds() bool { + _, ok := o.GetEnabledRuleCollectionIdsOk() + return ok +} + +// SetEnabledRuleCollectionIds gets a reference to the given []string and assigns it to the EnabledRuleCollectionIds field. +func (o *WafConfigPatch) SetEnabledRuleCollectionIds(v WafConfigPatchGetEnabledRuleCollectionIdsRetType) { + setWafConfigPatchGetEnabledRuleCollectionIdsAttributeType(&o.EnabledRuleCollectionIds, v) +} + +// GetEnabledRuleGroupIds returns the EnabledRuleGroupIds field value if set, zero value otherwise. +func (o *WafConfigPatch) GetEnabledRuleGroupIds() (res WafConfigPatchGetEnabledRuleGroupIdsRetType) { + res, _ = o.GetEnabledRuleGroupIdsOk() + return +} + +// GetEnabledRuleGroupIdsOk returns a tuple with the EnabledRuleGroupIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfigPatch) GetEnabledRuleGroupIdsOk() (ret WafConfigPatchGetEnabledRuleGroupIdsRetType, ok bool) { + return getWafConfigPatchGetEnabledRuleGroupIdsAttributeTypeOk(o.EnabledRuleGroupIds) +} + +// HasEnabledRuleGroupIds returns a boolean if a field has been set. +func (o *WafConfigPatch) HasEnabledRuleGroupIds() bool { + _, ok := o.GetEnabledRuleGroupIdsOk() + return ok +} + +// SetEnabledRuleGroupIds gets a reference to the given []string and assigns it to the EnabledRuleGroupIds field. +func (o *WafConfigPatch) SetEnabledRuleGroupIds(v WafConfigPatchGetEnabledRuleGroupIdsRetType) { + setWafConfigPatchGetEnabledRuleGroupIdsAttributeType(&o.EnabledRuleGroupIds, v) +} + +// GetEnabledRuleIds returns the EnabledRuleIds field value if set, zero value otherwise. +func (o *WafConfigPatch) GetEnabledRuleIds() (res WafConfigPatchGetEnabledRuleIdsRetType) { + res, _ = o.GetEnabledRuleIdsOk() + return +} + +// GetEnabledRuleIdsOk returns a tuple with the EnabledRuleIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfigPatch) GetEnabledRuleIdsOk() (ret WafConfigPatchGetEnabledRuleIdsRetType, ok bool) { + return getWafConfigPatchGetEnabledRuleIdsAttributeTypeOk(o.EnabledRuleIds) +} + +// HasEnabledRuleIds returns a boolean if a field has been set. +func (o *WafConfigPatch) HasEnabledRuleIds() bool { + _, ok := o.GetEnabledRuleIdsOk() + return ok +} + +// SetEnabledRuleIds gets a reference to the given []string and assigns it to the EnabledRuleIds field. +func (o *WafConfigPatch) SetEnabledRuleIds(v WafConfigPatchGetEnabledRuleIdsRetType) { + setWafConfigPatchGetEnabledRuleIdsAttributeType(&o.EnabledRuleIds, v) +} + +// GetLogOnlyRuleCollectionIds returns the LogOnlyRuleCollectionIds field value if set, zero value otherwise. +func (o *WafConfigPatch) GetLogOnlyRuleCollectionIds() (res WafConfigPatchGetLogOnlyRuleCollectionIdsRetType) { + res, _ = o.GetLogOnlyRuleCollectionIdsOk() + return +} + +// GetLogOnlyRuleCollectionIdsOk returns a tuple with the LogOnlyRuleCollectionIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfigPatch) GetLogOnlyRuleCollectionIdsOk() (ret WafConfigPatchGetLogOnlyRuleCollectionIdsRetType, ok bool) { + return getWafConfigPatchGetLogOnlyRuleCollectionIdsAttributeTypeOk(o.LogOnlyRuleCollectionIds) +} + +// HasLogOnlyRuleCollectionIds returns a boolean if a field has been set. +func (o *WafConfigPatch) HasLogOnlyRuleCollectionIds() bool { + _, ok := o.GetLogOnlyRuleCollectionIdsOk() + return ok +} + +// SetLogOnlyRuleCollectionIds gets a reference to the given []string and assigns it to the LogOnlyRuleCollectionIds field. +func (o *WafConfigPatch) SetLogOnlyRuleCollectionIds(v WafConfigPatchGetLogOnlyRuleCollectionIdsRetType) { + setWafConfigPatchGetLogOnlyRuleCollectionIdsAttributeType(&o.LogOnlyRuleCollectionIds, v) +} + +// GetLogOnlyRuleGroupIds returns the LogOnlyRuleGroupIds field value if set, zero value otherwise. +func (o *WafConfigPatch) GetLogOnlyRuleGroupIds() (res WafConfigPatchGetLogOnlyRuleGroupIdsRetType) { + res, _ = o.GetLogOnlyRuleGroupIdsOk() + return +} + +// GetLogOnlyRuleGroupIdsOk returns a tuple with the LogOnlyRuleGroupIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfigPatch) GetLogOnlyRuleGroupIdsOk() (ret WafConfigPatchGetLogOnlyRuleGroupIdsRetType, ok bool) { + return getWafConfigPatchGetLogOnlyRuleGroupIdsAttributeTypeOk(o.LogOnlyRuleGroupIds) +} + +// HasLogOnlyRuleGroupIds returns a boolean if a field has been set. +func (o *WafConfigPatch) HasLogOnlyRuleGroupIds() bool { + _, ok := o.GetLogOnlyRuleGroupIdsOk() + return ok +} + +// SetLogOnlyRuleGroupIds gets a reference to the given []string and assigns it to the LogOnlyRuleGroupIds field. +func (o *WafConfigPatch) SetLogOnlyRuleGroupIds(v WafConfigPatchGetLogOnlyRuleGroupIdsRetType) { + setWafConfigPatchGetLogOnlyRuleGroupIdsAttributeType(&o.LogOnlyRuleGroupIds, v) +} + +// GetLogOnlyRuleIds returns the LogOnlyRuleIds field value if set, zero value otherwise. +func (o *WafConfigPatch) GetLogOnlyRuleIds() (res WafConfigPatchGetLogOnlyRuleIdsRetType) { + res, _ = o.GetLogOnlyRuleIdsOk() + return +} + +// GetLogOnlyRuleIdsOk returns a tuple with the LogOnlyRuleIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfigPatch) GetLogOnlyRuleIdsOk() (ret WafConfigPatchGetLogOnlyRuleIdsRetType, ok bool) { + return getWafConfigPatchGetLogOnlyRuleIdsAttributeTypeOk(o.LogOnlyRuleIds) +} + +// HasLogOnlyRuleIds returns a boolean if a field has been set. +func (o *WafConfigPatch) HasLogOnlyRuleIds() bool { + _, ok := o.GetLogOnlyRuleIdsOk() + return ok +} + +// SetLogOnlyRuleIds gets a reference to the given []string and assigns it to the LogOnlyRuleIds field. +func (o *WafConfigPatch) SetLogOnlyRuleIds(v WafConfigPatchGetLogOnlyRuleIdsRetType) { + setWafConfigPatchGetLogOnlyRuleIdsAttributeType(&o.LogOnlyRuleIds, v) +} + // GetMode returns the Mode field value if set, zero value otherwise. func (o *WafConfigPatch) GetMode() (res WafConfigPatchGetModeRetType) { res, _ = o.GetModeOk() @@ -103,6 +661,29 @@ func (o *WafConfigPatch) SetMode(v WafConfigPatchGetModeRetType) { setWafConfigPatchGetModeAttributeType(&o.Mode, v) } +// GetParanoiaLevel returns the ParanoiaLevel field value if set, zero value otherwise. +func (o *WafConfigPatch) GetParanoiaLevel() (res WafConfigPatchGetParanoiaLevelRetType) { + res, _ = o.GetParanoiaLevelOk() + return +} + +// GetParanoiaLevelOk returns a tuple with the ParanoiaLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WafConfigPatch) GetParanoiaLevelOk() (ret WafConfigPatchGetParanoiaLevelRetType, ok bool) { + return getWafConfigPatchGetParanoiaLevelAttributeTypeOk(o.ParanoiaLevel) +} + +// HasParanoiaLevel returns a boolean if a field has been set. +func (o *WafConfigPatch) HasParanoiaLevel() bool { + _, ok := o.GetParanoiaLevelOk() + return ok +} + +// SetParanoiaLevel gets a reference to the given WafParanoiaLevel and assigns it to the ParanoiaLevel field. +func (o *WafConfigPatch) SetParanoiaLevel(v WafConfigPatchGetParanoiaLevelRetType) { + setWafConfigPatchGetParanoiaLevelAttributeType(&o.ParanoiaLevel, v) +} + // GetType returns the Type field value if set, zero value otherwise. func (o *WafConfigPatch) GetType() (res WafConfigPatchGetTypeRetType) { res, _ = o.GetTypeOk() @@ -128,9 +709,48 @@ func (o *WafConfigPatch) SetType(v WafConfigPatchGetTypeRetType) { func (o WafConfigPatch) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getWafConfigPatchGetAllowedHttpMethodsAttributeTypeOk(o.AllowedHttpMethods); ok { + toSerialize["AllowedHttpMethods"] = val + } + if val, ok := getWafConfigPatchGetAllowedHttpVersionsAttributeTypeOk(o.AllowedHttpVersions); ok { + toSerialize["AllowedHttpVersions"] = val + } + if val, ok := getWafConfigPatchGetAllowedRequestContentTypesAttributeTypeOk(o.AllowedRequestContentTypes); ok { + toSerialize["AllowedRequestContentTypes"] = val + } + if val, ok := getWafConfigPatchGetDisabledRuleCollectionIdsAttributeTypeOk(o.DisabledRuleCollectionIds); ok { + toSerialize["DisabledRuleCollectionIds"] = val + } + if val, ok := getWafConfigPatchGetDisabledRuleGroupIdsAttributeTypeOk(o.DisabledRuleGroupIds); ok { + toSerialize["DisabledRuleGroupIds"] = val + } + if val, ok := getWafConfigPatchGetDisabledRuleIdsAttributeTypeOk(o.DisabledRuleIds); ok { + toSerialize["DisabledRuleIds"] = val + } + if val, ok := getWafConfigPatchGetEnabledRuleCollectionIdsAttributeTypeOk(o.EnabledRuleCollectionIds); ok { + toSerialize["EnabledRuleCollectionIds"] = val + } + if val, ok := getWafConfigPatchGetEnabledRuleGroupIdsAttributeTypeOk(o.EnabledRuleGroupIds); ok { + toSerialize["EnabledRuleGroupIds"] = val + } + if val, ok := getWafConfigPatchGetEnabledRuleIdsAttributeTypeOk(o.EnabledRuleIds); ok { + toSerialize["EnabledRuleIds"] = val + } + if val, ok := getWafConfigPatchGetLogOnlyRuleCollectionIdsAttributeTypeOk(o.LogOnlyRuleCollectionIds); ok { + toSerialize["LogOnlyRuleCollectionIds"] = val + } + if val, ok := getWafConfigPatchGetLogOnlyRuleGroupIdsAttributeTypeOk(o.LogOnlyRuleGroupIds); ok { + toSerialize["LogOnlyRuleGroupIds"] = val + } + if val, ok := getWafConfigPatchGetLogOnlyRuleIdsAttributeTypeOk(o.LogOnlyRuleIds); ok { + toSerialize["LogOnlyRuleIds"] = val + } if val, ok := getWafConfigPatchGetModeAttributeTypeOk(o.Mode); ok { toSerialize["Mode"] = val } + if val, ok := getWafConfigPatchGetParanoiaLevelAttributeTypeOk(o.ParanoiaLevel); ok { + toSerialize["ParanoiaLevel"] = val + } if val, ok := getWafConfigPatchGetTypeAttributeTypeOk(o.Type); ok { toSerialize["Type"] = val } diff --git a/services/cdn/model_waf_config_patch_test.go b/services/cdn/model_waf_config_patch_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_waf_config_patch_test.go +++ b/services/cdn/model_waf_config_patch_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_waf_config_test.go b/services/cdn/model_waf_config_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_waf_config_test.go +++ b/services/cdn/model_waf_config_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_waf_mode.go b/services/cdn/model_waf_mode.go index 70775c73e..aa0831298 100644 --- a/services/cdn/model_waf_mode.go +++ b/services/cdn/model_waf_mode.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,7 +15,7 @@ import ( "fmt" ) -// WafMode the model 'WafMode' +// WafMode - `ENABLED`: The WAF actively inspects and blocks malicious requests. - `DISABLED`: The WAF is completely off. No inspection occurs. - `LOG_ONLY`: The WAF inspects requests and logs matches but never blocks. type WafMode string // List of WafMode diff --git a/services/cdn/model_waf_mode_test.go b/services/cdn/model_waf_mode_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_waf_mode_test.go +++ b/services/cdn/model_waf_mode_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_waf_paranoia_level.go b/services/cdn/model_waf_paranoia_level.go new file mode 100644 index 000000000..3fcbee8df --- /dev/null +++ b/services/cdn/model_waf_paranoia_level.go @@ -0,0 +1,119 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" + "fmt" +) + +// WafParanoiaLevel The paranoia level defines how aggressively the WAF should action on requests. It ranges from `L1` (least strict, lowest chance of false positives) to `L4` (most strict, highest chance of false positives). A higher paranoia level is more effective at catching attacks but can also block legitimate traffic. +type WafParanoiaLevel string + +// List of WafParanoiaLevel +const ( + WAFPARANOIALEVEL_L1 WafParanoiaLevel = "L1" + WAFPARANOIALEVEL_L2 WafParanoiaLevel = "L2" + WAFPARANOIALEVEL_L3 WafParanoiaLevel = "L3" + WAFPARANOIALEVEL_L4 WafParanoiaLevel = "L4" +) + +// All allowed values of WafParanoiaLevel enum +var AllowedWafParanoiaLevelEnumValues = []WafParanoiaLevel{ + "L1", + "L2", + "L3", + "L4", +} + +func (v *WafParanoiaLevel) 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 := WafParanoiaLevel(value) + for _, existing := range AllowedWafParanoiaLevelEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid WafParanoiaLevel", value) +} + +// NewWafParanoiaLevelFromValue returns a pointer to a valid WafParanoiaLevel +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewWafParanoiaLevelFromValue(v string) (*WafParanoiaLevel, error) { + ev := WafParanoiaLevel(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for WafParanoiaLevel: valid values are %v", v, AllowedWafParanoiaLevelEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v WafParanoiaLevel) IsValid() bool { + for _, existing := range AllowedWafParanoiaLevelEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to WafParanoiaLevel value +func (v WafParanoiaLevel) Ptr() *WafParanoiaLevel { + return &v +} + +type NullableWafParanoiaLevel struct { + value *WafParanoiaLevel + isSet bool +} + +func (v NullableWafParanoiaLevel) Get() *WafParanoiaLevel { + return v.value +} + +func (v *NullableWafParanoiaLevel) Set(val *WafParanoiaLevel) { + v.value = val + v.isSet = true +} + +func (v NullableWafParanoiaLevel) IsSet() bool { + return v.isSet +} + +func (v *NullableWafParanoiaLevel) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafParanoiaLevel(val *WafParanoiaLevel) *NullableWafParanoiaLevel { + return &NullableWafParanoiaLevel{value: val, isSet: true} +} + +func (v NullableWafParanoiaLevel) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafParanoiaLevel) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_waf_paranoia_level_test.go b/services/cdn/model_waf_paranoia_level_test.go new file mode 100644 index 000000000..d7e05bb41 --- /dev/null +++ b/services/cdn/model_waf_paranoia_level_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_waf_rule.go b/services/cdn/model_waf_rule.go index a0b3909d1..faa854c8c 100644 --- a/services/cdn/model_waf_rule.go +++ b/services/cdn/model_waf_rule.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_waf_rule_action.go b/services/cdn/model_waf_rule_action.go new file mode 100644 index 000000000..0c65fc190 --- /dev/null +++ b/services/cdn/model_waf_rule_action.go @@ -0,0 +1,117 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" + "fmt" +) + +// WAFRuleAction The action a WAF rule can take based on a request +type WAFRuleAction string + +// List of WAFRuleAction +const ( + WAFRULEACTION_BLOCKED WAFRuleAction = "BLOCKED" + WAFRULEACTION_LOGGED WAFRuleAction = "LOGGED" + WAFRULEACTION_ALLOWED WAFRuleAction = "ALLOWED" +) + +// All allowed values of WAFRuleAction enum +var AllowedWAFRuleActionEnumValues = []WAFRuleAction{ + "BLOCKED", + "LOGGED", + "ALLOWED", +} + +func (v *WAFRuleAction) 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 := WAFRuleAction(value) + for _, existing := range AllowedWAFRuleActionEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid WAFRuleAction", value) +} + +// NewWAFRuleActionFromValue returns a pointer to a valid WAFRuleAction +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewWAFRuleActionFromValue(v string) (*WAFRuleAction, error) { + ev := WAFRuleAction(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for WAFRuleAction: valid values are %v", v, AllowedWAFRuleActionEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v WAFRuleAction) IsValid() bool { + for _, existing := range AllowedWAFRuleActionEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to WAFRuleAction value +func (v WAFRuleAction) Ptr() *WAFRuleAction { + return &v +} + +type NullableWAFRuleAction struct { + value *WAFRuleAction + isSet bool +} + +func (v NullableWAFRuleAction) Get() *WAFRuleAction { + return v.value +} + +func (v *NullableWAFRuleAction) Set(val *WAFRuleAction) { + v.value = val + v.isSet = true +} + +func (v NullableWAFRuleAction) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFRuleAction) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFRuleAction(val *WAFRuleAction) *NullableWAFRuleAction { + return &NullableWAFRuleAction{value: val, isSet: true} +} + +func (v NullableWAFRuleAction) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFRuleAction) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_waf_rule_action_test.go b/services/cdn/model_waf_rule_action_test.go new file mode 100644 index 000000000..d7e05bb41 --- /dev/null +++ b/services/cdn/model_waf_rule_action_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_waf_rule_collection.go b/services/cdn/model_waf_rule_collection.go index 8ec1ab667..f5a76d08b 100644 --- a/services/cdn/model_waf_rule_collection.go +++ b/services/cdn/model_waf_rule_collection.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_waf_rule_collection_test.go b/services/cdn/model_waf_rule_collection_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_waf_rule_collection_test.go +++ b/services/cdn/model_waf_rule_collection_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_waf_rule_group.go b/services/cdn/model_waf_rule_group.go index b5f16f772..7b1141be5 100644 --- a/services/cdn/model_waf_rule_group.go +++ b/services/cdn/model_waf_rule_group.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_waf_rule_group_test.go b/services/cdn/model_waf_rule_group_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_waf_rule_group_test.go +++ b/services/cdn/model_waf_rule_group_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_waf_rule_test.go b/services/cdn/model_waf_rule_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_waf_rule_test.go +++ b/services/cdn/model_waf_rule_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_waf_status_rule_block.go b/services/cdn/model_waf_status_rule_block.go index 10050279b..0c45fb1a0 100644 --- a/services/cdn/model_waf_status_rule_block.go +++ b/services/cdn/model_waf_status_rule_block.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -38,11 +38,33 @@ func setWafStatusRuleBlockGetIdAttributeType(arg *WafStatusRuleBlockGetIdAttribu type WafStatusRuleBlockGetIdArgType = string type WafStatusRuleBlockGetIdRetType = string +/* + types and functions for reason +*/ + +// isModel +type WafStatusRuleBlockGetReasonAttributeType = *WafStatusRuleBlockReason +type WafStatusRuleBlockGetReasonArgType = WafStatusRuleBlockReason +type WafStatusRuleBlockGetReasonRetType = WafStatusRuleBlockReason + +func getWafStatusRuleBlockGetReasonAttributeTypeOk(arg WafStatusRuleBlockGetReasonAttributeType) (ret WafStatusRuleBlockGetReasonRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafStatusRuleBlockGetReasonAttributeType(arg *WafStatusRuleBlockGetReasonAttributeType, val WafStatusRuleBlockGetReasonRetType) { + *arg = &val +} + // WafStatusRuleBlock struct for WafStatusRuleBlock type WafStatusRuleBlock struct { // Specifies the Id of the Rule. // REQUIRED Id WafStatusRuleBlockGetIdAttributeType `json:"id" required:"true"` + // REQUIRED + Reason WafStatusRuleBlockGetReasonAttributeType `json:"reason" required:"true"` } type _WafStatusRuleBlock WafStatusRuleBlock @@ -51,9 +73,10 @@ type _WafStatusRuleBlock WafStatusRuleBlock // 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 NewWafStatusRuleBlock(id WafStatusRuleBlockGetIdArgType) *WafStatusRuleBlock { +func NewWafStatusRuleBlock(id WafStatusRuleBlockGetIdArgType, reason WafStatusRuleBlockGetReasonArgType) *WafStatusRuleBlock { this := WafStatusRuleBlock{} setWafStatusRuleBlockGetIdAttributeType(&this.Id, id) + setWafStatusRuleBlockGetReasonAttributeType(&this.Reason, reason) return &this } @@ -82,11 +105,31 @@ func (o *WafStatusRuleBlock) SetId(v WafStatusRuleBlockGetIdRetType) { setWafStatusRuleBlockGetIdAttributeType(&o.Id, v) } +// GetReason returns the Reason field value +func (o *WafStatusRuleBlock) GetReason() (ret WafStatusRuleBlockGetReasonRetType) { + ret, _ = o.GetReasonOk() + return ret +} + +// GetReasonOk returns a tuple with the Reason field value +// and a boolean to check if the value has been set. +func (o *WafStatusRuleBlock) GetReasonOk() (ret WafStatusRuleBlockGetReasonRetType, ok bool) { + return getWafStatusRuleBlockGetReasonAttributeTypeOk(o.Reason) +} + +// SetReason sets field value +func (o *WafStatusRuleBlock) SetReason(v WafStatusRuleBlockGetReasonRetType) { + setWafStatusRuleBlockGetReasonAttributeType(&o.Reason, v) +} + func (o WafStatusRuleBlock) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getWafStatusRuleBlockGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } + if val, ok := getWafStatusRuleBlockGetReasonAttributeTypeOk(o.Reason); ok { + toSerialize["Reason"] = val + } return toSerialize, nil } diff --git a/services/cdn/model_waf_status_rule_block_reason.go b/services/cdn/model_waf_status_rule_block_reason.go new file mode 100644 index 000000000..0108e7443 --- /dev/null +++ b/services/cdn/model_waf_status_rule_block_reason.go @@ -0,0 +1,283 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" + "fmt" +) + +// WafStatusRuleBlockReason - Defines the Reason why a Rule is in the specified state (set to be enabled, disabled or logOnly). +type WafStatusRuleBlockReason struct { + WafStatusRuleBlockReasonDirectlyDefined *WafStatusRuleBlockReasonDirectlyDefined + WafStatusRuleBlockReasonInheritedFromCollection *WafStatusRuleBlockReasonInheritedFromCollection + WafStatusRuleBlockReasonInheritedFromGroup *WafStatusRuleBlockReasonInheritedFromGroup + WafStatusRuleBlockReasonInvalidWafType *WafStatusRuleBlockReasonInvalidWafType + WafStatusRuleBlockReasonNeverDefined *WafStatusRuleBlockReasonNeverDefined +} + +// WafStatusRuleBlockReasonDirectlyDefinedAsWafStatusRuleBlockReason is a convenience function that returns WafStatusRuleBlockReasonDirectlyDefined wrapped in WafStatusRuleBlockReason +func WafStatusRuleBlockReasonDirectlyDefinedAsWafStatusRuleBlockReason(v *WafStatusRuleBlockReasonDirectlyDefined) WafStatusRuleBlockReason { + return WafStatusRuleBlockReason{ + WafStatusRuleBlockReasonDirectlyDefined: v, + } +} + +// WafStatusRuleBlockReasonInheritedFromCollectionAsWafStatusRuleBlockReason is a convenience function that returns WafStatusRuleBlockReasonInheritedFromCollection wrapped in WafStatusRuleBlockReason +func WafStatusRuleBlockReasonInheritedFromCollectionAsWafStatusRuleBlockReason(v *WafStatusRuleBlockReasonInheritedFromCollection) WafStatusRuleBlockReason { + return WafStatusRuleBlockReason{ + WafStatusRuleBlockReasonInheritedFromCollection: v, + } +} + +// WafStatusRuleBlockReasonInheritedFromGroupAsWafStatusRuleBlockReason is a convenience function that returns WafStatusRuleBlockReasonInheritedFromGroup wrapped in WafStatusRuleBlockReason +func WafStatusRuleBlockReasonInheritedFromGroupAsWafStatusRuleBlockReason(v *WafStatusRuleBlockReasonInheritedFromGroup) WafStatusRuleBlockReason { + return WafStatusRuleBlockReason{ + WafStatusRuleBlockReasonInheritedFromGroup: v, + } +} + +// WafStatusRuleBlockReasonInvalidWafTypeAsWafStatusRuleBlockReason is a convenience function that returns WafStatusRuleBlockReasonInvalidWafType wrapped in WafStatusRuleBlockReason +func WafStatusRuleBlockReasonInvalidWafTypeAsWafStatusRuleBlockReason(v *WafStatusRuleBlockReasonInvalidWafType) WafStatusRuleBlockReason { + return WafStatusRuleBlockReason{ + WafStatusRuleBlockReasonInvalidWafType: v, + } +} + +// WafStatusRuleBlockReasonNeverDefinedAsWafStatusRuleBlockReason is a convenience function that returns WafStatusRuleBlockReasonNeverDefined wrapped in WafStatusRuleBlockReason +func WafStatusRuleBlockReasonNeverDefinedAsWafStatusRuleBlockReason(v *WafStatusRuleBlockReasonNeverDefined) WafStatusRuleBlockReason { + return WafStatusRuleBlockReason{ + WafStatusRuleBlockReasonNeverDefined: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *WafStatusRuleBlockReason) 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 'WafStatusRuleBlockReasonDirectlyDefined' + if jsonDict["type"] == "WafStatusRuleBlockReasonDirectlyDefined" { + // try to unmarshal JSON data into WafStatusRuleBlockReasonDirectlyDefined + err = json.Unmarshal(data, &dst.WafStatusRuleBlockReasonDirectlyDefined) + if err == nil { + return nil // data stored in dst.WafStatusRuleBlockReasonDirectlyDefined, return on the first match + } else { + dst.WafStatusRuleBlockReasonDirectlyDefined = nil + return fmt.Errorf("failed to unmarshal WafStatusRuleBlockReason as WafStatusRuleBlockReasonDirectlyDefined: %s", err.Error()) + } + } + + // check if the discriminator value is 'WafStatusRuleBlockReasonInheritedFromCollection' + if jsonDict["type"] == "WafStatusRuleBlockReasonInheritedFromCollection" { + // try to unmarshal JSON data into WafStatusRuleBlockReasonInheritedFromCollection + err = json.Unmarshal(data, &dst.WafStatusRuleBlockReasonInheritedFromCollection) + if err == nil { + return nil // data stored in dst.WafStatusRuleBlockReasonInheritedFromCollection, return on the first match + } else { + dst.WafStatusRuleBlockReasonInheritedFromCollection = nil + return fmt.Errorf("failed to unmarshal WafStatusRuleBlockReason as WafStatusRuleBlockReasonInheritedFromCollection: %s", err.Error()) + } + } + + // check if the discriminator value is 'WafStatusRuleBlockReasonInheritedFromGroup' + if jsonDict["type"] == "WafStatusRuleBlockReasonInheritedFromGroup" { + // try to unmarshal JSON data into WafStatusRuleBlockReasonInheritedFromGroup + err = json.Unmarshal(data, &dst.WafStatusRuleBlockReasonInheritedFromGroup) + if err == nil { + return nil // data stored in dst.WafStatusRuleBlockReasonInheritedFromGroup, return on the first match + } else { + dst.WafStatusRuleBlockReasonInheritedFromGroup = nil + return fmt.Errorf("failed to unmarshal WafStatusRuleBlockReason as WafStatusRuleBlockReasonInheritedFromGroup: %s", err.Error()) + } + } + + // check if the discriminator value is 'WafStatusRuleBlockReasonInvalidWafType' + if jsonDict["type"] == "WafStatusRuleBlockReasonInvalidWafType" { + // try to unmarshal JSON data into WafStatusRuleBlockReasonInvalidWafType + err = json.Unmarshal(data, &dst.WafStatusRuleBlockReasonInvalidWafType) + if err == nil { + return nil // data stored in dst.WafStatusRuleBlockReasonInvalidWafType, return on the first match + } else { + dst.WafStatusRuleBlockReasonInvalidWafType = nil + return fmt.Errorf("failed to unmarshal WafStatusRuleBlockReason as WafStatusRuleBlockReasonInvalidWafType: %s", err.Error()) + } + } + + // check if the discriminator value is 'WafStatusRuleBlockReasonNeverDefined' + if jsonDict["type"] == "WafStatusRuleBlockReasonNeverDefined" { + // try to unmarshal JSON data into WafStatusRuleBlockReasonNeverDefined + err = json.Unmarshal(data, &dst.WafStatusRuleBlockReasonNeverDefined) + if err == nil { + return nil // data stored in dst.WafStatusRuleBlockReasonNeverDefined, return on the first match + } else { + dst.WafStatusRuleBlockReasonNeverDefined = nil + return fmt.Errorf("failed to unmarshal WafStatusRuleBlockReason as WafStatusRuleBlockReasonNeverDefined: %s", err.Error()) + } + } + + // check if the discriminator value is 'directlyDefined' + if jsonDict["type"] == "directlyDefined" { + // try to unmarshal JSON data into WafStatusRuleBlockReasonDirectlyDefined + err = json.Unmarshal(data, &dst.WafStatusRuleBlockReasonDirectlyDefined) + if err == nil { + return nil // data stored in dst.WafStatusRuleBlockReasonDirectlyDefined, return on the first match + } else { + dst.WafStatusRuleBlockReasonDirectlyDefined = nil + return fmt.Errorf("failed to unmarshal WafStatusRuleBlockReason as WafStatusRuleBlockReasonDirectlyDefined: %s", err.Error()) + } + } + + // check if the discriminator value is 'inheritedFromCollection' + if jsonDict["type"] == "inheritedFromCollection" { + // try to unmarshal JSON data into WafStatusRuleBlockReasonInheritedFromCollection + err = json.Unmarshal(data, &dst.WafStatusRuleBlockReasonInheritedFromCollection) + if err == nil { + return nil // data stored in dst.WafStatusRuleBlockReasonInheritedFromCollection, return on the first match + } else { + dst.WafStatusRuleBlockReasonInheritedFromCollection = nil + return fmt.Errorf("failed to unmarshal WafStatusRuleBlockReason as WafStatusRuleBlockReasonInheritedFromCollection: %s", err.Error()) + } + } + + // check if the discriminator value is 'inheritedFromGroup' + if jsonDict["type"] == "inheritedFromGroup" { + // try to unmarshal JSON data into WafStatusRuleBlockReasonInheritedFromGroup + err = json.Unmarshal(data, &dst.WafStatusRuleBlockReasonInheritedFromGroup) + if err == nil { + return nil // data stored in dst.WafStatusRuleBlockReasonInheritedFromGroup, return on the first match + } else { + dst.WafStatusRuleBlockReasonInheritedFromGroup = nil + return fmt.Errorf("failed to unmarshal WafStatusRuleBlockReason as WafStatusRuleBlockReasonInheritedFromGroup: %s", err.Error()) + } + } + + // check if the discriminator value is 'invalidWafType' + if jsonDict["type"] == "invalidWafType" { + // try to unmarshal JSON data into WafStatusRuleBlockReasonInvalidWafType + err = json.Unmarshal(data, &dst.WafStatusRuleBlockReasonInvalidWafType) + if err == nil { + return nil // data stored in dst.WafStatusRuleBlockReasonInvalidWafType, return on the first match + } else { + dst.WafStatusRuleBlockReasonInvalidWafType = nil + return fmt.Errorf("failed to unmarshal WafStatusRuleBlockReason as WafStatusRuleBlockReasonInvalidWafType: %s", err.Error()) + } + } + + // check if the discriminator value is 'neverDefined' + if jsonDict["type"] == "neverDefined" { + // try to unmarshal JSON data into WafStatusRuleBlockReasonNeverDefined + err = json.Unmarshal(data, &dst.WafStatusRuleBlockReasonNeverDefined) + if err == nil { + return nil // data stored in dst.WafStatusRuleBlockReasonNeverDefined, return on the first match + } else { + dst.WafStatusRuleBlockReasonNeverDefined = nil + return fmt.Errorf("failed to unmarshal WafStatusRuleBlockReason as WafStatusRuleBlockReasonNeverDefined: %s", err.Error()) + } + } + + return nil +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src WafStatusRuleBlockReason) MarshalJSON() ([]byte, error) { + if src.WafStatusRuleBlockReasonDirectlyDefined != nil { + return json.Marshal(&src.WafStatusRuleBlockReasonDirectlyDefined) + } + + if src.WafStatusRuleBlockReasonInheritedFromCollection != nil { + return json.Marshal(&src.WafStatusRuleBlockReasonInheritedFromCollection) + } + + if src.WafStatusRuleBlockReasonInheritedFromGroup != nil { + return json.Marshal(&src.WafStatusRuleBlockReasonInheritedFromGroup) + } + + if src.WafStatusRuleBlockReasonInvalidWafType != nil { + return json.Marshal(&src.WafStatusRuleBlockReasonInvalidWafType) + } + + if src.WafStatusRuleBlockReasonNeverDefined != nil { + return json.Marshal(&src.WafStatusRuleBlockReasonNeverDefined) + } + + return []byte("{}"), nil // no data in oneOf schemas => empty JSON object +} + +// Get the actual instance +func (obj *WafStatusRuleBlockReason) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.WafStatusRuleBlockReasonDirectlyDefined != nil { + return obj.WafStatusRuleBlockReasonDirectlyDefined + } + + if obj.WafStatusRuleBlockReasonInheritedFromCollection != nil { + return obj.WafStatusRuleBlockReasonInheritedFromCollection + } + + if obj.WafStatusRuleBlockReasonInheritedFromGroup != nil { + return obj.WafStatusRuleBlockReasonInheritedFromGroup + } + + if obj.WafStatusRuleBlockReasonInvalidWafType != nil { + return obj.WafStatusRuleBlockReasonInvalidWafType + } + + if obj.WafStatusRuleBlockReasonNeverDefined != nil { + return obj.WafStatusRuleBlockReasonNeverDefined + } + + // all schemas are nil + return nil +} + +type NullableWafStatusRuleBlockReason struct { + value *WafStatusRuleBlockReason + isSet bool +} + +func (v NullableWafStatusRuleBlockReason) Get() *WafStatusRuleBlockReason { + return v.value +} + +func (v *NullableWafStatusRuleBlockReason) Set(val *WafStatusRuleBlockReason) { + v.value = val + v.isSet = true +} + +func (v NullableWafStatusRuleBlockReason) IsSet() bool { + return v.isSet +} + +func (v *NullableWafStatusRuleBlockReason) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafStatusRuleBlockReason(val *WafStatusRuleBlockReason) *NullableWafStatusRuleBlockReason { + return &NullableWafStatusRuleBlockReason{value: val, isSet: true} +} + +func (v NullableWafStatusRuleBlockReason) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafStatusRuleBlockReason) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_waf_status_rule_block_reason_directly_defined.go b/services/cdn/model_waf_status_rule_block_reason_directly_defined.go new file mode 100644 index 000000000..94dbe8995 --- /dev/null +++ b/services/cdn/model_waf_status_rule_block_reason_directly_defined.go @@ -0,0 +1,127 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the WafStatusRuleBlockReasonDirectlyDefined type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafStatusRuleBlockReasonDirectlyDefined{} + +/* + types and functions for type +*/ + +// isNotNullableString +type WafStatusRuleBlockReasonDirectlyDefinedGetTypeAttributeType = *string + +func getWafStatusRuleBlockReasonDirectlyDefinedGetTypeAttributeTypeOk(arg WafStatusRuleBlockReasonDirectlyDefinedGetTypeAttributeType) (ret WafStatusRuleBlockReasonDirectlyDefinedGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafStatusRuleBlockReasonDirectlyDefinedGetTypeAttributeType(arg *WafStatusRuleBlockReasonDirectlyDefinedGetTypeAttributeType, val WafStatusRuleBlockReasonDirectlyDefinedGetTypeRetType) { + *arg = &val +} + +type WafStatusRuleBlockReasonDirectlyDefinedGetTypeArgType = string +type WafStatusRuleBlockReasonDirectlyDefinedGetTypeRetType = string + +// WafStatusRuleBlockReasonDirectlyDefined struct for WafStatusRuleBlockReasonDirectlyDefined +type WafStatusRuleBlockReasonDirectlyDefined struct { + // This is always `directlyDefined` + // REQUIRED + Type WafStatusRuleBlockReasonDirectlyDefinedGetTypeAttributeType `json:"type" required:"true"` +} + +type _WafStatusRuleBlockReasonDirectlyDefined WafStatusRuleBlockReasonDirectlyDefined + +// NewWafStatusRuleBlockReasonDirectlyDefined instantiates a new WafStatusRuleBlockReasonDirectlyDefined 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 NewWafStatusRuleBlockReasonDirectlyDefined(types WafStatusRuleBlockReasonDirectlyDefinedGetTypeArgType) *WafStatusRuleBlockReasonDirectlyDefined { + this := WafStatusRuleBlockReasonDirectlyDefined{} + setWafStatusRuleBlockReasonDirectlyDefinedGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewWafStatusRuleBlockReasonDirectlyDefinedWithDefaults instantiates a new WafStatusRuleBlockReasonDirectlyDefined 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 NewWafStatusRuleBlockReasonDirectlyDefinedWithDefaults() *WafStatusRuleBlockReasonDirectlyDefined { + this := WafStatusRuleBlockReasonDirectlyDefined{} + return &this +} + +// GetType returns the Type field value +func (o *WafStatusRuleBlockReasonDirectlyDefined) GetType() (ret WafStatusRuleBlockReasonDirectlyDefinedGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *WafStatusRuleBlockReasonDirectlyDefined) GetTypeOk() (ret WafStatusRuleBlockReasonDirectlyDefinedGetTypeRetType, ok bool) { + return getWafStatusRuleBlockReasonDirectlyDefinedGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +func (o *WafStatusRuleBlockReasonDirectlyDefined) SetType(v WafStatusRuleBlockReasonDirectlyDefinedGetTypeRetType) { + setWafStatusRuleBlockReasonDirectlyDefinedGetTypeAttributeType(&o.Type, v) +} + +func (o WafStatusRuleBlockReasonDirectlyDefined) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getWafStatusRuleBlockReasonDirectlyDefinedGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableWafStatusRuleBlockReasonDirectlyDefined struct { + value *WafStatusRuleBlockReasonDirectlyDefined + isSet bool +} + +func (v NullableWafStatusRuleBlockReasonDirectlyDefined) Get() *WafStatusRuleBlockReasonDirectlyDefined { + return v.value +} + +func (v *NullableWafStatusRuleBlockReasonDirectlyDefined) Set(val *WafStatusRuleBlockReasonDirectlyDefined) { + v.value = val + v.isSet = true +} + +func (v NullableWafStatusRuleBlockReasonDirectlyDefined) IsSet() bool { + return v.isSet +} + +func (v *NullableWafStatusRuleBlockReasonDirectlyDefined) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafStatusRuleBlockReasonDirectlyDefined(val *WafStatusRuleBlockReasonDirectlyDefined) *NullableWafStatusRuleBlockReasonDirectlyDefined { + return &NullableWafStatusRuleBlockReasonDirectlyDefined{value: val, isSet: true} +} + +func (v NullableWafStatusRuleBlockReasonDirectlyDefined) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafStatusRuleBlockReasonDirectlyDefined) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_waf_status_rule_block_reason_directly_defined_test.go b/services/cdn/model_waf_status_rule_block_reason_directly_defined_test.go new file mode 100644 index 000000000..d7e05bb41 --- /dev/null +++ b/services/cdn/model_waf_status_rule_block_reason_directly_defined_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_waf_status_rule_block_reason_inherited_from_collection.go b/services/cdn/model_waf_status_rule_block_reason_inherited_from_collection.go new file mode 100644 index 000000000..63df54ba1 --- /dev/null +++ b/services/cdn/model_waf_status_rule_block_reason_inherited_from_collection.go @@ -0,0 +1,172 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the WafStatusRuleBlockReasonInheritedFromCollection type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafStatusRuleBlockReasonInheritedFromCollection{} + +/* + types and functions for collectionId +*/ + +// isNotNullableString +type WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdAttributeType = *string + +func getWafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdAttributeTypeOk(arg WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdAttributeType) (ret WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdAttributeType(arg *WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdAttributeType, val WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdRetType) { + *arg = &val +} + +type WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdArgType = string +type WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdRetType = string + +/* + types and functions for type +*/ + +// isNotNullableString +type WafStatusRuleBlockReasonInheritedFromCollectionGetTypeAttributeType = *string + +func getWafStatusRuleBlockReasonInheritedFromCollectionGetTypeAttributeTypeOk(arg WafStatusRuleBlockReasonInheritedFromCollectionGetTypeAttributeType) (ret WafStatusRuleBlockReasonInheritedFromCollectionGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafStatusRuleBlockReasonInheritedFromCollectionGetTypeAttributeType(arg *WafStatusRuleBlockReasonInheritedFromCollectionGetTypeAttributeType, val WafStatusRuleBlockReasonInheritedFromCollectionGetTypeRetType) { + *arg = &val +} + +type WafStatusRuleBlockReasonInheritedFromCollectionGetTypeArgType = string +type WafStatusRuleBlockReasonInheritedFromCollectionGetTypeRetType = string + +// WafStatusRuleBlockReasonInheritedFromCollection struct for WafStatusRuleBlockReasonInheritedFromCollection +type WafStatusRuleBlockReasonInheritedFromCollection struct { + // The Collection that caused this rule to be in its current state. + // REQUIRED + CollectionId WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdAttributeType `json:"collectionId" required:"true"` + // This is always `inheritedFromCollection` + // REQUIRED + Type WafStatusRuleBlockReasonInheritedFromCollectionGetTypeAttributeType `json:"type" required:"true"` +} + +type _WafStatusRuleBlockReasonInheritedFromCollection WafStatusRuleBlockReasonInheritedFromCollection + +// NewWafStatusRuleBlockReasonInheritedFromCollection instantiates a new WafStatusRuleBlockReasonInheritedFromCollection 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 NewWafStatusRuleBlockReasonInheritedFromCollection(collectionId WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdArgType, types WafStatusRuleBlockReasonInheritedFromCollectionGetTypeArgType) *WafStatusRuleBlockReasonInheritedFromCollection { + this := WafStatusRuleBlockReasonInheritedFromCollection{} + setWafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdAttributeType(&this.CollectionId, collectionId) + setWafStatusRuleBlockReasonInheritedFromCollectionGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewWafStatusRuleBlockReasonInheritedFromCollectionWithDefaults instantiates a new WafStatusRuleBlockReasonInheritedFromCollection 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 NewWafStatusRuleBlockReasonInheritedFromCollectionWithDefaults() *WafStatusRuleBlockReasonInheritedFromCollection { + this := WafStatusRuleBlockReasonInheritedFromCollection{} + return &this +} + +// GetCollectionId returns the CollectionId field value +func (o *WafStatusRuleBlockReasonInheritedFromCollection) GetCollectionId() (ret WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdRetType) { + ret, _ = o.GetCollectionIdOk() + return ret +} + +// GetCollectionIdOk returns a tuple with the CollectionId field value +// and a boolean to check if the value has been set. +func (o *WafStatusRuleBlockReasonInheritedFromCollection) GetCollectionIdOk() (ret WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdRetType, ok bool) { + return getWafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdAttributeTypeOk(o.CollectionId) +} + +// SetCollectionId sets field value +func (o *WafStatusRuleBlockReasonInheritedFromCollection) SetCollectionId(v WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdRetType) { + setWafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdAttributeType(&o.CollectionId, v) +} + +// GetType returns the Type field value +func (o *WafStatusRuleBlockReasonInheritedFromCollection) GetType() (ret WafStatusRuleBlockReasonInheritedFromCollectionGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *WafStatusRuleBlockReasonInheritedFromCollection) GetTypeOk() (ret WafStatusRuleBlockReasonInheritedFromCollectionGetTypeRetType, ok bool) { + return getWafStatusRuleBlockReasonInheritedFromCollectionGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +func (o *WafStatusRuleBlockReasonInheritedFromCollection) SetType(v WafStatusRuleBlockReasonInheritedFromCollectionGetTypeRetType) { + setWafStatusRuleBlockReasonInheritedFromCollectionGetTypeAttributeType(&o.Type, v) +} + +func (o WafStatusRuleBlockReasonInheritedFromCollection) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getWafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdAttributeTypeOk(o.CollectionId); ok { + toSerialize["CollectionId"] = val + } + if val, ok := getWafStatusRuleBlockReasonInheritedFromCollectionGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableWafStatusRuleBlockReasonInheritedFromCollection struct { + value *WafStatusRuleBlockReasonInheritedFromCollection + isSet bool +} + +func (v NullableWafStatusRuleBlockReasonInheritedFromCollection) Get() *WafStatusRuleBlockReasonInheritedFromCollection { + return v.value +} + +func (v *NullableWafStatusRuleBlockReasonInheritedFromCollection) Set(val *WafStatusRuleBlockReasonInheritedFromCollection) { + v.value = val + v.isSet = true +} + +func (v NullableWafStatusRuleBlockReasonInheritedFromCollection) IsSet() bool { + return v.isSet +} + +func (v *NullableWafStatusRuleBlockReasonInheritedFromCollection) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafStatusRuleBlockReasonInheritedFromCollection(val *WafStatusRuleBlockReasonInheritedFromCollection) *NullableWafStatusRuleBlockReasonInheritedFromCollection { + return &NullableWafStatusRuleBlockReasonInheritedFromCollection{value: val, isSet: true} +} + +func (v NullableWafStatusRuleBlockReasonInheritedFromCollection) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafStatusRuleBlockReasonInheritedFromCollection) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_waf_status_rule_block_reason_inherited_from_collection_test.go b/services/cdn/model_waf_status_rule_block_reason_inherited_from_collection_test.go new file mode 100644 index 000000000..d7e05bb41 --- /dev/null +++ b/services/cdn/model_waf_status_rule_block_reason_inherited_from_collection_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_waf_status_rule_block_reason_inherited_from_group.go b/services/cdn/model_waf_status_rule_block_reason_inherited_from_group.go new file mode 100644 index 000000000..f18ac6958 --- /dev/null +++ b/services/cdn/model_waf_status_rule_block_reason_inherited_from_group.go @@ -0,0 +1,172 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the WafStatusRuleBlockReasonInheritedFromGroup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafStatusRuleBlockReasonInheritedFromGroup{} + +/* + types and functions for groupId +*/ + +// isNotNullableString +type WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdAttributeType = *string + +func getWafStatusRuleBlockReasonInheritedFromGroupGetGroupIdAttributeTypeOk(arg WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdAttributeType) (ret WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafStatusRuleBlockReasonInheritedFromGroupGetGroupIdAttributeType(arg *WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdAttributeType, val WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdRetType) { + *arg = &val +} + +type WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdArgType = string +type WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdRetType = string + +/* + types and functions for type +*/ + +// isNotNullableString +type WafStatusRuleBlockReasonInheritedFromGroupGetTypeAttributeType = *string + +func getWafStatusRuleBlockReasonInheritedFromGroupGetTypeAttributeTypeOk(arg WafStatusRuleBlockReasonInheritedFromGroupGetTypeAttributeType) (ret WafStatusRuleBlockReasonInheritedFromGroupGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafStatusRuleBlockReasonInheritedFromGroupGetTypeAttributeType(arg *WafStatusRuleBlockReasonInheritedFromGroupGetTypeAttributeType, val WafStatusRuleBlockReasonInheritedFromGroupGetTypeRetType) { + *arg = &val +} + +type WafStatusRuleBlockReasonInheritedFromGroupGetTypeArgType = string +type WafStatusRuleBlockReasonInheritedFromGroupGetTypeRetType = string + +// WafStatusRuleBlockReasonInheritedFromGroup struct for WafStatusRuleBlockReasonInheritedFromGroup +type WafStatusRuleBlockReasonInheritedFromGroup struct { + // The Group that caused this rule to be in its current state. + // REQUIRED + GroupId WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdAttributeType `json:"groupId" required:"true"` + // This is always `inheritedFromGroup` + // REQUIRED + Type WafStatusRuleBlockReasonInheritedFromGroupGetTypeAttributeType `json:"type" required:"true"` +} + +type _WafStatusRuleBlockReasonInheritedFromGroup WafStatusRuleBlockReasonInheritedFromGroup + +// NewWafStatusRuleBlockReasonInheritedFromGroup instantiates a new WafStatusRuleBlockReasonInheritedFromGroup 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 NewWafStatusRuleBlockReasonInheritedFromGroup(groupId WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdArgType, types WafStatusRuleBlockReasonInheritedFromGroupGetTypeArgType) *WafStatusRuleBlockReasonInheritedFromGroup { + this := WafStatusRuleBlockReasonInheritedFromGroup{} + setWafStatusRuleBlockReasonInheritedFromGroupGetGroupIdAttributeType(&this.GroupId, groupId) + setWafStatusRuleBlockReasonInheritedFromGroupGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewWafStatusRuleBlockReasonInheritedFromGroupWithDefaults instantiates a new WafStatusRuleBlockReasonInheritedFromGroup 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 NewWafStatusRuleBlockReasonInheritedFromGroupWithDefaults() *WafStatusRuleBlockReasonInheritedFromGroup { + this := WafStatusRuleBlockReasonInheritedFromGroup{} + return &this +} + +// GetGroupId returns the GroupId field value +func (o *WafStatusRuleBlockReasonInheritedFromGroup) GetGroupId() (ret WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdRetType) { + ret, _ = o.GetGroupIdOk() + return ret +} + +// GetGroupIdOk returns a tuple with the GroupId field value +// and a boolean to check if the value has been set. +func (o *WafStatusRuleBlockReasonInheritedFromGroup) GetGroupIdOk() (ret WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdRetType, ok bool) { + return getWafStatusRuleBlockReasonInheritedFromGroupGetGroupIdAttributeTypeOk(o.GroupId) +} + +// SetGroupId sets field value +func (o *WafStatusRuleBlockReasonInheritedFromGroup) SetGroupId(v WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdRetType) { + setWafStatusRuleBlockReasonInheritedFromGroupGetGroupIdAttributeType(&o.GroupId, v) +} + +// GetType returns the Type field value +func (o *WafStatusRuleBlockReasonInheritedFromGroup) GetType() (ret WafStatusRuleBlockReasonInheritedFromGroupGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *WafStatusRuleBlockReasonInheritedFromGroup) GetTypeOk() (ret WafStatusRuleBlockReasonInheritedFromGroupGetTypeRetType, ok bool) { + return getWafStatusRuleBlockReasonInheritedFromGroupGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +func (o *WafStatusRuleBlockReasonInheritedFromGroup) SetType(v WafStatusRuleBlockReasonInheritedFromGroupGetTypeRetType) { + setWafStatusRuleBlockReasonInheritedFromGroupGetTypeAttributeType(&o.Type, v) +} + +func (o WafStatusRuleBlockReasonInheritedFromGroup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getWafStatusRuleBlockReasonInheritedFromGroupGetGroupIdAttributeTypeOk(o.GroupId); ok { + toSerialize["GroupId"] = val + } + if val, ok := getWafStatusRuleBlockReasonInheritedFromGroupGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableWafStatusRuleBlockReasonInheritedFromGroup struct { + value *WafStatusRuleBlockReasonInheritedFromGroup + isSet bool +} + +func (v NullableWafStatusRuleBlockReasonInheritedFromGroup) Get() *WafStatusRuleBlockReasonInheritedFromGroup { + return v.value +} + +func (v *NullableWafStatusRuleBlockReasonInheritedFromGroup) Set(val *WafStatusRuleBlockReasonInheritedFromGroup) { + v.value = val + v.isSet = true +} + +func (v NullableWafStatusRuleBlockReasonInheritedFromGroup) IsSet() bool { + return v.isSet +} + +func (v *NullableWafStatusRuleBlockReasonInheritedFromGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafStatusRuleBlockReasonInheritedFromGroup(val *WafStatusRuleBlockReasonInheritedFromGroup) *NullableWafStatusRuleBlockReasonInheritedFromGroup { + return &NullableWafStatusRuleBlockReasonInheritedFromGroup{value: val, isSet: true} +} + +func (v NullableWafStatusRuleBlockReasonInheritedFromGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafStatusRuleBlockReasonInheritedFromGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_waf_status_rule_block_reason_inherited_from_group_test.go b/services/cdn/model_waf_status_rule_block_reason_inherited_from_group_test.go new file mode 100644 index 000000000..d7e05bb41 --- /dev/null +++ b/services/cdn/model_waf_status_rule_block_reason_inherited_from_group_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_waf_status_rule_block_reason_invalid_waf_type.go b/services/cdn/model_waf_status_rule_block_reason_invalid_waf_type.go new file mode 100644 index 000000000..e8767ed89 --- /dev/null +++ b/services/cdn/model_waf_status_rule_block_reason_invalid_waf_type.go @@ -0,0 +1,171 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the WafStatusRuleBlockReasonInvalidWafType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafStatusRuleBlockReasonInvalidWafType{} + +/* + types and functions for allowedWafTypes +*/ + +// isArray +type WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesAttributeType = *[]WafType +type WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesArgType = []WafType +type WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesRetType = []WafType + +func getWafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesAttributeTypeOk(arg WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesAttributeType) (ret WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesAttributeType(arg *WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesAttributeType, val WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesRetType) { + *arg = &val +} + +/* + types and functions for type +*/ + +// isNotNullableString +type WafStatusRuleBlockReasonInvalidWafTypeGetTypeAttributeType = *string + +func getWafStatusRuleBlockReasonInvalidWafTypeGetTypeAttributeTypeOk(arg WafStatusRuleBlockReasonInvalidWafTypeGetTypeAttributeType) (ret WafStatusRuleBlockReasonInvalidWafTypeGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafStatusRuleBlockReasonInvalidWafTypeGetTypeAttributeType(arg *WafStatusRuleBlockReasonInvalidWafTypeGetTypeAttributeType, val WafStatusRuleBlockReasonInvalidWafTypeGetTypeRetType) { + *arg = &val +} + +type WafStatusRuleBlockReasonInvalidWafTypeGetTypeArgType = string +type WafStatusRuleBlockReasonInvalidWafTypeGetTypeRetType = string + +// WafStatusRuleBlockReasonInvalidWafType struct for WafStatusRuleBlockReasonInvalidWafType +type WafStatusRuleBlockReasonInvalidWafType struct { + // A list containing all WAF Types which can use this Rule. You must patch you WAF to one of these WAF Types to make use of this rule. Rules show up with this state if they would have been enabled or logOnly otherwise. + // REQUIRED + AllowedWafTypes WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesAttributeType `json:"allowedWafTypes" required:"true"` + // This is always `invalidWafType` + // REQUIRED + Type WafStatusRuleBlockReasonInvalidWafTypeGetTypeAttributeType `json:"type" required:"true"` +} + +type _WafStatusRuleBlockReasonInvalidWafType WafStatusRuleBlockReasonInvalidWafType + +// NewWafStatusRuleBlockReasonInvalidWafType instantiates a new WafStatusRuleBlockReasonInvalidWafType 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 NewWafStatusRuleBlockReasonInvalidWafType(allowedWafTypes WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesArgType, types WafStatusRuleBlockReasonInvalidWafTypeGetTypeArgType) *WafStatusRuleBlockReasonInvalidWafType { + this := WafStatusRuleBlockReasonInvalidWafType{} + setWafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesAttributeType(&this.AllowedWafTypes, allowedWafTypes) + setWafStatusRuleBlockReasonInvalidWafTypeGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewWafStatusRuleBlockReasonInvalidWafTypeWithDefaults instantiates a new WafStatusRuleBlockReasonInvalidWafType 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 NewWafStatusRuleBlockReasonInvalidWafTypeWithDefaults() *WafStatusRuleBlockReasonInvalidWafType { + this := WafStatusRuleBlockReasonInvalidWafType{} + return &this +} + +// GetAllowedWafTypes returns the AllowedWafTypes field value +func (o *WafStatusRuleBlockReasonInvalidWafType) GetAllowedWafTypes() (ret WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesRetType) { + ret, _ = o.GetAllowedWafTypesOk() + return ret +} + +// GetAllowedWafTypesOk returns a tuple with the AllowedWafTypes field value +// and a boolean to check if the value has been set. +func (o *WafStatusRuleBlockReasonInvalidWafType) GetAllowedWafTypesOk() (ret WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesRetType, ok bool) { + return getWafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesAttributeTypeOk(o.AllowedWafTypes) +} + +// SetAllowedWafTypes sets field value +func (o *WafStatusRuleBlockReasonInvalidWafType) SetAllowedWafTypes(v WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesRetType) { + setWafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesAttributeType(&o.AllowedWafTypes, v) +} + +// GetType returns the Type field value +func (o *WafStatusRuleBlockReasonInvalidWafType) GetType() (ret WafStatusRuleBlockReasonInvalidWafTypeGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *WafStatusRuleBlockReasonInvalidWafType) GetTypeOk() (ret WafStatusRuleBlockReasonInvalidWafTypeGetTypeRetType, ok bool) { + return getWafStatusRuleBlockReasonInvalidWafTypeGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +func (o *WafStatusRuleBlockReasonInvalidWafType) SetType(v WafStatusRuleBlockReasonInvalidWafTypeGetTypeRetType) { + setWafStatusRuleBlockReasonInvalidWafTypeGetTypeAttributeType(&o.Type, v) +} + +func (o WafStatusRuleBlockReasonInvalidWafType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getWafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesAttributeTypeOk(o.AllowedWafTypes); ok { + toSerialize["AllowedWafTypes"] = val + } + if val, ok := getWafStatusRuleBlockReasonInvalidWafTypeGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableWafStatusRuleBlockReasonInvalidWafType struct { + value *WafStatusRuleBlockReasonInvalidWafType + isSet bool +} + +func (v NullableWafStatusRuleBlockReasonInvalidWafType) Get() *WafStatusRuleBlockReasonInvalidWafType { + return v.value +} + +func (v *NullableWafStatusRuleBlockReasonInvalidWafType) Set(val *WafStatusRuleBlockReasonInvalidWafType) { + v.value = val + v.isSet = true +} + +func (v NullableWafStatusRuleBlockReasonInvalidWafType) IsSet() bool { + return v.isSet +} + +func (v *NullableWafStatusRuleBlockReasonInvalidWafType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafStatusRuleBlockReasonInvalidWafType(val *WafStatusRuleBlockReasonInvalidWafType) *NullableWafStatusRuleBlockReasonInvalidWafType { + return &NullableWafStatusRuleBlockReasonInvalidWafType{value: val, isSet: true} +} + +func (v NullableWafStatusRuleBlockReasonInvalidWafType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafStatusRuleBlockReasonInvalidWafType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_waf_status_rule_block_reason_invalid_waf_type_test.go b/services/cdn/model_waf_status_rule_block_reason_invalid_waf_type_test.go new file mode 100644 index 000000000..d7e05bb41 --- /dev/null +++ b/services/cdn/model_waf_status_rule_block_reason_invalid_waf_type_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_waf_status_rule_block_reason_never_defined.go b/services/cdn/model_waf_status_rule_block_reason_never_defined.go new file mode 100644 index 000000000..f6f195b95 --- /dev/null +++ b/services/cdn/model_waf_status_rule_block_reason_never_defined.go @@ -0,0 +1,127 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the WafStatusRuleBlockReasonNeverDefined type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafStatusRuleBlockReasonNeverDefined{} + +/* + types and functions for type +*/ + +// isNotNullableString +type WafStatusRuleBlockReasonNeverDefinedGetTypeAttributeType = *string + +func getWafStatusRuleBlockReasonNeverDefinedGetTypeAttributeTypeOk(arg WafStatusRuleBlockReasonNeverDefinedGetTypeAttributeType) (ret WafStatusRuleBlockReasonNeverDefinedGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWafStatusRuleBlockReasonNeverDefinedGetTypeAttributeType(arg *WafStatusRuleBlockReasonNeverDefinedGetTypeAttributeType, val WafStatusRuleBlockReasonNeverDefinedGetTypeRetType) { + *arg = &val +} + +type WafStatusRuleBlockReasonNeverDefinedGetTypeArgType = string +type WafStatusRuleBlockReasonNeverDefinedGetTypeRetType = string + +// WafStatusRuleBlockReasonNeverDefined This object only ever shows up in the disabled rules section. If rules are never defined (e.g. no collection, rule group, or the rule itself is ever mentioned), they are implicitly disabled +type WafStatusRuleBlockReasonNeverDefined struct { + // This is always `neverDefined` + // REQUIRED + Type WafStatusRuleBlockReasonNeverDefinedGetTypeAttributeType `json:"type" required:"true"` +} + +type _WafStatusRuleBlockReasonNeverDefined WafStatusRuleBlockReasonNeverDefined + +// NewWafStatusRuleBlockReasonNeverDefined instantiates a new WafStatusRuleBlockReasonNeverDefined 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 NewWafStatusRuleBlockReasonNeverDefined(types WafStatusRuleBlockReasonNeverDefinedGetTypeArgType) *WafStatusRuleBlockReasonNeverDefined { + this := WafStatusRuleBlockReasonNeverDefined{} + setWafStatusRuleBlockReasonNeverDefinedGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewWafStatusRuleBlockReasonNeverDefinedWithDefaults instantiates a new WafStatusRuleBlockReasonNeverDefined 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 NewWafStatusRuleBlockReasonNeverDefinedWithDefaults() *WafStatusRuleBlockReasonNeverDefined { + this := WafStatusRuleBlockReasonNeverDefined{} + return &this +} + +// GetType returns the Type field value +func (o *WafStatusRuleBlockReasonNeverDefined) GetType() (ret WafStatusRuleBlockReasonNeverDefinedGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *WafStatusRuleBlockReasonNeverDefined) GetTypeOk() (ret WafStatusRuleBlockReasonNeverDefinedGetTypeRetType, ok bool) { + return getWafStatusRuleBlockReasonNeverDefinedGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +func (o *WafStatusRuleBlockReasonNeverDefined) SetType(v WafStatusRuleBlockReasonNeverDefinedGetTypeRetType) { + setWafStatusRuleBlockReasonNeverDefinedGetTypeAttributeType(&o.Type, v) +} + +func (o WafStatusRuleBlockReasonNeverDefined) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getWafStatusRuleBlockReasonNeverDefinedGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableWafStatusRuleBlockReasonNeverDefined struct { + value *WafStatusRuleBlockReasonNeverDefined + isSet bool +} + +func (v NullableWafStatusRuleBlockReasonNeverDefined) Get() *WafStatusRuleBlockReasonNeverDefined { + return v.value +} + +func (v *NullableWafStatusRuleBlockReasonNeverDefined) Set(val *WafStatusRuleBlockReasonNeverDefined) { + v.value = val + v.isSet = true +} + +func (v NullableWafStatusRuleBlockReasonNeverDefined) IsSet() bool { + return v.isSet +} + +func (v *NullableWafStatusRuleBlockReasonNeverDefined) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWafStatusRuleBlockReasonNeverDefined(val *WafStatusRuleBlockReasonNeverDefined) *NullableWafStatusRuleBlockReasonNeverDefined { + return &NullableWafStatusRuleBlockReasonNeverDefined{value: val, isSet: true} +} + +func (v NullableWafStatusRuleBlockReasonNeverDefined) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWafStatusRuleBlockReasonNeverDefined) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_waf_status_rule_block_reason_never_defined_test.go b/services/cdn/model_waf_status_rule_block_reason_never_defined_test.go new file mode 100644 index 000000000..d7e05bb41 --- /dev/null +++ b/services/cdn/model_waf_status_rule_block_reason_never_defined_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_waf_status_rule_block_reason_test.go b/services/cdn/model_waf_status_rule_block_reason_test.go new file mode 100644 index 000000000..d7e05bb41 --- /dev/null +++ b/services/cdn/model_waf_status_rule_block_reason_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_waf_status_rule_block_test.go b/services/cdn/model_waf_status_rule_block_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_waf_status_rule_block_test.go +++ b/services/cdn/model_waf_status_rule_block_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_waf_type.go b/services/cdn/model_waf_type.go index 28c749cae..9bf4663e1 100644 --- a/services/cdn/model_waf_type.go +++ b/services/cdn/model_waf_type.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_waf_type_test.go b/services/cdn/model_waf_type_test.go index 486a30539..d7e05bb41 100644 --- a/services/cdn/model_waf_type_test.go +++ b/services/cdn/model_waf_type_test.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_waf_violation.go b/services/cdn/model_waf_violation.go new file mode 100644 index 000000000..5a2d7cb95 --- /dev/null +++ b/services/cdn/model_waf_violation.go @@ -0,0 +1,348 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the WAFViolation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WAFViolation{} + +/* + types and functions for action +*/ + +// isEnumRef +type WAFViolationGetActionAttributeType = *WAFRuleAction +type WAFViolationGetActionArgType = WAFRuleAction +type WAFViolationGetActionRetType = WAFRuleAction + +func getWAFViolationGetActionAttributeTypeOk(arg WAFViolationGetActionAttributeType) (ret WAFViolationGetActionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWAFViolationGetActionAttributeType(arg *WAFViolationGetActionAttributeType, val WAFViolationGetActionRetType) { + *arg = &val +} + +/* + types and functions for asn +*/ + +// isNotNullableString +type WAFViolationGetAsnAttributeType = *string + +func getWAFViolationGetAsnAttributeTypeOk(arg WAFViolationGetAsnAttributeType) (ret WAFViolationGetAsnRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWAFViolationGetAsnAttributeType(arg *WAFViolationGetAsnAttributeType, val WAFViolationGetAsnRetType) { + *arg = &val +} + +type WAFViolationGetAsnArgType = string +type WAFViolationGetAsnRetType = string + +/* + types and functions for message +*/ + +// isNotNullableString +type WAFViolationGetMessageAttributeType = *string + +func getWAFViolationGetMessageAttributeTypeOk(arg WAFViolationGetMessageAttributeType) (ret WAFViolationGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWAFViolationGetMessageAttributeType(arg *WAFViolationGetMessageAttributeType, val WAFViolationGetMessageRetType) { + *arg = &val +} + +type WAFViolationGetMessageArgType = string +type WAFViolationGetMessageRetType = string + +/* + types and functions for method +*/ + +// isNotNullableString +type WAFViolationGetMethodAttributeType = *string + +func getWAFViolationGetMethodAttributeTypeOk(arg WAFViolationGetMethodAttributeType) (ret WAFViolationGetMethodRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWAFViolationGetMethodAttributeType(arg *WAFViolationGetMethodAttributeType, val WAFViolationGetMethodRetType) { + *arg = &val +} + +type WAFViolationGetMethodArgType = string +type WAFViolationGetMethodRetType = string + +/* + types and functions for requestHeaders +*/ + +// isContainer +type WAFViolationGetRequestHeadersAttributeType = *map[string]string +type WAFViolationGetRequestHeadersArgType = map[string]string +type WAFViolationGetRequestHeadersRetType = map[string]string + +func getWAFViolationGetRequestHeadersAttributeTypeOk(arg WAFViolationGetRequestHeadersAttributeType) (ret WAFViolationGetRequestHeadersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWAFViolationGetRequestHeadersAttributeType(arg *WAFViolationGetRequestHeadersAttributeType, val WAFViolationGetRequestHeadersRetType) { + *arg = &val +} + +/* + types and functions for ruleId +*/ + +// isNotNullableString +type WAFViolationGetRuleIdAttributeType = *string + +func getWAFViolationGetRuleIdAttributeTypeOk(arg WAFViolationGetRuleIdAttributeType) (ret WAFViolationGetRuleIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setWAFViolationGetRuleIdAttributeType(arg *WAFViolationGetRuleIdAttributeType, val WAFViolationGetRuleIdRetType) { + *arg = &val +} + +type WAFViolationGetRuleIdArgType = string +type WAFViolationGetRuleIdRetType = string + +// WAFViolation Information about a violated WAF rule in case the WAF is enabled and a rule was triggered (either in BLOCK or LOG_ONLY mode) +type WAFViolation struct { + // REQUIRED + Action WAFViolationGetActionAttributeType `json:"action" required:"true"` + // ASN for the request + // REQUIRED + Asn WAFViolationGetAsnAttributeType `json:"asn" required:"true"` + // Rule specific message explaining the violation + // REQUIRED + Message WAFViolationGetMessageAttributeType `json:"message" required:"true"` + // HTTP Method of the request that triggered the violation + // REQUIRED + Method WAFViolationGetMethodAttributeType `json:"method" required:"true"` + // REQUIRED + RequestHeaders WAFViolationGetRequestHeadersAttributeType `json:"requestHeaders" required:"true"` + // ID of the WAF rule that was triggered + // REQUIRED + RuleId WAFViolationGetRuleIdAttributeType `json:"ruleId" required:"true"` +} + +type _WAFViolation WAFViolation + +// NewWAFViolation instantiates a new WAFViolation 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 NewWAFViolation(action WAFViolationGetActionArgType, asn WAFViolationGetAsnArgType, message WAFViolationGetMessageArgType, method WAFViolationGetMethodArgType, requestHeaders WAFViolationGetRequestHeadersArgType, ruleId WAFViolationGetRuleIdArgType) *WAFViolation { + this := WAFViolation{} + setWAFViolationGetActionAttributeType(&this.Action, action) + setWAFViolationGetAsnAttributeType(&this.Asn, asn) + setWAFViolationGetMessageAttributeType(&this.Message, message) + setWAFViolationGetMethodAttributeType(&this.Method, method) + setWAFViolationGetRequestHeadersAttributeType(&this.RequestHeaders, requestHeaders) + setWAFViolationGetRuleIdAttributeType(&this.RuleId, ruleId) + return &this +} + +// NewWAFViolationWithDefaults instantiates a new WAFViolation 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 NewWAFViolationWithDefaults() *WAFViolation { + this := WAFViolation{} + return &this +} + +// GetAction returns the Action field value +func (o *WAFViolation) GetAction() (ret WAFViolationGetActionRetType) { + ret, _ = o.GetActionOk() + return ret +} + +// GetActionOk returns a tuple with the Action field value +// and a boolean to check if the value has been set. +func (o *WAFViolation) GetActionOk() (ret WAFViolationGetActionRetType, ok bool) { + return getWAFViolationGetActionAttributeTypeOk(o.Action) +} + +// SetAction sets field value +func (o *WAFViolation) SetAction(v WAFViolationGetActionRetType) { + setWAFViolationGetActionAttributeType(&o.Action, v) +} + +// GetAsn returns the Asn field value +func (o *WAFViolation) GetAsn() (ret WAFViolationGetAsnRetType) { + ret, _ = o.GetAsnOk() + return ret +} + +// GetAsnOk returns a tuple with the Asn field value +// and a boolean to check if the value has been set. +func (o *WAFViolation) GetAsnOk() (ret WAFViolationGetAsnRetType, ok bool) { + return getWAFViolationGetAsnAttributeTypeOk(o.Asn) +} + +// SetAsn sets field value +func (o *WAFViolation) SetAsn(v WAFViolationGetAsnRetType) { + setWAFViolationGetAsnAttributeType(&o.Asn, v) +} + +// GetMessage returns the Message field value +func (o *WAFViolation) GetMessage() (ret WAFViolationGetMessageRetType) { + 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 *WAFViolation) GetMessageOk() (ret WAFViolationGetMessageRetType, ok bool) { + return getWAFViolationGetMessageAttributeTypeOk(o.Message) +} + +// SetMessage sets field value +func (o *WAFViolation) SetMessage(v WAFViolationGetMessageRetType) { + setWAFViolationGetMessageAttributeType(&o.Message, v) +} + +// GetMethod returns the Method field value +func (o *WAFViolation) GetMethod() (ret WAFViolationGetMethodRetType) { + ret, _ = o.GetMethodOk() + return ret +} + +// GetMethodOk returns a tuple with the Method field value +// and a boolean to check if the value has been set. +func (o *WAFViolation) GetMethodOk() (ret WAFViolationGetMethodRetType, ok bool) { + return getWAFViolationGetMethodAttributeTypeOk(o.Method) +} + +// SetMethod sets field value +func (o *WAFViolation) SetMethod(v WAFViolationGetMethodRetType) { + setWAFViolationGetMethodAttributeType(&o.Method, v) +} + +// GetRequestHeaders returns the RequestHeaders field value +func (o *WAFViolation) GetRequestHeaders() (ret WAFViolationGetRequestHeadersRetType) { + ret, _ = o.GetRequestHeadersOk() + return ret +} + +// GetRequestHeadersOk returns a tuple with the RequestHeaders field value +// and a boolean to check if the value has been set. +func (o *WAFViolation) GetRequestHeadersOk() (ret WAFViolationGetRequestHeadersRetType, ok bool) { + return getWAFViolationGetRequestHeadersAttributeTypeOk(o.RequestHeaders) +} + +// SetRequestHeaders sets field value +func (o *WAFViolation) SetRequestHeaders(v WAFViolationGetRequestHeadersRetType) { + setWAFViolationGetRequestHeadersAttributeType(&o.RequestHeaders, v) +} + +// GetRuleId returns the RuleId field value +func (o *WAFViolation) GetRuleId() (ret WAFViolationGetRuleIdRetType) { + ret, _ = o.GetRuleIdOk() + return ret +} + +// GetRuleIdOk returns a tuple with the RuleId field value +// and a boolean to check if the value has been set. +func (o *WAFViolation) GetRuleIdOk() (ret WAFViolationGetRuleIdRetType, ok bool) { + return getWAFViolationGetRuleIdAttributeTypeOk(o.RuleId) +} + +// SetRuleId sets field value +func (o *WAFViolation) SetRuleId(v WAFViolationGetRuleIdRetType) { + setWAFViolationGetRuleIdAttributeType(&o.RuleId, v) +} + +func (o WAFViolation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getWAFViolationGetActionAttributeTypeOk(o.Action); ok { + toSerialize["Action"] = val + } + if val, ok := getWAFViolationGetAsnAttributeTypeOk(o.Asn); ok { + toSerialize["Asn"] = val + } + if val, ok := getWAFViolationGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + if val, ok := getWAFViolationGetMethodAttributeTypeOk(o.Method); ok { + toSerialize["Method"] = val + } + if val, ok := getWAFViolationGetRequestHeadersAttributeTypeOk(o.RequestHeaders); ok { + toSerialize["RequestHeaders"] = val + } + if val, ok := getWAFViolationGetRuleIdAttributeTypeOk(o.RuleId); ok { + toSerialize["RuleId"] = val + } + return toSerialize, nil +} + +type NullableWAFViolation struct { + value *WAFViolation + isSet bool +} + +func (v NullableWAFViolation) Get() *WAFViolation { + return v.value +} + +func (v *NullableWAFViolation) Set(val *WAFViolation) { + v.value = val + v.isSet = true +} + +func (v NullableWAFViolation) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFViolation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFViolation(val *WAFViolation) *NullableWAFViolation { + return &NullableWAFViolation{value: val, isSet: true} +} + +func (v NullableWAFViolation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFViolation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_waf_violation_test.go b/services/cdn/model_waf_violation_test.go new file mode 100644 index 000000000..d7e05bb41 --- /dev/null +++ b/services/cdn/model_waf_violation_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/utils.go b/services/cdn/utils.go index 1765c560a..142227da2 100644 --- a/services/cdn/utils.go +++ b/services/cdn/utils.go @@ -3,7 +3,7 @@ CDN API API used to create and manage your CDN distributions. -API version: 1beta2.0.0 +API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. From a3623c26b1eb01639ffc4e855e85fd8cef47ee9e Mon Sep 17 00:00:00 2001 From: Marcel Jacek Date: Mon, 1 Dec 2025 16:02:22 +0100 Subject: [PATCH 2/2] add changelog entries --- CHANGELOG.md | 26 +++++++++++++++++++++++--- services/cdn/CHANGELOG.md | 20 ++++++++++++++++++++ services/cdn/VERSION | 2 +- 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb4853a14..b1343f741 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,9 +10,29 @@ - Add `Etag` field to `Role` model struct - [v0.9.1](services/authorization/CHANGELOG.md#v091) - Bump STACKIT SDK core module from `v0.19.0` to `v0.20.0` -- `cdn`: [v1.8.1](services/cdn/CHANGELOG.md#v181) (formerly `v2.1.1`) - - **Note: This release was formerly known as `v2.1.1` and was re-tagged as `v1.8.1`, see statement in the [changelog of the STACKIT CDN SDK module](services/cdn/CHANGELOG).** - - Bump STACKIT SDK core module from `v0.19.0` to `v0.20.0` +- `cdn`: + - [v1.9.0](services/cdn/CHANGELOG.md#v190) + - **Feature:** Switch from `v1beta2` CDN API version to `v1` version. + - **Feature:** Add new function `GetLogsSearchFilters` + - **Feature:** Add `WafAction` method to `ApiGetLogsRequest` struct + - **Feature:** Add `Reason` field to `WafStatusRuleBlock` model struct + - **Feature:** Add fields to `WafConfig` and `WafConfigPatch` model struct: + - `AllowedHttpMethods` + - `AllowedHttpVersions` + - `AllowedRequestContentTypes` + - `DisabledRuleCollectionIds` + - `DisabledRuleGroupIds` + - `DisabledRuleIds` + - `EnabledRuleCollectionIds` + - `EnabledRuleGroupIds` + - `EnabledRuleIds` + - `LogOnlyRuleCollectionIds` + - `LogOnlyRuleGroupIds` + - `LogOnlyRuleIds` + - `ParanoiaLevel` + - [v1.8.1](services/cdn/CHANGELOG.md#v181) (formerly `v2.1.1`) + - **Note: This release was formerly known as `v2.1.1` and was re-tagged as `v1.8.1`, see statement in the [changelog of the STACKIT CDN SDK module](services/cdn/CHANGELOG).** + - Bump STACKIT SDK core module from `v0.19.0` to `v0.20.0` - `certificates`: [v1.1.2](services/certificates/CHANGELOG.md#v112) - Bump STACKIT SDK core module from `v0.19.0` to `v0.20.0` - `dns`: [v0.17.2](services/dns/CHANGELOG.md#v0172) diff --git a/services/cdn/CHANGELOG.md b/services/cdn/CHANGELOG.md index 1fb09f0c5..7a0d2c6a1 100644 --- a/services/cdn/CHANGELOG.md +++ b/services/cdn/CHANGELOG.md @@ -1,3 +1,23 @@ +## v1.9.0 +- **Feature:** Switch from `v1beta2` CDN API version to `v1` version. +- **Feature:** Add new function `GetLogsSearchFilters` +- **Feature:** Add `WafAction` method to `ApiGetLogsRequest` struct +- **Feature:** Add `Reason` field to `WafStatusRuleBlock` model struct +- **Feature:** Add fields to `WafConfig` and `WafConfigPatch` model struct: + - `AllowedHttpMethods` + - `AllowedHttpVersions` + - `AllowedRequestContentTypes` + - `DisabledRuleCollectionIds` + - `DisabledRuleGroupIds` + - `DisabledRuleIds` + - `EnabledRuleCollectionIds` + - `EnabledRuleGroupIds` + - `EnabledRuleIds` + - `LogOnlyRuleCollectionIds` + - `LogOnlyRuleGroupIds` + - `LogOnlyRuleIds` + - `ParanoiaLevel` + ## v1.8.1 - **Note: This release was formerly known as `v2.1.1` and was re-tagged, see statement below.** - Bump STACKIT SDK core module from `v0.19.0` to `v0.20.0` diff --git a/services/cdn/VERSION b/services/cdn/VERSION index 2fb69e15c..295e37c0e 100644 --- a/services/cdn/VERSION +++ b/services/cdn/VERSION @@ -1 +1 @@ -v1.8.1 +v1.9.0