From 6ba58eb3ffc10be3042cd7143fbb752c599ea036 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Tue, 28 Oct 2025 12:01:32 +0000 Subject: [PATCH] Generate cdn --- services/cdn/api_default.go | 479 +++++------------- services/cdn/api_default_test.go | 90 +--- services/cdn/client.go | 4 +- services/cdn/configuration.go | 2 +- services/cdn/model_bucket_backend.go | 214 ++++++++ services/cdn/model_bucket_backend_create.go | 257 ++++++++++ .../cdn/model_bucket_backend_create_test.go | 11 + services/cdn/model_bucket_backend_patch.go | 269 ++++++++++ .../cdn/model_bucket_backend_patch_test.go | 11 + services/cdn/model_bucket_backend_test.go | 11 + services/cdn/model_bucket_credentials.go | 170 +++++++ services/cdn/model_bucket_credentials_test.go | 11 + services/cdn/model_config.go | 44 +- services/cdn/model_config_backend.go | 44 +- 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 | 44 +- services/cdn/model_config_patch_backend.go | 44 +- .../cdn/model_config_patch_backend_test.go | 2 +- services/cdn/model_config_patch_log_sink.go | 42 +- .../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 | 230 +++------ ...del_create_distribution_payload_backend.go | 163 ++++++ ...reate_distribution_payload_backend_test.go | 11 + ...el_create_distribution_payload_log_sink.go | 42 +- ...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 | 42 +- .../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 | 20 +- 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 | 52 +- services/cdn/model_error_details_test.go | 2 +- .../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 | 98 ++-- .../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 | 51 +- ..._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 | 52 +- ..._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 +- services/cdn/model_get_statistics_response.go | 2 +- .../cdn/model_get_statistics_response_test.go | 2 +- services/cdn/model_http_backend.go | 3 +- services/cdn/model_http_backend_create.go | 267 ++++++++++ .../cdn/model_http_backend_create_test.go | 11 + 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 | 72 +-- ...odel_list_waf_collections_response_test.go | 2 +- services/cdn/model_loki_log_sink.go | 2 +- services/cdn/model_loki_log_sink_create.go | 213 ++++++++ .../cdn/model_loki_log_sink_create_test.go | 11 + .../cdn/model_loki_log_sink_credentials.go | 170 +++++++ .../model_loki_log_sink_credentials_test.go | 11 + services/cdn/model_loki_log_sink_patch.go | 221 ++++++++ .../cdn/model_loki_log_sink_patch_test.go | 11 + 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 | 52 +- ..._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 | 2 +- services/cdn/model_status_error_test.go | 2 +- services/cdn/model_waf_config.go | 4 +- services/cdn/model_waf_config_patch.go | 2 +- services/cdn/model_waf_config_patch_test.go | 2 +- services/cdn/model_waf_config_test.go | 2 +- services/cdn/model_waf_mode.go | 2 +- services/cdn/model_waf_mode_test.go | 2 +- services/cdn/model_waf_rule.go | 126 ++--- services/cdn/model_waf_rule_collection.go | 124 ++--- .../cdn/model_waf_rule_collection_test.go | 2 +- services/cdn/model_waf_rule_group.go | 124 ++--- 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 | 74 +-- .../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/utils.go | 2 +- 143 files changed, 2884 insertions(+), 1318 deletions(-) create mode 100644 services/cdn/model_bucket_backend.go create mode 100644 services/cdn/model_bucket_backend_create.go create mode 100644 services/cdn/model_bucket_backend_create_test.go create mode 100644 services/cdn/model_bucket_backend_patch.go create mode 100644 services/cdn/model_bucket_backend_patch_test.go create mode 100644 services/cdn/model_bucket_backend_test.go create mode 100644 services/cdn/model_bucket_credentials.go create mode 100644 services/cdn/model_bucket_credentials_test.go create mode 100644 services/cdn/model_create_distribution_payload_backend.go create mode 100644 services/cdn/model_create_distribution_payload_backend_test.go create mode 100644 services/cdn/model_http_backend_create.go create mode 100644 services/cdn/model_http_backend_create_test.go create mode 100644 services/cdn/model_loki_log_sink_create.go create mode 100644 services/cdn/model_loki_log_sink_create_test.go create mode 100644 services/cdn/model_loki_log_sink_credentials.go create mode 100644 services/cdn/model_loki_log_sink_credentials_test.go create mode 100644 services/cdn/model_loki_log_sink_patch.go create mode 100644 services/cdn/model_loki_log_sink_patch_test.go diff --git a/services/cdn/api_default.go b/services/cdn/api_default.go index 803f9289a..58dde3502 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -30,7 +30,7 @@ type DefaultApi interface { CreateDistribution will create a new CDN distribution @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 projectId Your STACKIT Project Id @return ApiCreateDistributionRequest */ CreateDistribution(ctx context.Context, projectId string) ApiCreateDistributionRequest @@ -38,7 +38,7 @@ type DefaultApi interface { CreateDistributionExecute 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 projectId Your STACKIT Project Id @return CreateDistributionResponse */ @@ -49,7 +49,7 @@ type DefaultApi interface { @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 projectId Your STACKIT Project Id @param distributionId @param domain @return ApiDeleteCustomDomainRequest @@ -59,7 +59,7 @@ type DefaultApi interface { DeleteCustomDomainExecute 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 projectId Your STACKIT Project Id @param distributionId @param domain @return DeleteCustomDomainResponse @@ -68,11 +68,11 @@ type DefaultApi interface { DeleteCustomDomainExecute(ctx context.Context, projectId string, distributionId string, domain string) (*DeleteCustomDomainResponse, error) /* DeleteDistribution Delete distribution - DeleteDistribution accepts a project- and distribution-ID and will delete a distribution. + DeleteDistribution accepts a project- and distribution-Id and will delete a distribution. @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 projectId Your STACKIT Project Id @param distributionId @return ApiDeleteDistributionRequest */ @@ -81,7 +81,7 @@ type DefaultApi interface { DeleteDistributionExecute 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 projectId Your STACKIT Project Id @param distributionId @return DeleteDistributionResponse @@ -106,7 +106,7 @@ type DefaultApi interface { @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 projectId Your STACKIT Project Id @param distributionId @return ApiFindCachePathsRequest */ @@ -115,7 +115,7 @@ type DefaultApi interface { FindCachePathsExecute 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 projectId Your STACKIT Project Id @param distributionId @return FindCachePathsResponse @@ -130,7 +130,7 @@ type DefaultApi interface { @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 projectId Your STACKIT Project Id @param distributionId @return ApiGetCacheInfoRequest */ @@ -139,7 +139,7 @@ type DefaultApi interface { GetCacheInfoExecute 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 projectId Your STACKIT Project Id @param distributionId @return GetCacheInfoResponse @@ -151,7 +151,7 @@ type DefaultApi interface { @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 projectId Your STACKIT Project Id @param distributionId @param domain @return ApiGetCustomDomainRequest @@ -161,7 +161,7 @@ type DefaultApi interface { GetCustomDomainExecute 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 projectId Your STACKIT Project Id @param distributionId @param domain @return GetCustomDomainResponse @@ -169,11 +169,11 @@ type DefaultApi interface { */ GetCustomDomainExecute(ctx context.Context, projectId string, distributionId string, domain string) (*GetCustomDomainResponse, error) /* - GetDistribution Get distribution by ID - This returns a specific distribution by its ID. If no distribution with the given ID exists the endpoint returns 404. Trying to get a deleted distributions also return 404. + GetDistribution Get distribution by Id + This returns a specific distribution by its Id. If no distribution with the given Id exists the endpoint returns 404. Trying to get a deleted distributions also return 404. @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 projectId Your STACKIT Project Id @param distributionId @return ApiGetDistributionRequest */ @@ -182,7 +182,7 @@ type DefaultApi interface { GetDistributionExecute 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 projectId Your STACKIT Project Id @param distributionId @return GetDistributionResponse @@ -192,8 +192,8 @@ type DefaultApi interface { GetLogs Retrieve distribution logs @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 + @param projectId Your STACKIT Project Id + @param distributionId Your CDN distribution Id @return ApiGetLogsRequest */ GetLogs(ctx context.Context, projectId string, distributionId string) ApiGetLogsRequest @@ -201,31 +201,12 @@ type DefaultApi interface { GetLogsExecute 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 + @param projectId Your STACKIT Project Id + @param distributionId Your CDN distribution Id @return GetLogsResponse */ 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 @@ -242,7 +223,7 @@ type DefaultApi interface { @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 projectId Your STACKIT Project Id @param distributionId @return ApiGetStatisticsRequest */ @@ -251,7 +232,7 @@ type DefaultApi interface { GetStatisticsExecute 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 projectId Your STACKIT Project Id @param distributionId @return GetStatisticsResponse @@ -260,11 +241,11 @@ type DefaultApi interface { /* ListDistributions List all distributions belonging to a specific project ListDistributions returns a list of all CDN distributions associated with - a given project, ordered by their distribution ID. + a given project, ordered by their distribution Id. @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 projectId Your STACKIT Project Id @return ApiListDistributionsRequest */ ListDistributions(ctx context.Context, projectId string) ApiListDistributionsRequest @@ -272,35 +253,35 @@ type DefaultApi interface { ListDistributionsExecute 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 projectId Your STACKIT Project Id @return ListDistributionsResponse */ ListDistributionsExecute(ctx context.Context, projectId string) (*ListDistributionsResponse, error) /* - ListWAFCollections List all WAF rule collections of the project + ListWafCollections List all WAF rule collections of the project Returns all WAF rule collections available to the project @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Your STACKIT Project ID - @return ApiListWAFCollectionsRequest + @param projectId Your STACKIT Project Id + @return ApiListWafCollectionsRequest */ - ListWAFCollections(ctx context.Context, projectId string) ApiListWAFCollectionsRequest + ListWafCollections(ctx context.Context, projectId string) ApiListWafCollectionsRequest /* - ListWAFCollectionsExecute executes the request + ListWafCollectionsExecute 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 - @return ListWAFCollectionsResponse + @param projectId Your STACKIT Project Id + @return ListWafCollectionsResponse */ - ListWAFCollectionsExecute(ctx context.Context, projectId string) (*ListWAFCollectionsResponse, error) + ListWafCollectionsExecute(ctx context.Context, projectId string) (*ListWafCollectionsResponse, error) /* PatchDistribution Update existing distribution Modify a CDN distribution with a partial update. Only the fields specified in the request will be modified. @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 projectId Your STACKIT Project Id @param distributionId @return ApiPatchDistributionRequest */ @@ -309,7 +290,7 @@ type DefaultApi interface { PatchDistributionExecute 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 projectId Your STACKIT Project Id @param distributionId @return PatchDistributionResponse @@ -322,7 +303,7 @@ type DefaultApi interface { @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 projectId Your STACKIT Project Id @param distributionId @return ApiPurgeCacheRequest */ @@ -331,7 +312,7 @@ type DefaultApi interface { PurgeCacheExecute 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 projectId Your STACKIT Project Id @param distributionId @return map[string]interface{} @@ -343,7 +324,7 @@ type DefaultApi interface { @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 projectId Your STACKIT Project Id @param distributionId @param domain @return ApiPutCustomDomainRequest @@ -353,7 +334,7 @@ type DefaultApi interface { PutCustomDomainExecute 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 projectId Your STACKIT Project Id @param distributionId @param domain @return PutCustomDomainResponse @@ -422,12 +403,6 @@ type ApiGetLogsRequest interface { Execute() (*GetLogsResponse, error) } -type ApiGetLogsSearchFiltersRequest interface { - // Required filter for search suggestions (e.g., status=4, requestCountry, cacheHit=tru, dataCenterRegion). The filter query cannot be empty. - Filter(filter string) ApiGetLogsSearchFiltersRequest - Execute() (*GetLogsSearchFiltersResponse, error) -} - type ApiGetStatisticsRequest interface { // the start of the time range for which statistics should be returned From(from time.Time) ApiGetStatisticsRequest @@ -445,14 +420,14 @@ type ApiListDistributionsRequest interface { WithWafStatus(withWafStatus bool) ApiListDistributionsRequest // Identifier is returned by the previous response and is used to request the next page. As the `pageIdentifier` encodes an element, inserts during pagination will *not* shift the result. So a scenario like: - Start listing first page - Insert new element - Start listing second page will *never* result in an element from the first page to get \"pushed\" to the second page, like it could occur with basic limit + offset pagination. The identifier should be treated as an opaque string and never modified. Only pass values returned by the API. PageIdentifier(pageIdentifier string) ApiListDistributionsRequest - // The following sort options exist. We default to `createdAt` - `id` - Sort by distribution ID using String comparison - `updatedAt` - Sort by when the distribution configuration was last modified, for example by changing the regions or response headers - `createdAt` - Sort by when the distribution was initially created. - `originUrl` - Sort by originURL using String comparison - `status` - Sort by distribution status, using String comparison - `originUrlRelated` - The origin URL is segmented and reversed before sorting. E.g. `www.example.com` is converted to `com.example.www` for sorting. This way, distributions pointing to the same domain trees are grouped next to each other. + // The following sort options exist. We default to `createdAt` - `id` - Sort by distribution Id using String comparison - `updatedAt` - Sort by when the distribution configuration was last modified, for example by changing the regions or response headers - `createdAt` - Sort by when the distribution was initially created. - `originUrl` - Sort by originUrl using String comparison - `status` - Sort by distribution status, using String comparison - `originUrlRelated` - The originUrl is segmented and reversed before sorting. E.g. `www.example.com` is converted to `com.example.www` for sorting. This way, distributions pointing to the same domain trees are grouped next to each other. SortBy(sortBy string) ApiListDistributionsRequest SortOrder(sortOrder string) ApiListDistributionsRequest Execute() (*ListDistributionsResponse, error) } -type ApiListWAFCollectionsRequest interface { - Execute() (*ListWAFCollectionsResponse, error) +type ApiListWafCollectionsRequest interface { + Execute() (*ListWafCollectionsResponse, error) } type ApiPatchDistributionRequest interface { @@ -502,7 +477,7 @@ func (r CreateDistributionRequest) Execute() (*CreateDistributionResponse, error return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta/projects/{projectId}/distributions" + localVarPath := localBasePath + "/v1beta2/projects/{projectId}/distributions" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarHeaderParams := make(map[string]string) @@ -564,7 +539,7 @@ func (r CreateDistributionRequest) Execute() (*CreateDistributionResponse, error ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -586,7 +561,7 @@ func (r CreateDistributionRequest) Execute() (*CreateDistributionResponse, error return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 422 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -597,7 +572,7 @@ func (r CreateDistributionRequest) Execute() (*CreateDistributionResponse, error return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 500 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -607,7 +582,7 @@ func (r CreateDistributionRequest) Execute() (*CreateDistributionResponse, error newErr.Model = v return localVarReturnValue, newErr } - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -637,7 +612,7 @@ CreateDistribution: Create new distribution CreateDistribution will create a new CDN distribution @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 projectId Your STACKIT Project Id @return ApiCreateDistributionRequest */ func (a *APIClient) CreateDistribution(ctx context.Context, projectId string) ApiCreateDistributionRequest { @@ -688,7 +663,7 @@ func (r DeleteCustomDomainRequest) Execute() (*DeleteCustomDomainResponse, error return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}" + localVarPath := localBasePath + "/v1beta2/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) @@ -764,7 +739,7 @@ func (r DeleteCustomDomainRequest) Execute() (*DeleteCustomDomainResponse, error return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 422 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -775,7 +750,7 @@ func (r DeleteCustomDomainRequest) Execute() (*DeleteCustomDomainResponse, error return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 500 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -785,7 +760,7 @@ func (r DeleteCustomDomainRequest) Execute() (*DeleteCustomDomainResponse, error newErr.Model = v return localVarReturnValue, newErr } - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -815,7 +790,7 @@ DeleteCustomDomain: Delete a custom domain # Removes a custom domain @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 projectId Your STACKIT Project Id @param distributionId @param domain @return ApiDeleteCustomDomainRequest @@ -873,7 +848,7 @@ func (r DeleteDistributionRequest) Execute() (*DeleteDistributionResponse, error return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta/projects/{projectId}/distributions/{distributionId}" + localVarPath := localBasePath + "/v1beta2/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) @@ -945,7 +920,7 @@ func (r DeleteDistributionRequest) Execute() (*DeleteDistributionResponse, error return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 422 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -956,7 +931,7 @@ func (r DeleteDistributionRequest) Execute() (*DeleteDistributionResponse, error return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 500 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -966,7 +941,7 @@ func (r DeleteDistributionRequest) Execute() (*DeleteDistributionResponse, error newErr.Model = v return localVarReturnValue, newErr } - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -993,10 +968,10 @@ func (r DeleteDistributionRequest) Execute() (*DeleteDistributionResponse, error /* DeleteDistribution: Delete distribution -DeleteDistribution accepts a project- and distribution-ID and will delete a distribution. +DeleteDistribution accepts a project- and distribution-Id and will delete a distribution. @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 projectId Your STACKIT Project Id @param distributionId @return ApiDeleteDistributionRequest */ @@ -1051,7 +1026,7 @@ func (r FindCachePathsRequest) Execute() (*FindCachePathsResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta/projects/{projectId}/distributions/{distributionId}/cache/paths" + localVarPath := localBasePath + "/v1beta2/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) @@ -1124,7 +1099,7 @@ func (r FindCachePathsRequest) Execute() (*FindCachePathsResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 422 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1135,7 +1110,7 @@ func (r FindCachePathsRequest) Execute() (*FindCachePathsResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 500 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1145,7 +1120,7 @@ func (r FindCachePathsRequest) Execute() (*FindCachePathsResponse, error) { newErr.Model = v return localVarReturnValue, newErr } - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1188,7 +1163,7 @@ this would return the following paths, in the following order, assuming `/te` wa - `/test/2` @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 projectId Your STACKIT Project Id @param distributionId @return ApiFindCachePathsRequest */ @@ -1241,7 +1216,7 @@ func (r GetCacheInfoRequest) Execute() (*GetCacheInfoResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta/projects/{projectId}/distributions/{distributionId}/cache" + localVarPath := localBasePath + "/v1beta2/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) @@ -1313,7 +1288,7 @@ func (r GetCacheInfoRequest) Execute() (*GetCacheInfoResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 422 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1324,7 +1299,7 @@ func (r GetCacheInfoRequest) Execute() (*GetCacheInfoResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 500 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1334,7 +1309,7 @@ func (r GetCacheInfoRequest) Execute() (*GetCacheInfoResponse, error) { newErr.Model = v return localVarReturnValue, newErr } - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1367,7 +1342,7 @@ If (and only if) you provide the path query parameter, the history will also con The request will not fail if no data about a path is found. @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 projectId Your STACKIT Project Id @param distributionId @return ApiGetCacheInfoRequest */ @@ -1415,7 +1390,7 @@ func (r GetCustomDomainRequest) Execute() (*GetCustomDomainResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}" + localVarPath := localBasePath + "/v1beta2/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) @@ -1488,7 +1463,7 @@ func (r GetCustomDomainRequest) Execute() (*GetCustomDomainResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 404 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1499,7 +1474,7 @@ func (r GetCustomDomainRequest) Execute() (*GetCustomDomainResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 422 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1510,7 +1485,7 @@ func (r GetCustomDomainRequest) Execute() (*GetCustomDomainResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 500 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1520,7 +1495,7 @@ func (r GetCustomDomainRequest) Execute() (*GetCustomDomainResponse, error) { newErr.Model = v return localVarReturnValue, newErr } - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1550,7 +1525,7 @@ GetCustomDomain: Retrieve a specific custom domain # Returns a 200 and the custom domain if this custom domain was associated to this distribution, else 404 @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 projectId Your STACKIT Project Id @param distributionId @param domain @return ApiGetCustomDomainRequest @@ -1608,7 +1583,7 @@ func (r GetDistributionRequest) Execute() (*GetDistributionResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta/projects/{projectId}/distributions/{distributionId}" + localVarPath := localBasePath + "/v1beta2/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) @@ -1680,7 +1655,7 @@ func (r GetDistributionRequest) Execute() (*GetDistributionResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 404 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1691,7 +1666,7 @@ func (r GetDistributionRequest) Execute() (*GetDistributionResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 422 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1702,7 +1677,7 @@ func (r GetDistributionRequest) Execute() (*GetDistributionResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 500 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1712,7 +1687,7 @@ func (r GetDistributionRequest) Execute() (*GetDistributionResponse, error) { newErr.Model = v return localVarReturnValue, newErr } - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1737,12 +1712,12 @@ func (r GetDistributionRequest) Execute() (*GetDistributionResponse, error) { } /* -GetDistribution: Get distribution by ID +GetDistribution: Get distribution by Id -This returns a specific distribution by its ID. If no distribution with the given ID exists the endpoint returns 404. Trying to get a deleted distributions also return 404. +This returns a specific distribution by its Id. If no distribution with the given Id exists the endpoint returns 404. Trying to get a deleted distributions also return 404. @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 projectId Your STACKIT Project Id @param distributionId @return ApiGetDistributionRequest */ @@ -1867,7 +1842,7 @@ func (r GetLogsRequest) Execute() (*GetLogsResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta/projects/{projectId}/distributions/{distributionId}/logs" + localVarPath := localBasePath + "/v1beta2/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) @@ -1966,7 +1941,7 @@ func (r GetLogsRequest) Execute() (*GetLogsResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 422 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1977,7 +1952,7 @@ func (r GetLogsRequest) Execute() (*GetLogsResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 500 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1987,7 +1962,7 @@ func (r GetLogsRequest) Execute() (*GetLogsResponse, error) { newErr.Model = v return localVarReturnValue, newErr } - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2015,8 +1990,8 @@ func (r GetLogsRequest) Execute() (*GetLogsResponse, error) { GetLogs: Retrieve distribution logs @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 + @param projectId Your STACKIT Project Id + @param distributionId Your CDN distribution Id @return ApiGetLogsRequest */ func (a *APIClient) GetLogs(ctx context.Context, projectId string, distributionId string) ApiGetLogsRequest { @@ -2038,194 +2013,6 @@ func (a *APIClient) GetLogsExecute(ctx context.Context, projectId string, distri return r.Execute() } -type GetLogsSearchFiltersRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - distributionId string - filter *string -} - -// Required filter for search suggestions (e.g., status=4, requestCountry, cacheHit=tru, dataCenterRegion). The filter query cannot be empty. - -func (r GetLogsSearchFiltersRequest) Filter(filter string) ApiGetLogsSearchFiltersRequest { - r.filter = &filter - return r -} - -func (r GetLogsSearchFiltersRequest) Execute() (*GetLogsSearchFiltersResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetLogsSearchFiltersResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetLogsSearchFilters") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1beta/projects/{projectId}/distributions/{distributionId}/logs/searchFilters" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.filter == nil { - return localVarReturnValue, fmt.Errorf("filter is required and must be specified") - } - - parameterAddToHeaderOrQuery(localVarQueryParams, "filter", r.filter, "") - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericJSONResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v string - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v GenericJSONResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericJSONResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v GenericJSONResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -GetLogsSearchFilters: Get relevant search filters for this distribution based on user input - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Your STACKIT Project ID - @param distributionId Your CDN distribution ID - @return ApiGetLogsSearchFiltersRequest -*/ -func (a *APIClient) GetLogsSearchFilters(ctx context.Context, projectId string, distributionId string) ApiGetLogsSearchFiltersRequest { - return GetLogsSearchFiltersRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - } -} - -func (a *APIClient) GetLogsSearchFiltersExecute(ctx context.Context, projectId string, distributionId string) (*GetLogsSearchFiltersResponse, error) { - r := GetLogsSearchFiltersRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - } - return r.Execute() -} - type GetStatisticsRequest struct { ctx context.Context apiService *DefaultApiService @@ -2274,7 +2061,7 @@ func (r GetStatisticsRequest) Execute() (*GetStatisticsResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta/projects/{projectId}/distributions/{distributionId}/statistics" + localVarPath := localBasePath + "/v1beta2/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) @@ -2353,7 +2140,7 @@ func (r GetStatisticsRequest) Execute() (*GetStatisticsResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 422 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2364,7 +2151,7 @@ func (r GetStatisticsRequest) Execute() (*GetStatisticsResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 500 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2374,7 +2161,7 @@ func (r GetStatisticsRequest) Execute() (*GetStatisticsResponse, error) { newErr.Model = v return localVarReturnValue, newErr } - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2414,7 +2201,7 @@ The upper bound is optional. If you omit it, the API will use the start of the n Example: if `interval` is `hourly`, `from` would default to the start of the next hour, if it's `daily`, `from` would default to the start of the next day, etc. @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 projectId Your STACKIT Project Id @param distributionId @return ApiGetStatisticsRequest */ @@ -2469,7 +2256,7 @@ func (r ListDistributionsRequest) PageIdentifier(pageIdentifier string) ApiListD return r } -// The following sort options exist. We default to `createdAt` - `id` - Sort by distribution ID using String comparison - `updatedAt` - Sort by when the distribution configuration was last modified, for example by changing the regions or response headers - `createdAt` - Sort by when the distribution was initially created. - `originUrl` - Sort by originURL using String comparison - `status` - Sort by distribution status, using String comparison - `originUrlRelated` - The origin URL is segmented and reversed before sorting. E.g. `www.example.com` is converted to `com.example.www` for sorting. This way, distributions pointing to the same domain trees are grouped next to each other. +// The following sort options exist. We default to `createdAt` - `id` - Sort by distribution Id using String comparison - `updatedAt` - Sort by when the distribution configuration was last modified, for example by changing the regions or response headers - `createdAt` - Sort by when the distribution was initially created. - `originUrl` - Sort by originUrl using String comparison - `status` - Sort by distribution status, using String comparison - `originUrlRelated` - The originUrl is segmented and reversed before sorting. E.g. `www.example.com` is converted to `com.example.www` for sorting. This way, distributions pointing to the same domain trees are grouped next to each other. func (r ListDistributionsRequest) SortBy(sortBy string) ApiListDistributionsRequest { r.sortBy = &sortBy @@ -2498,7 +2285,7 @@ func (r ListDistributionsRequest) Execute() (*ListDistributionsResponse, error) return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta/projects/{projectId}/distributions" + localVarPath := localBasePath + "/v1beta2/projects/{projectId}/distributions" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarHeaderParams := make(map[string]string) @@ -2581,7 +2368,7 @@ func (r ListDistributionsRequest) Execute() (*ListDistributionsResponse, error) return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 422 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2592,7 +2379,7 @@ func (r ListDistributionsRequest) Execute() (*ListDistributionsResponse, error) return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 500 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2602,7 +2389,7 @@ func (r ListDistributionsRequest) Execute() (*ListDistributionsResponse, error) newErr.Model = v return localVarReturnValue, newErr } - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2630,10 +2417,10 @@ func (r ListDistributionsRequest) Execute() (*ListDistributionsResponse, error) ListDistributions: List all distributions belonging to a specific project ListDistributions returns a list of all CDN distributions associated with -a given project, ordered by their distribution ID. +a given project, ordered by their distribution Id. @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 projectId Your STACKIT Project Id @return ApiListDistributionsRequest */ func (a *APIClient) ListDistributions(ctx context.Context, projectId string) ApiListDistributionsRequest { @@ -2653,30 +2440,30 @@ func (a *APIClient) ListDistributionsExecute(ctx context.Context, projectId stri return r.Execute() } -type ListWAFCollectionsRequest struct { +type ListWafCollectionsRequest struct { ctx context.Context apiService *DefaultApiService projectId string } -func (r ListWAFCollectionsRequest) Execute() (*ListWAFCollectionsResponse, error) { +func (r ListWafCollectionsRequest) Execute() (*ListWafCollectionsResponse, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListWAFCollectionsResponse + localVarReturnValue *ListWafCollectionsResponse ) 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.ListWAFCollections") + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListWafCollections") if err != nil { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta/projects/{projectId}/waf/collections" + localVarPath := localBasePath + "/v1beta2/projects/{projectId}/waf/collections" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarHeaderParams := make(map[string]string) @@ -2744,7 +2531,7 @@ func (r ListWAFCollectionsRequest) Execute() (*ListWAFCollectionsResponse, error return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 422 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2755,7 +2542,7 @@ func (r ListWAFCollectionsRequest) Execute() (*ListWAFCollectionsResponse, error return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 500 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2765,7 +2552,7 @@ func (r ListWAFCollectionsRequest) Execute() (*ListWAFCollectionsResponse, error newErr.Model = v return localVarReturnValue, newErr } - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2790,24 +2577,24 @@ func (r ListWAFCollectionsRequest) Execute() (*ListWAFCollectionsResponse, error } /* -ListWAFCollections: List all WAF rule collections of the project +ListWafCollections: List all WAF rule collections of the project Returns all WAF rule collections available to the project @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Your STACKIT Project ID - @return ApiListWAFCollectionsRequest + @param projectId Your STACKIT Project Id + @return ApiListWafCollectionsRequest */ -func (a *APIClient) ListWAFCollections(ctx context.Context, projectId string) ApiListWAFCollectionsRequest { - return ListWAFCollectionsRequest{ +func (a *APIClient) ListWafCollections(ctx context.Context, projectId string) ApiListWafCollectionsRequest { + return ListWafCollectionsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, } } -func (a *APIClient) ListWAFCollectionsExecute(ctx context.Context, projectId string) (*ListWAFCollectionsResponse, error) { - r := ListWAFCollectionsRequest{ +func (a *APIClient) ListWafCollectionsExecute(ctx context.Context, projectId string) (*ListWafCollectionsResponse, error) { + r := ListWafCollectionsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, @@ -2845,7 +2632,7 @@ func (r PatchDistributionRequest) Execute() (*PatchDistributionResponse, error) return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta/projects/{projectId}/distributions/{distributionId}" + localVarPath := localBasePath + "/v1beta2/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) @@ -2916,7 +2703,7 @@ func (r PatchDistributionRequest) Execute() (*PatchDistributionResponse, error) return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 422 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2927,7 +2714,7 @@ func (r PatchDistributionRequest) Execute() (*PatchDistributionResponse, error) return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 500 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2937,7 +2724,7 @@ func (r PatchDistributionRequest) Execute() (*PatchDistributionResponse, error) newErr.Model = v return localVarReturnValue, newErr } - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2967,7 +2754,7 @@ PatchDistribution: Update existing distribution Modify a CDN distribution with a partial update. Only the fields specified in the request will be modified. @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 projectId Your STACKIT Project Id @param distributionId @return ApiPatchDistributionRequest */ @@ -3020,7 +2807,7 @@ func (r PurgeCacheRequest) Execute() (map[string]interface{}, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta/projects/{projectId}/distributions/{distributionId}/cache/purge" + localVarPath := localBasePath + "/v1beta2/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) @@ -3091,7 +2878,7 @@ func (r PurgeCacheRequest) Execute() (map[string]interface{}, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 422 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -3102,7 +2889,7 @@ func (r PurgeCacheRequest) Execute() (map[string]interface{}, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 500 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -3112,7 +2899,7 @@ func (r PurgeCacheRequest) Execute() (map[string]interface{}, error) { newErr.Model = v return localVarReturnValue, newErr } - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -3143,7 +2930,7 @@ Clear the cache for this distribution. All content, regardless of its staleness, will get refetched from the host. @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 projectId Your STACKIT Project Id @param distributionId @return ApiPurgeCacheRequest */ @@ -3197,7 +2984,7 @@ func (r PutCustomDomainRequest) Execute() (*PutCustomDomainResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1beta/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}" + localVarPath := localBasePath + "/v1beta2/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) @@ -3272,7 +3059,7 @@ func (r PutCustomDomainRequest) Execute() (*PutCustomDomainResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 422 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -3283,7 +3070,7 @@ func (r PutCustomDomainRequest) Execute() (*PutCustomDomainResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 500 { - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -3293,7 +3080,7 @@ func (r PutCustomDomainRequest) Execute() (*PutCustomDomainResponse, error) { newErr.Model = v return localVarReturnValue, newErr } - var v GenericJSONResponse + var v GenericJsonResponse err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -3323,7 +3110,7 @@ PutCustomDomain: Create or update a custom domain Creates a new custom domain. If it already exists, this will overwrite the previous custom domain's properties. @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 projectId Your STACKIT Project Id @param distributionId @param domain @return ApiPutCustomDomainRequest diff --git a/services/cdn/api_default_test.go b/services/cdn/api_default_test.go index 32f1be735..a44fac2f6 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 := "/v1beta/projects/{projectId}/distributions" + _apiUrlPath := "/v1beta2/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 := "/v1beta/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}" + _apiUrlPath := "/v1beta2/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 := "/v1beta/projects/{projectId}/distributions/{distributionId}" + _apiUrlPath := "/v1beta2/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 := "/v1beta/projects/{projectId}/distributions/{distributionId}/cache/paths" + _apiUrlPath := "/v1beta2/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 := "/v1beta/projects/{projectId}/distributions/{distributionId}/cache" + _apiUrlPath := "/v1beta2/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 := "/v1beta/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}" + _apiUrlPath := "/v1beta2/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 := "/v1beta/projects/{projectId}/distributions/{distributionId}" + _apiUrlPath := "/v1beta2/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 := "/v1beta/projects/{projectId}/distributions/{distributionId}/logs" + _apiUrlPath := "/v1beta2/projects/{projectId}/distributions/{distributionId}/logs" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) distributionIdValue := uuid.NewString() @@ -470,64 +470,8 @@ func Test_cdn_DefaultApiService(t *testing.T) { } }) - t.Run("Test DefaultApiService GetLogsSearchFilters", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}/distributions/{distributionId}/logs/searchFilters" - projectIdValue := "projectId-value" - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) - distributionIdValue := uuid.NewString() - _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(distributionIdValue, "distributionId")), -1) - - testDefaultApiServeMux := http.NewServeMux() - testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := GetLogsSearchFiltersResponse{} - w.Header().Add("Content-Type", "application/json") - json.NewEncoder(w).Encode(data) - }) - testServer := httptest.NewServer(testDefaultApiServeMux) - defer testServer.Close() - - configuration := &config.Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/1.0.0/go", - Debug: false, - Region: "test_region", - Servers: config.ServerConfigurations{ - { - URL: testServer.URL, - Description: "Localhost for cdn_DefaultApi", - Variables: map[string]config.ServerVariable{ - "region": { - DefaultValue: "test_region.", - EnumValues: []string{ - "test_region.", - }, - }, - }, - }, - }, - OperationServers: map[string]config.ServerConfigurations{}, - } - apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) - if err != nil { - t.Fatalf("creating API client: %v", err) - } - - projectId := projectIdValue - distributionId := distributionIdValue - var filter string - - resp, reqErr := apiClient.GetLogsSearchFilters(context.Background(), projectId, distributionId).Filter(filter).Execute() - - if reqErr != nil { - t.Fatalf("error in call: %v", reqErr) - } - if IsNil(resp) { - t.Fatalf("response not present") - } - }) - t.Run("Test DefaultApiService GetStatistics", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}/distributions/{distributionId}/statistics" + _apiUrlPath := "/v1beta2/projects/{projectId}/distributions/{distributionId}/statistics" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) distributionIdValue := uuid.NewString() @@ -583,7 +527,7 @@ func Test_cdn_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListDistributions", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}/distributions" + _apiUrlPath := "/v1beta2/projects/{projectId}/distributions" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) @@ -634,14 +578,14 @@ func Test_cdn_DefaultApiService(t *testing.T) { } }) - t.Run("Test DefaultApiService ListWAFCollections", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}/waf/collections" + t.Run("Test DefaultApiService ListWafCollections", func(t *testing.T) { + _apiUrlPath := "/v1beta2/projects/{projectId}/waf/collections" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { - data := ListWAFCollectionsResponse{} + data := ListWafCollectionsResponse{} w.Header().Add("Content-Type", "application/json") json.NewEncoder(w).Encode(data) }) @@ -676,7 +620,7 @@ func Test_cdn_DefaultApiService(t *testing.T) { projectId := projectIdValue - resp, reqErr := apiClient.ListWAFCollections(context.Background(), projectId).Execute() + resp, reqErr := apiClient.ListWafCollections(context.Background(), projectId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -687,7 +631,7 @@ func Test_cdn_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService PatchDistribution", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}/distributions/{distributionId}" + _apiUrlPath := "/v1beta2/projects/{projectId}/distributions/{distributionId}" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) distributionIdValue := "distributionId-value" @@ -742,7 +686,7 @@ func Test_cdn_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService PurgeCache", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}/distributions/{distributionId}/cache/purge" + _apiUrlPath := "/v1beta2/projects/{projectId}/distributions/{distributionId}/cache/purge" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) distributionIdValue := uuid.NewString() @@ -797,7 +741,7 @@ func Test_cdn_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService PutCustomDomain", func(t *testing.T) { - _apiUrlPath := "/v1beta/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}" + _apiUrlPath := "/v1beta2/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 b115d61a4..9108c8de5 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: 1beta.0.0 +API version: 1beta2.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 v1beta.0.0 +// APIClient manages communication with the CDN API API v1beta2.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 60597698a..863f74d2c 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: 1beta.0.0 +API version: 1beta2.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 new file mode 100644 index 000000000..f33d320e1 --- /dev/null +++ b/services/cdn/model_bucket_backend.go @@ -0,0 +1,214 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the BucketBackend type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BucketBackend{} + +/* + types and functions for bucketUrl +*/ + +// isNotNullableString +type BucketBackendGetBucketUrlAttributeType = *string + +func getBucketBackendGetBucketUrlAttributeTypeOk(arg BucketBackendGetBucketUrlAttributeType) (ret BucketBackendGetBucketUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBucketBackendGetBucketUrlAttributeType(arg *BucketBackendGetBucketUrlAttributeType, val BucketBackendGetBucketUrlRetType) { + *arg = &val +} + +type BucketBackendGetBucketUrlArgType = string +type BucketBackendGetBucketUrlRetType = string + +/* + types and functions for region +*/ + +// isNotNullableString +type BucketBackendGetRegionAttributeType = *string + +func getBucketBackendGetRegionAttributeTypeOk(arg BucketBackendGetRegionAttributeType) (ret BucketBackendGetRegionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBucketBackendGetRegionAttributeType(arg *BucketBackendGetRegionAttributeType, val BucketBackendGetRegionRetType) { + *arg = &val +} + +type BucketBackendGetRegionArgType = string +type BucketBackendGetRegionRetType = string + +/* + types and functions for type +*/ + +// isNotNullableString +type BucketBackendGetTypeAttributeType = *string + +func getBucketBackendGetTypeAttributeTypeOk(arg BucketBackendGetTypeAttributeType) (ret BucketBackendGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBucketBackendGetTypeAttributeType(arg *BucketBackendGetTypeAttributeType, val BucketBackendGetTypeRetType) { + *arg = &val +} + +type BucketBackendGetTypeArgType = string +type BucketBackendGetTypeRetType = string + +// BucketBackend struct for BucketBackend +type BucketBackend struct { + // REQUIRED + BucketUrl BucketBackendGetBucketUrlAttributeType `json:"bucketUrl" required:"true"` + // REQUIRED + Region BucketBackendGetRegionAttributeType `json:"region" required:"true"` + // REQUIRED + Type BucketBackendGetTypeAttributeType `json:"type" required:"true"` +} + +type _BucketBackend BucketBackend + +// NewBucketBackend instantiates a new BucketBackend 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 NewBucketBackend(bucketUrl BucketBackendGetBucketUrlArgType, region BucketBackendGetRegionArgType, types BucketBackendGetTypeArgType) *BucketBackend { + this := BucketBackend{} + setBucketBackendGetBucketUrlAttributeType(&this.BucketUrl, bucketUrl) + setBucketBackendGetRegionAttributeType(&this.Region, region) + setBucketBackendGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewBucketBackendWithDefaults instantiates a new BucketBackend 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 NewBucketBackendWithDefaults() *BucketBackend { + this := BucketBackend{} + return &this +} + +// GetBucketUrl returns the BucketUrl field value +func (o *BucketBackend) GetBucketUrl() (ret BucketBackendGetBucketUrlRetType) { + ret, _ = o.GetBucketUrlOk() + return ret +} + +// GetBucketUrlOk returns a tuple with the BucketUrl field value +// and a boolean to check if the value has been set. +func (o *BucketBackend) GetBucketUrlOk() (ret BucketBackendGetBucketUrlRetType, ok bool) { + return getBucketBackendGetBucketUrlAttributeTypeOk(o.BucketUrl) +} + +// SetBucketUrl sets field value +func (o *BucketBackend) SetBucketUrl(v BucketBackendGetBucketUrlRetType) { + setBucketBackendGetBucketUrlAttributeType(&o.BucketUrl, v) +} + +// GetRegion returns the Region field value +func (o *BucketBackend) GetRegion() (ret BucketBackendGetRegionRetType) { + ret, _ = o.GetRegionOk() + return ret +} + +// GetRegionOk returns a tuple with the Region field value +// and a boolean to check if the value has been set. +func (o *BucketBackend) GetRegionOk() (ret BucketBackendGetRegionRetType, ok bool) { + return getBucketBackendGetRegionAttributeTypeOk(o.Region) +} + +// SetRegion sets field value +func (o *BucketBackend) SetRegion(v BucketBackendGetRegionRetType) { + setBucketBackendGetRegionAttributeType(&o.Region, v) +} + +// GetType returns the Type field value +func (o *BucketBackend) GetType() (ret BucketBackendGetTypeRetType) { + 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 *BucketBackend) GetTypeOk() (ret BucketBackendGetTypeRetType, ok bool) { + return getBucketBackendGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +func (o *BucketBackend) SetType(v BucketBackendGetTypeRetType) { + setBucketBackendGetTypeAttributeType(&o.Type, v) +} + +func (o BucketBackend) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getBucketBackendGetBucketUrlAttributeTypeOk(o.BucketUrl); ok { + toSerialize["BucketUrl"] = val + } + if val, ok := getBucketBackendGetRegionAttributeTypeOk(o.Region); ok { + toSerialize["Region"] = val + } + if val, ok := getBucketBackendGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableBucketBackend struct { + value *BucketBackend + isSet bool +} + +func (v NullableBucketBackend) Get() *BucketBackend { + return v.value +} + +func (v *NullableBucketBackend) Set(val *BucketBackend) { + v.value = val + v.isSet = true +} + +func (v NullableBucketBackend) IsSet() bool { + return v.isSet +} + +func (v *NullableBucketBackend) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBucketBackend(val *BucketBackend) *NullableBucketBackend { + return &NullableBucketBackend{value: val, isSet: true} +} + +func (v NullableBucketBackend) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBucketBackend) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_bucket_backend_create.go b/services/cdn/model_bucket_backend_create.go new file mode 100644 index 000000000..aeb6dd7ea --- /dev/null +++ b/services/cdn/model_bucket_backend_create.go @@ -0,0 +1,257 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the BucketBackendCreate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BucketBackendCreate{} + +/* + types and functions for bucketUrl +*/ + +// isNotNullableString +type BucketBackendCreateGetBucketUrlAttributeType = *string + +func getBucketBackendCreateGetBucketUrlAttributeTypeOk(arg BucketBackendCreateGetBucketUrlAttributeType) (ret BucketBackendCreateGetBucketUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBucketBackendCreateGetBucketUrlAttributeType(arg *BucketBackendCreateGetBucketUrlAttributeType, val BucketBackendCreateGetBucketUrlRetType) { + *arg = &val +} + +type BucketBackendCreateGetBucketUrlArgType = string +type BucketBackendCreateGetBucketUrlRetType = string + +/* + types and functions for credentials +*/ + +// isModel +type BucketBackendCreateGetCredentialsAttributeType = *BucketCredentials +type BucketBackendCreateGetCredentialsArgType = BucketCredentials +type BucketBackendCreateGetCredentialsRetType = BucketCredentials + +func getBucketBackendCreateGetCredentialsAttributeTypeOk(arg BucketBackendCreateGetCredentialsAttributeType) (ret BucketBackendCreateGetCredentialsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBucketBackendCreateGetCredentialsAttributeType(arg *BucketBackendCreateGetCredentialsAttributeType, val BucketBackendCreateGetCredentialsRetType) { + *arg = &val +} + +/* + types and functions for region +*/ + +// isNotNullableString +type BucketBackendCreateGetRegionAttributeType = *string + +func getBucketBackendCreateGetRegionAttributeTypeOk(arg BucketBackendCreateGetRegionAttributeType) (ret BucketBackendCreateGetRegionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBucketBackendCreateGetRegionAttributeType(arg *BucketBackendCreateGetRegionAttributeType, val BucketBackendCreateGetRegionRetType) { + *arg = &val +} + +type BucketBackendCreateGetRegionArgType = string +type BucketBackendCreateGetRegionRetType = string + +/* + types and functions for type +*/ + +// isNotNullableString +type BucketBackendCreateGetTypeAttributeType = *string + +func getBucketBackendCreateGetTypeAttributeTypeOk(arg BucketBackendCreateGetTypeAttributeType) (ret BucketBackendCreateGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBucketBackendCreateGetTypeAttributeType(arg *BucketBackendCreateGetTypeAttributeType, val BucketBackendCreateGetTypeRetType) { + *arg = &val +} + +type BucketBackendCreateGetTypeArgType = string +type BucketBackendCreateGetTypeRetType = string + +// BucketBackendCreate struct for BucketBackendCreate +type BucketBackendCreate struct { + // REQUIRED + BucketUrl BucketBackendCreateGetBucketUrlAttributeType `json:"bucketUrl" required:"true"` + // REQUIRED + Credentials BucketBackendCreateGetCredentialsAttributeType `json:"credentials" required:"true"` + // REQUIRED + Region BucketBackendCreateGetRegionAttributeType `json:"region" required:"true"` + // REQUIRED + Type BucketBackendCreateGetTypeAttributeType `json:"type" required:"true"` +} + +type _BucketBackendCreate BucketBackendCreate + +// NewBucketBackendCreate instantiates a new BucketBackendCreate 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 NewBucketBackendCreate(bucketUrl BucketBackendCreateGetBucketUrlArgType, credentials BucketBackendCreateGetCredentialsArgType, region BucketBackendCreateGetRegionArgType, types BucketBackendCreateGetTypeArgType) *BucketBackendCreate { + this := BucketBackendCreate{} + setBucketBackendCreateGetBucketUrlAttributeType(&this.BucketUrl, bucketUrl) + setBucketBackendCreateGetCredentialsAttributeType(&this.Credentials, credentials) + setBucketBackendCreateGetRegionAttributeType(&this.Region, region) + setBucketBackendCreateGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewBucketBackendCreateWithDefaults instantiates a new BucketBackendCreate 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 NewBucketBackendCreateWithDefaults() *BucketBackendCreate { + this := BucketBackendCreate{} + return &this +} + +// GetBucketUrl returns the BucketUrl field value +func (o *BucketBackendCreate) GetBucketUrl() (ret BucketBackendCreateGetBucketUrlRetType) { + ret, _ = o.GetBucketUrlOk() + return ret +} + +// GetBucketUrlOk returns a tuple with the BucketUrl field value +// and a boolean to check if the value has been set. +func (o *BucketBackendCreate) GetBucketUrlOk() (ret BucketBackendCreateGetBucketUrlRetType, ok bool) { + return getBucketBackendCreateGetBucketUrlAttributeTypeOk(o.BucketUrl) +} + +// SetBucketUrl sets field value +func (o *BucketBackendCreate) SetBucketUrl(v BucketBackendCreateGetBucketUrlRetType) { + setBucketBackendCreateGetBucketUrlAttributeType(&o.BucketUrl, v) +} + +// GetCredentials returns the Credentials field value +func (o *BucketBackendCreate) GetCredentials() (ret BucketBackendCreateGetCredentialsRetType) { + ret, _ = o.GetCredentialsOk() + return ret +} + +// GetCredentialsOk returns a tuple with the Credentials field value +// and a boolean to check if the value has been set. +func (o *BucketBackendCreate) GetCredentialsOk() (ret BucketBackendCreateGetCredentialsRetType, ok bool) { + return getBucketBackendCreateGetCredentialsAttributeTypeOk(o.Credentials) +} + +// SetCredentials sets field value +func (o *BucketBackendCreate) SetCredentials(v BucketBackendCreateGetCredentialsRetType) { + setBucketBackendCreateGetCredentialsAttributeType(&o.Credentials, v) +} + +// GetRegion returns the Region field value +func (o *BucketBackendCreate) GetRegion() (ret BucketBackendCreateGetRegionRetType) { + ret, _ = o.GetRegionOk() + return ret +} + +// GetRegionOk returns a tuple with the Region field value +// and a boolean to check if the value has been set. +func (o *BucketBackendCreate) GetRegionOk() (ret BucketBackendCreateGetRegionRetType, ok bool) { + return getBucketBackendCreateGetRegionAttributeTypeOk(o.Region) +} + +// SetRegion sets field value +func (o *BucketBackendCreate) SetRegion(v BucketBackendCreateGetRegionRetType) { + setBucketBackendCreateGetRegionAttributeType(&o.Region, v) +} + +// GetType returns the Type field value +func (o *BucketBackendCreate) GetType() (ret BucketBackendCreateGetTypeRetType) { + 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 *BucketBackendCreate) GetTypeOk() (ret BucketBackendCreateGetTypeRetType, ok bool) { + return getBucketBackendCreateGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +func (o *BucketBackendCreate) SetType(v BucketBackendCreateGetTypeRetType) { + setBucketBackendCreateGetTypeAttributeType(&o.Type, v) +} + +func (o BucketBackendCreate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getBucketBackendCreateGetBucketUrlAttributeTypeOk(o.BucketUrl); ok { + toSerialize["BucketUrl"] = val + } + if val, ok := getBucketBackendCreateGetCredentialsAttributeTypeOk(o.Credentials); ok { + toSerialize["Credentials"] = val + } + if val, ok := getBucketBackendCreateGetRegionAttributeTypeOk(o.Region); ok { + toSerialize["Region"] = val + } + if val, ok := getBucketBackendCreateGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableBucketBackendCreate struct { + value *BucketBackendCreate + isSet bool +} + +func (v NullableBucketBackendCreate) Get() *BucketBackendCreate { + return v.value +} + +func (v *NullableBucketBackendCreate) Set(val *BucketBackendCreate) { + v.value = val + v.isSet = true +} + +func (v NullableBucketBackendCreate) IsSet() bool { + return v.isSet +} + +func (v *NullableBucketBackendCreate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBucketBackendCreate(val *BucketBackendCreate) *NullableBucketBackendCreate { + return &NullableBucketBackendCreate{value: val, isSet: true} +} + +func (v NullableBucketBackendCreate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBucketBackendCreate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_bucket_backend_create_test.go b/services/cdn/model_bucket_backend_create_test.go new file mode 100644 index 000000000..486a30539 --- /dev/null +++ b/services/cdn/model_bucket_backend_create_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_bucket_backend_patch.go b/services/cdn/model_bucket_backend_patch.go new file mode 100644 index 000000000..1fce2e822 --- /dev/null +++ b/services/cdn/model_bucket_backend_patch.go @@ -0,0 +1,269 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the BucketBackendPatch type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BucketBackendPatch{} + +/* + types and functions for bucketUrl +*/ + +// isNotNullableString +type BucketBackendPatchGetBucketUrlAttributeType = *string + +func getBucketBackendPatchGetBucketUrlAttributeTypeOk(arg BucketBackendPatchGetBucketUrlAttributeType) (ret BucketBackendPatchGetBucketUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBucketBackendPatchGetBucketUrlAttributeType(arg *BucketBackendPatchGetBucketUrlAttributeType, val BucketBackendPatchGetBucketUrlRetType) { + *arg = &val +} + +type BucketBackendPatchGetBucketUrlArgType = string +type BucketBackendPatchGetBucketUrlRetType = string + +/* + types and functions for credentials +*/ + +// isModel +type BucketBackendPatchGetCredentialsAttributeType = *BucketCredentials +type BucketBackendPatchGetCredentialsArgType = BucketCredentials +type BucketBackendPatchGetCredentialsRetType = BucketCredentials + +func getBucketBackendPatchGetCredentialsAttributeTypeOk(arg BucketBackendPatchGetCredentialsAttributeType) (ret BucketBackendPatchGetCredentialsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBucketBackendPatchGetCredentialsAttributeType(arg *BucketBackendPatchGetCredentialsAttributeType, val BucketBackendPatchGetCredentialsRetType) { + *arg = &val +} + +/* + types and functions for region +*/ + +// isNotNullableString +type BucketBackendPatchGetRegionAttributeType = *string + +func getBucketBackendPatchGetRegionAttributeTypeOk(arg BucketBackendPatchGetRegionAttributeType) (ret BucketBackendPatchGetRegionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBucketBackendPatchGetRegionAttributeType(arg *BucketBackendPatchGetRegionAttributeType, val BucketBackendPatchGetRegionRetType) { + *arg = &val +} + +type BucketBackendPatchGetRegionArgType = string +type BucketBackendPatchGetRegionRetType = string + +/* + types and functions for type +*/ + +// isNotNullableString +type BucketBackendPatchGetTypeAttributeType = *string + +func getBucketBackendPatchGetTypeAttributeTypeOk(arg BucketBackendPatchGetTypeAttributeType) (ret BucketBackendPatchGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBucketBackendPatchGetTypeAttributeType(arg *BucketBackendPatchGetTypeAttributeType, val BucketBackendPatchGetTypeRetType) { + *arg = &val +} + +type BucketBackendPatchGetTypeArgType = string +type BucketBackendPatchGetTypeRetType = string + +// BucketBackendPatch struct for BucketBackendPatch +type BucketBackendPatch struct { + BucketUrl BucketBackendPatchGetBucketUrlAttributeType `json:"bucketUrl,omitempty"` + Credentials BucketBackendPatchGetCredentialsAttributeType `json:"credentials,omitempty"` + Region BucketBackendPatchGetRegionAttributeType `json:"region,omitempty"` + // REQUIRED + Type BucketBackendPatchGetTypeAttributeType `json:"type" required:"true"` +} + +type _BucketBackendPatch BucketBackendPatch + +// NewBucketBackendPatch instantiates a new BucketBackendPatch 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 NewBucketBackendPatch(types BucketBackendPatchGetTypeArgType) *BucketBackendPatch { + this := BucketBackendPatch{} + setBucketBackendPatchGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewBucketBackendPatchWithDefaults instantiates a new BucketBackendPatch 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 NewBucketBackendPatchWithDefaults() *BucketBackendPatch { + this := BucketBackendPatch{} + return &this +} + +// GetBucketUrl returns the BucketUrl field value if set, zero value otherwise. +func (o *BucketBackendPatch) GetBucketUrl() (res BucketBackendPatchGetBucketUrlRetType) { + res, _ = o.GetBucketUrlOk() + return +} + +// GetBucketUrlOk returns a tuple with the BucketUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BucketBackendPatch) GetBucketUrlOk() (ret BucketBackendPatchGetBucketUrlRetType, ok bool) { + return getBucketBackendPatchGetBucketUrlAttributeTypeOk(o.BucketUrl) +} + +// HasBucketUrl returns a boolean if a field has been set. +func (o *BucketBackendPatch) HasBucketUrl() bool { + _, ok := o.GetBucketUrlOk() + return ok +} + +// SetBucketUrl gets a reference to the given string and assigns it to the BucketUrl field. +func (o *BucketBackendPatch) SetBucketUrl(v BucketBackendPatchGetBucketUrlRetType) { + setBucketBackendPatchGetBucketUrlAttributeType(&o.BucketUrl, v) +} + +// GetCredentials returns the Credentials field value if set, zero value otherwise. +func (o *BucketBackendPatch) GetCredentials() (res BucketBackendPatchGetCredentialsRetType) { + res, _ = o.GetCredentialsOk() + return +} + +// GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BucketBackendPatch) GetCredentialsOk() (ret BucketBackendPatchGetCredentialsRetType, ok bool) { + return getBucketBackendPatchGetCredentialsAttributeTypeOk(o.Credentials) +} + +// HasCredentials returns a boolean if a field has been set. +func (o *BucketBackendPatch) HasCredentials() bool { + _, ok := o.GetCredentialsOk() + return ok +} + +// SetCredentials gets a reference to the given BucketCredentials and assigns it to the Credentials field. +func (o *BucketBackendPatch) SetCredentials(v BucketBackendPatchGetCredentialsRetType) { + setBucketBackendPatchGetCredentialsAttributeType(&o.Credentials, v) +} + +// GetRegion returns the Region field value if set, zero value otherwise. +func (o *BucketBackendPatch) GetRegion() (res BucketBackendPatchGetRegionRetType) { + res, _ = o.GetRegionOk() + return +} + +// GetRegionOk returns a tuple with the Region field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BucketBackendPatch) GetRegionOk() (ret BucketBackendPatchGetRegionRetType, ok bool) { + return getBucketBackendPatchGetRegionAttributeTypeOk(o.Region) +} + +// HasRegion returns a boolean if a field has been set. +func (o *BucketBackendPatch) HasRegion() bool { + _, ok := o.GetRegionOk() + return ok +} + +// SetRegion gets a reference to the given string and assigns it to the Region field. +func (o *BucketBackendPatch) SetRegion(v BucketBackendPatchGetRegionRetType) { + setBucketBackendPatchGetRegionAttributeType(&o.Region, v) +} + +// GetType returns the Type field value +func (o *BucketBackendPatch) GetType() (ret BucketBackendPatchGetTypeRetType) { + 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 *BucketBackendPatch) GetTypeOk() (ret BucketBackendPatchGetTypeRetType, ok bool) { + return getBucketBackendPatchGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +func (o *BucketBackendPatch) SetType(v BucketBackendPatchGetTypeRetType) { + setBucketBackendPatchGetTypeAttributeType(&o.Type, v) +} + +func (o BucketBackendPatch) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getBucketBackendPatchGetBucketUrlAttributeTypeOk(o.BucketUrl); ok { + toSerialize["BucketUrl"] = val + } + if val, ok := getBucketBackendPatchGetCredentialsAttributeTypeOk(o.Credentials); ok { + toSerialize["Credentials"] = val + } + if val, ok := getBucketBackendPatchGetRegionAttributeTypeOk(o.Region); ok { + toSerialize["Region"] = val + } + if val, ok := getBucketBackendPatchGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableBucketBackendPatch struct { + value *BucketBackendPatch + isSet bool +} + +func (v NullableBucketBackendPatch) Get() *BucketBackendPatch { + return v.value +} + +func (v *NullableBucketBackendPatch) Set(val *BucketBackendPatch) { + v.value = val + v.isSet = true +} + +func (v NullableBucketBackendPatch) IsSet() bool { + return v.isSet +} + +func (v *NullableBucketBackendPatch) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBucketBackendPatch(val *BucketBackendPatch) *NullableBucketBackendPatch { + return &NullableBucketBackendPatch{value: val, isSet: true} +} + +func (v NullableBucketBackendPatch) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBucketBackendPatch) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_bucket_backend_patch_test.go b/services/cdn/model_bucket_backend_patch_test.go new file mode 100644 index 000000000..486a30539 --- /dev/null +++ b/services/cdn/model_bucket_backend_patch_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_bucket_backend_test.go b/services/cdn/model_bucket_backend_test.go new file mode 100644 index 000000000..486a30539 --- /dev/null +++ b/services/cdn/model_bucket_backend_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_bucket_credentials.go b/services/cdn/model_bucket_credentials.go new file mode 100644 index 000000000..8b6d65c37 --- /dev/null +++ b/services/cdn/model_bucket_credentials.go @@ -0,0 +1,170 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the BucketCredentials type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BucketCredentials{} + +/* + types and functions for accessKeyId +*/ + +// isNotNullableString +type BucketCredentialsGetAccessKeyIdAttributeType = *string + +func getBucketCredentialsGetAccessKeyIdAttributeTypeOk(arg BucketCredentialsGetAccessKeyIdAttributeType) (ret BucketCredentialsGetAccessKeyIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBucketCredentialsGetAccessKeyIdAttributeType(arg *BucketCredentialsGetAccessKeyIdAttributeType, val BucketCredentialsGetAccessKeyIdRetType) { + *arg = &val +} + +type BucketCredentialsGetAccessKeyIdArgType = string +type BucketCredentialsGetAccessKeyIdRetType = string + +/* + types and functions for secretAccessKey +*/ + +// isNotNullableString +type BucketCredentialsGetSecretAccessKeyAttributeType = *string + +func getBucketCredentialsGetSecretAccessKeyAttributeTypeOk(arg BucketCredentialsGetSecretAccessKeyAttributeType) (ret BucketCredentialsGetSecretAccessKeyRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBucketCredentialsGetSecretAccessKeyAttributeType(arg *BucketCredentialsGetSecretAccessKeyAttributeType, val BucketCredentialsGetSecretAccessKeyRetType) { + *arg = &val +} + +type BucketCredentialsGetSecretAccessKeyArgType = string +type BucketCredentialsGetSecretAccessKeyRetType = string + +// BucketCredentials struct for BucketCredentials +type BucketCredentials struct { + // REQUIRED + AccessKeyId BucketCredentialsGetAccessKeyIdAttributeType `json:"accessKeyId" required:"true"` + // REQUIRED + SecretAccessKey BucketCredentialsGetSecretAccessKeyAttributeType `json:"secretAccessKey" required:"true"` +} + +type _BucketCredentials BucketCredentials + +// NewBucketCredentials instantiates a new BucketCredentials 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 NewBucketCredentials(accessKeyId BucketCredentialsGetAccessKeyIdArgType, secretAccessKey BucketCredentialsGetSecretAccessKeyArgType) *BucketCredentials { + this := BucketCredentials{} + setBucketCredentialsGetAccessKeyIdAttributeType(&this.AccessKeyId, accessKeyId) + setBucketCredentialsGetSecretAccessKeyAttributeType(&this.SecretAccessKey, secretAccessKey) + return &this +} + +// NewBucketCredentialsWithDefaults instantiates a new BucketCredentials 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 NewBucketCredentialsWithDefaults() *BucketCredentials { + this := BucketCredentials{} + return &this +} + +// GetAccessKeyId returns the AccessKeyId field value +func (o *BucketCredentials) GetAccessKeyId() (ret BucketCredentialsGetAccessKeyIdRetType) { + ret, _ = o.GetAccessKeyIdOk() + return ret +} + +// GetAccessKeyIdOk returns a tuple with the AccessKeyId field value +// and a boolean to check if the value has been set. +func (o *BucketCredentials) GetAccessKeyIdOk() (ret BucketCredentialsGetAccessKeyIdRetType, ok bool) { + return getBucketCredentialsGetAccessKeyIdAttributeTypeOk(o.AccessKeyId) +} + +// SetAccessKeyId sets field value +func (o *BucketCredentials) SetAccessKeyId(v BucketCredentialsGetAccessKeyIdRetType) { + setBucketCredentialsGetAccessKeyIdAttributeType(&o.AccessKeyId, v) +} + +// GetSecretAccessKey returns the SecretAccessKey field value +func (o *BucketCredentials) GetSecretAccessKey() (ret BucketCredentialsGetSecretAccessKeyRetType) { + ret, _ = o.GetSecretAccessKeyOk() + return ret +} + +// GetSecretAccessKeyOk returns a tuple with the SecretAccessKey field value +// and a boolean to check if the value has been set. +func (o *BucketCredentials) GetSecretAccessKeyOk() (ret BucketCredentialsGetSecretAccessKeyRetType, ok bool) { + return getBucketCredentialsGetSecretAccessKeyAttributeTypeOk(o.SecretAccessKey) +} + +// SetSecretAccessKey sets field value +func (o *BucketCredentials) SetSecretAccessKey(v BucketCredentialsGetSecretAccessKeyRetType) { + setBucketCredentialsGetSecretAccessKeyAttributeType(&o.SecretAccessKey, v) +} + +func (o BucketCredentials) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getBucketCredentialsGetAccessKeyIdAttributeTypeOk(o.AccessKeyId); ok { + toSerialize["AccessKeyId"] = val + } + if val, ok := getBucketCredentialsGetSecretAccessKeyAttributeTypeOk(o.SecretAccessKey); ok { + toSerialize["SecretAccessKey"] = val + } + return toSerialize, nil +} + +type NullableBucketCredentials struct { + value *BucketCredentials + isSet bool +} + +func (v NullableBucketCredentials) Get() *BucketCredentials { + return v.value +} + +func (v *NullableBucketCredentials) Set(val *BucketCredentials) { + v.value = val + v.isSet = true +} + +func (v NullableBucketCredentials) IsSet() bool { + return v.isSet +} + +func (v *NullableBucketCredentials) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBucketCredentials(val *BucketCredentials) *NullableBucketCredentials { + return &NullableBucketCredentials{value: val, isSet: true} +} + +func (v NullableBucketCredentials) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBucketCredentials) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_bucket_credentials_test.go b/services/cdn/model_bucket_credentials_test.go new file mode 100644 index 000000000..486a30539 --- /dev/null +++ b/services/cdn/model_bucket_credentials_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_config.go b/services/cdn/model_config.go index fa661d310..3327a506c 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -58,22 +58,22 @@ func setConfigGetBlockedCountriesAttributeType(arg *ConfigGetBlockedCountriesAtt } /* - types and functions for blockedIPs + types and functions for blockedIps */ // isArray -type ConfigGetBlockedIPsAttributeType = *[]string -type ConfigGetBlockedIPsArgType = []string -type ConfigGetBlockedIPsRetType = []string +type ConfigGetBlockedIpsAttributeType = *[]string +type ConfigGetBlockedIpsArgType = []string +type ConfigGetBlockedIpsRetType = []string -func getConfigGetBlockedIPsAttributeTypeOk(arg ConfigGetBlockedIPsAttributeType) (ret ConfigGetBlockedIPsRetType, ok bool) { +func getConfigGetBlockedIpsAttributeTypeOk(arg ConfigGetBlockedIpsAttributeType) (ret ConfigGetBlockedIpsRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } -func setConfigGetBlockedIPsAttributeType(arg *ConfigGetBlockedIPsAttributeType, val ConfigGetBlockedIPsRetType) { +func setConfigGetBlockedIpsAttributeType(arg *ConfigGetBlockedIpsAttributeType, val ConfigGetBlockedIpsRetType) { *arg = &val } @@ -206,12 +206,12 @@ func setConfigGetWafAttributeType(arg *ConfigGetWafAttributeType, val ConfigGetW type Config struct { // REQUIRED Backend ConfigGetBackendAttributeType `json:"backend" required:"true"` - // Restricts access to your content based on country. We use the ISO 3166-1 alpha-2 standard for country codes (e.g., DE, ES, GB). This setting blocks users from the specified countries. + // Restricts access to your content based on country. We use the ISO 3166-1 alpha-2 standard for country codes (e.g. DE, ES, GB). This setting blocks users from the specified countries. // REQUIRED BlockedCountries ConfigGetBlockedCountriesAttributeType `json:"blockedCountries" required:"true"` // Restricts access to your content by specifying a list of blocked IPv4 addresses. This feature enhances security and privacy by preventing these addresses from accessing your distribution. // REQUIRED - BlockedIPs ConfigGetBlockedIPsAttributeType `json:"blockedIPs" required:"true"` + BlockedIps ConfigGetBlockedIpsAttributeType `json:"blockedIps" required:"true"` // Sets the default cache duration for the distribution. The default cache duration is applied when a 'Cache-Control' header is not presented in the origin's response. We use ISO8601 duration format for cache duration (e.g. P1DT2H30M) DefaultCacheDuration ConfigGetDefaultCacheDurationAttributeType `json:"defaultCacheDuration,omitempty"` LogSink ConfigGetLogSinkAttributeType `json:"logSink,omitempty"` @@ -230,11 +230,11 @@ type _Config Config // 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 NewConfig(backend ConfigGetBackendArgType, blockedCountries ConfigGetBlockedCountriesArgType, blockedIPs ConfigGetBlockedIPsArgType, regions ConfigGetRegionsArgType, waf ConfigGetWafArgType) *Config { +func NewConfig(backend ConfigGetBackendArgType, blockedCountries ConfigGetBlockedCountriesArgType, blockedIps ConfigGetBlockedIpsArgType, regions ConfigGetRegionsArgType, waf ConfigGetWafArgType) *Config { this := Config{} setConfigGetBackendAttributeType(&this.Backend, backend) setConfigGetBlockedCountriesAttributeType(&this.BlockedCountries, blockedCountries) - setConfigGetBlockedIPsAttributeType(&this.BlockedIPs, blockedIPs) + setConfigGetBlockedIpsAttributeType(&this.BlockedIps, blockedIps) setConfigGetRegionsAttributeType(&this.Regions, regions) setConfigGetWafAttributeType(&this.Waf, waf) return &this @@ -282,21 +282,21 @@ func (o *Config) SetBlockedCountries(v ConfigGetBlockedCountriesRetType) { setConfigGetBlockedCountriesAttributeType(&o.BlockedCountries, v) } -// GetBlockedIPs returns the BlockedIPs field value -func (o *Config) GetBlockedIPs() (ret ConfigGetBlockedIPsRetType) { - ret, _ = o.GetBlockedIPsOk() +// GetBlockedIps returns the BlockedIps field value +func (o *Config) GetBlockedIps() (ret ConfigGetBlockedIpsRetType) { + ret, _ = o.GetBlockedIpsOk() return ret } -// GetBlockedIPsOk returns a tuple with the BlockedIPs field value +// GetBlockedIpsOk returns a tuple with the BlockedIps field value // and a boolean to check if the value has been set. -func (o *Config) GetBlockedIPsOk() (ret ConfigGetBlockedIPsRetType, ok bool) { - return getConfigGetBlockedIPsAttributeTypeOk(o.BlockedIPs) +func (o *Config) GetBlockedIpsOk() (ret ConfigGetBlockedIpsRetType, ok bool) { + return getConfigGetBlockedIpsAttributeTypeOk(o.BlockedIps) } -// SetBlockedIPs sets field value -func (o *Config) SetBlockedIPs(v ConfigGetBlockedIPsRetType) { - setConfigGetBlockedIPsAttributeType(&o.BlockedIPs, v) +// SetBlockedIps sets field value +func (o *Config) SetBlockedIps(v ConfigGetBlockedIpsRetType) { + setConfigGetBlockedIpsAttributeType(&o.BlockedIps, v) } // GetDefaultCacheDuration returns the DefaultCacheDuration field value if set, zero value otherwise (both if not set or set to explicit null). @@ -455,8 +455,8 @@ func (o Config) ToMap() (map[string]interface{}, error) { if val, ok := getConfigGetBlockedCountriesAttributeTypeOk(o.BlockedCountries); ok { toSerialize["BlockedCountries"] = val } - if val, ok := getConfigGetBlockedIPsAttributeTypeOk(o.BlockedIPs); ok { - toSerialize["BlockedIPs"] = val + if val, ok := getConfigGetBlockedIpsAttributeTypeOk(o.BlockedIps); ok { + toSerialize["BlockedIps"] = val } if val, ok := getConfigGetDefaultCacheDurationAttributeTypeOk(o.DefaultCacheDuration); ok { toSerialize["DefaultCacheDuration"] = val diff --git a/services/cdn/model_config_backend.go b/services/cdn/model_config_backend.go index 2ed486765..dbb9618e1 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -17,7 +17,15 @@ import ( // ConfigBackend - struct for ConfigBackend type ConfigBackend struct { - HttpBackend *HttpBackend + BucketBackend *BucketBackend + HttpBackend *HttpBackend +} + +// BucketBackendAsConfigBackend is a convenience function that returns BucketBackend wrapped in ConfigBackend +func BucketBackendAsConfigBackend(v *BucketBackend) ConfigBackend { + return ConfigBackend{ + BucketBackend: v, + } } // HttpBackendAsConfigBackend is a convenience function that returns HttpBackend wrapped in ConfigBackend @@ -37,6 +45,18 @@ func (dst *ConfigBackend) UnmarshalJSON(data []byte) error { return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") } + // check if the discriminator value is 'BucketBackend' + if jsonDict["type"] == "BucketBackend" { + // try to unmarshal JSON data into BucketBackend + err = json.Unmarshal(data, &dst.BucketBackend) + if err == nil { + return nil // data stored in dst.BucketBackend, return on the first match + } else { + dst.BucketBackend = nil + return fmt.Errorf("failed to unmarshal ConfigBackend as BucketBackend: %s", err.Error()) + } + } + // check if the discriminator value is 'HttpBackend' if jsonDict["type"] == "HttpBackend" { // try to unmarshal JSON data into HttpBackend @@ -49,6 +69,18 @@ func (dst *ConfigBackend) UnmarshalJSON(data []byte) error { } } + // check if the discriminator value is 'bucket' + if jsonDict["type"] == "bucket" { + // try to unmarshal JSON data into BucketBackend + err = json.Unmarshal(data, &dst.BucketBackend) + if err == nil { + return nil // data stored in dst.BucketBackend, return on the first match + } else { + dst.BucketBackend = nil + return fmt.Errorf("failed to unmarshal ConfigBackend as BucketBackend: %s", err.Error()) + } + } + // check if the discriminator value is 'http' if jsonDict["type"] == "http" { // try to unmarshal JSON data into HttpBackend @@ -66,6 +98,10 @@ func (dst *ConfigBackend) UnmarshalJSON(data []byte) error { // Marshal data from the first non-nil pointers in the struct to JSON func (src ConfigBackend) MarshalJSON() ([]byte, error) { + if src.BucketBackend != nil { + return json.Marshal(&src.BucketBackend) + } + if src.HttpBackend != nil { return json.Marshal(&src.HttpBackend) } @@ -78,6 +114,10 @@ func (obj *ConfigBackend) GetActualInstance() interface{} { if obj == nil { return nil } + if obj.BucketBackend != nil { + return obj.BucketBackend + } + if obj.HttpBackend != nil { return obj.HttpBackend } diff --git a/services/cdn/model_config_backend_test.go b/services/cdn/model_config_backend_test.go index 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 eafafe136..ff9b16e2f 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 b2d9d9f21..815fb153b 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -58,22 +58,22 @@ func setConfigPatchGetBlockedCountriesAttributeType(arg *ConfigPatchGetBlockedCo } /* - types and functions for blockedIPs + types and functions for blockedIps */ // isArray -type ConfigPatchGetBlockedIPsAttributeType = *[]string -type ConfigPatchGetBlockedIPsArgType = []string -type ConfigPatchGetBlockedIPsRetType = []string +type ConfigPatchGetBlockedIpsAttributeType = *[]string +type ConfigPatchGetBlockedIpsArgType = []string +type ConfigPatchGetBlockedIpsRetType = []string -func getConfigPatchGetBlockedIPsAttributeTypeOk(arg ConfigPatchGetBlockedIPsAttributeType) (ret ConfigPatchGetBlockedIPsRetType, ok bool) { +func getConfigPatchGetBlockedIpsAttributeTypeOk(arg ConfigPatchGetBlockedIpsAttributeType) (ret ConfigPatchGetBlockedIpsRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } -func setConfigPatchGetBlockedIPsAttributeType(arg *ConfigPatchGetBlockedIPsAttributeType, val ConfigPatchGetBlockedIPsRetType) { +func setConfigPatchGetBlockedIpsAttributeType(arg *ConfigPatchGetBlockedIpsAttributeType, val ConfigPatchGetBlockedIpsRetType) { *arg = &val } @@ -208,7 +208,7 @@ type ConfigPatch struct { // Restricts access to your content based on country. We use the ISO 3166-1 alpha-2 standard for country codes (e.g., DE, ES, GB). This setting blocks users from the specified countries. BlockedCountries ConfigPatchGetBlockedCountriesAttributeType `json:"blockedCountries,omitempty"` // Restricts access to your content by specifying a list of blocked IPv4 addresses. This feature enhances security and privacy by preventing these addresses from accessing your distribution. - BlockedIPs ConfigPatchGetBlockedIPsAttributeType `json:"blockedIPs,omitempty"` + BlockedIps ConfigPatchGetBlockedIpsAttributeType `json:"blockedIps,omitempty"` // Sets the default cache duration for the distribution. The default cache duration is applied when a 'Cache-Control' header is not presented in the origin's response. We use ISO8601 duration format for cache duration (e.g. P1DT2H30M) DefaultCacheDuration ConfigPatchGetDefaultCacheDurationAttributeType `json:"defaultCacheDuration,omitempty"` LogSink ConfigPatchGetLogSinkAttributeType `json:"logSink,omitempty"` @@ -282,27 +282,27 @@ func (o *ConfigPatch) SetBlockedCountries(v ConfigPatchGetBlockedCountriesRetTyp setConfigPatchGetBlockedCountriesAttributeType(&o.BlockedCountries, v) } -// GetBlockedIPs returns the BlockedIPs field value if set, zero value otherwise. -func (o *ConfigPatch) GetBlockedIPs() (res ConfigPatchGetBlockedIPsRetType) { - res, _ = o.GetBlockedIPsOk() +// GetBlockedIps returns the BlockedIps field value if set, zero value otherwise. +func (o *ConfigPatch) GetBlockedIps() (res ConfigPatchGetBlockedIpsRetType) { + res, _ = o.GetBlockedIpsOk() return } -// GetBlockedIPsOk returns a tuple with the BlockedIPs field value if set, nil otherwise +// GetBlockedIpsOk returns a tuple with the BlockedIps field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ConfigPatch) GetBlockedIPsOk() (ret ConfigPatchGetBlockedIPsRetType, ok bool) { - return getConfigPatchGetBlockedIPsAttributeTypeOk(o.BlockedIPs) +func (o *ConfigPatch) GetBlockedIpsOk() (ret ConfigPatchGetBlockedIpsRetType, ok bool) { + return getConfigPatchGetBlockedIpsAttributeTypeOk(o.BlockedIps) } -// HasBlockedIPs returns a boolean if a field has been set. -func (o *ConfigPatch) HasBlockedIPs() bool { - _, ok := o.GetBlockedIPsOk() +// HasBlockedIps returns a boolean if a field has been set. +func (o *ConfigPatch) HasBlockedIps() bool { + _, ok := o.GetBlockedIpsOk() return ok } -// SetBlockedIPs gets a reference to the given []string and assigns it to the BlockedIPs field. -func (o *ConfigPatch) SetBlockedIPs(v ConfigPatchGetBlockedIPsRetType) { - setConfigPatchGetBlockedIPsAttributeType(&o.BlockedIPs, v) +// SetBlockedIps gets a reference to the given []string and assigns it to the BlockedIps field. +func (o *ConfigPatch) SetBlockedIps(v ConfigPatchGetBlockedIpsRetType) { + setConfigPatchGetBlockedIpsAttributeType(&o.BlockedIps, v) } // GetDefaultCacheDuration returns the DefaultCacheDuration field value if set, zero value otherwise (both if not set or set to explicit null). @@ -484,8 +484,8 @@ func (o ConfigPatch) ToMap() (map[string]interface{}, error) { if val, ok := getConfigPatchGetBlockedCountriesAttributeTypeOk(o.BlockedCountries); ok { toSerialize["BlockedCountries"] = val } - if val, ok := getConfigPatchGetBlockedIPsAttributeTypeOk(o.BlockedIPs); ok { - toSerialize["BlockedIPs"] = val + if val, ok := getConfigPatchGetBlockedIpsAttributeTypeOk(o.BlockedIps); ok { + toSerialize["BlockedIps"] = val } if val, ok := getConfigPatchGetDefaultCacheDurationAttributeTypeOk(o.DefaultCacheDuration); ok { toSerialize["DefaultCacheDuration"] = val diff --git a/services/cdn/model_config_patch_backend.go b/services/cdn/model_config_patch_backend.go index 458546b08..59dca714b 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -17,7 +17,15 @@ import ( // ConfigPatchBackend - struct for ConfigPatchBackend type ConfigPatchBackend struct { - HttpBackendPatch *HttpBackendPatch + BucketBackendPatch *BucketBackendPatch + HttpBackendPatch *HttpBackendPatch +} + +// BucketBackendPatchAsConfigPatchBackend is a convenience function that returns BucketBackendPatch wrapped in ConfigPatchBackend +func BucketBackendPatchAsConfigPatchBackend(v *BucketBackendPatch) ConfigPatchBackend { + return ConfigPatchBackend{ + BucketBackendPatch: v, + } } // HttpBackendPatchAsConfigPatchBackend is a convenience function that returns HttpBackendPatch wrapped in ConfigPatchBackend @@ -37,6 +45,18 @@ func (dst *ConfigPatchBackend) UnmarshalJSON(data []byte) error { return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") } + // check if the discriminator value is 'BucketBackendPatch' + if jsonDict["type"] == "BucketBackendPatch" { + // try to unmarshal JSON data into BucketBackendPatch + err = json.Unmarshal(data, &dst.BucketBackendPatch) + if err == nil { + return nil // data stored in dst.BucketBackendPatch, return on the first match + } else { + dst.BucketBackendPatch = nil + return fmt.Errorf("failed to unmarshal ConfigPatchBackend as BucketBackendPatch: %s", err.Error()) + } + } + // check if the discriminator value is 'HttpBackendPatch' if jsonDict["type"] == "HttpBackendPatch" { // try to unmarshal JSON data into HttpBackendPatch @@ -49,6 +69,18 @@ func (dst *ConfigPatchBackend) UnmarshalJSON(data []byte) error { } } + // check if the discriminator value is 'bucket' + if jsonDict["type"] == "bucket" { + // try to unmarshal JSON data into BucketBackendPatch + err = json.Unmarshal(data, &dst.BucketBackendPatch) + if err == nil { + return nil // data stored in dst.BucketBackendPatch, return on the first match + } else { + dst.BucketBackendPatch = nil + return fmt.Errorf("failed to unmarshal ConfigPatchBackend as BucketBackendPatch: %s", err.Error()) + } + } + // check if the discriminator value is 'http' if jsonDict["type"] == "http" { // try to unmarshal JSON data into HttpBackendPatch @@ -66,6 +98,10 @@ func (dst *ConfigPatchBackend) UnmarshalJSON(data []byte) error { // Marshal data from the first non-nil pointers in the struct to JSON func (src ConfigPatchBackend) MarshalJSON() ([]byte, error) { + if src.BucketBackendPatch != nil { + return json.Marshal(&src.BucketBackendPatch) + } + if src.HttpBackendPatch != nil { return json.Marshal(&src.HttpBackendPatch) } @@ -78,6 +114,10 @@ func (obj *ConfigPatchBackend) GetActualInstance() interface{} { if obj == nil { return nil } + if obj.BucketBackendPatch != nil { + return obj.BucketBackendPatch + } + if obj.HttpBackendPatch != nil { return obj.HttpBackendPatch } diff --git a/services/cdn/model_config_patch_backend_test.go b/services/cdn/model_config_patch_backend_test.go index 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 470c5e8c6..8b3458db6 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -17,13 +17,13 @@ import ( // ConfigPatchLogSink - struct for ConfigPatchLogSink type ConfigPatchLogSink struct { - PatchLokiLogSink *PatchLokiLogSink + LokiLogSinkPatch *LokiLogSinkPatch } -// PatchLokiLogSinkAsConfigPatchLogSink is a convenience function that returns PatchLokiLogSink wrapped in ConfigPatchLogSink -func PatchLokiLogSinkAsConfigPatchLogSink(v *PatchLokiLogSink) ConfigPatchLogSink { +// LokiLogSinkPatchAsConfigPatchLogSink is a convenience function that returns LokiLogSinkPatch wrapped in ConfigPatchLogSink +func LokiLogSinkPatchAsConfigPatchLogSink(v *LokiLogSinkPatch) ConfigPatchLogSink { return ConfigPatchLogSink{ - PatchLokiLogSink: v, + LokiLogSinkPatch: v, } } @@ -42,27 +42,27 @@ func (dst *ConfigPatchLogSink) UnmarshalJSON(data []byte) error { return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") } - // check if the discriminator value is 'PatchLokiLogSink' - if jsonDict["type"] == "PatchLokiLogSink" { - // try to unmarshal JSON data into PatchLokiLogSink - err = json.Unmarshal(data, &dst.PatchLokiLogSink) + // check if the discriminator value is 'LokiLogSinkPatch' + if jsonDict["type"] == "LokiLogSinkPatch" { + // try to unmarshal JSON data into LokiLogSinkPatch + err = json.Unmarshal(data, &dst.LokiLogSinkPatch) if err == nil { - return nil // data stored in dst.PatchLokiLogSink, return on the first match + return nil // data stored in dst.LokiLogSinkPatch, return on the first match } else { - dst.PatchLokiLogSink = nil - return fmt.Errorf("failed to unmarshal ConfigPatchLogSink as PatchLokiLogSink: %s", err.Error()) + dst.LokiLogSinkPatch = nil + return fmt.Errorf("failed to unmarshal ConfigPatchLogSink as LokiLogSinkPatch: %s", err.Error()) } } // check if the discriminator value is 'loki' if jsonDict["type"] == "loki" { - // try to unmarshal JSON data into PatchLokiLogSink - err = json.Unmarshal(data, &dst.PatchLokiLogSink) + // try to unmarshal JSON data into LokiLogSinkPatch + err = json.Unmarshal(data, &dst.LokiLogSinkPatch) if err == nil { - return nil // data stored in dst.PatchLokiLogSink, return on the first match + return nil // data stored in dst.LokiLogSinkPatch, return on the first match } else { - dst.PatchLokiLogSink = nil - return fmt.Errorf("failed to unmarshal ConfigPatchLogSink as PatchLokiLogSink: %s", err.Error()) + dst.LokiLogSinkPatch = nil + return fmt.Errorf("failed to unmarshal ConfigPatchLogSink as LokiLogSinkPatch: %s", err.Error()) } } @@ -71,8 +71,8 @@ func (dst *ConfigPatchLogSink) UnmarshalJSON(data []byte) error { // Marshal data from the first non-nil pointers in the struct to JSON func (src ConfigPatchLogSink) MarshalJSON() ([]byte, error) { - if src.PatchLokiLogSink != nil { - return json.Marshal(&src.PatchLokiLogSink) + if src.LokiLogSinkPatch != nil { + return json.Marshal(&src.LokiLogSinkPatch) } return []byte("{}"), nil // no data in oneOf schemas => empty JSON object @@ -83,8 +83,8 @@ func (obj *ConfigPatchLogSink) GetActualInstance() interface{} { if obj == nil { return nil } - if obj.PatchLokiLogSink != nil { - return obj.PatchLokiLogSink + if obj.LokiLogSinkPatch != nil { + return obj.LokiLogSinkPatch } // all schemas are nil diff --git a/services/cdn/model_config_patch_log_sink_test.go b/services/cdn/model_config_patch_log_sink_test.go index 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 816ea8dd6..2caafd7bc 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -17,6 +17,26 @@ import ( // checks if the CreateDistributionPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateDistributionPayload{} +/* + types and functions for backend +*/ + +// isModel +type CreateDistributionPayloadGetBackendAttributeType = *CreateDistributionPayloadBackend +type CreateDistributionPayloadGetBackendArgType = CreateDistributionPayloadBackend +type CreateDistributionPayloadGetBackendRetType = CreateDistributionPayloadBackend + +func getCreateDistributionPayloadGetBackendAttributeTypeOk(arg CreateDistributionPayloadGetBackendAttributeType) (ret CreateDistributionPayloadGetBackendRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setCreateDistributionPayloadGetBackendAttributeType(arg *CreateDistributionPayloadGetBackendAttributeType, val CreateDistributionPayloadGetBackendRetType) { + *arg = &val +} + /* types and functions for blockedCountries */ @@ -38,22 +58,22 @@ func setCreateDistributionPayloadGetBlockedCountriesAttributeType(arg *CreateDis } /* - types and functions for blockedIPs + types and functions for blockedIps */ // isArray -type CreateDistributionPayloadGetBlockedIPsAttributeType = *[]string -type CreateDistributionPayloadGetBlockedIPsArgType = []string -type CreateDistributionPayloadGetBlockedIPsRetType = []string +type CreateDistributionPayloadGetBlockedIpsAttributeType = *[]string +type CreateDistributionPayloadGetBlockedIpsArgType = []string +type CreateDistributionPayloadGetBlockedIpsRetType = []string -func getCreateDistributionPayloadGetBlockedIPsAttributeTypeOk(arg CreateDistributionPayloadGetBlockedIPsAttributeType) (ret CreateDistributionPayloadGetBlockedIPsRetType, ok bool) { +func getCreateDistributionPayloadGetBlockedIpsAttributeTypeOk(arg CreateDistributionPayloadGetBlockedIpsAttributeType) (ret CreateDistributionPayloadGetBlockedIpsRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } -func setCreateDistributionPayloadGetBlockedIPsAttributeType(arg *CreateDistributionPayloadGetBlockedIPsAttributeType, val CreateDistributionPayloadGetBlockedIPsRetType) { +func setCreateDistributionPayloadGetBlockedIpsAttributeType(arg *CreateDistributionPayloadGetBlockedIpsAttributeType, val CreateDistributionPayloadGetBlockedIpsRetType) { *arg = &val } @@ -78,26 +98,6 @@ func setCreateDistributionPayloadGetDefaultCacheDurationAttributeType(arg *Creat type CreateDistributionPayloadGetDefaultCacheDurationArgType = string type CreateDistributionPayloadGetDefaultCacheDurationRetType = string -/* - types and functions for geofencing -*/ - -// isContainer -type CreateDistributionPayloadGetGeofencingAttributeType = *map[string][]string -type CreateDistributionPayloadGetGeofencingArgType = map[string][]string -type CreateDistributionPayloadGetGeofencingRetType = map[string][]string - -func getCreateDistributionPayloadGetGeofencingAttributeTypeOk(arg CreateDistributionPayloadGetGeofencingAttributeType) (ret CreateDistributionPayloadGetGeofencingRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCreateDistributionPayloadGetGeofencingAttributeType(arg *CreateDistributionPayloadGetGeofencingAttributeType, val CreateDistributionPayloadGetGeofencingRetType) { - *arg = &val -} - /* types and functions for intentId */ @@ -179,47 +179,6 @@ func setCreateDistributionPayloadGetOptimizerAttributeType(arg *CreateDistributi *arg = &val } -/* - types and functions for originRequestHeaders -*/ - -// isContainer -type CreateDistributionPayloadGetOriginRequestHeadersAttributeType = *map[string]string -type CreateDistributionPayloadGetOriginRequestHeadersArgType = map[string]string -type CreateDistributionPayloadGetOriginRequestHeadersRetType = map[string]string - -func getCreateDistributionPayloadGetOriginRequestHeadersAttributeTypeOk(arg CreateDistributionPayloadGetOriginRequestHeadersAttributeType) (ret CreateDistributionPayloadGetOriginRequestHeadersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCreateDistributionPayloadGetOriginRequestHeadersAttributeType(arg *CreateDistributionPayloadGetOriginRequestHeadersAttributeType, val CreateDistributionPayloadGetOriginRequestHeadersRetType) { - *arg = &val -} - -/* - types and functions for originUrl -*/ - -// isNotNullableString -type CreateDistributionPayloadGetOriginUrlAttributeType = *string - -func getCreateDistributionPayloadGetOriginUrlAttributeTypeOk(arg CreateDistributionPayloadGetOriginUrlAttributeType) (ret CreateDistributionPayloadGetOriginUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setCreateDistributionPayloadGetOriginUrlAttributeType(arg *CreateDistributionPayloadGetOriginUrlAttributeType, val CreateDistributionPayloadGetOriginUrlRetType) { - *arg = &val -} - -type CreateDistributionPayloadGetOriginUrlArgType = string -type CreateDistributionPayloadGetOriginUrlRetType = string - /* types and functions for regions */ @@ -262,25 +221,20 @@ func setCreateDistributionPayloadGetWafAttributeType(arg *CreateDistributionPayl // CreateDistributionPayload struct for CreateDistributionPayload type CreateDistributionPayload struct { + // REQUIRED + Backend CreateDistributionPayloadGetBackendAttributeType `json:"backend" required:"true"` // Restricts access to your content based on country. We use the ISO 3166-1 alpha-2 standard for country codes (e.g., DE, ES, GB). This setting blocks users from the specified countries. BlockedCountries CreateDistributionPayloadGetBlockedCountriesAttributeType `json:"blockedCountries,omitempty"` // Restricts access to your content by specifying a list of blocked IPv4 addresses. This feature enhances security and privacy by preventing these addresses from accessing your distribution. - BlockedIPs CreateDistributionPayloadGetBlockedIPsAttributeType `json:"blockedIPs,omitempty"` + BlockedIps CreateDistributionPayloadGetBlockedIpsAttributeType `json:"blockedIps,omitempty"` // Sets the default cache duration for the distribution. The default cache duration is applied when a 'Cache-Control' header is not presented in the origin's response. We use ISO8601 duration format for cache duration (e.g. P1DT2H30M) DefaultCacheDuration CreateDistributionPayloadGetDefaultCacheDurationAttributeType `json:"defaultCacheDuration,omitempty"` - // An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You can not have a country be assigned to multiple alternative origins. - Geofencing CreateDistributionPayloadGetGeofencingAttributeType `json:"geofencing,omitempty"` // While optional, it is greatly encouraged to provide an `intentId`. This is used to deduplicate requests. If multiple POST-Requests with the same `intentId` for a given `projectId` are received, all but the first request are dropped. IntentId CreateDistributionPayloadGetIntentIdAttributeType `json:"intentId,omitempty"` LogSink CreateDistributionPayloadGetLogSinkAttributeType `json:"logSink,omitempty"` // Sets the monthly limit of bandwidth in bytes that the pullzone is allowed to use. MonthlyLimitBytes CreateDistributionPayloadGetMonthlyLimitBytesAttributeType `json:"monthlyLimitBytes,omitempty"` Optimizer CreateDistributionPayloadGetOptimizerAttributeType `json:"optimizer,omitempty"` - // Headers that will be sent with every request to the configured origin. WARNING: Do not store sensitive values in the headers. The data is stores as plain text. - OriginRequestHeaders CreateDistributionPayloadGetOriginRequestHeadersAttributeType `json:"originRequestHeaders,omitempty"` - // The origin of the content that should be made available through the CDN. Note that the path and query parameters are ignored. Ports are allowed. If no protocol is provided, `https` is assumed. So `www.example.com:1234/somePath?q=123` is normalized to `https://www.example.com:1234` - // REQUIRED - OriginUrl CreateDistributionPayloadGetOriginUrlAttributeType `json:"originUrl" required:"true"` // Define in which regions you would like your content to be cached. // REQUIRED Regions CreateDistributionPayloadGetRegionsAttributeType `json:"regions" required:"true"` @@ -293,9 +247,9 @@ type _CreateDistributionPayload CreateDistributionPayload // 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 NewCreateDistributionPayload(originUrl CreateDistributionPayloadGetOriginUrlArgType, regions CreateDistributionPayloadGetRegionsArgType) *CreateDistributionPayload { +func NewCreateDistributionPayload(backend CreateDistributionPayloadGetBackendArgType, regions CreateDistributionPayloadGetRegionsArgType) *CreateDistributionPayload { this := CreateDistributionPayload{} - setCreateDistributionPayloadGetOriginUrlAttributeType(&this.OriginUrl, originUrl) + setCreateDistributionPayloadGetBackendAttributeType(&this.Backend, backend) setCreateDistributionPayloadGetRegionsAttributeType(&this.Regions, regions) return &this } @@ -308,6 +262,23 @@ func NewCreateDistributionPayloadWithDefaults() *CreateDistributionPayload { return &this } +// GetBackend returns the Backend field value +func (o *CreateDistributionPayload) GetBackend() (ret CreateDistributionPayloadGetBackendRetType) { + ret, _ = o.GetBackendOk() + return ret +} + +// GetBackendOk returns a tuple with the Backend field value +// and a boolean to check if the value has been set. +func (o *CreateDistributionPayload) GetBackendOk() (ret CreateDistributionPayloadGetBackendRetType, ok bool) { + return getCreateDistributionPayloadGetBackendAttributeTypeOk(o.Backend) +} + +// SetBackend sets field value +func (o *CreateDistributionPayload) SetBackend(v CreateDistributionPayloadGetBackendRetType) { + setCreateDistributionPayloadGetBackendAttributeType(&o.Backend, v) +} + // GetBlockedCountries returns the BlockedCountries field value if set, zero value otherwise. func (o *CreateDistributionPayload) GetBlockedCountries() (res CreateDistributionPayloadGetBlockedCountriesRetType) { res, _ = o.GetBlockedCountriesOk() @@ -331,27 +302,27 @@ func (o *CreateDistributionPayload) SetBlockedCountries(v CreateDistributionPayl setCreateDistributionPayloadGetBlockedCountriesAttributeType(&o.BlockedCountries, v) } -// GetBlockedIPs returns the BlockedIPs field value if set, zero value otherwise. -func (o *CreateDistributionPayload) GetBlockedIPs() (res CreateDistributionPayloadGetBlockedIPsRetType) { - res, _ = o.GetBlockedIPsOk() +// GetBlockedIps returns the BlockedIps field value if set, zero value otherwise. +func (o *CreateDistributionPayload) GetBlockedIps() (res CreateDistributionPayloadGetBlockedIpsRetType) { + res, _ = o.GetBlockedIpsOk() return } -// GetBlockedIPsOk returns a tuple with the BlockedIPs field value if set, nil otherwise +// GetBlockedIpsOk returns a tuple with the BlockedIps field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateDistributionPayload) GetBlockedIPsOk() (ret CreateDistributionPayloadGetBlockedIPsRetType, ok bool) { - return getCreateDistributionPayloadGetBlockedIPsAttributeTypeOk(o.BlockedIPs) +func (o *CreateDistributionPayload) GetBlockedIpsOk() (ret CreateDistributionPayloadGetBlockedIpsRetType, ok bool) { + return getCreateDistributionPayloadGetBlockedIpsAttributeTypeOk(o.BlockedIps) } -// HasBlockedIPs returns a boolean if a field has been set. -func (o *CreateDistributionPayload) HasBlockedIPs() bool { - _, ok := o.GetBlockedIPsOk() +// HasBlockedIps returns a boolean if a field has been set. +func (o *CreateDistributionPayload) HasBlockedIps() bool { + _, ok := o.GetBlockedIpsOk() return ok } -// SetBlockedIPs gets a reference to the given []string and assigns it to the BlockedIPs field. -func (o *CreateDistributionPayload) SetBlockedIPs(v CreateDistributionPayloadGetBlockedIPsRetType) { - setCreateDistributionPayloadGetBlockedIPsAttributeType(&o.BlockedIPs, v) +// SetBlockedIps gets a reference to the given []string and assigns it to the BlockedIps field. +func (o *CreateDistributionPayload) SetBlockedIps(v CreateDistributionPayloadGetBlockedIpsRetType) { + setCreateDistributionPayloadGetBlockedIpsAttributeType(&o.BlockedIps, v) } // GetDefaultCacheDuration returns the DefaultCacheDuration field value if set, zero value otherwise. @@ -377,29 +348,6 @@ func (o *CreateDistributionPayload) SetDefaultCacheDuration(v CreateDistribution setCreateDistributionPayloadGetDefaultCacheDurationAttributeType(&o.DefaultCacheDuration, v) } -// GetGeofencing returns the Geofencing field value if set, zero value otherwise. -func (o *CreateDistributionPayload) GetGeofencing() (res CreateDistributionPayloadGetGeofencingRetType) { - res, _ = o.GetGeofencingOk() - return -} - -// GetGeofencingOk returns a tuple with the Geofencing field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateDistributionPayload) GetGeofencingOk() (ret CreateDistributionPayloadGetGeofencingRetType, ok bool) { - return getCreateDistributionPayloadGetGeofencingAttributeTypeOk(o.Geofencing) -} - -// HasGeofencing returns a boolean if a field has been set. -func (o *CreateDistributionPayload) HasGeofencing() bool { - _, ok := o.GetGeofencingOk() - return ok -} - -// SetGeofencing gets a reference to the given map[string][]string and assigns it to the Geofencing field. -func (o *CreateDistributionPayload) SetGeofencing(v CreateDistributionPayloadGetGeofencingRetType) { - setCreateDistributionPayloadGetGeofencingAttributeType(&o.Geofencing, v) -} - // GetIntentId returns the IntentId field value if set, zero value otherwise. func (o *CreateDistributionPayload) GetIntentId() (res CreateDistributionPayloadGetIntentIdRetType) { res, _ = o.GetIntentIdOk() @@ -492,46 +440,6 @@ func (o *CreateDistributionPayload) SetOptimizer(v CreateDistributionPayloadGetO setCreateDistributionPayloadGetOptimizerAttributeType(&o.Optimizer, v) } -// GetOriginRequestHeaders returns the OriginRequestHeaders field value if set, zero value otherwise. -func (o *CreateDistributionPayload) GetOriginRequestHeaders() (res CreateDistributionPayloadGetOriginRequestHeadersRetType) { - res, _ = o.GetOriginRequestHeadersOk() - return -} - -// GetOriginRequestHeadersOk returns a tuple with the OriginRequestHeaders field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateDistributionPayload) GetOriginRequestHeadersOk() (ret CreateDistributionPayloadGetOriginRequestHeadersRetType, ok bool) { - return getCreateDistributionPayloadGetOriginRequestHeadersAttributeTypeOk(o.OriginRequestHeaders) -} - -// HasOriginRequestHeaders returns a boolean if a field has been set. -func (o *CreateDistributionPayload) HasOriginRequestHeaders() bool { - _, ok := o.GetOriginRequestHeadersOk() - return ok -} - -// SetOriginRequestHeaders gets a reference to the given map[string]string and assigns it to the OriginRequestHeaders field. -func (o *CreateDistributionPayload) SetOriginRequestHeaders(v CreateDistributionPayloadGetOriginRequestHeadersRetType) { - setCreateDistributionPayloadGetOriginRequestHeadersAttributeType(&o.OriginRequestHeaders, v) -} - -// GetOriginUrl returns the OriginUrl field value -func (o *CreateDistributionPayload) GetOriginUrl() (ret CreateDistributionPayloadGetOriginUrlRetType) { - ret, _ = o.GetOriginUrlOk() - return ret -} - -// GetOriginUrlOk returns a tuple with the OriginUrl field value -// and a boolean to check if the value has been set. -func (o *CreateDistributionPayload) GetOriginUrlOk() (ret CreateDistributionPayloadGetOriginUrlRetType, ok bool) { - return getCreateDistributionPayloadGetOriginUrlAttributeTypeOk(o.OriginUrl) -} - -// SetOriginUrl sets field value -func (o *CreateDistributionPayload) SetOriginUrl(v CreateDistributionPayloadGetOriginUrlRetType) { - setCreateDistributionPayloadGetOriginUrlAttributeType(&o.OriginUrl, v) -} - // GetRegions returns the Regions field value func (o *CreateDistributionPayload) GetRegions() (ret CreateDistributionPayloadGetRegionsRetType) { ret, _ = o.GetRegionsOk() @@ -574,18 +482,18 @@ func (o *CreateDistributionPayload) SetWaf(v CreateDistributionPayloadGetWafRetT func (o CreateDistributionPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getCreateDistributionPayloadGetBackendAttributeTypeOk(o.Backend); ok { + toSerialize["Backend"] = val + } if val, ok := getCreateDistributionPayloadGetBlockedCountriesAttributeTypeOk(o.BlockedCountries); ok { toSerialize["BlockedCountries"] = val } - if val, ok := getCreateDistributionPayloadGetBlockedIPsAttributeTypeOk(o.BlockedIPs); ok { - toSerialize["BlockedIPs"] = val + if val, ok := getCreateDistributionPayloadGetBlockedIpsAttributeTypeOk(o.BlockedIps); ok { + toSerialize["BlockedIps"] = val } if val, ok := getCreateDistributionPayloadGetDefaultCacheDurationAttributeTypeOk(o.DefaultCacheDuration); ok { toSerialize["DefaultCacheDuration"] = val } - if val, ok := getCreateDistributionPayloadGetGeofencingAttributeTypeOk(o.Geofencing); ok { - toSerialize["Geofencing"] = val - } if val, ok := getCreateDistributionPayloadGetIntentIdAttributeTypeOk(o.IntentId); ok { toSerialize["IntentId"] = val } @@ -598,12 +506,6 @@ func (o CreateDistributionPayload) ToMap() (map[string]interface{}, error) { if val, ok := getCreateDistributionPayloadGetOptimizerAttributeTypeOk(o.Optimizer); ok { toSerialize["Optimizer"] = val } - if val, ok := getCreateDistributionPayloadGetOriginRequestHeadersAttributeTypeOk(o.OriginRequestHeaders); ok { - toSerialize["OriginRequestHeaders"] = val - } - if val, ok := getCreateDistributionPayloadGetOriginUrlAttributeTypeOk(o.OriginUrl); ok { - toSerialize["OriginUrl"] = val - } if val, ok := getCreateDistributionPayloadGetRegionsAttributeTypeOk(o.Regions); ok { toSerialize["Regions"] = val } diff --git a/services/cdn/model_create_distribution_payload_backend.go b/services/cdn/model_create_distribution_payload_backend.go new file mode 100644 index 000000000..6ff634b14 --- /dev/null +++ b/services/cdn/model_create_distribution_payload_backend.go @@ -0,0 +1,163 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" + "fmt" +) + +// CreateDistributionPayloadBackend - Configuration for the content origin backend. +type CreateDistributionPayloadBackend struct { + BucketBackendCreate *BucketBackendCreate + HttpBackendCreate *HttpBackendCreate +} + +// BucketBackendCreateAsCreateDistributionPayloadBackend is a convenience function that returns BucketBackendCreate wrapped in CreateDistributionPayloadBackend +func BucketBackendCreateAsCreateDistributionPayloadBackend(v *BucketBackendCreate) CreateDistributionPayloadBackend { + return CreateDistributionPayloadBackend{ + BucketBackendCreate: v, + } +} + +// HttpBackendCreateAsCreateDistributionPayloadBackend is a convenience function that returns HttpBackendCreate wrapped in CreateDistributionPayloadBackend +func HttpBackendCreateAsCreateDistributionPayloadBackend(v *HttpBackendCreate) CreateDistributionPayloadBackend { + return CreateDistributionPayloadBackend{ + HttpBackendCreate: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *CreateDistributionPayloadBackend) 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 'BucketBackendCreate' + if jsonDict["type"] == "BucketBackendCreate" { + // try to unmarshal JSON data into BucketBackendCreate + err = json.Unmarshal(data, &dst.BucketBackendCreate) + if err == nil { + return nil // data stored in dst.BucketBackendCreate, return on the first match + } else { + dst.BucketBackendCreate = nil + return fmt.Errorf("failed to unmarshal CreateDistributionPayloadBackend as BucketBackendCreate: %s", err.Error()) + } + } + + // check if the discriminator value is 'HttpBackendCreate' + if jsonDict["type"] == "HttpBackendCreate" { + // try to unmarshal JSON data into HttpBackendCreate + err = json.Unmarshal(data, &dst.HttpBackendCreate) + if err == nil { + return nil // data stored in dst.HttpBackendCreate, return on the first match + } else { + dst.HttpBackendCreate = nil + return fmt.Errorf("failed to unmarshal CreateDistributionPayloadBackend as HttpBackendCreate: %s", err.Error()) + } + } + + // check if the discriminator value is 'bucket' + if jsonDict["type"] == "bucket" { + // try to unmarshal JSON data into BucketBackendCreate + err = json.Unmarshal(data, &dst.BucketBackendCreate) + if err == nil { + return nil // data stored in dst.BucketBackendCreate, return on the first match + } else { + dst.BucketBackendCreate = nil + return fmt.Errorf("failed to unmarshal CreateDistributionPayloadBackend as BucketBackendCreate: %s", err.Error()) + } + } + + // check if the discriminator value is 'http' + if jsonDict["type"] == "http" { + // try to unmarshal JSON data into HttpBackendCreate + err = json.Unmarshal(data, &dst.HttpBackendCreate) + if err == nil { + return nil // data stored in dst.HttpBackendCreate, return on the first match + } else { + dst.HttpBackendCreate = nil + return fmt.Errorf("failed to unmarshal CreateDistributionPayloadBackend as HttpBackendCreate: %s", err.Error()) + } + } + + return nil +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src CreateDistributionPayloadBackend) MarshalJSON() ([]byte, error) { + if src.BucketBackendCreate != nil { + return json.Marshal(&src.BucketBackendCreate) + } + + if src.HttpBackendCreate != nil { + return json.Marshal(&src.HttpBackendCreate) + } + + return []byte("{}"), nil // no data in oneOf schemas => empty JSON object +} + +// Get the actual instance +func (obj *CreateDistributionPayloadBackend) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.BucketBackendCreate != nil { + return obj.BucketBackendCreate + } + + if obj.HttpBackendCreate != nil { + return obj.HttpBackendCreate + } + + // all schemas are nil + return nil +} + +type NullableCreateDistributionPayloadBackend struct { + value *CreateDistributionPayloadBackend + isSet bool +} + +func (v NullableCreateDistributionPayloadBackend) Get() *CreateDistributionPayloadBackend { + return v.value +} + +func (v *NullableCreateDistributionPayloadBackend) Set(val *CreateDistributionPayloadBackend) { + v.value = val + v.isSet = true +} + +func (v NullableCreateDistributionPayloadBackend) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateDistributionPayloadBackend) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateDistributionPayloadBackend(val *CreateDistributionPayloadBackend) *NullableCreateDistributionPayloadBackend { + return &NullableCreateDistributionPayloadBackend{value: val, isSet: true} +} + +func (v NullableCreateDistributionPayloadBackend) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateDistributionPayloadBackend) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_create_distribution_payload_backend_test.go b/services/cdn/model_create_distribution_payload_backend_test.go new file mode 100644 index 000000000..486a30539 --- /dev/null +++ b/services/cdn/model_create_distribution_payload_backend_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_create_distribution_payload_log_sink.go b/services/cdn/model_create_distribution_payload_log_sink.go index 24c3dcd13..985e625f0 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -17,13 +17,13 @@ import ( // CreateDistributionPayloadLogSink - struct for CreateDistributionPayloadLogSink type CreateDistributionPayloadLogSink struct { - PatchLokiLogSink *PatchLokiLogSink + LokiLogSinkCreate *LokiLogSinkCreate } -// PatchLokiLogSinkAsCreateDistributionPayloadLogSink is a convenience function that returns PatchLokiLogSink wrapped in CreateDistributionPayloadLogSink -func PatchLokiLogSinkAsCreateDistributionPayloadLogSink(v *PatchLokiLogSink) CreateDistributionPayloadLogSink { +// LokiLogSinkCreateAsCreateDistributionPayloadLogSink is a convenience function that returns LokiLogSinkCreate wrapped in CreateDistributionPayloadLogSink +func LokiLogSinkCreateAsCreateDistributionPayloadLogSink(v *LokiLogSinkCreate) CreateDistributionPayloadLogSink { return CreateDistributionPayloadLogSink{ - PatchLokiLogSink: v, + LokiLogSinkCreate: v, } } @@ -37,27 +37,27 @@ func (dst *CreateDistributionPayloadLogSink) UnmarshalJSON(data []byte) error { return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") } - // check if the discriminator value is 'PatchLokiLogSink' - if jsonDict["type"] == "PatchLokiLogSink" { - // try to unmarshal JSON data into PatchLokiLogSink - err = json.Unmarshal(data, &dst.PatchLokiLogSink) + // check if the discriminator value is 'LokiLogSinkCreate' + if jsonDict["type"] == "LokiLogSinkCreate" { + // try to unmarshal JSON data into LokiLogSinkCreate + err = json.Unmarshal(data, &dst.LokiLogSinkCreate) if err == nil { - return nil // data stored in dst.PatchLokiLogSink, return on the first match + return nil // data stored in dst.LokiLogSinkCreate, return on the first match } else { - dst.PatchLokiLogSink = nil - return fmt.Errorf("failed to unmarshal CreateDistributionPayloadLogSink as PatchLokiLogSink: %s", err.Error()) + dst.LokiLogSinkCreate = nil + return fmt.Errorf("failed to unmarshal CreateDistributionPayloadLogSink as LokiLogSinkCreate: %s", err.Error()) } } // check if the discriminator value is 'loki' if jsonDict["type"] == "loki" { - // try to unmarshal JSON data into PatchLokiLogSink - err = json.Unmarshal(data, &dst.PatchLokiLogSink) + // try to unmarshal JSON data into LokiLogSinkCreate + err = json.Unmarshal(data, &dst.LokiLogSinkCreate) if err == nil { - return nil // data stored in dst.PatchLokiLogSink, return on the first match + return nil // data stored in dst.LokiLogSinkCreate, return on the first match } else { - dst.PatchLokiLogSink = nil - return fmt.Errorf("failed to unmarshal CreateDistributionPayloadLogSink as PatchLokiLogSink: %s", err.Error()) + dst.LokiLogSinkCreate = nil + return fmt.Errorf("failed to unmarshal CreateDistributionPayloadLogSink as LokiLogSinkCreate: %s", err.Error()) } } @@ -66,8 +66,8 @@ func (dst *CreateDistributionPayloadLogSink) UnmarshalJSON(data []byte) error { // Marshal data from the first non-nil pointers in the struct to JSON func (src CreateDistributionPayloadLogSink) MarshalJSON() ([]byte, error) { - if src.PatchLokiLogSink != nil { - return json.Marshal(&src.PatchLokiLogSink) + if src.LokiLogSinkCreate != nil { + return json.Marshal(&src.LokiLogSinkCreate) } return []byte("{}"), nil // no data in oneOf schemas => empty JSON object @@ -78,8 +78,8 @@ func (obj *CreateDistributionPayloadLogSink) GetActualInstance() interface{} { if obj == nil { return nil } - if obj.PatchLokiLogSink != nil { - return obj.PatchLokiLogSink + if obj.LokiLogSinkCreate != nil { + return obj.LokiLogSinkCreate } // all schemas are nil 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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 8abd0d2e1..76da78897 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 a1bac3cb7..1f8f22ec9 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 d642772e2..3aad5e71f 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 0ef54a210..419185c0e 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 f2cfc9a6e..cc9938069 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: 1beta.0.0 +API version: 1beta2.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 f76a46f62..256f392a6 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -60,25 +60,25 @@ type DistributionLogsRecordGetDataCenterRegionArgType = string type DistributionLogsRecordGetDataCenterRegionRetType = string /* - types and functions for distributionID + types and functions for distributionId */ // isNotNullableString -type DistributionLogsRecordGetDistributionIDAttributeType = *string +type DistributionLogsRecordGetDistributionIdAttributeType = *string -func getDistributionLogsRecordGetDistributionIDAttributeTypeOk(arg DistributionLogsRecordGetDistributionIDAttributeType) (ret DistributionLogsRecordGetDistributionIDRetType, ok bool) { +func getDistributionLogsRecordGetDistributionIdAttributeTypeOk(arg DistributionLogsRecordGetDistributionIdAttributeType) (ret DistributionLogsRecordGetDistributionIdRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } -func setDistributionLogsRecordGetDistributionIDAttributeType(arg *DistributionLogsRecordGetDistributionIDAttributeType, val DistributionLogsRecordGetDistributionIDRetType) { +func setDistributionLogsRecordGetDistributionIdAttributeType(arg *DistributionLogsRecordGetDistributionIdAttributeType, val DistributionLogsRecordGetDistributionIdRetType) { *arg = &val } -type DistributionLogsRecordGetDistributionIDArgType = string -type DistributionLogsRecordGetDistributionIDRetType = string +type DistributionLogsRecordGetDistributionIdArgType = string +type DistributionLogsRecordGetDistributionIdRetType = string /* types and functions for host @@ -210,7 +210,7 @@ type DistributionLogsRecord struct { // REQUIRED DataCenterRegion DistributionLogsRecordGetDataCenterRegionAttributeType `json:"dataCenterRegion" required:"true"` // REQUIRED - DistributionID DistributionLogsRecordGetDistributionIDAttributeType `json:"distributionID" required:"true"` + DistributionId DistributionLogsRecordGetDistributionIdAttributeType `json:"distributionId" required:"true"` // REQUIRED Host DistributionLogsRecordGetHostAttributeType `json:"host" required:"true"` // REQUIRED @@ -233,11 +233,11 @@ type _DistributionLogsRecord DistributionLogsRecord // 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 NewDistributionLogsRecord(cacheHit DistributionLogsRecordgetCacheHitArgType, dataCenterRegion DistributionLogsRecordGetDataCenterRegionArgType, distributionID DistributionLogsRecordGetDistributionIDArgType, host DistributionLogsRecordGetHostArgType, path DistributionLogsRecordGetPathArgType, requestCountryCode DistributionLogsRecordGetRequestCountryCodeArgType, size DistributionLogsRecordGetSizeArgType, statusCode DistributionLogsRecordGetStatusCodeArgType, timestamp DistributionLogsRecordGetTimestampArgType) *DistributionLogsRecord { +func NewDistributionLogsRecord(cacheHit DistributionLogsRecordgetCacheHitArgType, dataCenterRegion DistributionLogsRecordGetDataCenterRegionArgType, distributionId DistributionLogsRecordGetDistributionIdArgType, host DistributionLogsRecordGetHostArgType, path DistributionLogsRecordGetPathArgType, requestCountryCode DistributionLogsRecordGetRequestCountryCodeArgType, size DistributionLogsRecordGetSizeArgType, statusCode DistributionLogsRecordGetStatusCodeArgType, timestamp DistributionLogsRecordGetTimestampArgType) *DistributionLogsRecord { this := DistributionLogsRecord{} setDistributionLogsRecordgetCacheHitAttributeType(&this.CacheHit, cacheHit) setDistributionLogsRecordGetDataCenterRegionAttributeType(&this.DataCenterRegion, dataCenterRegion) - setDistributionLogsRecordGetDistributionIDAttributeType(&this.DistributionID, distributionID) + setDistributionLogsRecordGetDistributionIdAttributeType(&this.DistributionId, distributionId) setDistributionLogsRecordGetHostAttributeType(&this.Host, host) setDistributionLogsRecordGetPathAttributeType(&this.Path, path) setDistributionLogsRecordGetRequestCountryCodeAttributeType(&this.RequestCountryCode, requestCountryCode) @@ -289,21 +289,21 @@ func (o *DistributionLogsRecord) SetDataCenterRegion(v DistributionLogsRecordGet setDistributionLogsRecordGetDataCenterRegionAttributeType(&o.DataCenterRegion, v) } -// GetDistributionID returns the DistributionID field value -func (o *DistributionLogsRecord) GetDistributionID() (ret DistributionLogsRecordGetDistributionIDRetType) { - ret, _ = o.GetDistributionIDOk() +// GetDistributionId returns the DistributionId field value +func (o *DistributionLogsRecord) GetDistributionId() (ret DistributionLogsRecordGetDistributionIdRetType) { + ret, _ = o.GetDistributionIdOk() return ret } -// GetDistributionIDOk returns a tuple with the DistributionID field value +// GetDistributionIdOk returns a tuple with the DistributionId field value // and a boolean to check if the value has been set. -func (o *DistributionLogsRecord) GetDistributionIDOk() (ret DistributionLogsRecordGetDistributionIDRetType, ok bool) { - return getDistributionLogsRecordGetDistributionIDAttributeTypeOk(o.DistributionID) +func (o *DistributionLogsRecord) GetDistributionIdOk() (ret DistributionLogsRecordGetDistributionIdRetType, ok bool) { + return getDistributionLogsRecordGetDistributionIdAttributeTypeOk(o.DistributionId) } -// SetDistributionID sets field value -func (o *DistributionLogsRecord) SetDistributionID(v DistributionLogsRecordGetDistributionIDRetType) { - setDistributionLogsRecordGetDistributionIDAttributeType(&o.DistributionID, v) +// SetDistributionId sets field value +func (o *DistributionLogsRecord) SetDistributionId(v DistributionLogsRecordGetDistributionIdRetType) { + setDistributionLogsRecordGetDistributionIdAttributeType(&o.DistributionId, v) } // GetHost returns the Host field value @@ -416,8 +416,8 @@ func (o DistributionLogsRecord) ToMap() (map[string]interface{}, error) { if val, ok := getDistributionLogsRecordGetDataCenterRegionAttributeTypeOk(o.DataCenterRegion); ok { toSerialize["DataCenterRegion"] = val } - if val, ok := getDistributionLogsRecordGetDistributionIDAttributeTypeOk(o.DistributionID); ok { - toSerialize["DistributionID"] = val + if val, ok := getDistributionLogsRecordGetDistributionIdAttributeTypeOk(o.DistributionId); ok { + toSerialize["DistributionId"] = val } if val, ok := getDistributionLogsRecordGetHostAttributeTypeOk(o.Host); ok { toSerialize["Host"] = val diff --git a/services/cdn/model_distribution_logs_record_test.go b/services/cdn/model_distribution_logs_record_test.go index 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 cb1f2d3f6..9e069bad2 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: 1beta.0.0 +API version: 1beta2.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 c88c33bef..41b93dbcb 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 258c77a9b..80e404a51 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 ffa8f30f1..c9cc29dd0 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 b11806086..d79ea9980 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: 1beta.0.0 +API version: 1beta2.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 4d7c5fbd9..dfa9b9bf1 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -22,9 +22,9 @@ var _ MappedNullable = &DistributionWaf{} */ // isArray -type DistributionWafGetDisabledRulesAttributeType = *[]WAFStatusRuleBlock -type DistributionWafGetDisabledRulesArgType = []WAFStatusRuleBlock -type DistributionWafGetDisabledRulesRetType = []WAFStatusRuleBlock +type DistributionWafGetDisabledRulesAttributeType = *[]WafStatusRuleBlock +type DistributionWafGetDisabledRulesArgType = []WafStatusRuleBlock +type DistributionWafGetDisabledRulesRetType = []WafStatusRuleBlock func getDistributionWafGetDisabledRulesAttributeTypeOk(arg DistributionWafGetDisabledRulesAttributeType) (ret DistributionWafGetDisabledRulesRetType, ok bool) { if arg == nil { @@ -42,9 +42,9 @@ func setDistributionWafGetDisabledRulesAttributeType(arg *DistributionWafGetDisa */ // isArray -type DistributionWafGetEnabledRulesAttributeType = *[]WAFStatusRuleBlock -type DistributionWafGetEnabledRulesArgType = []WAFStatusRuleBlock -type DistributionWafGetEnabledRulesRetType = []WAFStatusRuleBlock +type DistributionWafGetEnabledRulesAttributeType = *[]WafStatusRuleBlock +type DistributionWafGetEnabledRulesArgType = []WafStatusRuleBlock +type DistributionWafGetEnabledRulesRetType = []WafStatusRuleBlock func getDistributionWafGetEnabledRulesAttributeTypeOk(arg DistributionWafGetEnabledRulesAttributeType) (ret DistributionWafGetEnabledRulesRetType, ok bool) { if arg == nil { @@ -62,9 +62,9 @@ func setDistributionWafGetEnabledRulesAttributeType(arg *DistributionWafGetEnabl */ // isArray -type DistributionWafGetLogOnlyRulesAttributeType = *[]WAFStatusRuleBlock -type DistributionWafGetLogOnlyRulesArgType = []WAFStatusRuleBlock -type DistributionWafGetLogOnlyRulesRetType = []WAFStatusRuleBlock +type DistributionWafGetLogOnlyRulesAttributeType = *[]WafStatusRuleBlock +type DistributionWafGetLogOnlyRulesArgType = []WafStatusRuleBlock +type DistributionWafGetLogOnlyRulesRetType = []WafStatusRuleBlock func getDistributionWafGetLogOnlyRulesAttributeTypeOk(arg DistributionWafGetLogOnlyRulesAttributeType) (ret DistributionWafGetLogOnlyRulesRetType, ok bool) { if arg == nil { diff --git a/services/cdn/model_distribution_waf_test.go b/services/cdn/model_distribution_waf_test.go index 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 32101eebb..461af9a23 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: 1beta.0.0 +API version: 1beta2.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 7b648ebe4..bce3c3bc8 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 74aba78c8..afe3485ab 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: 1beta.0.0 +API version: 1beta2.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 44f69b81e..150f4b55e 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -39,27 +39,6 @@ func setErrorDetailsGetDeAttributeType(arg *ErrorDetailsGetDeAttributeType, val type ErrorDetailsGetDeArgType = string type ErrorDetailsGetDeRetType = string -/* - types and functions for description -*/ - -// isNotNullableString -type ErrorDetailsGetDescriptionAttributeType = *string - -func getErrorDetailsGetDescriptionAttributeTypeOk(arg ErrorDetailsGetDescriptionAttributeType) (ret ErrorDetailsGetDescriptionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setErrorDetailsGetDescriptionAttributeType(arg *ErrorDetailsGetDescriptionAttributeType, val ErrorDetailsGetDescriptionRetType) { - *arg = &val -} - -type ErrorDetailsGetDescriptionArgType = string -type ErrorDetailsGetDescriptionRetType = string - /* types and functions for en */ @@ -232,9 +211,6 @@ func setErrorDetailsGetKeyAttributeType(arg *ErrorDetailsGetKeyAttributeType, va type ErrorDetails struct { // German description of the error De ErrorDetailsGetDeAttributeType `json:"de,omitempty"` - // Deprecated: Check the GitHub changelog for alternatives - // REQUIRED - Description ErrorDetailsGetDescriptionAttributeType `json:"description" required:"true"` // English description of the error // REQUIRED En ErrorDetailsGetEnAttributeType `json:"en" required:"true"` @@ -250,9 +226,8 @@ type _ErrorDetails ErrorDetails // 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 NewErrorDetails(description ErrorDetailsGetDescriptionArgType, en ErrorDetailsGetEnArgType, key ErrorDetailsGetKeyArgType) *ErrorDetails { +func NewErrorDetails(en ErrorDetailsGetEnArgType, key ErrorDetailsGetKeyArgType) *ErrorDetails { this := ErrorDetails{} - setErrorDetailsGetDescriptionAttributeType(&this.Description, description) setErrorDetailsGetEnAttributeType(&this.En, en) setErrorDetailsGetKeyAttributeType(&this.Key, key) return &this @@ -289,26 +264,6 @@ func (o *ErrorDetails) SetDe(v ErrorDetailsGetDeRetType) { setErrorDetailsGetDeAttributeType(&o.De, v) } -// GetDescription returns the Description field value -// Deprecated -func (o *ErrorDetails) GetDescription() (ret ErrorDetailsGetDescriptionRetType) { - ret, _ = o.GetDescriptionOk() - return ret -} - -// GetDescriptionOk returns a tuple with the Description field value -// and a boolean to check if the value has been set. -// Deprecated -func (o *ErrorDetails) GetDescriptionOk() (ret ErrorDetailsGetDescriptionRetType, ok bool) { - return getErrorDetailsGetDescriptionAttributeTypeOk(o.Description) -} - -// SetDescription sets field value -// Deprecated -func (o *ErrorDetails) SetDescription(v ErrorDetailsGetDescriptionRetType) { - setErrorDetailsGetDescriptionAttributeType(&o.Description, v) -} - // GetEn returns the En field value func (o *ErrorDetails) GetEn() (ret ErrorDetailsGetEnRetType) { ret, _ = o.GetEnOk() @@ -371,9 +326,6 @@ func (o ErrorDetails) ToMap() (map[string]interface{}, error) { if val, ok := getErrorDetailsGetDeAttributeTypeOk(o.De); ok { toSerialize["De"] = val } - if val, ok := getErrorDetailsGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } if val, ok := getErrorDetailsGetEnAttributeTypeOk(o.En); ok { toSerialize["En"] = val } diff --git a/services/cdn/model_error_details_test.go b/services/cdn/model_error_details_test.go index 6ff7437c7..0deff8875 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_find_cache_paths_response.go b/services/cdn/model_find_cache_paths_response.go index 246b204b9..9b2d0dc4b 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: 1beta.0.0 +API version: 1beta2.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 1bed5abdd..035569e93 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 b2166c941..2c3c400d4 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,26 +14,26 @@ import ( "encoding/json" ) -// checks if the GenericJSONResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GenericJSONResponse{} +// checks if the GenericJsonResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GenericJsonResponse{} /* types and functions for details */ // isArray -type GenericJSONResponseGetDetailsAttributeType = *[]ErrorDetails -type GenericJSONResponseGetDetailsArgType = []ErrorDetails -type GenericJSONResponseGetDetailsRetType = []ErrorDetails +type GenericJsonResponseGetDetailsAttributeType = *[]ErrorDetails +type GenericJsonResponseGetDetailsArgType = []ErrorDetails +type GenericJsonResponseGetDetailsRetType = []ErrorDetails -func getGenericJSONResponseGetDetailsAttributeTypeOk(arg GenericJSONResponseGetDetailsAttributeType) (ret GenericJSONResponseGetDetailsRetType, ok bool) { +func getGenericJsonResponseGetDetailsAttributeTypeOk(arg GenericJsonResponseGetDetailsAttributeType) (ret GenericJsonResponseGetDetailsRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } -func setGenericJSONResponseGetDetailsAttributeType(arg *GenericJSONResponseGetDetailsAttributeType, val GenericJSONResponseGetDetailsRetType) { +func setGenericJsonResponseGetDetailsAttributeType(arg *GenericJsonResponseGetDetailsAttributeType, val GenericJsonResponseGetDetailsRetType) { *arg = &val } @@ -42,133 +42,133 @@ func setGenericJSONResponseGetDetailsAttributeType(arg *GenericJSONResponseGetDe */ // isNotNullableString -type GenericJSONResponseGetMessageAttributeType = *string +type GenericJsonResponseGetMessageAttributeType = *string -func getGenericJSONResponseGetMessageAttributeTypeOk(arg GenericJSONResponseGetMessageAttributeType) (ret GenericJSONResponseGetMessageRetType, ok bool) { +func getGenericJsonResponseGetMessageAttributeTypeOk(arg GenericJsonResponseGetMessageAttributeType) (ret GenericJsonResponseGetMessageRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } -func setGenericJSONResponseGetMessageAttributeType(arg *GenericJSONResponseGetMessageAttributeType, val GenericJSONResponseGetMessageRetType) { +func setGenericJsonResponseGetMessageAttributeType(arg *GenericJsonResponseGetMessageAttributeType, val GenericJsonResponseGetMessageRetType) { *arg = &val } -type GenericJSONResponseGetMessageArgType = string -type GenericJSONResponseGetMessageRetType = string +type GenericJsonResponseGetMessageArgType = string +type GenericJsonResponseGetMessageRetType = string -// GenericJSONResponse struct for GenericJSONResponse -type GenericJSONResponse struct { +// GenericJsonResponse struct for GenericJsonResponse +type GenericJsonResponse struct { // Listing of issues with your request - Details GenericJSONResponseGetDetailsAttributeType `json:"details,omitempty"` + Details GenericJsonResponseGetDetailsAttributeType `json:"details,omitempty"` // REQUIRED - Message GenericJSONResponseGetMessageAttributeType `json:"message" required:"true"` + Message GenericJsonResponseGetMessageAttributeType `json:"message" required:"true"` } -type _GenericJSONResponse GenericJSONResponse +type _GenericJsonResponse GenericJsonResponse -// NewGenericJSONResponse instantiates a new GenericJSONResponse object +// NewGenericJsonResponse instantiates a new GenericJsonResponse 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 NewGenericJSONResponse(message GenericJSONResponseGetMessageArgType) *GenericJSONResponse { - this := GenericJSONResponse{} - setGenericJSONResponseGetMessageAttributeType(&this.Message, message) +func NewGenericJsonResponse(message GenericJsonResponseGetMessageArgType) *GenericJsonResponse { + this := GenericJsonResponse{} + setGenericJsonResponseGetMessageAttributeType(&this.Message, message) return &this } -// NewGenericJSONResponseWithDefaults instantiates a new GenericJSONResponse object +// NewGenericJsonResponseWithDefaults instantiates a new GenericJsonResponse 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 NewGenericJSONResponseWithDefaults() *GenericJSONResponse { - this := GenericJSONResponse{} +func NewGenericJsonResponseWithDefaults() *GenericJsonResponse { + this := GenericJsonResponse{} return &this } // GetDetails returns the Details field value if set, zero value otherwise. -func (o *GenericJSONResponse) GetDetails() (res GenericJSONResponseGetDetailsRetType) { +func (o *GenericJsonResponse) GetDetails() (res GenericJsonResponseGetDetailsRetType) { res, _ = o.GetDetailsOk() return } // GetDetailsOk returns a tuple with the Details field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GenericJSONResponse) GetDetailsOk() (ret GenericJSONResponseGetDetailsRetType, ok bool) { - return getGenericJSONResponseGetDetailsAttributeTypeOk(o.Details) +func (o *GenericJsonResponse) GetDetailsOk() (ret GenericJsonResponseGetDetailsRetType, ok bool) { + return getGenericJsonResponseGetDetailsAttributeTypeOk(o.Details) } // HasDetails returns a boolean if a field has been set. -func (o *GenericJSONResponse) HasDetails() bool { +func (o *GenericJsonResponse) HasDetails() bool { _, ok := o.GetDetailsOk() return ok } // SetDetails gets a reference to the given []ErrorDetails and assigns it to the Details field. -func (o *GenericJSONResponse) SetDetails(v GenericJSONResponseGetDetailsRetType) { - setGenericJSONResponseGetDetailsAttributeType(&o.Details, v) +func (o *GenericJsonResponse) SetDetails(v GenericJsonResponseGetDetailsRetType) { + setGenericJsonResponseGetDetailsAttributeType(&o.Details, v) } // GetMessage returns the Message field value -func (o *GenericJSONResponse) GetMessage() (ret GenericJSONResponseGetMessageRetType) { +func (o *GenericJsonResponse) GetMessage() (ret GenericJsonResponseGetMessageRetType) { 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 *GenericJSONResponse) GetMessageOk() (ret GenericJSONResponseGetMessageRetType, ok bool) { - return getGenericJSONResponseGetMessageAttributeTypeOk(o.Message) +func (o *GenericJsonResponse) GetMessageOk() (ret GenericJsonResponseGetMessageRetType, ok bool) { + return getGenericJsonResponseGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value -func (o *GenericJSONResponse) SetMessage(v GenericJSONResponseGetMessageRetType) { - setGenericJSONResponseGetMessageAttributeType(&o.Message, v) +func (o *GenericJsonResponse) SetMessage(v GenericJsonResponseGetMessageRetType) { + setGenericJsonResponseGetMessageAttributeType(&o.Message, v) } -func (o GenericJSONResponse) ToMap() (map[string]interface{}, error) { +func (o GenericJsonResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getGenericJSONResponseGetDetailsAttributeTypeOk(o.Details); ok { + if val, ok := getGenericJsonResponseGetDetailsAttributeTypeOk(o.Details); ok { toSerialize["Details"] = val } - if val, ok := getGenericJSONResponseGetMessageAttributeTypeOk(o.Message); ok { + if val, ok := getGenericJsonResponseGetMessageAttributeTypeOk(o.Message); ok { toSerialize["Message"] = val } return toSerialize, nil } -type NullableGenericJSONResponse struct { - value *GenericJSONResponse +type NullableGenericJsonResponse struct { + value *GenericJsonResponse isSet bool } -func (v NullableGenericJSONResponse) Get() *GenericJSONResponse { +func (v NullableGenericJsonResponse) Get() *GenericJsonResponse { return v.value } -func (v *NullableGenericJSONResponse) Set(val *GenericJSONResponse) { +func (v *NullableGenericJsonResponse) Set(val *GenericJsonResponse) { v.value = val v.isSet = true } -func (v NullableGenericJSONResponse) IsSet() bool { +func (v NullableGenericJsonResponse) IsSet() bool { return v.isSet } -func (v *NullableGenericJSONResponse) Unset() { +func (v *NullableGenericJsonResponse) Unset() { v.value = nil v.isSet = false } -func NewNullableGenericJSONResponse(val *GenericJSONResponse) *NullableGenericJSONResponse { - return &NullableGenericJSONResponse{value: val, isSet: true} +func NewNullableGenericJsonResponse(val *GenericJsonResponse) *NullableGenericJsonResponse { + return &NullableGenericJsonResponse{value: val, isSet: true} } -func (v NullableGenericJSONResponse) MarshalJSON() ([]byte, error) { +func (v NullableGenericJsonResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableGenericJSONResponse) UnmarshalJSON(src []byte) error { +func (v *NullableGenericJsonResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/cdn/model_generic_json_response_test.go b/services/cdn/model_generic_json_response_test.go index 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 d470c9ba6..1bdcaf9be 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: 1beta.0.0 +API version: 1beta2.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 cca70d11c..bcb273bcb 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,26 +19,6 @@ import ( // checks if the GetCacheInfoResponseHistoryEntry type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GetCacheInfoResponseHistoryEntry{} -/* - types and functions for occuredAt -*/ - -// isDateTime -type GetCacheInfoResponseHistoryEntryGetOccuredAtAttributeType = *time.Time -type GetCacheInfoResponseHistoryEntryGetOccuredAtArgType = time.Time -type GetCacheInfoResponseHistoryEntryGetOccuredAtRetType = time.Time - -func getGetCacheInfoResponseHistoryEntryGetOccuredAtAttributeTypeOk(arg GetCacheInfoResponseHistoryEntryGetOccuredAtAttributeType) (ret GetCacheInfoResponseHistoryEntryGetOccuredAtRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setGetCacheInfoResponseHistoryEntryGetOccuredAtAttributeType(arg *GetCacheInfoResponseHistoryEntryGetOccuredAtAttributeType, val GetCacheInfoResponseHistoryEntryGetOccuredAtRetType) { - *arg = &val -} - /* types and functions for occurredAt */ @@ -185,9 +165,6 @@ func setGetCacheInfoResponseHistoryEntryGetTypeAttributeType(arg *GetCacheInfoRe // GetCacheInfoResponseHistoryEntry struct for GetCacheInfoResponseHistoryEntry type GetCacheInfoResponseHistoryEntry struct { - // Deprecated: Check the GitHub changelog for alternatives - // REQUIRED - OccuredAt GetCacheInfoResponseHistoryEntryGetOccuredAtAttributeType `json:"occuredAt" required:"true"` // REQUIRED OccurredAt GetCacheInfoResponseHistoryEntryGetOccurredAtAttributeType `json:"occurredAt" required:"true"` // REQUIRED @@ -200,9 +177,8 @@ type _GetCacheInfoResponseHistoryEntry GetCacheInfoResponseHistoryEntry // 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 NewGetCacheInfoResponseHistoryEntry(occuredAt GetCacheInfoResponseHistoryEntryGetOccuredAtArgType, occurredAt GetCacheInfoResponseHistoryEntryGetOccurredAtArgType, types GetCacheInfoResponseHistoryEntryGetTypeArgType) *GetCacheInfoResponseHistoryEntry { +func NewGetCacheInfoResponseHistoryEntry(occurredAt GetCacheInfoResponseHistoryEntryGetOccurredAtArgType, types GetCacheInfoResponseHistoryEntryGetTypeArgType) *GetCacheInfoResponseHistoryEntry { this := GetCacheInfoResponseHistoryEntry{} - setGetCacheInfoResponseHistoryEntryGetOccuredAtAttributeType(&this.OccuredAt, occuredAt) setGetCacheInfoResponseHistoryEntryGetOccurredAtAttributeType(&this.OccurredAt, occurredAt) setGetCacheInfoResponseHistoryEntryGetTypeAttributeType(&this.Type, types) return &this @@ -216,26 +192,6 @@ func NewGetCacheInfoResponseHistoryEntryWithDefaults() *GetCacheInfoResponseHist return &this } -// GetOccuredAt returns the OccuredAt field value -// Deprecated -func (o *GetCacheInfoResponseHistoryEntry) GetOccuredAt() (ret GetCacheInfoResponseHistoryEntryGetOccuredAtRetType) { - ret, _ = o.GetOccuredAtOk() - return ret -} - -// GetOccuredAtOk returns a tuple with the OccuredAt field value -// and a boolean to check if the value has been set. -// Deprecated -func (o *GetCacheInfoResponseHistoryEntry) GetOccuredAtOk() (ret GetCacheInfoResponseHistoryEntryGetOccuredAtRetType, ok bool) { - return getGetCacheInfoResponseHistoryEntryGetOccuredAtAttributeTypeOk(o.OccuredAt) -} - -// SetOccuredAt sets field value -// Deprecated -func (o *GetCacheInfoResponseHistoryEntry) SetOccuredAt(v GetCacheInfoResponseHistoryEntryGetOccuredAtRetType) { - setGetCacheInfoResponseHistoryEntryGetOccuredAtAttributeType(&o.OccuredAt, v) -} - // GetOccurredAt returns the OccurredAt field value func (o *GetCacheInfoResponseHistoryEntry) GetOccurredAt() (ret GetCacheInfoResponseHistoryEntryGetOccurredAtRetType) { ret, _ = o.GetOccurredAtOk() @@ -272,9 +228,6 @@ func (o *GetCacheInfoResponseHistoryEntry) SetType(v GetCacheInfoResponseHistory func (o GetCacheInfoResponseHistoryEntry) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getGetCacheInfoResponseHistoryEntryGetOccuredAtAttributeTypeOk(o.OccuredAt); ok { - toSerialize["OccuredAt"] = val - } if val, ok := getGetCacheInfoResponseHistoryEntryGetOccurredAtAttributeTypeOk(o.OccurredAt); ok { toSerialize["OccurredAt"] = val } 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 67235e5b0..997859bae 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 09d2da1e2..23ef5b930 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 a8efa5cd5..2c8c801b7 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 0a7c1b09a..6f637ab4a 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -57,36 +57,12 @@ func setGetCustomDomainResponseGetCustomDomainAttributeType(arg *GetCustomDomain *arg = &val } -/* - types and functions for domain -*/ - -// isNotNullableString -type GetCustomDomainResponseGetDomainAttributeType = *string - -func getGetCustomDomainResponseGetDomainAttributeTypeOk(arg GetCustomDomainResponseGetDomainAttributeType) (ret GetCustomDomainResponseGetDomainRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setGetCustomDomainResponseGetDomainAttributeType(arg *GetCustomDomainResponseGetDomainAttributeType, val GetCustomDomainResponseGetDomainRetType) { - *arg = &val -} - -type GetCustomDomainResponseGetDomainArgType = string -type GetCustomDomainResponseGetDomainRetType = string - // GetCustomDomainResponse struct for GetCustomDomainResponse type GetCustomDomainResponse struct { // REQUIRED Certificate GetCustomDomainResponseGetCertificateAttributeType `json:"certificate" required:"true"` // REQUIRED CustomDomain GetCustomDomainResponseGetCustomDomainAttributeType `json:"customDomain" required:"true"` - // Deprecated: Check the GitHub changelog for alternatives - // REQUIRED - Domain GetCustomDomainResponseGetDomainAttributeType `json:"domain" required:"true"` } type _GetCustomDomainResponse GetCustomDomainResponse @@ -95,11 +71,10 @@ type _GetCustomDomainResponse GetCustomDomainResponse // 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 NewGetCustomDomainResponse(certificate GetCustomDomainResponseGetCertificateArgType, customDomain GetCustomDomainResponseGetCustomDomainArgType, domain GetCustomDomainResponseGetDomainArgType) *GetCustomDomainResponse { +func NewGetCustomDomainResponse(certificate GetCustomDomainResponseGetCertificateArgType, customDomain GetCustomDomainResponseGetCustomDomainArgType) *GetCustomDomainResponse { this := GetCustomDomainResponse{} setGetCustomDomainResponseGetCertificateAttributeType(&this.Certificate, certificate) setGetCustomDomainResponseGetCustomDomainAttributeType(&this.CustomDomain, customDomain) - setGetCustomDomainResponseGetDomainAttributeType(&this.Domain, domain) return &this } @@ -145,26 +120,6 @@ func (o *GetCustomDomainResponse) SetCustomDomain(v GetCustomDomainResponseGetCu setGetCustomDomainResponseGetCustomDomainAttributeType(&o.CustomDomain, v) } -// GetDomain returns the Domain field value -// Deprecated -func (o *GetCustomDomainResponse) GetDomain() (ret GetCustomDomainResponseGetDomainRetType) { - ret, _ = o.GetDomainOk() - return ret -} - -// GetDomainOk returns a tuple with the Domain field value -// and a boolean to check if the value has been set. -// Deprecated -func (o *GetCustomDomainResponse) GetDomainOk() (ret GetCustomDomainResponseGetDomainRetType, ok bool) { - return getGetCustomDomainResponseGetDomainAttributeTypeOk(o.Domain) -} - -// SetDomain sets field value -// Deprecated -func (o *GetCustomDomainResponse) SetDomain(v GetCustomDomainResponseGetDomainRetType) { - setGetCustomDomainResponseGetDomainAttributeType(&o.Domain, v) -} - func (o GetCustomDomainResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getGetCustomDomainResponseGetCertificateAttributeTypeOk(o.Certificate); ok { @@ -173,9 +128,6 @@ func (o GetCustomDomainResponse) ToMap() (map[string]interface{}, error) { if val, ok := getGetCustomDomainResponseGetCustomDomainAttributeTypeOk(o.CustomDomain); ok { toSerialize["CustomDomain"] = val } - if val, ok := getGetCustomDomainResponseGetDomainAttributeTypeOk(o.Domain); ok { - toSerialize["Domain"] = val - } return toSerialize, nil } diff --git a/services/cdn/model_get_custom_domain_response_certificate.go b/services/cdn/model_get_custom_domain_response_certificate.go index 724971638..3b452d380 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 b14f63ca9..070137ecb 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 c346e3176..6bd711f22 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_get_statistics_response.go b/services/cdn/model_get_statistics_response.go index 987fa833b..2b36fbcd7 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 12ed7bd0d..c93365452 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -107,6 +107,7 @@ type HttpBackend struct { // Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text. // REQUIRED OriginRequestHeaders HttpBackendGetOriginRequestHeadersAttributeType `json:"originRequestHeaders" required:"true"` + // The origin of the content that should be made available through the CDN. Note that the path and query parameters are ignored. Ports are allowed. If no protocol is provided, `https` is assumed. So `www.example.com:1234/somePath?q=123` is normalized to `https://www.example.com:1234` // REQUIRED OriginUrl HttpBackendGetOriginUrlAttributeType `json:"originUrl" required:"true"` // REQUIRED diff --git a/services/cdn/model_http_backend_create.go b/services/cdn/model_http_backend_create.go new file mode 100644 index 000000000..409d6218d --- /dev/null +++ b/services/cdn/model_http_backend_create.go @@ -0,0 +1,267 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the HttpBackendCreate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HttpBackendCreate{} + +/* + types and functions for geofencing +*/ + +// isContainer +type HttpBackendCreateGetGeofencingAttributeType = *map[string][]string +type HttpBackendCreateGetGeofencingArgType = map[string][]string +type HttpBackendCreateGetGeofencingRetType = map[string][]string + +func getHttpBackendCreateGetGeofencingAttributeTypeOk(arg HttpBackendCreateGetGeofencingAttributeType) (ret HttpBackendCreateGetGeofencingRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setHttpBackendCreateGetGeofencingAttributeType(arg *HttpBackendCreateGetGeofencingAttributeType, val HttpBackendCreateGetGeofencingRetType) { + *arg = &val +} + +/* + types and functions for originRequestHeaders +*/ + +// isContainer +type HttpBackendCreateGetOriginRequestHeadersAttributeType = *map[string]string +type HttpBackendCreateGetOriginRequestHeadersArgType = map[string]string +type HttpBackendCreateGetOriginRequestHeadersRetType = map[string]string + +func getHttpBackendCreateGetOriginRequestHeadersAttributeTypeOk(arg HttpBackendCreateGetOriginRequestHeadersAttributeType) (ret HttpBackendCreateGetOriginRequestHeadersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setHttpBackendCreateGetOriginRequestHeadersAttributeType(arg *HttpBackendCreateGetOriginRequestHeadersAttributeType, val HttpBackendCreateGetOriginRequestHeadersRetType) { + *arg = &val +} + +/* + types and functions for originUrl +*/ + +// isNotNullableString +type HttpBackendCreateGetOriginUrlAttributeType = *string + +func getHttpBackendCreateGetOriginUrlAttributeTypeOk(arg HttpBackendCreateGetOriginUrlAttributeType) (ret HttpBackendCreateGetOriginUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setHttpBackendCreateGetOriginUrlAttributeType(arg *HttpBackendCreateGetOriginUrlAttributeType, val HttpBackendCreateGetOriginUrlRetType) { + *arg = &val +} + +type HttpBackendCreateGetOriginUrlArgType = string +type HttpBackendCreateGetOriginUrlRetType = string + +/* + types and functions for type +*/ + +// isNotNullableString +type HttpBackendCreateGetTypeAttributeType = *string + +func getHttpBackendCreateGetTypeAttributeTypeOk(arg HttpBackendCreateGetTypeAttributeType) (ret HttpBackendCreateGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setHttpBackendCreateGetTypeAttributeType(arg *HttpBackendCreateGetTypeAttributeType, val HttpBackendCreateGetTypeRetType) { + *arg = &val +} + +type HttpBackendCreateGetTypeArgType = string +type HttpBackendCreateGetTypeRetType = string + +// HttpBackendCreate struct for HttpBackendCreate +type HttpBackendCreate struct { + // An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You cannot have a country be assigned to multiple alternative origins. + Geofencing HttpBackendCreateGetGeofencingAttributeType `json:"geofencing,omitempty"` + // Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text. + OriginRequestHeaders HttpBackendCreateGetOriginRequestHeadersAttributeType `json:"originRequestHeaders,omitempty"` + // The origin of the content that should be made available through the CDN. Note that the path and query parameters are ignored. Ports are allowed. If no protocol is provided, `https` is assumed. So `www.example.com:1234/somePath?q=123` is normalized to `https://www.example.com:1234` + // REQUIRED + OriginUrl HttpBackendCreateGetOriginUrlAttributeType `json:"originUrl" required:"true"` + // REQUIRED + Type HttpBackendCreateGetTypeAttributeType `json:"type" required:"true"` +} + +type _HttpBackendCreate HttpBackendCreate + +// NewHttpBackendCreate instantiates a new HttpBackendCreate 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 NewHttpBackendCreate(originUrl HttpBackendCreateGetOriginUrlArgType, types HttpBackendCreateGetTypeArgType) *HttpBackendCreate { + this := HttpBackendCreate{} + setHttpBackendCreateGetOriginUrlAttributeType(&this.OriginUrl, originUrl) + setHttpBackendCreateGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewHttpBackendCreateWithDefaults instantiates a new HttpBackendCreate 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 NewHttpBackendCreateWithDefaults() *HttpBackendCreate { + this := HttpBackendCreate{} + return &this +} + +// GetGeofencing returns the Geofencing field value if set, zero value otherwise. +func (o *HttpBackendCreate) GetGeofencing() (res HttpBackendCreateGetGeofencingRetType) { + res, _ = o.GetGeofencingOk() + return +} + +// GetGeofencingOk returns a tuple with the Geofencing field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HttpBackendCreate) GetGeofencingOk() (ret HttpBackendCreateGetGeofencingRetType, ok bool) { + return getHttpBackendCreateGetGeofencingAttributeTypeOk(o.Geofencing) +} + +// HasGeofencing returns a boolean if a field has been set. +func (o *HttpBackendCreate) HasGeofencing() bool { + _, ok := o.GetGeofencingOk() + return ok +} + +// SetGeofencing gets a reference to the given map[string][]string and assigns it to the Geofencing field. +func (o *HttpBackendCreate) SetGeofencing(v HttpBackendCreateGetGeofencingRetType) { + setHttpBackendCreateGetGeofencingAttributeType(&o.Geofencing, v) +} + +// GetOriginRequestHeaders returns the OriginRequestHeaders field value if set, zero value otherwise. +func (o *HttpBackendCreate) GetOriginRequestHeaders() (res HttpBackendCreateGetOriginRequestHeadersRetType) { + res, _ = o.GetOriginRequestHeadersOk() + return +} + +// GetOriginRequestHeadersOk returns a tuple with the OriginRequestHeaders field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HttpBackendCreate) GetOriginRequestHeadersOk() (ret HttpBackendCreateGetOriginRequestHeadersRetType, ok bool) { + return getHttpBackendCreateGetOriginRequestHeadersAttributeTypeOk(o.OriginRequestHeaders) +} + +// HasOriginRequestHeaders returns a boolean if a field has been set. +func (o *HttpBackendCreate) HasOriginRequestHeaders() bool { + _, ok := o.GetOriginRequestHeadersOk() + return ok +} + +// SetOriginRequestHeaders gets a reference to the given map[string]string and assigns it to the OriginRequestHeaders field. +func (o *HttpBackendCreate) SetOriginRequestHeaders(v HttpBackendCreateGetOriginRequestHeadersRetType) { + setHttpBackendCreateGetOriginRequestHeadersAttributeType(&o.OriginRequestHeaders, v) +} + +// GetOriginUrl returns the OriginUrl field value +func (o *HttpBackendCreate) GetOriginUrl() (ret HttpBackendCreateGetOriginUrlRetType) { + ret, _ = o.GetOriginUrlOk() + return ret +} + +// GetOriginUrlOk returns a tuple with the OriginUrl field value +// and a boolean to check if the value has been set. +func (o *HttpBackendCreate) GetOriginUrlOk() (ret HttpBackendCreateGetOriginUrlRetType, ok bool) { + return getHttpBackendCreateGetOriginUrlAttributeTypeOk(o.OriginUrl) +} + +// SetOriginUrl sets field value +func (o *HttpBackendCreate) SetOriginUrl(v HttpBackendCreateGetOriginUrlRetType) { + setHttpBackendCreateGetOriginUrlAttributeType(&o.OriginUrl, v) +} + +// GetType returns the Type field value +func (o *HttpBackendCreate) GetType() (ret HttpBackendCreateGetTypeRetType) { + 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 *HttpBackendCreate) GetTypeOk() (ret HttpBackendCreateGetTypeRetType, ok bool) { + return getHttpBackendCreateGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +func (o *HttpBackendCreate) SetType(v HttpBackendCreateGetTypeRetType) { + setHttpBackendCreateGetTypeAttributeType(&o.Type, v) +} + +func (o HttpBackendCreate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getHttpBackendCreateGetGeofencingAttributeTypeOk(o.Geofencing); ok { + toSerialize["Geofencing"] = val + } + if val, ok := getHttpBackendCreateGetOriginRequestHeadersAttributeTypeOk(o.OriginRequestHeaders); ok { + toSerialize["OriginRequestHeaders"] = val + } + if val, ok := getHttpBackendCreateGetOriginUrlAttributeTypeOk(o.OriginUrl); ok { + toSerialize["OriginUrl"] = val + } + if val, ok := getHttpBackendCreateGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableHttpBackendCreate struct { + value *HttpBackendCreate + isSet bool +} + +func (v NullableHttpBackendCreate) Get() *HttpBackendCreate { + return v.value +} + +func (v *NullableHttpBackendCreate) Set(val *HttpBackendCreate) { + v.value = val + v.isSet = true +} + +func (v NullableHttpBackendCreate) IsSet() bool { + return v.isSet +} + +func (v *NullableHttpBackendCreate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHttpBackendCreate(val *HttpBackendCreate) *NullableHttpBackendCreate { + return &NullableHttpBackendCreate{value: val, isSet: true} +} + +func (v NullableHttpBackendCreate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHttpBackendCreate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_http_backend_create_test.go b/services/cdn/model_http_backend_create_test.go new file mode 100644 index 000000000..486a30539 --- /dev/null +++ b/services/cdn/model_http_backend_create_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_http_backend_patch.go b/services/cdn/model_http_backend_patch.go index f3f6a7bc4..ec2f3fce9 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 9243a3a69..6b3b46544 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 686af1099..1ab104c17 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,112 +14,112 @@ import ( "encoding/json" ) -// checks if the ListWAFCollectionsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListWAFCollectionsResponse{} +// checks if the ListWafCollectionsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListWafCollectionsResponse{} /* types and functions for collections */ // isArray -type ListWAFCollectionsResponseGetCollectionsAttributeType = *[]WAFRuleCollection -type ListWAFCollectionsResponseGetCollectionsArgType = []WAFRuleCollection -type ListWAFCollectionsResponseGetCollectionsRetType = []WAFRuleCollection +type ListWafCollectionsResponseGetCollectionsAttributeType = *[]WafRuleCollection +type ListWafCollectionsResponseGetCollectionsArgType = []WafRuleCollection +type ListWafCollectionsResponseGetCollectionsRetType = []WafRuleCollection -func getListWAFCollectionsResponseGetCollectionsAttributeTypeOk(arg ListWAFCollectionsResponseGetCollectionsAttributeType) (ret ListWAFCollectionsResponseGetCollectionsRetType, ok bool) { +func getListWafCollectionsResponseGetCollectionsAttributeTypeOk(arg ListWafCollectionsResponseGetCollectionsAttributeType) (ret ListWafCollectionsResponseGetCollectionsRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } -func setListWAFCollectionsResponseGetCollectionsAttributeType(arg *ListWAFCollectionsResponseGetCollectionsAttributeType, val ListWAFCollectionsResponseGetCollectionsRetType) { +func setListWafCollectionsResponseGetCollectionsAttributeType(arg *ListWafCollectionsResponseGetCollectionsAttributeType, val ListWafCollectionsResponseGetCollectionsRetType) { *arg = &val } -// ListWAFCollectionsResponse struct for ListWAFCollectionsResponse -type ListWAFCollectionsResponse struct { +// ListWafCollectionsResponse struct for ListWafCollectionsResponse +type ListWafCollectionsResponse struct { // REQUIRED - Collections ListWAFCollectionsResponseGetCollectionsAttributeType `json:"collections" required:"true"` + Collections ListWafCollectionsResponseGetCollectionsAttributeType `json:"collections" required:"true"` } -type _ListWAFCollectionsResponse ListWAFCollectionsResponse +type _ListWafCollectionsResponse ListWafCollectionsResponse -// NewListWAFCollectionsResponse instantiates a new ListWAFCollectionsResponse object +// NewListWafCollectionsResponse instantiates a new ListWafCollectionsResponse 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 NewListWAFCollectionsResponse(collections ListWAFCollectionsResponseGetCollectionsArgType) *ListWAFCollectionsResponse { - this := ListWAFCollectionsResponse{} - setListWAFCollectionsResponseGetCollectionsAttributeType(&this.Collections, collections) +func NewListWafCollectionsResponse(collections ListWafCollectionsResponseGetCollectionsArgType) *ListWafCollectionsResponse { + this := ListWafCollectionsResponse{} + setListWafCollectionsResponseGetCollectionsAttributeType(&this.Collections, collections) return &this } -// NewListWAFCollectionsResponseWithDefaults instantiates a new ListWAFCollectionsResponse object +// NewListWafCollectionsResponseWithDefaults instantiates a new ListWafCollectionsResponse 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 NewListWAFCollectionsResponseWithDefaults() *ListWAFCollectionsResponse { - this := ListWAFCollectionsResponse{} +func NewListWafCollectionsResponseWithDefaults() *ListWafCollectionsResponse { + this := ListWafCollectionsResponse{} return &this } // GetCollections returns the Collections field value -func (o *ListWAFCollectionsResponse) GetCollections() (ret ListWAFCollectionsResponseGetCollectionsRetType) { +func (o *ListWafCollectionsResponse) GetCollections() (ret ListWafCollectionsResponseGetCollectionsRetType) { ret, _ = o.GetCollectionsOk() return ret } // GetCollectionsOk returns a tuple with the Collections field value // and a boolean to check if the value has been set. -func (o *ListWAFCollectionsResponse) GetCollectionsOk() (ret ListWAFCollectionsResponseGetCollectionsRetType, ok bool) { - return getListWAFCollectionsResponseGetCollectionsAttributeTypeOk(o.Collections) +func (o *ListWafCollectionsResponse) GetCollectionsOk() (ret ListWafCollectionsResponseGetCollectionsRetType, ok bool) { + return getListWafCollectionsResponseGetCollectionsAttributeTypeOk(o.Collections) } // SetCollections sets field value -func (o *ListWAFCollectionsResponse) SetCollections(v ListWAFCollectionsResponseGetCollectionsRetType) { - setListWAFCollectionsResponseGetCollectionsAttributeType(&o.Collections, v) +func (o *ListWafCollectionsResponse) SetCollections(v ListWafCollectionsResponseGetCollectionsRetType) { + setListWafCollectionsResponseGetCollectionsAttributeType(&o.Collections, v) } -func (o ListWAFCollectionsResponse) ToMap() (map[string]interface{}, error) { +func (o ListWafCollectionsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getListWAFCollectionsResponseGetCollectionsAttributeTypeOk(o.Collections); ok { + if val, ok := getListWafCollectionsResponseGetCollectionsAttributeTypeOk(o.Collections); ok { toSerialize["Collections"] = val } return toSerialize, nil } -type NullableListWAFCollectionsResponse struct { - value *ListWAFCollectionsResponse +type NullableListWafCollectionsResponse struct { + value *ListWafCollectionsResponse isSet bool } -func (v NullableListWAFCollectionsResponse) Get() *ListWAFCollectionsResponse { +func (v NullableListWafCollectionsResponse) Get() *ListWafCollectionsResponse { return v.value } -func (v *NullableListWAFCollectionsResponse) Set(val *ListWAFCollectionsResponse) { +func (v *NullableListWafCollectionsResponse) Set(val *ListWafCollectionsResponse) { v.value = val v.isSet = true } -func (v NullableListWAFCollectionsResponse) IsSet() bool { +func (v NullableListWafCollectionsResponse) IsSet() bool { return v.isSet } -func (v *NullableListWAFCollectionsResponse) Unset() { +func (v *NullableListWafCollectionsResponse) Unset() { v.value = nil v.isSet = false } -func NewNullableListWAFCollectionsResponse(val *ListWAFCollectionsResponse) *NullableListWAFCollectionsResponse { - return &NullableListWAFCollectionsResponse{value: val, isSet: true} +func NewNullableListWafCollectionsResponse(val *ListWafCollectionsResponse) *NullableListWafCollectionsResponse { + return &NullableListWafCollectionsResponse{value: val, isSet: true} } -func (v NullableListWAFCollectionsResponse) MarshalJSON() ([]byte, error) { +func (v NullableListWafCollectionsResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableListWAFCollectionsResponse) UnmarshalJSON(src []byte) error { +func (v *NullableListWafCollectionsResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/cdn/model_list_waf_collections_response_test.go b/services/cdn/model_list_waf_collections_response_test.go index 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 a641b483e..9672e6c55 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: 1beta.0.0 +API version: 1beta2.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 new file mode 100644 index 000000000..c1e14288c --- /dev/null +++ b/services/cdn/model_loki_log_sink_create.go @@ -0,0 +1,213 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the LokiLogSinkCreate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LokiLogSinkCreate{} + +/* + types and functions for credentials +*/ + +// isModel +type LokiLogSinkCreateGetCredentialsAttributeType = *LokiLogSinkCredentials +type LokiLogSinkCreateGetCredentialsArgType = LokiLogSinkCredentials +type LokiLogSinkCreateGetCredentialsRetType = LokiLogSinkCredentials + +func getLokiLogSinkCreateGetCredentialsAttributeTypeOk(arg LokiLogSinkCreateGetCredentialsAttributeType) (ret LokiLogSinkCreateGetCredentialsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLokiLogSinkCreateGetCredentialsAttributeType(arg *LokiLogSinkCreateGetCredentialsAttributeType, val LokiLogSinkCreateGetCredentialsRetType) { + *arg = &val +} + +/* + types and functions for pushUrl +*/ + +// isNotNullableString +type LokiLogSinkCreateGetPushUrlAttributeType = *string + +func getLokiLogSinkCreateGetPushUrlAttributeTypeOk(arg LokiLogSinkCreateGetPushUrlAttributeType) (ret LokiLogSinkCreateGetPushUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLokiLogSinkCreateGetPushUrlAttributeType(arg *LokiLogSinkCreateGetPushUrlAttributeType, val LokiLogSinkCreateGetPushUrlRetType) { + *arg = &val +} + +type LokiLogSinkCreateGetPushUrlArgType = string +type LokiLogSinkCreateGetPushUrlRetType = string + +/* + types and functions for type +*/ + +// isNotNullableString +type LokiLogSinkCreateGetTypeAttributeType = *string + +func getLokiLogSinkCreateGetTypeAttributeTypeOk(arg LokiLogSinkCreateGetTypeAttributeType) (ret LokiLogSinkCreateGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLokiLogSinkCreateGetTypeAttributeType(arg *LokiLogSinkCreateGetTypeAttributeType, val LokiLogSinkCreateGetTypeRetType) { + *arg = &val +} + +type LokiLogSinkCreateGetTypeArgType = string +type LokiLogSinkCreateGetTypeRetType = string + +// LokiLogSinkCreate struct for LokiLogSinkCreate +type LokiLogSinkCreate struct { + // REQUIRED + Credentials LokiLogSinkCreateGetCredentialsAttributeType `json:"credentials" required:"true"` + // REQUIRED + PushUrl LokiLogSinkCreateGetPushUrlAttributeType `json:"pushUrl" required:"true"` + // REQUIRED + Type LokiLogSinkCreateGetTypeAttributeType `json:"type" required:"true"` +} + +type _LokiLogSinkCreate LokiLogSinkCreate + +// NewLokiLogSinkCreate instantiates a new LokiLogSinkCreate 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 NewLokiLogSinkCreate(credentials LokiLogSinkCreateGetCredentialsArgType, pushUrl LokiLogSinkCreateGetPushUrlArgType, types LokiLogSinkCreateGetTypeArgType) *LokiLogSinkCreate { + this := LokiLogSinkCreate{} + setLokiLogSinkCreateGetCredentialsAttributeType(&this.Credentials, credentials) + setLokiLogSinkCreateGetPushUrlAttributeType(&this.PushUrl, pushUrl) + setLokiLogSinkCreateGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewLokiLogSinkCreateWithDefaults instantiates a new LokiLogSinkCreate 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 NewLokiLogSinkCreateWithDefaults() *LokiLogSinkCreate { + this := LokiLogSinkCreate{} + return &this +} + +// GetCredentials returns the Credentials field value +func (o *LokiLogSinkCreate) GetCredentials() (ret LokiLogSinkCreateGetCredentialsRetType) { + ret, _ = o.GetCredentialsOk() + return ret +} + +// GetCredentialsOk returns a tuple with the Credentials field value +// and a boolean to check if the value has been set. +func (o *LokiLogSinkCreate) GetCredentialsOk() (ret LokiLogSinkCreateGetCredentialsRetType, ok bool) { + return getLokiLogSinkCreateGetCredentialsAttributeTypeOk(o.Credentials) +} + +// SetCredentials sets field value +func (o *LokiLogSinkCreate) SetCredentials(v LokiLogSinkCreateGetCredentialsRetType) { + setLokiLogSinkCreateGetCredentialsAttributeType(&o.Credentials, v) +} + +// GetPushUrl returns the PushUrl field value +func (o *LokiLogSinkCreate) GetPushUrl() (ret LokiLogSinkCreateGetPushUrlRetType) { + ret, _ = o.GetPushUrlOk() + return ret +} + +// GetPushUrlOk returns a tuple with the PushUrl field value +// and a boolean to check if the value has been set. +func (o *LokiLogSinkCreate) GetPushUrlOk() (ret LokiLogSinkCreateGetPushUrlRetType, ok bool) { + return getLokiLogSinkCreateGetPushUrlAttributeTypeOk(o.PushUrl) +} + +// SetPushUrl sets field value +func (o *LokiLogSinkCreate) SetPushUrl(v LokiLogSinkCreateGetPushUrlRetType) { + setLokiLogSinkCreateGetPushUrlAttributeType(&o.PushUrl, v) +} + +// GetType returns the Type field value +func (o *LokiLogSinkCreate) GetType() (ret LokiLogSinkCreateGetTypeRetType) { + 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 *LokiLogSinkCreate) GetTypeOk() (ret LokiLogSinkCreateGetTypeRetType, ok bool) { + return getLokiLogSinkCreateGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +func (o *LokiLogSinkCreate) SetType(v LokiLogSinkCreateGetTypeRetType) { + setLokiLogSinkCreateGetTypeAttributeType(&o.Type, v) +} + +func (o LokiLogSinkCreate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getLokiLogSinkCreateGetCredentialsAttributeTypeOk(o.Credentials); ok { + toSerialize["Credentials"] = val + } + if val, ok := getLokiLogSinkCreateGetPushUrlAttributeTypeOk(o.PushUrl); ok { + toSerialize["PushUrl"] = val + } + if val, ok := getLokiLogSinkCreateGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableLokiLogSinkCreate struct { + value *LokiLogSinkCreate + isSet bool +} + +func (v NullableLokiLogSinkCreate) Get() *LokiLogSinkCreate { + return v.value +} + +func (v *NullableLokiLogSinkCreate) Set(val *LokiLogSinkCreate) { + v.value = val + v.isSet = true +} + +func (v NullableLokiLogSinkCreate) IsSet() bool { + return v.isSet +} + +func (v *NullableLokiLogSinkCreate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLokiLogSinkCreate(val *LokiLogSinkCreate) *NullableLokiLogSinkCreate { + return &NullableLokiLogSinkCreate{value: val, isSet: true} +} + +func (v NullableLokiLogSinkCreate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLokiLogSinkCreate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_loki_log_sink_create_test.go b/services/cdn/model_loki_log_sink_create_test.go new file mode 100644 index 000000000..486a30539 --- /dev/null +++ b/services/cdn/model_loki_log_sink_create_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_loki_log_sink_credentials.go b/services/cdn/model_loki_log_sink_credentials.go new file mode 100644 index 000000000..dad248b30 --- /dev/null +++ b/services/cdn/model_loki_log_sink_credentials.go @@ -0,0 +1,170 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the LokiLogSinkCredentials type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LokiLogSinkCredentials{} + +/* + types and functions for password +*/ + +// isNotNullableString +type LokiLogSinkCredentialsGetPasswordAttributeType = *string + +func getLokiLogSinkCredentialsGetPasswordAttributeTypeOk(arg LokiLogSinkCredentialsGetPasswordAttributeType) (ret LokiLogSinkCredentialsGetPasswordRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLokiLogSinkCredentialsGetPasswordAttributeType(arg *LokiLogSinkCredentialsGetPasswordAttributeType, val LokiLogSinkCredentialsGetPasswordRetType) { + *arg = &val +} + +type LokiLogSinkCredentialsGetPasswordArgType = string +type LokiLogSinkCredentialsGetPasswordRetType = string + +/* + types and functions for username +*/ + +// isNotNullableString +type LokiLogSinkCredentialsGetUsernameAttributeType = *string + +func getLokiLogSinkCredentialsGetUsernameAttributeTypeOk(arg LokiLogSinkCredentialsGetUsernameAttributeType) (ret LokiLogSinkCredentialsGetUsernameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLokiLogSinkCredentialsGetUsernameAttributeType(arg *LokiLogSinkCredentialsGetUsernameAttributeType, val LokiLogSinkCredentialsGetUsernameRetType) { + *arg = &val +} + +type LokiLogSinkCredentialsGetUsernameArgType = string +type LokiLogSinkCredentialsGetUsernameRetType = string + +// LokiLogSinkCredentials struct for LokiLogSinkCredentials +type LokiLogSinkCredentials struct { + // REQUIRED + Password LokiLogSinkCredentialsGetPasswordAttributeType `json:"password" required:"true"` + // REQUIRED + Username LokiLogSinkCredentialsGetUsernameAttributeType `json:"username" required:"true"` +} + +type _LokiLogSinkCredentials LokiLogSinkCredentials + +// NewLokiLogSinkCredentials instantiates a new LokiLogSinkCredentials 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 NewLokiLogSinkCredentials(password LokiLogSinkCredentialsGetPasswordArgType, username LokiLogSinkCredentialsGetUsernameArgType) *LokiLogSinkCredentials { + this := LokiLogSinkCredentials{} + setLokiLogSinkCredentialsGetPasswordAttributeType(&this.Password, password) + setLokiLogSinkCredentialsGetUsernameAttributeType(&this.Username, username) + return &this +} + +// NewLokiLogSinkCredentialsWithDefaults instantiates a new LokiLogSinkCredentials 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 NewLokiLogSinkCredentialsWithDefaults() *LokiLogSinkCredentials { + this := LokiLogSinkCredentials{} + return &this +} + +// GetPassword returns the Password field value +func (o *LokiLogSinkCredentials) GetPassword() (ret LokiLogSinkCredentialsGetPasswordRetType) { + ret, _ = o.GetPasswordOk() + return ret +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *LokiLogSinkCredentials) GetPasswordOk() (ret LokiLogSinkCredentialsGetPasswordRetType, ok bool) { + return getLokiLogSinkCredentialsGetPasswordAttributeTypeOk(o.Password) +} + +// SetPassword sets field value +func (o *LokiLogSinkCredentials) SetPassword(v LokiLogSinkCredentialsGetPasswordRetType) { + setLokiLogSinkCredentialsGetPasswordAttributeType(&o.Password, v) +} + +// GetUsername returns the Username field value +func (o *LokiLogSinkCredentials) GetUsername() (ret LokiLogSinkCredentialsGetUsernameRetType) { + ret, _ = o.GetUsernameOk() + return ret +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *LokiLogSinkCredentials) GetUsernameOk() (ret LokiLogSinkCredentialsGetUsernameRetType, ok bool) { + return getLokiLogSinkCredentialsGetUsernameAttributeTypeOk(o.Username) +} + +// SetUsername sets field value +func (o *LokiLogSinkCredentials) SetUsername(v LokiLogSinkCredentialsGetUsernameRetType) { + setLokiLogSinkCredentialsGetUsernameAttributeType(&o.Username, v) +} + +func (o LokiLogSinkCredentials) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getLokiLogSinkCredentialsGetPasswordAttributeTypeOk(o.Password); ok { + toSerialize["Password"] = val + } + if val, ok := getLokiLogSinkCredentialsGetUsernameAttributeTypeOk(o.Username); ok { + toSerialize["Username"] = val + } + return toSerialize, nil +} + +type NullableLokiLogSinkCredentials struct { + value *LokiLogSinkCredentials + isSet bool +} + +func (v NullableLokiLogSinkCredentials) Get() *LokiLogSinkCredentials { + return v.value +} + +func (v *NullableLokiLogSinkCredentials) Set(val *LokiLogSinkCredentials) { + v.value = val + v.isSet = true +} + +func (v NullableLokiLogSinkCredentials) IsSet() bool { + return v.isSet +} + +func (v *NullableLokiLogSinkCredentials) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLokiLogSinkCredentials(val *LokiLogSinkCredentials) *NullableLokiLogSinkCredentials { + return &NullableLokiLogSinkCredentials{value: val, isSet: true} +} + +func (v NullableLokiLogSinkCredentials) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLokiLogSinkCredentials) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_loki_log_sink_credentials_test.go b/services/cdn/model_loki_log_sink_credentials_test.go new file mode 100644 index 000000000..486a30539 --- /dev/null +++ b/services/cdn/model_loki_log_sink_credentials_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_loki_log_sink_patch.go b/services/cdn/model_loki_log_sink_patch.go new file mode 100644 index 000000000..393e29d27 --- /dev/null +++ b/services/cdn/model_loki_log_sink_patch.go @@ -0,0 +1,221 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn + +import ( + "encoding/json" +) + +// checks if the LokiLogSinkPatch type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LokiLogSinkPatch{} + +/* + types and functions for credentials +*/ + +// isModel +type LokiLogSinkPatchGetCredentialsAttributeType = *LokiLogSinkCredentials +type LokiLogSinkPatchGetCredentialsArgType = LokiLogSinkCredentials +type LokiLogSinkPatchGetCredentialsRetType = LokiLogSinkCredentials + +func getLokiLogSinkPatchGetCredentialsAttributeTypeOk(arg LokiLogSinkPatchGetCredentialsAttributeType) (ret LokiLogSinkPatchGetCredentialsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLokiLogSinkPatchGetCredentialsAttributeType(arg *LokiLogSinkPatchGetCredentialsAttributeType, val LokiLogSinkPatchGetCredentialsRetType) { + *arg = &val +} + +/* + types and functions for pushUrl +*/ + +// isNotNullableString +type LokiLogSinkPatchGetPushUrlAttributeType = *string + +func getLokiLogSinkPatchGetPushUrlAttributeTypeOk(arg LokiLogSinkPatchGetPushUrlAttributeType) (ret LokiLogSinkPatchGetPushUrlRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLokiLogSinkPatchGetPushUrlAttributeType(arg *LokiLogSinkPatchGetPushUrlAttributeType, val LokiLogSinkPatchGetPushUrlRetType) { + *arg = &val +} + +type LokiLogSinkPatchGetPushUrlArgType = string +type LokiLogSinkPatchGetPushUrlRetType = string + +/* + types and functions for type +*/ + +// isNotNullableString +type LokiLogSinkPatchGetTypeAttributeType = *string + +func getLokiLogSinkPatchGetTypeAttributeTypeOk(arg LokiLogSinkPatchGetTypeAttributeType) (ret LokiLogSinkPatchGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setLokiLogSinkPatchGetTypeAttributeType(arg *LokiLogSinkPatchGetTypeAttributeType, val LokiLogSinkPatchGetTypeRetType) { + *arg = &val +} + +type LokiLogSinkPatchGetTypeArgType = string +type LokiLogSinkPatchGetTypeRetType = string + +// LokiLogSinkPatch struct for LokiLogSinkPatch +type LokiLogSinkPatch struct { + Credentials LokiLogSinkPatchGetCredentialsAttributeType `json:"credentials,omitempty"` + PushUrl LokiLogSinkPatchGetPushUrlAttributeType `json:"pushUrl,omitempty"` + // REQUIRED + Type LokiLogSinkPatchGetTypeAttributeType `json:"type" required:"true"` +} + +type _LokiLogSinkPatch LokiLogSinkPatch + +// NewLokiLogSinkPatch instantiates a new LokiLogSinkPatch 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 NewLokiLogSinkPatch(types LokiLogSinkPatchGetTypeArgType) *LokiLogSinkPatch { + this := LokiLogSinkPatch{} + setLokiLogSinkPatchGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewLokiLogSinkPatchWithDefaults instantiates a new LokiLogSinkPatch 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 NewLokiLogSinkPatchWithDefaults() *LokiLogSinkPatch { + this := LokiLogSinkPatch{} + return &this +} + +// GetCredentials returns the Credentials field value if set, zero value otherwise. +func (o *LokiLogSinkPatch) GetCredentials() (res LokiLogSinkPatchGetCredentialsRetType) { + res, _ = o.GetCredentialsOk() + return +} + +// GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LokiLogSinkPatch) GetCredentialsOk() (ret LokiLogSinkPatchGetCredentialsRetType, ok bool) { + return getLokiLogSinkPatchGetCredentialsAttributeTypeOk(o.Credentials) +} + +// HasCredentials returns a boolean if a field has been set. +func (o *LokiLogSinkPatch) HasCredentials() bool { + _, ok := o.GetCredentialsOk() + return ok +} + +// SetCredentials gets a reference to the given LokiLogSinkCredentials and assigns it to the Credentials field. +func (o *LokiLogSinkPatch) SetCredentials(v LokiLogSinkPatchGetCredentialsRetType) { + setLokiLogSinkPatchGetCredentialsAttributeType(&o.Credentials, v) +} + +// GetPushUrl returns the PushUrl field value if set, zero value otherwise. +func (o *LokiLogSinkPatch) GetPushUrl() (res LokiLogSinkPatchGetPushUrlRetType) { + res, _ = o.GetPushUrlOk() + return +} + +// GetPushUrlOk returns a tuple with the PushUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LokiLogSinkPatch) GetPushUrlOk() (ret LokiLogSinkPatchGetPushUrlRetType, ok bool) { + return getLokiLogSinkPatchGetPushUrlAttributeTypeOk(o.PushUrl) +} + +// HasPushUrl returns a boolean if a field has been set. +func (o *LokiLogSinkPatch) HasPushUrl() bool { + _, ok := o.GetPushUrlOk() + return ok +} + +// SetPushUrl gets a reference to the given string and assigns it to the PushUrl field. +func (o *LokiLogSinkPatch) SetPushUrl(v LokiLogSinkPatchGetPushUrlRetType) { + setLokiLogSinkPatchGetPushUrlAttributeType(&o.PushUrl, v) +} + +// GetType returns the Type field value +func (o *LokiLogSinkPatch) GetType() (ret LokiLogSinkPatchGetTypeRetType) { + 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 *LokiLogSinkPatch) GetTypeOk() (ret LokiLogSinkPatchGetTypeRetType, ok bool) { + return getLokiLogSinkPatchGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +func (o *LokiLogSinkPatch) SetType(v LokiLogSinkPatchGetTypeRetType) { + setLokiLogSinkPatchGetTypeAttributeType(&o.Type, v) +} + +func (o LokiLogSinkPatch) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getLokiLogSinkPatchGetCredentialsAttributeTypeOk(o.Credentials); ok { + toSerialize["Credentials"] = val + } + if val, ok := getLokiLogSinkPatchGetPushUrlAttributeTypeOk(o.PushUrl); ok { + toSerialize["PushUrl"] = val + } + if val, ok := getLokiLogSinkPatchGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +type NullableLokiLogSinkPatch struct { + value *LokiLogSinkPatch + isSet bool +} + +func (v NullableLokiLogSinkPatch) Get() *LokiLogSinkPatch { + return v.value +} + +func (v *NullableLokiLogSinkPatch) Set(val *LokiLogSinkPatch) { + v.value = val + v.isSet = true +} + +func (v NullableLokiLogSinkPatch) IsSet() bool { + return v.isSet +} + +func (v *NullableLokiLogSinkPatch) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLokiLogSinkPatch(val *LokiLogSinkPatch) *NullableLokiLogSinkPatch { + return &NullableLokiLogSinkPatch{value: val, isSet: true} +} + +func (v NullableLokiLogSinkPatch) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLokiLogSinkPatch) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/cdn/model_loki_log_sink_patch_test.go b/services/cdn/model_loki_log_sink_patch_test.go new file mode 100644 index 000000000..486a30539 --- /dev/null +++ b/services/cdn/model_loki_log_sink_patch_test.go @@ -0,0 +1,11 @@ +/* +CDN API + +API used to create and manage your CDN distributions. + +API version: 1beta2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package cdn diff --git a/services/cdn/model_loki_log_sink_test.go b/services/cdn/model_loki_log_sink_test.go index 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 6d9565ff5..9e6dee876 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: 1beta.0.0 +API version: 1beta2.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 4eb44b30f..23e80e31a 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 cbdbe688d..84afc9fe6 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 5fe155fd1..46e68decf 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 88bac16c4..ab1e7c9e4 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 918688495..5e60e6dbd 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 33ab9eed7..be69d8512 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 31ee37272..d1f3fc1ce 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: 1beta.0.0 +API version: 1beta2.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 b5d96198c..03c5fd070 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 22013ae57..77a396c7d 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -57,35 +57,11 @@ func setPutCustomDomainResponseGetCustomDomainAttributeType(arg *PutCustomDomain *arg = &val } -/* - types and functions for domain -*/ - -// isNotNullableString -type PutCustomDomainResponseGetDomainAttributeType = *string - -func getPutCustomDomainResponseGetDomainAttributeTypeOk(arg PutCustomDomainResponseGetDomainAttributeType) (ret PutCustomDomainResponseGetDomainRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setPutCustomDomainResponseGetDomainAttributeType(arg *PutCustomDomainResponseGetDomainAttributeType, val PutCustomDomainResponseGetDomainRetType) { - *arg = &val -} - -type PutCustomDomainResponseGetDomainArgType = string -type PutCustomDomainResponseGetDomainRetType = string - // PutCustomDomainResponse struct for PutCustomDomainResponse type PutCustomDomainResponse struct { Certificate PutCustomDomainResponseGetCertificateAttributeType `json:"certificate,omitempty"` // REQUIRED CustomDomain PutCustomDomainResponseGetCustomDomainAttributeType `json:"customDomain" required:"true"` - // Deprecated: Check the GitHub changelog for alternatives - // REQUIRED - Domain PutCustomDomainResponseGetDomainAttributeType `json:"domain" required:"true"` } type _PutCustomDomainResponse PutCustomDomainResponse @@ -94,10 +70,9 @@ type _PutCustomDomainResponse PutCustomDomainResponse // 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 NewPutCustomDomainResponse(customDomain PutCustomDomainResponseGetCustomDomainArgType, domain PutCustomDomainResponseGetDomainArgType) *PutCustomDomainResponse { +func NewPutCustomDomainResponse(customDomain PutCustomDomainResponseGetCustomDomainArgType) *PutCustomDomainResponse { this := PutCustomDomainResponse{} setPutCustomDomainResponseGetCustomDomainAttributeType(&this.CustomDomain, customDomain) - setPutCustomDomainResponseGetDomainAttributeType(&this.Domain, domain) return &this } @@ -149,26 +124,6 @@ func (o *PutCustomDomainResponse) SetCustomDomain(v PutCustomDomainResponseGetCu setPutCustomDomainResponseGetCustomDomainAttributeType(&o.CustomDomain, v) } -// GetDomain returns the Domain field value -// Deprecated -func (o *PutCustomDomainResponse) GetDomain() (ret PutCustomDomainResponseGetDomainRetType) { - ret, _ = o.GetDomainOk() - return ret -} - -// GetDomainOk returns a tuple with the Domain field value -// and a boolean to check if the value has been set. -// Deprecated -func (o *PutCustomDomainResponse) GetDomainOk() (ret PutCustomDomainResponseGetDomainRetType, ok bool) { - return getPutCustomDomainResponseGetDomainAttributeTypeOk(o.Domain) -} - -// SetDomain sets field value -// Deprecated -func (o *PutCustomDomainResponse) SetDomain(v PutCustomDomainResponseGetDomainRetType) { - setPutCustomDomainResponseGetDomainAttributeType(&o.Domain, v) -} - func (o PutCustomDomainResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getPutCustomDomainResponseGetCertificateAttributeTypeOk(o.Certificate); ok { @@ -177,9 +132,6 @@ func (o PutCustomDomainResponse) ToMap() (map[string]interface{}, error) { if val, ok := getPutCustomDomainResponseGetCustomDomainAttributeTypeOk(o.CustomDomain); ok { toSerialize["CustomDomain"] = val } - if val, ok := getPutCustomDomainResponseGetDomainAttributeTypeOk(o.Domain); ok { - toSerialize["Domain"] = val - } return toSerialize, nil } diff --git a/services/cdn/model_put_custom_domain_response_certificate.go b/services/cdn/model_put_custom_domain_response_certificate.go index 671ee7065..ac42a7c36 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 004f9c91c..c55ae4ecd 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 c231786c5..10081f05c 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_status_error_test.go b/services/cdn/model_status_error_test.go index 609279169..665db1bf5 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_waf_config.go b/services/cdn/model_waf_config.go index e772a1dae..c9420fa29 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -79,7 +79,7 @@ func setWafConfigGetTypeAttributeType(arg *WafConfigGetTypeAttributeType, val Wa // WafConfig Configuration of the WAF of a distribution type WafConfig struct { - // 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. + // 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"` // REQUIRED diff --git a/services/cdn/model_waf_config_patch.go b/services/cdn/model_waf_config_patch.go index 850dda32b..545baa19b 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_waf_config_patch_test.go b/services/cdn/model_waf_config_patch_test.go index 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 30776fdf3..70775c73e 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_waf_mode_test.go b/services/cdn/model_waf_mode_test.go index 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/model_waf_rule.go b/services/cdn/model_waf_rule.go index 3a873b618..a0b3909d1 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,47 +14,47 @@ import ( "encoding/json" ) -// checks if the WAFRule type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WAFRule{} +// checks if the WafRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafRule{} /* types and functions for code */ // isNotNullableString -type WAFRuleGetCodeAttributeType = *string +type WafRuleGetCodeAttributeType = *string -func getWAFRuleGetCodeAttributeTypeOk(arg WAFRuleGetCodeAttributeType) (ret WAFRuleGetCodeRetType, ok bool) { +func getWafRuleGetCodeAttributeTypeOk(arg WafRuleGetCodeAttributeType) (ret WafRuleGetCodeRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } -func setWAFRuleGetCodeAttributeType(arg *WAFRuleGetCodeAttributeType, val WAFRuleGetCodeRetType) { +func setWafRuleGetCodeAttributeType(arg *WafRuleGetCodeAttributeType, val WafRuleGetCodeRetType) { *arg = &val } -type WAFRuleGetCodeArgType = string -type WAFRuleGetCodeRetType = string +type WafRuleGetCodeArgType = string +type WafRuleGetCodeRetType = string /* types and functions for description */ // isContainer -type WAFRuleGetDescriptionAttributeType = *map[string]string -type WAFRuleGetDescriptionArgType = map[string]string -type WAFRuleGetDescriptionRetType = map[string]string +type WafRuleGetDescriptionAttributeType = *map[string]string +type WafRuleGetDescriptionArgType = map[string]string +type WafRuleGetDescriptionRetType = map[string]string -func getWAFRuleGetDescriptionAttributeTypeOk(arg WAFRuleGetDescriptionAttributeType) (ret WAFRuleGetDescriptionRetType, ok bool) { +func getWafRuleGetDescriptionAttributeTypeOk(arg WafRuleGetDescriptionAttributeType) (ret WafRuleGetDescriptionRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } -func setWAFRuleGetDescriptionAttributeType(arg *WAFRuleGetDescriptionAttributeType, val WAFRuleGetDescriptionRetType) { +func setWafRuleGetDescriptionAttributeType(arg *WafRuleGetDescriptionAttributeType, val WafRuleGetDescriptionRetType) { *arg = &val } @@ -63,157 +63,157 @@ func setWAFRuleGetDescriptionAttributeType(arg *WAFRuleGetDescriptionAttributeTy */ // isNotNullableString -type WAFRuleGetIdAttributeType = *string +type WafRuleGetIdAttributeType = *string -func getWAFRuleGetIdAttributeTypeOk(arg WAFRuleGetIdAttributeType) (ret WAFRuleGetIdRetType, ok bool) { +func getWafRuleGetIdAttributeTypeOk(arg WafRuleGetIdAttributeType) (ret WafRuleGetIdRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } -func setWAFRuleGetIdAttributeType(arg *WAFRuleGetIdAttributeType, val WAFRuleGetIdRetType) { +func setWafRuleGetIdAttributeType(arg *WafRuleGetIdAttributeType, val WafRuleGetIdRetType) { *arg = &val } -type WAFRuleGetIdArgType = string -type WAFRuleGetIdRetType = string +type WafRuleGetIdArgType = string +type WafRuleGetIdRetType = string -// WAFRule struct for WAFRule -type WAFRule struct { - // Optional CoreRuleSet rule ID in case this is a CRS rule - Code WAFRuleGetCodeAttributeType `json:"code,omitempty"` +// WafRule struct for WafRule +type WafRule struct { + // Optional CoreRuleSet rule Id in case this is a CRS rule + Code WafRuleGetCodeAttributeType `json:"code,omitempty"` // LocalizedString is a map from language to string value // REQUIRED - Description WAFRuleGetDescriptionAttributeType `json:"description" required:"true"` + Description WafRuleGetDescriptionAttributeType `json:"description" required:"true"` // REQUIRED - Id WAFRuleGetIdAttributeType `json:"id" required:"true"` + Id WafRuleGetIdAttributeType `json:"id" required:"true"` } -type _WAFRule WAFRule +type _WafRule WafRule -// NewWAFRule instantiates a new WAFRule object +// NewWafRule instantiates a new WafRule 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 NewWAFRule(description WAFRuleGetDescriptionArgType, id WAFRuleGetIdArgType) *WAFRule { - this := WAFRule{} - setWAFRuleGetDescriptionAttributeType(&this.Description, description) - setWAFRuleGetIdAttributeType(&this.Id, id) +func NewWafRule(description WafRuleGetDescriptionArgType, id WafRuleGetIdArgType) *WafRule { + this := WafRule{} + setWafRuleGetDescriptionAttributeType(&this.Description, description) + setWafRuleGetIdAttributeType(&this.Id, id) return &this } -// NewWAFRuleWithDefaults instantiates a new WAFRule object +// NewWafRuleWithDefaults instantiates a new WafRule 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 NewWAFRuleWithDefaults() *WAFRule { - this := WAFRule{} +func NewWafRuleWithDefaults() *WafRule { + this := WafRule{} return &this } // GetCode returns the Code field value if set, zero value otherwise. -func (o *WAFRule) GetCode() (res WAFRuleGetCodeRetType) { +func (o *WafRule) GetCode() (res WafRuleGetCodeRetType) { res, _ = o.GetCodeOk() return } // GetCodeOk returns a tuple with the Code field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WAFRule) GetCodeOk() (ret WAFRuleGetCodeRetType, ok bool) { - return getWAFRuleGetCodeAttributeTypeOk(o.Code) +func (o *WafRule) GetCodeOk() (ret WafRuleGetCodeRetType, ok bool) { + return getWafRuleGetCodeAttributeTypeOk(o.Code) } // HasCode returns a boolean if a field has been set. -func (o *WAFRule) HasCode() bool { +func (o *WafRule) HasCode() bool { _, ok := o.GetCodeOk() return ok } // SetCode gets a reference to the given string and assigns it to the Code field. -func (o *WAFRule) SetCode(v WAFRuleGetCodeRetType) { - setWAFRuleGetCodeAttributeType(&o.Code, v) +func (o *WafRule) SetCode(v WafRuleGetCodeRetType) { + setWafRuleGetCodeAttributeType(&o.Code, v) } // GetDescription returns the Description field value -func (o *WAFRule) GetDescription() (ret WAFRuleGetDescriptionRetType) { +func (o *WafRule) GetDescription() (ret WafRuleGetDescriptionRetType) { ret, _ = o.GetDescriptionOk() return ret } // GetDescriptionOk returns a tuple with the Description field value // and a boolean to check if the value has been set. -func (o *WAFRule) GetDescriptionOk() (ret WAFRuleGetDescriptionRetType, ok bool) { - return getWAFRuleGetDescriptionAttributeTypeOk(o.Description) +func (o *WafRule) GetDescriptionOk() (ret WafRuleGetDescriptionRetType, ok bool) { + return getWafRuleGetDescriptionAttributeTypeOk(o.Description) } // SetDescription sets field value -func (o *WAFRule) SetDescription(v WAFRuleGetDescriptionRetType) { - setWAFRuleGetDescriptionAttributeType(&o.Description, v) +func (o *WafRule) SetDescription(v WafRuleGetDescriptionRetType) { + setWafRuleGetDescriptionAttributeType(&o.Description, v) } // GetId returns the Id field value -func (o *WAFRule) GetId() (ret WAFRuleGetIdRetType) { +func (o *WafRule) GetId() (ret WafRuleGetIdRetType) { 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 *WAFRule) GetIdOk() (ret WAFRuleGetIdRetType, ok bool) { - return getWAFRuleGetIdAttributeTypeOk(o.Id) +func (o *WafRule) GetIdOk() (ret WafRuleGetIdRetType, ok bool) { + return getWafRuleGetIdAttributeTypeOk(o.Id) } // SetId sets field value -func (o *WAFRule) SetId(v WAFRuleGetIdRetType) { - setWAFRuleGetIdAttributeType(&o.Id, v) +func (o *WafRule) SetId(v WafRuleGetIdRetType) { + setWafRuleGetIdAttributeType(&o.Id, v) } -func (o WAFRule) ToMap() (map[string]interface{}, error) { +func (o WafRule) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getWAFRuleGetCodeAttributeTypeOk(o.Code); ok { + if val, ok := getWafRuleGetCodeAttributeTypeOk(o.Code); ok { toSerialize["Code"] = val } - if val, ok := getWAFRuleGetDescriptionAttributeTypeOk(o.Description); ok { + if val, ok := getWafRuleGetDescriptionAttributeTypeOk(o.Description); ok { toSerialize["Description"] = val } - if val, ok := getWAFRuleGetIdAttributeTypeOk(o.Id); ok { + if val, ok := getWafRuleGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } return toSerialize, nil } -type NullableWAFRule struct { - value *WAFRule +type NullableWafRule struct { + value *WafRule isSet bool } -func (v NullableWAFRule) Get() *WAFRule { +func (v NullableWafRule) Get() *WafRule { return v.value } -func (v *NullableWAFRule) Set(val *WAFRule) { +func (v *NullableWafRule) Set(val *WafRule) { v.value = val v.isSet = true } -func (v NullableWAFRule) IsSet() bool { +func (v NullableWafRule) IsSet() bool { return v.isSet } -func (v *NullableWAFRule) Unset() { +func (v *NullableWafRule) Unset() { v.value = nil v.isSet = false } -func NewNullableWAFRule(val *WAFRule) *NullableWAFRule { - return &NullableWAFRule{value: val, isSet: true} +func NewNullableWafRule(val *WafRule) *NullableWafRule { + return &NullableWafRule{value: val, isSet: true} } -func (v NullableWAFRule) MarshalJSON() ([]byte, error) { +func (v NullableWafRule) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableWAFRule) UnmarshalJSON(src []byte) error { +func (v *NullableWafRule) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/cdn/model_waf_rule_collection.go b/services/cdn/model_waf_rule_collection.go index f97cbd1ef..8ec1ab667 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,26 +14,26 @@ import ( "encoding/json" ) -// checks if the WAFRuleCollection type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WAFRuleCollection{} +// checks if the WafRuleCollection type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafRuleCollection{} /* types and functions for groups */ // isArray -type WAFRuleCollectionGetGroupsAttributeType = *[]WAFRuleGroup -type WAFRuleCollectionGetGroupsArgType = []WAFRuleGroup -type WAFRuleCollectionGetGroupsRetType = []WAFRuleGroup +type WafRuleCollectionGetGroupsAttributeType = *[]WafRuleGroup +type WafRuleCollectionGetGroupsArgType = []WafRuleGroup +type WafRuleCollectionGetGroupsRetType = []WafRuleGroup -func getWAFRuleCollectionGetGroupsAttributeTypeOk(arg WAFRuleCollectionGetGroupsAttributeType) (ret WAFRuleCollectionGetGroupsRetType, ok bool) { +func getWafRuleCollectionGetGroupsAttributeTypeOk(arg WafRuleCollectionGetGroupsAttributeType) (ret WafRuleCollectionGetGroupsRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } -func setWAFRuleCollectionGetGroupsAttributeType(arg *WAFRuleCollectionGetGroupsAttributeType, val WAFRuleCollectionGetGroupsRetType) { +func setWafRuleCollectionGetGroupsAttributeType(arg *WafRuleCollectionGetGroupsAttributeType, val WafRuleCollectionGetGroupsRetType) { *arg = &val } @@ -42,172 +42,172 @@ func setWAFRuleCollectionGetGroupsAttributeType(arg *WAFRuleCollectionGetGroupsA */ // isNotNullableString -type WAFRuleCollectionGetIdAttributeType = *string +type WafRuleCollectionGetIdAttributeType = *string -func getWAFRuleCollectionGetIdAttributeTypeOk(arg WAFRuleCollectionGetIdAttributeType) (ret WAFRuleCollectionGetIdRetType, ok bool) { +func getWafRuleCollectionGetIdAttributeTypeOk(arg WafRuleCollectionGetIdAttributeType) (ret WafRuleCollectionGetIdRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } -func setWAFRuleCollectionGetIdAttributeType(arg *WAFRuleCollectionGetIdAttributeType, val WAFRuleCollectionGetIdRetType) { +func setWafRuleCollectionGetIdAttributeType(arg *WafRuleCollectionGetIdAttributeType, val WafRuleCollectionGetIdRetType) { *arg = &val } -type WAFRuleCollectionGetIdArgType = string -type WAFRuleCollectionGetIdRetType = string +type WafRuleCollectionGetIdArgType = string +type WafRuleCollectionGetIdRetType = string /* types and functions for name */ // isContainer -type WAFRuleCollectionGetNameAttributeType = *map[string]string -type WAFRuleCollectionGetNameArgType = map[string]string -type WAFRuleCollectionGetNameRetType = map[string]string +type WafRuleCollectionGetNameAttributeType = *map[string]string +type WafRuleCollectionGetNameArgType = map[string]string +type WafRuleCollectionGetNameRetType = map[string]string -func getWAFRuleCollectionGetNameAttributeTypeOk(arg WAFRuleCollectionGetNameAttributeType) (ret WAFRuleCollectionGetNameRetType, ok bool) { +func getWafRuleCollectionGetNameAttributeTypeOk(arg WafRuleCollectionGetNameAttributeType) (ret WafRuleCollectionGetNameRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } -func setWAFRuleCollectionGetNameAttributeType(arg *WAFRuleCollectionGetNameAttributeType, val WAFRuleCollectionGetNameRetType) { +func setWafRuleCollectionGetNameAttributeType(arg *WafRuleCollectionGetNameAttributeType, val WafRuleCollectionGetNameRetType) { *arg = &val } -// WAFRuleCollection struct for WAFRuleCollection -type WAFRuleCollection struct { +// WafRuleCollection struct for WafRuleCollection +type WafRuleCollection struct { // REQUIRED - Groups WAFRuleCollectionGetGroupsAttributeType `json:"groups" required:"true"` + Groups WafRuleCollectionGetGroupsAttributeType `json:"groups" required:"true"` // REQUIRED - Id WAFRuleCollectionGetIdAttributeType `json:"id" required:"true"` + Id WafRuleCollectionGetIdAttributeType `json:"id" required:"true"` // LocalizedString is a map from language to string value // REQUIRED - Name WAFRuleCollectionGetNameAttributeType `json:"name" required:"true"` + Name WafRuleCollectionGetNameAttributeType `json:"name" required:"true"` } -type _WAFRuleCollection WAFRuleCollection +type _WafRuleCollection WafRuleCollection -// NewWAFRuleCollection instantiates a new WAFRuleCollection object +// NewWafRuleCollection instantiates a new WafRuleCollection 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 NewWAFRuleCollection(groups WAFRuleCollectionGetGroupsArgType, id WAFRuleCollectionGetIdArgType, name WAFRuleCollectionGetNameArgType) *WAFRuleCollection { - this := WAFRuleCollection{} - setWAFRuleCollectionGetGroupsAttributeType(&this.Groups, groups) - setWAFRuleCollectionGetIdAttributeType(&this.Id, id) - setWAFRuleCollectionGetNameAttributeType(&this.Name, name) +func NewWafRuleCollection(groups WafRuleCollectionGetGroupsArgType, id WafRuleCollectionGetIdArgType, name WafRuleCollectionGetNameArgType) *WafRuleCollection { + this := WafRuleCollection{} + setWafRuleCollectionGetGroupsAttributeType(&this.Groups, groups) + setWafRuleCollectionGetIdAttributeType(&this.Id, id) + setWafRuleCollectionGetNameAttributeType(&this.Name, name) return &this } -// NewWAFRuleCollectionWithDefaults instantiates a new WAFRuleCollection object +// NewWafRuleCollectionWithDefaults instantiates a new WafRuleCollection 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 NewWAFRuleCollectionWithDefaults() *WAFRuleCollection { - this := WAFRuleCollection{} +func NewWafRuleCollectionWithDefaults() *WafRuleCollection { + this := WafRuleCollection{} return &this } // GetGroups returns the Groups field value -func (o *WAFRuleCollection) GetGroups() (ret WAFRuleCollectionGetGroupsRetType) { +func (o *WafRuleCollection) GetGroups() (ret WafRuleCollectionGetGroupsRetType) { ret, _ = o.GetGroupsOk() return ret } // GetGroupsOk returns a tuple with the Groups field value // and a boolean to check if the value has been set. -func (o *WAFRuleCollection) GetGroupsOk() (ret WAFRuleCollectionGetGroupsRetType, ok bool) { - return getWAFRuleCollectionGetGroupsAttributeTypeOk(o.Groups) +func (o *WafRuleCollection) GetGroupsOk() (ret WafRuleCollectionGetGroupsRetType, ok bool) { + return getWafRuleCollectionGetGroupsAttributeTypeOk(o.Groups) } // SetGroups sets field value -func (o *WAFRuleCollection) SetGroups(v WAFRuleCollectionGetGroupsRetType) { - setWAFRuleCollectionGetGroupsAttributeType(&o.Groups, v) +func (o *WafRuleCollection) SetGroups(v WafRuleCollectionGetGroupsRetType) { + setWafRuleCollectionGetGroupsAttributeType(&o.Groups, v) } // GetId returns the Id field value -func (o *WAFRuleCollection) GetId() (ret WAFRuleCollectionGetIdRetType) { +func (o *WafRuleCollection) GetId() (ret WafRuleCollectionGetIdRetType) { 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 *WAFRuleCollection) GetIdOk() (ret WAFRuleCollectionGetIdRetType, ok bool) { - return getWAFRuleCollectionGetIdAttributeTypeOk(o.Id) +func (o *WafRuleCollection) GetIdOk() (ret WafRuleCollectionGetIdRetType, ok bool) { + return getWafRuleCollectionGetIdAttributeTypeOk(o.Id) } // SetId sets field value -func (o *WAFRuleCollection) SetId(v WAFRuleCollectionGetIdRetType) { - setWAFRuleCollectionGetIdAttributeType(&o.Id, v) +func (o *WafRuleCollection) SetId(v WafRuleCollectionGetIdRetType) { + setWafRuleCollectionGetIdAttributeType(&o.Id, v) } // GetName returns the Name field value -func (o *WAFRuleCollection) GetName() (ret WAFRuleCollectionGetNameRetType) { +func (o *WafRuleCollection) GetName() (ret WafRuleCollectionGetNameRetType) { ret, _ = o.GetNameOk() return ret } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -func (o *WAFRuleCollection) GetNameOk() (ret WAFRuleCollectionGetNameRetType, ok bool) { - return getWAFRuleCollectionGetNameAttributeTypeOk(o.Name) +func (o *WafRuleCollection) GetNameOk() (ret WafRuleCollectionGetNameRetType, ok bool) { + return getWafRuleCollectionGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *WAFRuleCollection) SetName(v WAFRuleCollectionGetNameRetType) { - setWAFRuleCollectionGetNameAttributeType(&o.Name, v) +func (o *WafRuleCollection) SetName(v WafRuleCollectionGetNameRetType) { + setWafRuleCollectionGetNameAttributeType(&o.Name, v) } -func (o WAFRuleCollection) ToMap() (map[string]interface{}, error) { +func (o WafRuleCollection) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getWAFRuleCollectionGetGroupsAttributeTypeOk(o.Groups); ok { + if val, ok := getWafRuleCollectionGetGroupsAttributeTypeOk(o.Groups); ok { toSerialize["Groups"] = val } - if val, ok := getWAFRuleCollectionGetIdAttributeTypeOk(o.Id); ok { + if val, ok := getWafRuleCollectionGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } - if val, ok := getWAFRuleCollectionGetNameAttributeTypeOk(o.Name); ok { + if val, ok := getWafRuleCollectionGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } return toSerialize, nil } -type NullableWAFRuleCollection struct { - value *WAFRuleCollection +type NullableWafRuleCollection struct { + value *WafRuleCollection isSet bool } -func (v NullableWAFRuleCollection) Get() *WAFRuleCollection { +func (v NullableWafRuleCollection) Get() *WafRuleCollection { return v.value } -func (v *NullableWAFRuleCollection) Set(val *WAFRuleCollection) { +func (v *NullableWafRuleCollection) Set(val *WafRuleCollection) { v.value = val v.isSet = true } -func (v NullableWAFRuleCollection) IsSet() bool { +func (v NullableWafRuleCollection) IsSet() bool { return v.isSet } -func (v *NullableWAFRuleCollection) Unset() { +func (v *NullableWafRuleCollection) Unset() { v.value = nil v.isSet = false } -func NewNullableWAFRuleCollection(val *WAFRuleCollection) *NullableWAFRuleCollection { - return &NullableWAFRuleCollection{value: val, isSet: true} +func NewNullableWafRuleCollection(val *WafRuleCollection) *NullableWafRuleCollection { + return &NullableWafRuleCollection{value: val, isSet: true} } -func (v NullableWAFRuleCollection) MarshalJSON() ([]byte, error) { +func (v NullableWafRuleCollection) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableWAFRuleCollection) UnmarshalJSON(src []byte) error { +func (v *NullableWafRuleCollection) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/cdn/model_waf_rule_collection_test.go b/services/cdn/model_waf_rule_collection_test.go index 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 cbae73c7c..b5f16f772 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,26 +14,26 @@ import ( "encoding/json" ) -// checks if the WAFRuleGroup type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WAFRuleGroup{} +// checks if the WafRuleGroup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafRuleGroup{} /* types and functions for description */ // isContainer -type WAFRuleGroupGetDescriptionAttributeType = *map[string]string -type WAFRuleGroupGetDescriptionArgType = map[string]string -type WAFRuleGroupGetDescriptionRetType = map[string]string +type WafRuleGroupGetDescriptionAttributeType = *map[string]string +type WafRuleGroupGetDescriptionArgType = map[string]string +type WafRuleGroupGetDescriptionRetType = map[string]string -func getWAFRuleGroupGetDescriptionAttributeTypeOk(arg WAFRuleGroupGetDescriptionAttributeType) (ret WAFRuleGroupGetDescriptionRetType, ok bool) { +func getWafRuleGroupGetDescriptionAttributeTypeOk(arg WafRuleGroupGetDescriptionAttributeType) (ret WafRuleGroupGetDescriptionRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } -func setWAFRuleGroupGetDescriptionAttributeType(arg *WAFRuleGroupGetDescriptionAttributeType, val WAFRuleGroupGetDescriptionRetType) { +func setWafRuleGroupGetDescriptionAttributeType(arg *WafRuleGroupGetDescriptionAttributeType, val WafRuleGroupGetDescriptionRetType) { *arg = &val } @@ -42,18 +42,18 @@ func setWAFRuleGroupGetDescriptionAttributeType(arg *WAFRuleGroupGetDescriptionA */ // isContainer -type WAFRuleGroupGetNameAttributeType = *map[string]string -type WAFRuleGroupGetNameArgType = map[string]string -type WAFRuleGroupGetNameRetType = map[string]string +type WafRuleGroupGetNameAttributeType = *map[string]string +type WafRuleGroupGetNameArgType = map[string]string +type WafRuleGroupGetNameRetType = map[string]string -func getWAFRuleGroupGetNameAttributeTypeOk(arg WAFRuleGroupGetNameAttributeType) (ret WAFRuleGroupGetNameRetType, ok bool) { +func getWafRuleGroupGetNameAttributeTypeOk(arg WafRuleGroupGetNameAttributeType) (ret WafRuleGroupGetNameRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } -func setWAFRuleGroupGetNameAttributeType(arg *WAFRuleGroupGetNameAttributeType, val WAFRuleGroupGetNameRetType) { +func setWafRuleGroupGetNameAttributeType(arg *WafRuleGroupGetNameAttributeType, val WafRuleGroupGetNameRetType) { *arg = &val } @@ -62,152 +62,152 @@ func setWAFRuleGroupGetNameAttributeType(arg *WAFRuleGroupGetNameAttributeType, */ // isArray -type WAFRuleGroupGetRulesAttributeType = *[]WAFRule -type WAFRuleGroupGetRulesArgType = []WAFRule -type WAFRuleGroupGetRulesRetType = []WAFRule +type WafRuleGroupGetRulesAttributeType = *[]WafRule +type WafRuleGroupGetRulesArgType = []WafRule +type WafRuleGroupGetRulesRetType = []WafRule -func getWAFRuleGroupGetRulesAttributeTypeOk(arg WAFRuleGroupGetRulesAttributeType) (ret WAFRuleGroupGetRulesRetType, ok bool) { +func getWafRuleGroupGetRulesAttributeTypeOk(arg WafRuleGroupGetRulesAttributeType) (ret WafRuleGroupGetRulesRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } -func setWAFRuleGroupGetRulesAttributeType(arg *WAFRuleGroupGetRulesAttributeType, val WAFRuleGroupGetRulesRetType) { +func setWafRuleGroupGetRulesAttributeType(arg *WafRuleGroupGetRulesAttributeType, val WafRuleGroupGetRulesRetType) { *arg = &val } -// WAFRuleGroup struct for WAFRuleGroup -type WAFRuleGroup struct { +// WafRuleGroup struct for WafRuleGroup +type WafRuleGroup struct { // LocalizedString is a map from language to string value // REQUIRED - Description WAFRuleGroupGetDescriptionAttributeType `json:"description" required:"true"` + Description WafRuleGroupGetDescriptionAttributeType `json:"description" required:"true"` // LocalizedString is a map from language to string value // REQUIRED - Name WAFRuleGroupGetNameAttributeType `json:"name" required:"true"` + Name WafRuleGroupGetNameAttributeType `json:"name" required:"true"` // REQUIRED - Rules WAFRuleGroupGetRulesAttributeType `json:"rules" required:"true"` + Rules WafRuleGroupGetRulesAttributeType `json:"rules" required:"true"` } -type _WAFRuleGroup WAFRuleGroup +type _WafRuleGroup WafRuleGroup -// NewWAFRuleGroup instantiates a new WAFRuleGroup object +// NewWafRuleGroup instantiates a new WafRuleGroup 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 NewWAFRuleGroup(description WAFRuleGroupGetDescriptionArgType, name WAFRuleGroupGetNameArgType, rules WAFRuleGroupGetRulesArgType) *WAFRuleGroup { - this := WAFRuleGroup{} - setWAFRuleGroupGetDescriptionAttributeType(&this.Description, description) - setWAFRuleGroupGetNameAttributeType(&this.Name, name) - setWAFRuleGroupGetRulesAttributeType(&this.Rules, rules) +func NewWafRuleGroup(description WafRuleGroupGetDescriptionArgType, name WafRuleGroupGetNameArgType, rules WafRuleGroupGetRulesArgType) *WafRuleGroup { + this := WafRuleGroup{} + setWafRuleGroupGetDescriptionAttributeType(&this.Description, description) + setWafRuleGroupGetNameAttributeType(&this.Name, name) + setWafRuleGroupGetRulesAttributeType(&this.Rules, rules) return &this } -// NewWAFRuleGroupWithDefaults instantiates a new WAFRuleGroup object +// NewWafRuleGroupWithDefaults instantiates a new WafRuleGroup 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 NewWAFRuleGroupWithDefaults() *WAFRuleGroup { - this := WAFRuleGroup{} +func NewWafRuleGroupWithDefaults() *WafRuleGroup { + this := WafRuleGroup{} return &this } // GetDescription returns the Description field value -func (o *WAFRuleGroup) GetDescription() (ret WAFRuleGroupGetDescriptionRetType) { +func (o *WafRuleGroup) GetDescription() (ret WafRuleGroupGetDescriptionRetType) { ret, _ = o.GetDescriptionOk() return ret } // GetDescriptionOk returns a tuple with the Description field value // and a boolean to check if the value has been set. -func (o *WAFRuleGroup) GetDescriptionOk() (ret WAFRuleGroupGetDescriptionRetType, ok bool) { - return getWAFRuleGroupGetDescriptionAttributeTypeOk(o.Description) +func (o *WafRuleGroup) GetDescriptionOk() (ret WafRuleGroupGetDescriptionRetType, ok bool) { + return getWafRuleGroupGetDescriptionAttributeTypeOk(o.Description) } // SetDescription sets field value -func (o *WAFRuleGroup) SetDescription(v WAFRuleGroupGetDescriptionRetType) { - setWAFRuleGroupGetDescriptionAttributeType(&o.Description, v) +func (o *WafRuleGroup) SetDescription(v WafRuleGroupGetDescriptionRetType) { + setWafRuleGroupGetDescriptionAttributeType(&o.Description, v) } // GetName returns the Name field value -func (o *WAFRuleGroup) GetName() (ret WAFRuleGroupGetNameRetType) { +func (o *WafRuleGroup) GetName() (ret WafRuleGroupGetNameRetType) { ret, _ = o.GetNameOk() return ret } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -func (o *WAFRuleGroup) GetNameOk() (ret WAFRuleGroupGetNameRetType, ok bool) { - return getWAFRuleGroupGetNameAttributeTypeOk(o.Name) +func (o *WafRuleGroup) GetNameOk() (ret WafRuleGroupGetNameRetType, ok bool) { + return getWafRuleGroupGetNameAttributeTypeOk(o.Name) } // SetName sets field value -func (o *WAFRuleGroup) SetName(v WAFRuleGroupGetNameRetType) { - setWAFRuleGroupGetNameAttributeType(&o.Name, v) +func (o *WafRuleGroup) SetName(v WafRuleGroupGetNameRetType) { + setWafRuleGroupGetNameAttributeType(&o.Name, v) } // GetRules returns the Rules field value -func (o *WAFRuleGroup) GetRules() (ret WAFRuleGroupGetRulesRetType) { +func (o *WafRuleGroup) GetRules() (ret WafRuleGroupGetRulesRetType) { ret, _ = o.GetRulesOk() return ret } // GetRulesOk returns a tuple with the Rules field value // and a boolean to check if the value has been set. -func (o *WAFRuleGroup) GetRulesOk() (ret WAFRuleGroupGetRulesRetType, ok bool) { - return getWAFRuleGroupGetRulesAttributeTypeOk(o.Rules) +func (o *WafRuleGroup) GetRulesOk() (ret WafRuleGroupGetRulesRetType, ok bool) { + return getWafRuleGroupGetRulesAttributeTypeOk(o.Rules) } // SetRules sets field value -func (o *WAFRuleGroup) SetRules(v WAFRuleGroupGetRulesRetType) { - setWAFRuleGroupGetRulesAttributeType(&o.Rules, v) +func (o *WafRuleGroup) SetRules(v WafRuleGroupGetRulesRetType) { + setWafRuleGroupGetRulesAttributeType(&o.Rules, v) } -func (o WAFRuleGroup) ToMap() (map[string]interface{}, error) { +func (o WafRuleGroup) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getWAFRuleGroupGetDescriptionAttributeTypeOk(o.Description); ok { + if val, ok := getWafRuleGroupGetDescriptionAttributeTypeOk(o.Description); ok { toSerialize["Description"] = val } - if val, ok := getWAFRuleGroupGetNameAttributeTypeOk(o.Name); ok { + if val, ok := getWafRuleGroupGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } - if val, ok := getWAFRuleGroupGetRulesAttributeTypeOk(o.Rules); ok { + if val, ok := getWafRuleGroupGetRulesAttributeTypeOk(o.Rules); ok { toSerialize["Rules"] = val } return toSerialize, nil } -type NullableWAFRuleGroup struct { - value *WAFRuleGroup +type NullableWafRuleGroup struct { + value *WafRuleGroup isSet bool } -func (v NullableWAFRuleGroup) Get() *WAFRuleGroup { +func (v NullableWafRuleGroup) Get() *WafRuleGroup { return v.value } -func (v *NullableWAFRuleGroup) Set(val *WAFRuleGroup) { +func (v *NullableWafRuleGroup) Set(val *WafRuleGroup) { v.value = val v.isSet = true } -func (v NullableWAFRuleGroup) IsSet() bool { +func (v NullableWafRuleGroup) IsSet() bool { return v.isSet } -func (v *NullableWAFRuleGroup) Unset() { +func (v *NullableWafRuleGroup) Unset() { v.value = nil v.isSet = false } -func NewNullableWAFRuleGroup(val *WAFRuleGroup) *NullableWAFRuleGroup { - return &NullableWAFRuleGroup{value: val, isSet: true} +func NewNullableWafRuleGroup(val *WafRuleGroup) *NullableWafRuleGroup { + return &NullableWafRuleGroup{value: val, isSet: true} } -func (v NullableWAFRuleGroup) MarshalJSON() ([]byte, error) { +func (v NullableWafRuleGroup) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableWAFRuleGroup) UnmarshalJSON(src []byte) error { +func (v *NullableWafRuleGroup) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/cdn/model_waf_rule_group_test.go b/services/cdn/model_waf_rule_group_test.go index 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 e22846aa3..10050279b 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,114 +14,114 @@ import ( "encoding/json" ) -// checks if the WAFStatusRuleBlock type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WAFStatusRuleBlock{} +// checks if the WafStatusRuleBlock type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WafStatusRuleBlock{} /* types and functions for id */ // isNotNullableString -type WAFStatusRuleBlockGetIdAttributeType = *string +type WafStatusRuleBlockGetIdAttributeType = *string -func getWAFStatusRuleBlockGetIdAttributeTypeOk(arg WAFStatusRuleBlockGetIdAttributeType) (ret WAFStatusRuleBlockGetIdRetType, ok bool) { +func getWafStatusRuleBlockGetIdAttributeTypeOk(arg WafStatusRuleBlockGetIdAttributeType) (ret WafStatusRuleBlockGetIdRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } -func setWAFStatusRuleBlockGetIdAttributeType(arg *WAFStatusRuleBlockGetIdAttributeType, val WAFStatusRuleBlockGetIdRetType) { +func setWafStatusRuleBlockGetIdAttributeType(arg *WafStatusRuleBlockGetIdAttributeType, val WafStatusRuleBlockGetIdRetType) { *arg = &val } -type WAFStatusRuleBlockGetIdArgType = string -type WAFStatusRuleBlockGetIdRetType = string +type WafStatusRuleBlockGetIdArgType = string +type WafStatusRuleBlockGetIdRetType = string -// WAFStatusRuleBlock struct for WAFStatusRuleBlock -type WAFStatusRuleBlock struct { - // Specifies the ID of the Rule. +// WafStatusRuleBlock struct for WafStatusRuleBlock +type WafStatusRuleBlock struct { + // Specifies the Id of the Rule. // REQUIRED - Id WAFStatusRuleBlockGetIdAttributeType `json:"id" required:"true"` + Id WafStatusRuleBlockGetIdAttributeType `json:"id" required:"true"` } -type _WAFStatusRuleBlock WAFStatusRuleBlock +type _WafStatusRuleBlock WafStatusRuleBlock -// NewWAFStatusRuleBlock instantiates a new WAFStatusRuleBlock object +// NewWafStatusRuleBlock instantiates a new WafStatusRuleBlock 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 NewWAFStatusRuleBlock(id WAFStatusRuleBlockGetIdArgType) *WAFStatusRuleBlock { - this := WAFStatusRuleBlock{} - setWAFStatusRuleBlockGetIdAttributeType(&this.Id, id) +func NewWafStatusRuleBlock(id WafStatusRuleBlockGetIdArgType) *WafStatusRuleBlock { + this := WafStatusRuleBlock{} + setWafStatusRuleBlockGetIdAttributeType(&this.Id, id) return &this } -// NewWAFStatusRuleBlockWithDefaults instantiates a new WAFStatusRuleBlock object +// NewWafStatusRuleBlockWithDefaults instantiates a new WafStatusRuleBlock 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 NewWAFStatusRuleBlockWithDefaults() *WAFStatusRuleBlock { - this := WAFStatusRuleBlock{} +func NewWafStatusRuleBlockWithDefaults() *WafStatusRuleBlock { + this := WafStatusRuleBlock{} return &this } // GetId returns the Id field value -func (o *WAFStatusRuleBlock) GetId() (ret WAFStatusRuleBlockGetIdRetType) { +func (o *WafStatusRuleBlock) GetId() (ret WafStatusRuleBlockGetIdRetType) { 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 *WAFStatusRuleBlock) GetIdOk() (ret WAFStatusRuleBlockGetIdRetType, ok bool) { - return getWAFStatusRuleBlockGetIdAttributeTypeOk(o.Id) +func (o *WafStatusRuleBlock) GetIdOk() (ret WafStatusRuleBlockGetIdRetType, ok bool) { + return getWafStatusRuleBlockGetIdAttributeTypeOk(o.Id) } // SetId sets field value -func (o *WAFStatusRuleBlock) SetId(v WAFStatusRuleBlockGetIdRetType) { - setWAFStatusRuleBlockGetIdAttributeType(&o.Id, v) +func (o *WafStatusRuleBlock) SetId(v WafStatusRuleBlockGetIdRetType) { + setWafStatusRuleBlockGetIdAttributeType(&o.Id, v) } -func (o WAFStatusRuleBlock) ToMap() (map[string]interface{}, error) { +func (o WafStatusRuleBlock) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getWAFStatusRuleBlockGetIdAttributeTypeOk(o.Id); ok { + if val, ok := getWafStatusRuleBlockGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } return toSerialize, nil } -type NullableWAFStatusRuleBlock struct { - value *WAFStatusRuleBlock +type NullableWafStatusRuleBlock struct { + value *WafStatusRuleBlock isSet bool } -func (v NullableWAFStatusRuleBlock) Get() *WAFStatusRuleBlock { +func (v NullableWafStatusRuleBlock) Get() *WafStatusRuleBlock { return v.value } -func (v *NullableWAFStatusRuleBlock) Set(val *WAFStatusRuleBlock) { +func (v *NullableWafStatusRuleBlock) Set(val *WafStatusRuleBlock) { v.value = val v.isSet = true } -func (v NullableWAFStatusRuleBlock) IsSet() bool { +func (v NullableWafStatusRuleBlock) IsSet() bool { return v.isSet } -func (v *NullableWAFStatusRuleBlock) Unset() { +func (v *NullableWafStatusRuleBlock) Unset() { v.value = nil v.isSet = false } -func NewNullableWAFStatusRuleBlock(val *WAFStatusRuleBlock) *NullableWAFStatusRuleBlock { - return &NullableWAFStatusRuleBlock{value: val, isSet: true} +func NewNullableWafStatusRuleBlock(val *WafStatusRuleBlock) *NullableWafStatusRuleBlock { + return &NullableWafStatusRuleBlock{value: val, isSet: true} } -func (v NullableWAFStatusRuleBlock) MarshalJSON() ([]byte, error) { +func (v NullableWafStatusRuleBlock) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableWAFStatusRuleBlock) UnmarshalJSON(src []byte) error { +func (v *NullableWafStatusRuleBlock) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/cdn/model_waf_status_rule_block_test.go b/services/cdn/model_waf_status_rule_block_test.go index 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.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 c1421e710..28c749cae 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: 1beta.0.0 +API version: 1beta2.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 51fc7c9ea..486a30539 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/cdn/utils.go b/services/cdn/utils.go index 58bb87418..1765c560a 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: 1beta.0.0 +API version: 1beta2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.