diff --git a/services/cdn/.openapi-generator/VERSION b/services/cdn/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec4..0000000000 --- a/services/cdn/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/services/cdn/api_default.go b/services/cdn/api_default.go deleted file mode 100644 index 4bedce977c..0000000000 --- a/services/cdn/api_default.go +++ /dev/null @@ -1,3496 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "bytes" - "context" - "fmt" - "io" - "net/http" - "net/url" - "strings" - "time" - - "github.com/stackitcloud/stackit-sdk-go/core/config" - "github.com/stackitcloud/stackit-sdk-go/core/oapierror" -) - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DefaultApi interface { - /* - 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 - @return ApiCreateDistributionRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateDistribution(ctx context.Context, projectId string) ApiCreateDistributionRequest - /* - 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 - @return CreateDistributionResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - CreateDistributionExecute(ctx context.Context, projectId string) (*CreateDistributionResponse, error) - /* - 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 distributionId - @param domain - @return ApiDeleteCustomDomainRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteCustomDomain(ctx context.Context, projectId string, distributionId string, domain string) ApiDeleteCustomDomainRequest - /* - 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 distributionId - @param domain - @return DeleteCustomDomainResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - 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. - - - @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 - @return ApiDeleteDistributionRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteDistribution(ctx context.Context, projectId string, distributionId string) ApiDeleteDistributionRequest - /* - 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 distributionId - @return DeleteDistributionResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - DeleteDistributionExecute(ctx context.Context, projectId string, distributionId string) (*DeleteDistributionResponse, error) - /* - FindCachePaths Return Paths that were purged - This returns paths that are present in the cache purging history. - Only substrings of the provided input are returned. - The response is sorted in descending order by the most recent purge. - - So, assuming you have have the following purged for a distribution - - `/test/1` at `2025-01-01` - - `/test/2` at `2025-01-02` - - `/someOtherPath/1` at `2025-01-03` - - `/test/1` at `2025-01-04` - - `/test/3` at `2025-01-05`, - this would return the following paths, in the following order, assuming `/te` was the search parameter: - - `/test/3` - - `/test/1` - - `/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 distributionId - @return ApiFindCachePathsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - FindCachePaths(ctx context.Context, projectId string, distributionId string) ApiFindCachePathsRequest - /* - 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 distributionId - @return FindCachePathsResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - FindCachePathsExecute(ctx context.Context, projectId string, distributionId string) (*FindCachePathsResponse, error) - /* - GetCacheInfo Get Infos about the Caching State - Return caching info metadata, which contains the last cache purging time and a history of the most recent *full* purges. - - If (and only if) you provide the path query parameter, the history will also contain granular cache purges. - 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 distributionId - @return ApiGetCacheInfoRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetCacheInfo(ctx context.Context, projectId string, distributionId string) ApiGetCacheInfoRequest - /* - 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 distributionId - @return GetCacheInfoResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetCacheInfoExecute(ctx context.Context, projectId string, distributionId string) (*GetCacheInfoResponse, error) - /* - 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 distributionId - @param domain - @return ApiGetCustomDomainRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetCustomDomain(ctx context.Context, projectId string, distributionId string, domain string) ApiGetCustomDomainRequest - /* - 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 distributionId - @param domain - @return GetCustomDomainResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - 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. - - @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 - @return ApiGetDistributionRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetDistribution(ctx context.Context, projectId string, distributionId string) ApiGetDistributionRequest - /* - 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 distributionId - @return GetDistributionResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetDistributionExecute(ctx context.Context, projectId string, distributionId string) (*GetDistributionResponse, 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 - @return ApiGetLogsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetLogs(ctx context.Context, projectId string, distributionId string) ApiGetLogsRequest - /* - 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 - @return GetLogsResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - 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 - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - 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 - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - 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 - time range. The response is a list of statistics records. Each record aggregates the statistics for its time interval. - In case no statistics for a time interval exist, no record is returned. - The time range for which statistics should be returned can be configured using query parameters. - - Timestamps are assumed to be UTC. This is especially important for the "buckets" when you, for example, return daily information. A day always starts and ends at 00:00Z. - - **Important Note:** Lower bounds are inclusive, upper bounds are exclusive. If you, for example, want a daily grouped which starts on the 1st Jan and also contains the full 10th Jan day, you would define `2025-01-01T00:00:00Z` as the lower and `2025-01-11T00:00:00Z` as the upper bound. - - The upper bound is optional. If you omit it, the API will use the start of the next interval as the upper bound. - 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 distributionId - @return ApiGetStatisticsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetStatistics(ctx context.Context, projectId string, distributionId string) ApiGetStatisticsRequest - /* - 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 distributionId - @return GetStatisticsResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - GetStatisticsExecute(ctx context.Context, projectId string, distributionId string) (*GetStatisticsResponse, 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. - - - @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 ApiListDistributionsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListDistributions(ctx context.Context, projectId string) ApiListDistributionsRequest - /* - 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 - @return ListDistributionsResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListDistributionsExecute(ctx context.Context, projectId string) (*ListDistributionsResponse, error) - /* - 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 - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListWafCollections(ctx context.Context, projectId string) ApiListWafCollectionsRequest - /* - 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 - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - 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 distributionId - @return ApiPatchDistributionRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - PatchDistribution(ctx context.Context, projectId string, distributionId string) ApiPatchDistributionRequest - /* - 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 distributionId - @return PatchDistributionResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - PatchDistributionExecute(ctx context.Context, projectId string, distributionId string) (*PatchDistributionResponse, error) - /* - PurgeCache Clear distribution cache - 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 distributionId - @return ApiPurgeCacheRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - PurgeCache(ctx context.Context, projectId string, distributionId string) ApiPurgeCacheRequest - /* - 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 distributionId - @return map[string]interface{} - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - PurgeCacheExecute(ctx context.Context, projectId string, distributionId string) (map[string]interface{}, error) - /* - 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 distributionId - @param domain - @return ApiPutCustomDomainRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - PutCustomDomain(ctx context.Context, projectId string, distributionId string, domain string) ApiPutCustomDomainRequest - /* - 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 distributionId - @param domain - @return PutCustomDomainResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - PutCustomDomainExecute(ctx context.Context, projectId string, distributionId string, domain string) (*PutCustomDomainResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiCreateDistributionRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CreateDistributionPayload(createDistributionPayload CreateDistributionPayload) ApiCreateDistributionRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*CreateDistributionResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteCustomDomainRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - IntentId(intentId string) ApiDeleteCustomDomainRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*DeleteCustomDomainResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiDeleteDistributionRequest interface { - // While optional, it is greatly encouraged to provide an `intentId`. This is used to deduplicate requests. If multiple DELETE-Requests with the same `intentId` are received, all but the first request are dropped. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - IntentId(intentId string) ApiDeleteDistributionRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*DeleteDistributionResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiFindCachePathsRequest interface { - // A substring of the search query. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Path(path string) ApiFindCachePathsRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*FindCachePathsResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetCacheInfoRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - PurgePath(purgePath string) ApiGetCacheInfoRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*GetCacheInfoResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetCustomDomainRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*GetCustomDomainResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetDistributionRequest interface { - // If set, the top level of a distribution contains a `waf` property, which defines the status of the waf. This includes a list of all resolved rules. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - WithWafStatus(withWafStatus bool) ApiGetDistributionRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*GetDistributionResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetLogsRequest interface { - // the start of the time range for which logs should be returned - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - From(from time.Time) ApiGetLogsRequest - // the end of the time range for which logs should be returned. If not specified, \"now\" is used. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - To(to time.Time) ApiGetLogsRequest - // Quantifies how many log entries should be returned on this page. Must be a natural number between 1 and 1000 (inclusive) - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - PageSize(pageSize int32) ApiGetLogsRequest - // Identifier is returned by the previous response and is used to request the next page. As the `pageIdentifier` encodes an element, inserts during pagination will *not* shift the result. So a scenario like: - Start listing first page - Insert new element - Start listing second page will *never* result in an element from the first page to get \"pushed\" to the second page, like it could occur with basic limit + offset pagination. The identifier should be treated as an opaque string and never modified. Only pass values returned by the API. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - PageIdentifier(pageIdentifier string) ApiGetLogsRequest - // Sorts the log messages by a specific field. Defaults to `timestamp`. Supported sort options: - `timestamp` - `dataCenterRegion` - `requestCountryCode` - `statusCode` - `cacheHit` - `size` - `path` - `host` - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - SortBy(sortBy string) ApiGetLogsRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - SortOrder(sortOrder string) ApiGetLogsRequest - // If this is set then only log entries with the chosen WAF rule action/outcome are returned. Specifically, if `ALLOWED` then all requests with no violation are returned. If `BLOCKED` then those where a WAF rule blocked a request and if `LOGGED` then only those requests where the WAF violation was only logged but the request not blocked - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - WafAction(wafAction WAFRuleAction) ApiGetLogsRequest - // Filters by the CDN data center region that served the request. Can be combined with other filters - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - DataCenterRegion(dataCenterRegion string) ApiGetLogsRequest - // Filters by the originating country of the user request. Can be combined with other filters - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - RequestCountryCode(requestCountryCode string) ApiGetLogsRequest - // Filters by the HTTP status code returned to the client. Can be combined with other filters - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - StatusCode(statusCode int32) ApiGetLogsRequest - // Filters based on whether the request was served from the CDN cache. Can be combined with other filters - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - CacheHit(cacheHit bool) ApiGetLogsRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*GetLogsResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetLogsSearchFiltersRequest interface { - // Optional search string. Will search the **values** for the text input. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Filter(filter string) ApiGetLogsSearchFiltersRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*GetLogsSearchFiltersResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiGetStatisticsRequest interface { - // the start of the time range for which statistics should be returned - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - From(from time.Time) ApiGetStatisticsRequest - // the end of the time range for which statistics should be returned. If not specified, the end of the current time interval is used, e.g. next day for daily, next month for monthly, and so on. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - To(to time.Time) ApiGetStatisticsRequest - // Over which interval should statistics be aggregated? defaults to hourly resolution **NOTE**: Intervals are grouped in buckets that start and end based on a day in UTC+0 time. So for the `daily` interval, the group starts (inclusive) and ends (exclusive) at `00:00Z` - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Interval(interval string) ApiGetStatisticsRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*GetStatisticsResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListDistributionsRequest interface { - // Quantifies how many distributions should be returned on this page. Must be a natural number between 1 and 100 (inclusive) - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - PageSize(pageSize int32) ApiListDistributionsRequest - // If set, the top level of a distribution contains a `waf` property, which defines the status of the waf. This includes a list of all resolved rules. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - 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. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - 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 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. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - SortBy(sortBy string) ApiListDistributionsRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - SortOrder(sortOrder string) ApiListDistributionsRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ListDistributionsResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListWafCollectionsRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ListWafCollectionsResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiPatchDistributionRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - PatchDistributionPayload(patchDistributionPayload PatchDistributionPayload) ApiPatchDistributionRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*PatchDistributionResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiPurgeCacheRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - PurgeCachePayload(purgeCachePayload PurgeCachePayload) ApiPurgeCacheRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (map[string]interface{}, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiPutCustomDomainRequest interface { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - PutCustomDomainPayload(putCustomDomainPayload PutCustomDomainPayload) ApiPutCustomDomainRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*PutCustomDomainResponse, error) -} - -// DefaultApiService DefaultApi service -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DefaultApiService service - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - createDistributionPayload *CreateDistributionPayload -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateDistributionRequest) CreateDistributionPayload(createDistributionPayload CreateDistributionPayload) ApiCreateDistributionRequest { - r.createDistributionPayload = &createDistributionPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r CreateDistributionRequest) Execute() (*CreateDistributionResponse, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CreateDistributionResponse - ) - 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.CreateDistribution") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/projects/{projectId}/distributions" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.createDistributionPayload == nil { - return localVarReturnValue, fmt.Errorf("createDistributionPayload is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.createDistributionPayload - 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 -} - -/* -CreateDistribution: Create new distribution - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiCreateDistributionRequest -*/ -func (a *APIClient) CreateDistribution(ctx context.Context, projectId string) ApiCreateDistributionRequest { - return CreateDistributionRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreateDistributionExecute(ctx context.Context, projectId string) (*CreateDistributionResponse, error) { - r := CreateDistributionRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteCustomDomainRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - distributionId string - domain string - intentId *string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteCustomDomainRequest) IntentId(intentId string) ApiDeleteCustomDomainRequest { - r.intentId = &intentId - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteCustomDomainRequest) Execute() (*DeleteCustomDomainResponse, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DeleteCustomDomainResponse - ) - 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.DeleteCustomDomain") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(ParameterValueToString(r.domain, "domain")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.domain) > 72 { - return localVarReturnValue, fmt.Errorf("domain must have less than 72 elements") - } - - if r.intentId != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "intentId", r.intentId, "") - } - // 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 == 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 -} - -/* -DeleteCustomDomain: Delete a custom domain - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 - @param domain - @return ApiDeleteCustomDomainRequest -*/ -func (a *APIClient) DeleteCustomDomain(ctx context.Context, projectId string, distributionId string, domain string) ApiDeleteCustomDomainRequest { - return DeleteCustomDomainRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - domain: domain, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteCustomDomainExecute(ctx context.Context, projectId string, distributionId string, domain string) (*DeleteCustomDomainResponse, error) { - r := DeleteCustomDomainRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - domain: domain, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteDistributionRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - distributionId string - intentId *string -} - -// While optional, it is greatly encouraged to provide an `intentId`. This is used to deduplicate requests. If multiple DELETE-Requests with the same `intentId` are received, all but the first request are dropped. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteDistributionRequest) IntentId(intentId string) ApiDeleteDistributionRequest { - r.intentId = &intentId - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r DeleteDistributionRequest) Execute() (*DeleteDistributionResponse, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DeleteDistributionResponse - ) - 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.DeleteDistribution") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.intentId != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "intentId", r.intentId, "") - } - // 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 == 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 -} - -/* -DeleteDistribution: Delete distribution - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 - @return ApiDeleteDistributionRequest -*/ -func (a *APIClient) DeleteDistribution(ctx context.Context, projectId string, distributionId string) ApiDeleteDistributionRequest { - return DeleteDistributionRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteDistributionExecute(ctx context.Context, projectId string, distributionId string) (*DeleteDistributionResponse, error) { - r := DeleteDistributionRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FindCachePathsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - distributionId string - path *string -} - -// A substring of the search query. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r FindCachePathsRequest) Path(path string) ApiFindCachePathsRequest { - r.path = &path - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r FindCachePathsRequest) Execute() (*FindCachePathsResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *FindCachePathsResponse - ) - 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.FindCachePaths") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}/cache/paths" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.path == nil { - return localVarReturnValue, fmt.Errorf("path is required and must be specified") - } - - parameterAddToHeaderOrQuery(localVarQueryParams, "path", r.path, "") - // 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 == 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 -} - -/* -FindCachePaths: Return Paths that were purged - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 - @return ApiFindCachePathsRequest -*/ -func (a *APIClient) FindCachePaths(ctx context.Context, projectId string, distributionId string) ApiFindCachePathsRequest { - return FindCachePathsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) FindCachePathsExecute(ctx context.Context, projectId string, distributionId string) (*FindCachePathsResponse, error) { - r := FindCachePathsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCacheInfoRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - distributionId string - purgePath *string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetCacheInfoRequest) PurgePath(purgePath string) ApiGetCacheInfoRequest { - r.purgePath = &purgePath - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetCacheInfoRequest) Execute() (*GetCacheInfoResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetCacheInfoResponse - ) - 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.GetCacheInfo") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}/cache" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.purgePath != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "purgePath", r.purgePath, "") - } - // 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 == 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 -} - -/* -GetCacheInfo: Get Infos about the Caching State - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 - @return ApiGetCacheInfoRequest -*/ -func (a *APIClient) GetCacheInfo(ctx context.Context, projectId string, distributionId string) ApiGetCacheInfoRequest { - return GetCacheInfoRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetCacheInfoExecute(ctx context.Context, projectId string, distributionId string) (*GetCacheInfoResponse, error) { - r := GetCacheInfoRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - distributionId string - domain string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetCustomDomainRequest) Execute() (*GetCustomDomainResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetCustomDomainResponse - ) - 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.GetCustomDomain") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(ParameterValueToString(r.domain, "domain")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.domain) > 72 { - return localVarReturnValue, fmt.Errorf("domain must have less than 72 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "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 == 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 == 404 { - 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 == 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 -} - -/* -GetCustomDomain: Retrieve a specific custom domain - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 - @param domain - @return ApiGetCustomDomainRequest -*/ -func (a *APIClient) GetCustomDomain(ctx context.Context, projectId string, distributionId string, domain string) ApiGetCustomDomainRequest { - return GetCustomDomainRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - domain: domain, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetCustomDomainExecute(ctx context.Context, projectId string, distributionId string, domain string) (*GetCustomDomainResponse, error) { - r := GetCustomDomainRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - domain: domain, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetDistributionRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - distributionId string - withWafStatus *bool -} - -// If set, the top level of a distribution contains a `waf` property, which defines the status of the waf. This includes a list of all resolved rules. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetDistributionRequest) WithWafStatus(withWafStatus bool) ApiGetDistributionRequest { - r.withWafStatus = &withWafStatus - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetDistributionRequest) Execute() (*GetDistributionResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetDistributionResponse - ) - 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.GetDistribution") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.withWafStatus != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "withWafStatus", r.withWafStatus, "") - } - // 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 == 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 == 404 { - 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 == 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 -} - -/* -GetDistribution: Get distribution by Id - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 - @return ApiGetDistributionRequest -*/ -func (a *APIClient) GetDistribution(ctx context.Context, projectId string, distributionId string) ApiGetDistributionRequest { - return GetDistributionRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetDistributionExecute(ctx context.Context, projectId string, distributionId string) (*GetDistributionResponse, error) { - r := GetDistributionRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - distributionId string - from *time.Time - to *time.Time - pageSize *int32 - pageIdentifier *string - sortBy *string - sortOrder *string - wafAction *WAFRuleAction - dataCenterRegion *string - requestCountryCode *string - statusCode *int32 - cacheHit *bool -} - -// the start of the time range for which logs should be returned -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetLogsRequest) From(from time.Time) ApiGetLogsRequest { - r.from = &from - return r -} - -// the end of the time range for which logs should be returned. If not specified, \"now\" is used. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetLogsRequest) To(to time.Time) ApiGetLogsRequest { - r.to = &to - return r -} - -// Quantifies how many log entries should be returned on this page. Must be a natural number between 1 and 1000 (inclusive) -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetLogsRequest) PageSize(pageSize int32) ApiGetLogsRequest { - r.pageSize = &pageSize - return r -} - -// 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetLogsRequest) PageIdentifier(pageIdentifier string) ApiGetLogsRequest { - r.pageIdentifier = &pageIdentifier - return r -} - -// Sorts the log messages by a specific field. Defaults to `timestamp`. Supported sort options: - `timestamp` - `dataCenterRegion` - `requestCountryCode` - `statusCode` - `cacheHit` - `size` - `path` - `host` -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetLogsRequest) SortBy(sortBy string) ApiGetLogsRequest { - r.sortBy = &sortBy - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetLogsRequest) SortOrder(sortOrder string) ApiGetLogsRequest { - r.sortOrder = &sortOrder - return r -} - -// If this is set then only log entries with the chosen WAF rule action/outcome are returned. Specifically, if `ALLOWED` then all requests with no violation are returned. If `BLOCKED` then those where a WAF rule blocked a request and if `LOGGED` then only those requests where the WAF violation was only logged but the request not blocked -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetLogsRequest) WafAction(wafAction WAFRuleAction) ApiGetLogsRequest { - r.wafAction = &wafAction - return r -} - -// Filters by the CDN data center region that served the request. Can be combined with other filters -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetLogsRequest) DataCenterRegion(dataCenterRegion string) ApiGetLogsRequest { - r.dataCenterRegion = &dataCenterRegion - return r -} - -// Filters by the originating country of the user request. Can be combined with other filters -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetLogsRequest) RequestCountryCode(requestCountryCode string) ApiGetLogsRequest { - r.requestCountryCode = &requestCountryCode - return r -} - -// Filters by the HTTP status code returned to the client. Can be combined with other filters -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetLogsRequest) StatusCode(statusCode int32) ApiGetLogsRequest { - r.statusCode = &statusCode - return r -} - -// Filters based on whether the request was served from the CDN cache. Can be combined with other filters -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetLogsRequest) CacheHit(cacheHit bool) ApiGetLogsRequest { - r.cacheHit = &cacheHit - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetLogsRequest) Execute() (*GetLogsResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetLogsResponse - ) - 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.GetLogs") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}/logs" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.from != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "from", r.from, "") - } - if r.to != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "to", r.to, "") - } - if r.pageSize != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "") - } - if r.pageIdentifier != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "pageIdentifier", r.pageIdentifier, "") - } - if r.sortBy != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "sortBy", r.sortBy, "") - } - if r.sortOrder != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "sortOrder", r.sortOrder, "") - } - if r.wafAction != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "wafAction", r.wafAction, "") - } - if r.dataCenterRegion != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "dataCenterRegion", r.dataCenterRegion, "") - } - if r.requestCountryCode != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "requestCountryCode", r.requestCountryCode, "") - } - if r.statusCode != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "statusCode", r.statusCode, "") - } - if r.cacheHit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cacheHit", r.cacheHit, "") - } - // 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 == 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 -} - -/* -GetLogs: Retrieve distribution logs -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiGetLogsRequest -*/ -func (a *APIClient) GetLogs(ctx context.Context, projectId string, distributionId string) ApiGetLogsRequest { - return GetLogsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetLogsExecute(ctx context.Context, projectId string, distributionId string) (*GetLogsResponse, error) { - r := GetLogsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - distributionId string - filter *string -} - -// Optional search string. Will search the **values** for the text input. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetLogsSearchFiltersRequest) Filter(filter string) ApiGetLogsSearchFiltersRequest { - r.filter = &filter - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetLogsSearchFiltersRequest) Execute() (*GetLogsSearchFiltersResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetLogsSearchFiltersResponse - ) - a := r.apiService - client, ok := a.client.(*APIClient) - if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") - } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetLogsSearchFilters") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}/logs/searchFilters" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.filter != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "filter", r.filter, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericJsonResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v string - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v GenericJsonResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericJsonResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - var v GenericJsonResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -/* -GetLogsSearchFilters: Get relevant search filters for this distribution based on user input. -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetStatisticsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - distributionId string - from *time.Time - to *time.Time - interval *string -} - -// the start of the time range for which statistics should be returned -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetStatisticsRequest) From(from time.Time) ApiGetStatisticsRequest { - r.from = &from - return r -} - -// the end of the time range for which statistics should be returned. If not specified, the end of the current time interval is used, e.g. next day for daily, next month for monthly, and so on. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetStatisticsRequest) To(to time.Time) ApiGetStatisticsRequest { - r.to = &to - return r -} - -// Over which interval should statistics be aggregated? defaults to hourly resolution **NOTE**: Intervals are grouped in buckets that start and end based on a day in UTC+0 time. So for the `daily` interval, the group starts (inclusive) and ends (exclusive) at `00:00Z` -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetStatisticsRequest) Interval(interval string) ApiGetStatisticsRequest { - r.interval = &interval - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r GetStatisticsRequest) Execute() (*GetStatisticsResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetStatisticsResponse - ) - 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.GetStatistics") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}/statistics" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.from == nil { - return localVarReturnValue, fmt.Errorf("from is required and must be specified") - } - - parameterAddToHeaderOrQuery(localVarQueryParams, "from", r.from, "") - if r.to != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "to", r.to, "") - } - if r.interval != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "interval", r.interval, "") - } - // 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 == 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 -} - -/* -GetStatistics: Retrieve the statistics of a distribution - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 - @return ApiGetStatisticsRequest -*/ -func (a *APIClient) GetStatistics(ctx context.Context, projectId string, distributionId string) ApiGetStatisticsRequest { - return GetStatisticsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetStatisticsExecute(ctx context.Context, projectId string, distributionId string) (*GetStatisticsResponse, error) { - r := GetStatisticsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListDistributionsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - pageSize *int32 - withWafStatus *bool - pageIdentifier *string - sortBy *string - sortOrder *string -} - -// Quantifies how many distributions should be returned on this page. Must be a natural number between 1 and 100 (inclusive) -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListDistributionsRequest) PageSize(pageSize int32) ApiListDistributionsRequest { - r.pageSize = &pageSize - return r -} - -// If set, the top level of a distribution contains a `waf` property, which defines the status of the waf. This includes a list of all resolved rules. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListDistributionsRequest) WithWafStatus(withWafStatus bool) ApiListDistributionsRequest { - r.withWafStatus = &withWafStatus - return r -} - -// 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListDistributionsRequest) PageIdentifier(pageIdentifier string) ApiListDistributionsRequest { - r.pageIdentifier = &pageIdentifier - 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 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListDistributionsRequest) SortBy(sortBy string) ApiListDistributionsRequest { - r.sortBy = &sortBy - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListDistributionsRequest) SortOrder(sortOrder string) ApiListDistributionsRequest { - r.sortOrder = &sortOrder - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListDistributionsRequest) Execute() (*ListDistributionsResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListDistributionsResponse - ) - 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.ListDistributions") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/projects/{projectId}/distributions" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.pageSize != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "pageSize", r.pageSize, "") - } - if r.withWafStatus != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "withWafStatus", r.withWafStatus, "") - } - if r.pageIdentifier != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "pageIdentifier", r.pageIdentifier, "") - } - if r.sortBy != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "sortBy", r.sortBy, "") - } - if r.sortOrder != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "sortOrder", r.sortOrder, "") - } - // 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 == 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 -} - -/* -ListDistributions: List all distributions belonging to a specific project - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 ApiListDistributionsRequest -*/ -func (a *APIClient) ListDistributions(ctx context.Context, projectId string) ApiListDistributionsRequest { - return ListDistributionsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListDistributionsExecute(ctx context.Context, projectId string) (*ListDistributionsResponse, error) { - r := ListDistributionsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListWafCollectionsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListWafCollectionsRequest) Execute() (*ListWafCollectionsResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - 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") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/projects/{projectId}/waf/collections" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "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 == 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 -} - -/* -ListWafCollections: List all WAF rule collections of the project - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 -*/ -func (a *APIClient) ListWafCollections(ctx context.Context, projectId string) ApiListWafCollectionsRequest { - return ListWafCollectionsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListWafCollectionsExecute(ctx context.Context, projectId string) (*ListWafCollectionsResponse, error) { - r := ListWafCollectionsRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchDistributionRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - distributionId string - patchDistributionPayload *PatchDistributionPayload -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r PatchDistributionRequest) PatchDistributionPayload(patchDistributionPayload PatchDistributionPayload) ApiPatchDistributionRequest { - r.patchDistributionPayload = &patchDistributionPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r PatchDistributionRequest) Execute() (*PatchDistributionResponse, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *PatchDistributionResponse - ) - 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.PatchDistribution") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.patchDistributionPayload - 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 == 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 -} - -/* -PatchDistribution: Update existing distribution - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 - @return ApiPatchDistributionRequest -*/ -func (a *APIClient) PatchDistribution(ctx context.Context, projectId string, distributionId string) ApiPatchDistributionRequest { - return PatchDistributionRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) PatchDistributionExecute(ctx context.Context, projectId string, distributionId string) (*PatchDistributionResponse, error) { - r := PatchDistributionRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PurgeCacheRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - distributionId string - purgeCachePayload *PurgeCachePayload -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r PurgeCacheRequest) PurgeCachePayload(purgeCachePayload PurgeCachePayload) ApiPurgeCacheRequest { - r.purgeCachePayload = &purgeCachePayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r PurgeCacheRequest) Execute() (map[string]interface{}, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue map[string]interface{} - ) - 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.PurgeCache") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}/cache/purge" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.purgeCachePayload - 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 == 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 -} - -/* -PurgeCache: Clear distribution cache - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 - @return ApiPurgeCacheRequest -*/ -func (a *APIClient) PurgeCache(ctx context.Context, projectId string, distributionId string) ApiPurgeCacheRequest { - return PurgeCacheRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) PurgeCacheExecute(ctx context.Context, projectId string, distributionId string) (map[string]interface{}, error) { - r := PurgeCacheRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - distributionId string - domain string - putCustomDomainPayload *PutCustomDomainPayload -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r PutCustomDomainRequest) PutCustomDomainPayload(putCustomDomainPayload PutCustomDomainPayload) ApiPutCustomDomainRequest { - r.putCustomDomainPayload = &putCustomDomainPayload - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r PutCustomDomainRequest) Execute() (*PutCustomDomainResponse, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *PutCustomDomainResponse - ) - 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.PutCustomDomain") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v1/projects/{projectId}/distributions/{distributionId}/customDomains/{domain}" - localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"distributionId"+"}", url.PathEscape(ParameterValueToString(r.distributionId, "distributionId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"domain"+"}", url.PathEscape(ParameterValueToString(r.domain, "domain")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if strlen(r.domain) > 72 { - return localVarReturnValue, fmt.Errorf("domain must have less than 72 elements") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.putCustomDomainPayload - 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 == 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 -} - -/* -PutCustomDomain: Create or update a custom domain - -Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - - @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 - @param domain - @return ApiPutCustomDomainRequest -*/ -func (a *APIClient) PutCustomDomain(ctx context.Context, projectId string, distributionId string, domain string) ApiPutCustomDomainRequest { - return PutCustomDomainRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - domain: domain, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) PutCustomDomainExecute(ctx context.Context, projectId string, distributionId string, domain string) (*PutCustomDomainResponse, error) { - r := PutCustomDomainRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - distributionId: distributionId, - domain: domain, - } - return r.Execute() -} diff --git a/services/cdn/client.go b/services/cdn/client.go deleted file mode 100644 index 1c42aea0c4..0000000000 --- a/services/cdn/client.go +++ /dev/null @@ -1,632 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "fmt" - "io" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - - "github.com/stackitcloud/stackit-sdk-go/core/auth" - "github.com/stackitcloud/stackit-sdk-go/core/config" -) - -var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") -) - -// APIClient manages communication with the STACKIT CDN API API v1.0.0 -// In most cases there should be only one, shared, APIClient. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type APIClient struct { - cfg *config.Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - defaultApi *DefaultApiService -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type service struct { - client DefaultApi -} - -// NewAPIClient creates a new API client. -// Optionally receives configuration options -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error) { - cfg := NewConfiguration() - - for _, option := range opts { - err := option(cfg) - if err != nil { - return nil, fmt.Errorf("configuring the client: %w", err) - } - } - - // using new regional api, so no region is set here - - if cfg.HTTPClient == nil { - cfg.HTTPClient = &http.Client{} - } - - authRoundTripper, err := auth.SetupAuth(cfg) - if err != nil { - return nil, fmt.Errorf("setting up authentication: %w", err) - } - - roundTripper := authRoundTripper - if cfg.Middleware != nil { - roundTripper = config.ChainMiddleware(roundTripper, cfg.Middleware...) - } - - cfg.HTTPClient.Transport = roundTripper - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - c.defaultApi = (*DefaultApiService)(&c.common) - - return c, nil -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func ParameterValueToString(obj interface{}, key string) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param, ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap, err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) -} - -// parameterAddToHeaderOrQuery adds the provided object to the request header or url query -// supporting deep object syntax -func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { - case reflect.Invalid: - value = "invalid" - - case reflect.Struct: - if t, ok := obj.(MappedNullable); ok { - dataMap, err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - var lenIndValue = indValue.Len() - for i := 0; i < lenIndValue; i++ { - var arrayValue = indValue.Index(i) - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, arrayValue.Interface(), collectionType) - } - return - - case reflect.Map: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { - return - } - iter := indValue.MapRange() - for iter.Next() { - k, v := iter.Key(), iter.Value() - parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), collectionType) - } - return - - case reflect.Interface: - fallthrough - case reflect.Ptr: - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), collectionType) - return - - case reflect.Int, reflect.Int8, reflect.Int16, - reflect.Int32, reflect.Int64: - value = strconv.FormatInt(v.Int(), 10) - case reflect.Uint, reflect.Uint8, reflect.Uint16, - reflect.Uint32, reflect.Uint64, reflect.Uintptr: - value = strconv.FormatUint(v.Uint(), 10) - case reflect.Float32, reflect.Float64: - value = strconv.FormatFloat(v.Float(), 'g', -1, 32) - case reflect.Bool: - value = strconv.FormatBool(v.Bool()) - case reflect.String: - value = v.String() - default: - value = v.Type().String() + " value" - } - } - - switch valuesMap := headerOrQueryParams.(type) { - case url.Values: - if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" { - valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value) - } else { - valuesMap.Add(keyPrefix, value) - } - break - case map[string]string: - valuesMap[keyPrefix] = value - break - } -} - -// helper for converting interface{} parameters to json strings -func parameterToJson(obj interface{}) (string, error) { - jsonBuf, err := json.Marshal(obj) - if err != nil { - return "", err - } - return string(jsonBuf), err -} - -// callAPI do the request. -func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { - if c.cfg.Debug { - dump, err := httputil.DumpRequestOut(request, true) - if err != nil { - return nil, err - } - log.Printf("\n%s\n", string(dump)) - } - - resp, err := c.cfg.HTTPClient.Do(request) - if err != nil { - return resp, err - } - - if c.cfg.Debug { - dump, err := httputil.DumpResponse(resp, true) - if err != nil { - return resp, err - } - log.Printf("\n%s\n", string(dump)) - } - return resp, err -} - -// Allow modification of underlying config for alternate implementations and testing -// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (c *APIClient) GetConfig() *config.Configuration { - return c.cfg -} - -type formFile struct { - fileBytes []byte - fileName string - formFileName string -} - -// prepareRequest build the request -func (c *APIClient) prepareRequest( - ctx context.Context, - path string, method string, - postBody interface{}, - headerParams map[string]string, - queryParams url.Values, - formParams url.Values, - formFiles []formFile) (localVarRequest *http.Request, err error) { - - var body *bytes.Buffer - - // Detect postBody type and post. - if !IsNil(postBody) { - contentType := headerParams["Content-Type"] - if contentType == "" { - contentType = detectContentType(postBody) - headerParams["Content-Type"] = contentType - } - - body, err = setBody(postBody, contentType) - if err != nil { - return nil, err - } - } - - // add form parameters and file if available. - if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { - if body != nil { - return nil, fmt.Errorf("cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, fmt.Errorf("cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) - - // Generate a new request - if body != nil { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // Walk through any authentication. - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } - if f, ok := v.(**os.File); ok { - *f, err = os.CreateTemp("", "HttpClientFile") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return fmt.Errorf("unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return fmt.Errorf("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - defer file.Close() - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - if reader, ok := body.(io.Reader); ok { - _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(*os.File); ok { - _, err = bodyBuf.ReadFrom(fp) - } else if b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} diff --git a/services/cdn/configuration.go b/services/cdn/configuration.go deleted file mode 100644 index 4e8c71202d..0000000000 --- a/services/cdn/configuration.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "github.com/stackitcloud/stackit-sdk-go/core/config" -) - -// NewConfiguration returns a new Configuration object -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewConfiguration() *config.Configuration { - cfg := &config.Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "stackit-sdk-go/cdn", - Debug: false, - Servers: config.ServerConfigurations{ - { - URL: "https://cdn.api.stackit.cloud", - Description: "No description provided", - Variables: map[string]config.ServerVariable{ - "region": { - Description: "No description provided", - DefaultValue: "global", - }, - }, - }, - }, - OperationServers: map[string]config.ServerConfigurations{}, - } - return cfg -} diff --git a/services/cdn/go.mod b/services/cdn/go.mod index b440be2602..964e33f84d 100644 --- a/services/cdn/go.mod +++ b/services/cdn/go.mod @@ -4,7 +4,7 @@ go 1.25 require ( github.com/google/go-cmp v0.7.0 - github.com/stackitcloud/stackit-sdk-go/core v0.27.0 + github.com/stackitcloud/stackit-sdk-go/core v0.27.1 ) require ( diff --git a/services/cdn/go.sum b/services/cdn/go.sum index 042f4a71a5..5bae1d1250 100644 --- a/services/cdn/go.sum +++ b/services/cdn/go.sum @@ -4,5 +4,5 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/stackitcloud/stackit-sdk-go/core v0.27.0 h1:7lc6qStcFDFf8zHP4ORPa9joybw+Sa2LtB6BVjKQ+ek= -github.com/stackitcloud/stackit-sdk-go/core v0.27.0/go.mod h1:WU1hhxnjXw2EV7CYa1nlEvNpMiRY6CvmIOaHuL3pOaA= +github.com/stackitcloud/stackit-sdk-go/core v0.27.1 h1:k7SrqqMoHjkvHbx6n6nV3Lt51itp8nNplht6vGHkPhw= +github.com/stackitcloud/stackit-sdk-go/core v0.27.1/go.mod h1:WU1hhxnjXw2EV7CYa1nlEvNpMiRY6CvmIOaHuL3pOaA= diff --git a/services/cdn/model_bucket_backend.go b/services/cdn/model_bucket_backend.go deleted file mode 100644 index 0bdf9c8ae2..0000000000 --- a/services/cdn/model_bucket_backend.go +++ /dev/null @@ -1,376 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// checks if the BucketBackend type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BucketBackend{} - -/* - types and functions for bucketUrl -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendGetBucketUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBucketBackendGetBucketUrlAttributeTypeOk(arg BucketBackendGetBucketUrlAttributeType) (ret BucketBackendGetBucketUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBucketBackendGetBucketUrlAttributeType(arg *BucketBackendGetBucketUrlAttributeType, val BucketBackendGetBucketUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendGetBucketUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendGetBucketUrlRetType = string - -/* - types and functions for region -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendGetRegionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBucketBackendGetRegionAttributeTypeOk(arg BucketBackendGetRegionAttributeType) (ret BucketBackendGetRegionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBucketBackendGetRegionAttributeType(arg *BucketBackendGetRegionAttributeType, val BucketBackendGetRegionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendGetRegionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendGetRegionRetType = string - -/* - types and functions for type -*/ - -// isEnum - -// BucketBackendTypes Defines the type of content origin. For this schema, it must be set to `bucket`. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendTypes string - -// List of Type -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - BUCKETBACKENDTYPE_BUCKET BucketBackendTypes = "bucket" -) - -// All allowed values of BucketBackend enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedBucketBackendTypesEnumValues = []BucketBackendTypes{ - "bucket", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *BucketBackendTypes) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson BucketBackendTypes - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := BucketBackendTypes(value) - for _, existing := range AllowedBucketBackendTypesEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid BucketBackend", value) -} - -// NewBucketBackendTypesFromValue returns a pointer to a valid BucketBackendTypes -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewBucketBackendTypesFromValue(v BucketBackendTypes) (*BucketBackendTypes, error) { - ev := BucketBackendTypes(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for BucketBackendTypes: valid values are %v", v, AllowedBucketBackendTypesEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v BucketBackendTypes) IsValid() bool { - for _, existing := range AllowedBucketBackendTypesEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TypeTypes value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v BucketBackendTypes) Ptr() *BucketBackendTypes { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableBucketBackendTypes struct { - value *BucketBackendTypes - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBucketBackendTypes) Get() *BucketBackendTypes { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBucketBackendTypes) Set(val *BucketBackendTypes) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBucketBackendTypes) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBucketBackendTypes) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableBucketBackendTypes(val *BucketBackendTypes) *NullableBucketBackendTypes { - return &NullableBucketBackendTypes{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBucketBackendTypes) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBucketBackendTypes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendGetTypeAttributeType = *BucketBackendTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendGetTypeArgType = BucketBackendTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendGetTypeRetType = BucketBackendTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBucketBackendGetTypeAttributeTypeOk(arg BucketBackendGetTypeAttributeType) (ret BucketBackendGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBucketBackendGetTypeAttributeType(arg *BucketBackendGetTypeAttributeType, val BucketBackendGetTypeRetType) { - *arg = &val -} - -// BucketBackend struct for BucketBackend -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackend struct { - // The fully qualified URL of your cloud storage bucket (for example, `https://s3.eu-central-1.amazonaws.com/my-bucket`). - // REQUIRED - BucketUrl BucketBackendGetBucketUrlAttributeType `json:"bucketUrl" required:"true"` - // The cloud provider region where your storage bucket is located (for example, `us-west-1` for AWS or `eu01` for STACKIT). - // REQUIRED - Region BucketBackendGetRegionAttributeType `json:"region" required:"true"` - // Defines the type of content origin. For this schema, it must be set to `bucket`. - // REQUIRED - Type BucketBackendGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewBucketBackendWithDefaults() *BucketBackend { - this := BucketBackend{} - return &this -} - -// GetBucketUrl returns the BucketUrl field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackend) GetBucketUrlOk() (ret BucketBackendGetBucketUrlRetType, ok bool) { - return getBucketBackendGetBucketUrlAttributeTypeOk(o.BucketUrl) -} - -// SetBucketUrl sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackend) SetBucketUrl(v BucketBackendGetBucketUrlRetType) { - setBucketBackendGetBucketUrlAttributeType(&o.BucketUrl, v) -} - -// GetRegion returns the Region field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackend) GetRegionOk() (ret BucketBackendGetRegionRetType, ok bool) { - return getBucketBackendGetRegionAttributeTypeOk(o.Region) -} - -// SetRegion sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackend) SetRegion(v BucketBackendGetRegionRetType) { - setBucketBackendGetRegionAttributeType(&o.Region, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackend) GetTypeOk() (ret BucketBackendGetTypeRetType, ok bool) { - return getBucketBackendGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackend) SetType(v BucketBackendGetTypeRetType) { - setBucketBackendGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableBucketBackend struct { - value *BucketBackend - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBucketBackend) Get() *BucketBackend { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBucketBackend) Set(val *BucketBackend) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBucketBackend) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBucketBackend) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableBucketBackend(val *BucketBackend) *NullableBucketBackend { - return &NullableBucketBackend{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBucketBackend) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 deleted file mode 100644 index 293e4de943..0000000000 --- a/services/cdn/model_bucket_backend_create.go +++ /dev/null @@ -1,429 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// checks if the BucketBackendCreate type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BucketBackendCreate{} - -/* - types and functions for bucketUrl -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendCreateGetBucketUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBucketBackendCreateGetBucketUrlAttributeTypeOk(arg BucketBackendCreateGetBucketUrlAttributeType) (ret BucketBackendCreateGetBucketUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBucketBackendCreateGetBucketUrlAttributeType(arg *BucketBackendCreateGetBucketUrlAttributeType, val BucketBackendCreateGetBucketUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendCreateGetBucketUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendCreateGetBucketUrlRetType = string - -/* - types and functions for credentials -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendCreateGetCredentialsAttributeType = *BucketCredentials - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendCreateGetCredentialsArgType = BucketCredentials - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendCreateGetCredentialsRetType = BucketCredentials - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBucketBackendCreateGetCredentialsAttributeTypeOk(arg BucketBackendCreateGetCredentialsAttributeType) (ret BucketBackendCreateGetCredentialsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBucketBackendCreateGetCredentialsAttributeType(arg *BucketBackendCreateGetCredentialsAttributeType, val BucketBackendCreateGetCredentialsRetType) { - *arg = &val -} - -/* - types and functions for region -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendCreateGetRegionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBucketBackendCreateGetRegionAttributeTypeOk(arg BucketBackendCreateGetRegionAttributeType) (ret BucketBackendCreateGetRegionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBucketBackendCreateGetRegionAttributeType(arg *BucketBackendCreateGetRegionAttributeType, val BucketBackendCreateGetRegionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendCreateGetRegionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendCreateGetRegionRetType = string - -/* - types and functions for type -*/ - -// isEnum - -// BucketBackendCreateTypes Defines the type of content origin. For this schema, it must be set to `bucket`. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendCreateTypes string - -// List of Type -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - BUCKETBACKENDCREATETYPE_BUCKET BucketBackendCreateTypes = "bucket" -) - -// All allowed values of BucketBackendCreate enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedBucketBackendCreateTypesEnumValues = []BucketBackendCreateTypes{ - "bucket", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *BucketBackendCreateTypes) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson BucketBackendCreateTypes - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := BucketBackendCreateTypes(value) - for _, existing := range AllowedBucketBackendCreateTypesEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid BucketBackendCreate", value) -} - -// NewBucketBackendCreateTypesFromValue returns a pointer to a valid BucketBackendCreateTypes -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewBucketBackendCreateTypesFromValue(v BucketBackendCreateTypes) (*BucketBackendCreateTypes, error) { - ev := BucketBackendCreateTypes(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for BucketBackendCreateTypes: valid values are %v", v, AllowedBucketBackendCreateTypesEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v BucketBackendCreateTypes) IsValid() bool { - for _, existing := range AllowedBucketBackendCreateTypesEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TypeTypes value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v BucketBackendCreateTypes) Ptr() *BucketBackendCreateTypes { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableBucketBackendCreateTypes struct { - value *BucketBackendCreateTypes - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBucketBackendCreateTypes) Get() *BucketBackendCreateTypes { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBucketBackendCreateTypes) Set(val *BucketBackendCreateTypes) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBucketBackendCreateTypes) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBucketBackendCreateTypes) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableBucketBackendCreateTypes(val *BucketBackendCreateTypes) *NullableBucketBackendCreateTypes { - return &NullableBucketBackendCreateTypes{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBucketBackendCreateTypes) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBucketBackendCreateTypes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendCreateGetTypeAttributeType = *BucketBackendCreateTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendCreateGetTypeArgType = BucketBackendCreateTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendCreateGetTypeRetType = BucketBackendCreateTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBucketBackendCreateGetTypeAttributeTypeOk(arg BucketBackendCreateGetTypeAttributeType) (ret BucketBackendCreateGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBucketBackendCreateGetTypeAttributeType(arg *BucketBackendCreateGetTypeAttributeType, val BucketBackendCreateGetTypeRetType) { - *arg = &val -} - -// BucketBackendCreate struct for BucketBackendCreate -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendCreate struct { - // The fully qualified URL of your cloud storage bucket (for example, `https://s3.eu-central-1.amazonaws.com/my-bucket`). - // REQUIRED - BucketUrl BucketBackendCreateGetBucketUrlAttributeType `json:"bucketUrl" required:"true"` - // REQUIRED - Credentials BucketBackendCreateGetCredentialsAttributeType `json:"credentials" required:"true"` - // The cloud provider region where your storage bucket is located (for example, `us-west-1` for AWS or `eu01` for STACKIT). - // REQUIRED - Region BucketBackendCreateGetRegionAttributeType `json:"region" required:"true"` - // Defines the type of content origin. For this schema, it must be set to `bucket`. - // REQUIRED - Type BucketBackendCreateGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewBucketBackendCreateWithDefaults() *BucketBackendCreate { - this := BucketBackendCreate{} - return &this -} - -// GetBucketUrl returns the BucketUrl field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackendCreate) GetBucketUrlOk() (ret BucketBackendCreateGetBucketUrlRetType, ok bool) { - return getBucketBackendCreateGetBucketUrlAttributeTypeOk(o.BucketUrl) -} - -// SetBucketUrl sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackendCreate) SetBucketUrl(v BucketBackendCreateGetBucketUrlRetType) { - setBucketBackendCreateGetBucketUrlAttributeType(&o.BucketUrl, v) -} - -// GetCredentials returns the Credentials field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackendCreate) GetCredentialsOk() (ret BucketBackendCreateGetCredentialsRetType, ok bool) { - return getBucketBackendCreateGetCredentialsAttributeTypeOk(o.Credentials) -} - -// SetCredentials sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackendCreate) SetCredentials(v BucketBackendCreateGetCredentialsRetType) { - setBucketBackendCreateGetCredentialsAttributeType(&o.Credentials, v) -} - -// GetRegion returns the Region field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackendCreate) GetRegionOk() (ret BucketBackendCreateGetRegionRetType, ok bool) { - return getBucketBackendCreateGetRegionAttributeTypeOk(o.Region) -} - -// SetRegion sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackendCreate) SetRegion(v BucketBackendCreateGetRegionRetType) { - setBucketBackendCreateGetRegionAttributeType(&o.Region, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackendCreate) GetTypeOk() (ret BucketBackendCreateGetTypeRetType, ok bool) { - return getBucketBackendCreateGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackendCreate) SetType(v BucketBackendCreateGetTypeRetType) { - setBucketBackendCreateGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableBucketBackendCreate struct { - value *BucketBackendCreate - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBucketBackendCreate) Get() *BucketBackendCreate { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBucketBackendCreate) Set(val *BucketBackendCreate) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBucketBackendCreate) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBucketBackendCreate) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableBucketBackendCreate(val *BucketBackendCreate) *NullableBucketBackendCreate { - return &NullableBucketBackendCreate{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBucketBackendCreate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 deleted file mode 100644 index 5fdf8550bb..0000000000 --- a/services/cdn/model_bucket_backend_create_test.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn - -import ( - "testing" -) - -// isEnum - -func TestBucketBackendCreateTypes_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"bucket"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := BucketBackendCreateTypes("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/cdn/model_bucket_backend_patch.go b/services/cdn/model_bucket_backend_patch.go deleted file mode 100644 index a3391ccdda..0000000000 --- a/services/cdn/model_bucket_backend_patch.go +++ /dev/null @@ -1,444 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// checks if the BucketBackendPatch type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BucketBackendPatch{} - -/* - types and functions for bucketUrl -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendPatchGetBucketUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBucketBackendPatchGetBucketUrlAttributeTypeOk(arg BucketBackendPatchGetBucketUrlAttributeType) (ret BucketBackendPatchGetBucketUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBucketBackendPatchGetBucketUrlAttributeType(arg *BucketBackendPatchGetBucketUrlAttributeType, val BucketBackendPatchGetBucketUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendPatchGetBucketUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendPatchGetBucketUrlRetType = string - -/* - types and functions for credentials -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendPatchGetCredentialsAttributeType = *BucketCredentials - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendPatchGetCredentialsArgType = BucketCredentials - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendPatchGetCredentialsRetType = BucketCredentials - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBucketBackendPatchGetCredentialsAttributeTypeOk(arg BucketBackendPatchGetCredentialsAttributeType) (ret BucketBackendPatchGetCredentialsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBucketBackendPatchGetCredentialsAttributeType(arg *BucketBackendPatchGetCredentialsAttributeType, val BucketBackendPatchGetCredentialsRetType) { - *arg = &val -} - -/* - types and functions for region -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendPatchGetRegionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBucketBackendPatchGetRegionAttributeTypeOk(arg BucketBackendPatchGetRegionAttributeType) (ret BucketBackendPatchGetRegionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBucketBackendPatchGetRegionAttributeType(arg *BucketBackendPatchGetRegionAttributeType, val BucketBackendPatchGetRegionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendPatchGetRegionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendPatchGetRegionRetType = string - -/* - types and functions for type -*/ - -// isEnum - -// BucketBackendPatchTypes Defines the type of content origin. For this schema, it must be set to `bucket`. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendPatchTypes string - -// List of Type -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - BUCKETBACKENDPATCHTYPE_BUCKET BucketBackendPatchTypes = "bucket" -) - -// All allowed values of BucketBackendPatch enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedBucketBackendPatchTypesEnumValues = []BucketBackendPatchTypes{ - "bucket", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *BucketBackendPatchTypes) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson BucketBackendPatchTypes - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := BucketBackendPatchTypes(value) - for _, existing := range AllowedBucketBackendPatchTypesEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid BucketBackendPatch", value) -} - -// NewBucketBackendPatchTypesFromValue returns a pointer to a valid BucketBackendPatchTypes -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewBucketBackendPatchTypesFromValue(v BucketBackendPatchTypes) (*BucketBackendPatchTypes, error) { - ev := BucketBackendPatchTypes(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for BucketBackendPatchTypes: valid values are %v", v, AllowedBucketBackendPatchTypesEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v BucketBackendPatchTypes) IsValid() bool { - for _, existing := range AllowedBucketBackendPatchTypesEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TypeTypes value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v BucketBackendPatchTypes) Ptr() *BucketBackendPatchTypes { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableBucketBackendPatchTypes struct { - value *BucketBackendPatchTypes - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBucketBackendPatchTypes) Get() *BucketBackendPatchTypes { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBucketBackendPatchTypes) Set(val *BucketBackendPatchTypes) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBucketBackendPatchTypes) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBucketBackendPatchTypes) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableBucketBackendPatchTypes(val *BucketBackendPatchTypes) *NullableBucketBackendPatchTypes { - return &NullableBucketBackendPatchTypes{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBucketBackendPatchTypes) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBucketBackendPatchTypes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendPatchGetTypeAttributeType = *BucketBackendPatchTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendPatchGetTypeArgType = BucketBackendPatchTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendPatchGetTypeRetType = BucketBackendPatchTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBucketBackendPatchGetTypeAttributeTypeOk(arg BucketBackendPatchGetTypeAttributeType) (ret BucketBackendPatchGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBucketBackendPatchGetTypeAttributeType(arg *BucketBackendPatchGetTypeAttributeType, val BucketBackendPatchGetTypeRetType) { - *arg = &val -} - -// BucketBackendPatch struct for BucketBackendPatch -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketBackendPatch struct { - // The fully qualified URL of your cloud storage bucket (for example, `https://s3.eu-central-1.amazonaws.com/my-bucket`). - BucketUrl BucketBackendPatchGetBucketUrlAttributeType `json:"bucketUrl,omitempty"` - Credentials BucketBackendPatchGetCredentialsAttributeType `json:"credentials,omitempty"` - // The cloud provider region where your storage bucket is located (for example, `us-west-1` for AWS or `eu01` for STACKIT). - Region BucketBackendPatchGetRegionAttributeType `json:"region,omitempty"` - // Defines the type of content origin. For this schema, it must be set to `bucket`. - // REQUIRED - Type BucketBackendPatchGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewBucketBackendPatchWithDefaults() *BucketBackendPatch { - this := BucketBackendPatch{} - return &this -} - -// GetBucketUrl returns the BucketUrl field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackendPatch) GetBucketUrlOk() (ret BucketBackendPatchGetBucketUrlRetType, ok bool) { - return getBucketBackendPatchGetBucketUrlAttributeTypeOk(o.BucketUrl) -} - -// HasBucketUrl returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackendPatch) SetBucketUrl(v BucketBackendPatchGetBucketUrlRetType) { - setBucketBackendPatchGetBucketUrlAttributeType(&o.BucketUrl, v) -} - -// GetCredentials returns the Credentials field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackendPatch) GetCredentialsOk() (ret BucketBackendPatchGetCredentialsRetType, ok bool) { - return getBucketBackendPatchGetCredentialsAttributeTypeOk(o.Credentials) -} - -// HasCredentials returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackendPatch) SetCredentials(v BucketBackendPatchGetCredentialsRetType) { - setBucketBackendPatchGetCredentialsAttributeType(&o.Credentials, v) -} - -// GetRegion returns the Region field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackendPatch) GetRegionOk() (ret BucketBackendPatchGetRegionRetType, ok bool) { - return getBucketBackendPatchGetRegionAttributeTypeOk(o.Region) -} - -// HasRegion returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackendPatch) SetRegion(v BucketBackendPatchGetRegionRetType) { - setBucketBackendPatchGetRegionAttributeType(&o.Region, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackendPatch) GetTypeOk() (ret BucketBackendPatchGetTypeRetType, ok bool) { - return getBucketBackendPatchGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketBackendPatch) SetType(v BucketBackendPatchGetTypeRetType) { - setBucketBackendPatchGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableBucketBackendPatch struct { - value *BucketBackendPatch - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBucketBackendPatch) Get() *BucketBackendPatch { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBucketBackendPatch) Set(val *BucketBackendPatch) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBucketBackendPatch) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBucketBackendPatch) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableBucketBackendPatch(val *BucketBackendPatch) *NullableBucketBackendPatch { - return &NullableBucketBackendPatch{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBucketBackendPatch) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 deleted file mode 100644 index 961bbcaaca..0000000000 --- a/services/cdn/model_bucket_backend_patch_test.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn - -import ( - "testing" -) - -// isEnum - -func TestBucketBackendPatchTypes_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"bucket"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := BucketBackendPatchTypes("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/cdn/model_bucket_backend_test.go b/services/cdn/model_bucket_backend_test.go deleted file mode 100644 index cc0f55377a..0000000000 --- a/services/cdn/model_bucket_backend_test.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn - -import ( - "testing" -) - -// isEnum - -func TestBucketBackendTypes_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"bucket"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := BucketBackendTypes("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/cdn/model_bucket_credentials.go b/services/cdn/model_bucket_credentials.go deleted file mode 100644 index f44e8aad82..0000000000 --- a/services/cdn/model_bucket_credentials.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketCredentialsGetAccessKeyIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBucketCredentialsGetAccessKeyIdAttributeTypeOk(arg BucketCredentialsGetAccessKeyIdAttributeType) (ret BucketCredentialsGetAccessKeyIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBucketCredentialsGetAccessKeyIdAttributeType(arg *BucketCredentialsGetAccessKeyIdAttributeType, val BucketCredentialsGetAccessKeyIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketCredentialsGetAccessKeyIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketCredentialsGetAccessKeyIdRetType = string - -/* - types and functions for secretAccessKey -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketCredentialsGetSecretAccessKeyAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBucketCredentialsGetSecretAccessKeyAttributeTypeOk(arg BucketCredentialsGetSecretAccessKeyAttributeType) (ret BucketCredentialsGetSecretAccessKeyRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBucketCredentialsGetSecretAccessKeyAttributeType(arg *BucketCredentialsGetSecretAccessKeyAttributeType, val BucketCredentialsGetSecretAccessKeyRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketCredentialsGetSecretAccessKeyArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketCredentialsGetSecretAccessKeyRetType = string - -// BucketCredentials struct for BucketCredentials -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BucketCredentials struct { - // REQUIRED - AccessKeyId BucketCredentialsGetAccessKeyIdAttributeType `json:"accessKeyId" required:"true"` - // REQUIRED - SecretAccessKey BucketCredentialsGetSecretAccessKeyAttributeType `json:"secretAccessKey" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewBucketCredentialsWithDefaults() *BucketCredentials { - this := BucketCredentials{} - return &this -} - -// GetAccessKeyId returns the AccessKeyId field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketCredentials) GetAccessKeyIdOk() (ret BucketCredentialsGetAccessKeyIdRetType, ok bool) { - return getBucketCredentialsGetAccessKeyIdAttributeTypeOk(o.AccessKeyId) -} - -// SetAccessKeyId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketCredentials) SetAccessKeyId(v BucketCredentialsGetAccessKeyIdRetType) { - setBucketCredentialsGetAccessKeyIdAttributeType(&o.AccessKeyId, v) -} - -// GetSecretAccessKey returns the SecretAccessKey field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketCredentials) GetSecretAccessKeyOk() (ret BucketCredentialsGetSecretAccessKeyRetType, ok bool) { - return getBucketCredentialsGetSecretAccessKeyAttributeTypeOk(o.SecretAccessKey) -} - -// SetSecretAccessKey sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BucketCredentials) SetSecretAccessKey(v BucketCredentialsGetSecretAccessKeyRetType) { - setBucketCredentialsGetSecretAccessKeyAttributeType(&o.SecretAccessKey, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableBucketCredentials struct { - value *BucketCredentials - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBucketCredentials) Get() *BucketCredentials { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBucketCredentials) Set(val *BucketCredentials) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBucketCredentials) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBucketCredentials) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableBucketCredentials(val *BucketCredentials) *NullableBucketCredentials { - return &NullableBucketCredentials{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBucketCredentials) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_bucket_credentials_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_cache_config.go b/services/cdn/model_cache_config.go deleted file mode 100644 index c2052a14fd..0000000000 --- a/services/cdn/model_cache_config.go +++ /dev/null @@ -1,258 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the CacheConfig type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CacheConfig{} - -/* - types and functions for cacheKeyHeaders -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigGetCacheKeyHeadersAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigGetCacheKeyHeadersArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigGetCacheKeyHeadersRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCacheConfigGetCacheKeyHeadersAttributeTypeOk(arg CacheConfigGetCacheKeyHeadersAttributeType) (ret CacheConfigGetCacheKeyHeadersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCacheConfigGetCacheKeyHeadersAttributeType(arg *CacheConfigGetCacheKeyHeadersAttributeType, val CacheConfigGetCacheKeyHeadersRetType) { - *arg = &val -} - -/* - types and functions for queryStringVaryEnabled -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfiggetQueryStringVaryEnabledAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfiggetQueryStringVaryEnabledArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfiggetQueryStringVaryEnabledRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCacheConfiggetQueryStringVaryEnabledAttributeTypeOk(arg CacheConfiggetQueryStringVaryEnabledAttributeType) (ret CacheConfiggetQueryStringVaryEnabledRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCacheConfiggetQueryStringVaryEnabledAttributeType(arg *CacheConfiggetQueryStringVaryEnabledAttributeType, val CacheConfiggetQueryStringVaryEnabledRetType) { - *arg = &val -} - -/* - types and functions for queryStringVaryParameters -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigGetQueryStringVaryParametersAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigGetQueryStringVaryParametersArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigGetQueryStringVaryParametersRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCacheConfigGetQueryStringVaryParametersAttributeTypeOk(arg CacheConfigGetQueryStringVaryParametersAttributeType) (ret CacheConfigGetQueryStringVaryParametersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCacheConfigGetQueryStringVaryParametersAttributeType(arg *CacheConfigGetQueryStringVaryParametersAttributeType, val CacheConfigGetQueryStringVaryParametersRetType) { - *arg = &val -} - -// CacheConfig Groups the cache options that influence how the CDN builds its cache key. **Cache cardinality warning:** enabling query-string vary produces one cache entry per unique query-string combination (**unbounded** when `queryStringVaryParameters` is empty). Each entry in `cacheKeyHeaders` multiplies the number of cache variants by the number of distinct values observed for that header. Use these settings sparingly. `queryStringVaryParameters` is stored independently of `queryStringVaryEnabled` so that this feature can be toggled on and off without losing the configured allowlist. Only `queryStringVaryEnabled` gates whether the parameter allowlist actually varies the cache. **Optimizer interaction:** when the Optimizer is enabled, the CDN automatically enables query-string vary for image responses regardless of this setting. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfig struct { - // HTTP request header names whose values participate in the cache key. Each entry multiplies the number of cache variants by the number of distinct values observed for that header. - // REQUIRED - CacheKeyHeaders CacheConfigGetCacheKeyHeadersAttributeType `json:"cacheKeyHeaders" required:"true"` - // When true, the CDN varies its cache by the request query string. If `queryStringVaryParameters` is empty, every unique query-string combination produces its own cache entry; if non-empty, only the listed parameters influence the cache key. - // REQUIRED - QueryStringVaryEnabled CacheConfiggetQueryStringVaryEnabledAttributeType `json:"queryStringVaryEnabled" required:"true"` - // Allowlist of query-string parameter names that participate in the cache key when `queryStringVaryEnabled` is true. Ignored while `queryStringVaryEnabled` is false, but still stored so it can be re-activated without losing the list. - // REQUIRED - QueryStringVaryParameters CacheConfigGetQueryStringVaryParametersAttributeType `json:"queryStringVaryParameters" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _CacheConfig CacheConfig - -// NewCacheConfig instantiates a new CacheConfig 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCacheConfig(cacheKeyHeaders CacheConfigGetCacheKeyHeadersArgType, queryStringVaryEnabled CacheConfiggetQueryStringVaryEnabledArgType, queryStringVaryParameters CacheConfigGetQueryStringVaryParametersArgType) *CacheConfig { - this := CacheConfig{} - setCacheConfigGetCacheKeyHeadersAttributeType(&this.CacheKeyHeaders, cacheKeyHeaders) - setCacheConfiggetQueryStringVaryEnabledAttributeType(&this.QueryStringVaryEnabled, queryStringVaryEnabled) - setCacheConfigGetQueryStringVaryParametersAttributeType(&this.QueryStringVaryParameters, queryStringVaryParameters) - return &this -} - -// NewCacheConfigWithDefaults instantiates a new CacheConfig 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCacheConfigWithDefaults() *CacheConfig { - this := CacheConfig{} - return &this -} - -// GetCacheKeyHeaders returns the CacheKeyHeaders field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfig) GetCacheKeyHeaders() (ret CacheConfigGetCacheKeyHeadersRetType) { - ret, _ = o.GetCacheKeyHeadersOk() - return ret -} - -// GetCacheKeyHeadersOk returns a tuple with the CacheKeyHeaders field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfig) GetCacheKeyHeadersOk() (ret CacheConfigGetCacheKeyHeadersRetType, ok bool) { - return getCacheConfigGetCacheKeyHeadersAttributeTypeOk(o.CacheKeyHeaders) -} - -// SetCacheKeyHeaders sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfig) SetCacheKeyHeaders(v CacheConfigGetCacheKeyHeadersRetType) { - setCacheConfigGetCacheKeyHeadersAttributeType(&o.CacheKeyHeaders, v) -} - -// GetQueryStringVaryEnabled returns the QueryStringVaryEnabled field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfig) GetQueryStringVaryEnabled() (ret CacheConfiggetQueryStringVaryEnabledRetType) { - ret, _ = o.GetQueryStringVaryEnabledOk() - return ret -} - -// GetQueryStringVaryEnabledOk returns a tuple with the QueryStringVaryEnabled field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfig) GetQueryStringVaryEnabledOk() (ret CacheConfiggetQueryStringVaryEnabledRetType, ok bool) { - return getCacheConfiggetQueryStringVaryEnabledAttributeTypeOk(o.QueryStringVaryEnabled) -} - -// SetQueryStringVaryEnabled sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfig) SetQueryStringVaryEnabled(v CacheConfiggetQueryStringVaryEnabledRetType) { - setCacheConfiggetQueryStringVaryEnabledAttributeType(&o.QueryStringVaryEnabled, v) -} - -// GetQueryStringVaryParameters returns the QueryStringVaryParameters field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfig) GetQueryStringVaryParameters() (ret CacheConfigGetQueryStringVaryParametersRetType) { - ret, _ = o.GetQueryStringVaryParametersOk() - return ret -} - -// GetQueryStringVaryParametersOk returns a tuple with the QueryStringVaryParameters field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfig) GetQueryStringVaryParametersOk() (ret CacheConfigGetQueryStringVaryParametersRetType, ok bool) { - return getCacheConfigGetQueryStringVaryParametersAttributeTypeOk(o.QueryStringVaryParameters) -} - -// SetQueryStringVaryParameters sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfig) SetQueryStringVaryParameters(v CacheConfigGetQueryStringVaryParametersRetType) { - setCacheConfigGetQueryStringVaryParametersAttributeType(&o.QueryStringVaryParameters, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CacheConfig) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCacheConfigGetCacheKeyHeadersAttributeTypeOk(o.CacheKeyHeaders); ok { - toSerialize["CacheKeyHeaders"] = val - } - if val, ok := getCacheConfiggetQueryStringVaryEnabledAttributeTypeOk(o.QueryStringVaryEnabled); ok { - toSerialize["QueryStringVaryEnabled"] = val - } - if val, ok := getCacheConfigGetQueryStringVaryParametersAttributeTypeOk(o.QueryStringVaryParameters); ok { - toSerialize["QueryStringVaryParameters"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCacheConfig struct { - value *CacheConfig - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCacheConfig) Get() *CacheConfig { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCacheConfig) Set(val *CacheConfig) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCacheConfig) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCacheConfig) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableCacheConfig(val *CacheConfig) *NullableCacheConfig { - return &NullableCacheConfig{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCacheConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCacheConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_cache_config_create.go b/services/cdn/model_cache_config_create.go deleted file mode 100644 index d10d3f927d..0000000000 --- a/services/cdn/model_cache_config_create.go +++ /dev/null @@ -1,272 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the CacheConfigCreate type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CacheConfigCreate{} - -/* - types and functions for cacheKeyHeaders -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigCreateGetCacheKeyHeadersAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigCreateGetCacheKeyHeadersArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigCreateGetCacheKeyHeadersRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCacheConfigCreateGetCacheKeyHeadersAttributeTypeOk(arg CacheConfigCreateGetCacheKeyHeadersAttributeType) (ret CacheConfigCreateGetCacheKeyHeadersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCacheConfigCreateGetCacheKeyHeadersAttributeType(arg *CacheConfigCreateGetCacheKeyHeadersAttributeType, val CacheConfigCreateGetCacheKeyHeadersRetType) { - *arg = &val -} - -/* - types and functions for queryStringVaryEnabled -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigCreategetQueryStringVaryEnabledAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigCreategetQueryStringVaryEnabledArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigCreategetQueryStringVaryEnabledRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCacheConfigCreategetQueryStringVaryEnabledAttributeTypeOk(arg CacheConfigCreategetQueryStringVaryEnabledAttributeType) (ret CacheConfigCreategetQueryStringVaryEnabledRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCacheConfigCreategetQueryStringVaryEnabledAttributeType(arg *CacheConfigCreategetQueryStringVaryEnabledAttributeType, val CacheConfigCreategetQueryStringVaryEnabledRetType) { - *arg = &val -} - -/* - types and functions for queryStringVaryParameters -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigCreateGetQueryStringVaryParametersAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigCreateGetQueryStringVaryParametersArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigCreateGetQueryStringVaryParametersRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCacheConfigCreateGetQueryStringVaryParametersAttributeTypeOk(arg CacheConfigCreateGetQueryStringVaryParametersAttributeType) (ret CacheConfigCreateGetQueryStringVaryParametersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCacheConfigCreateGetQueryStringVaryParametersAttributeType(arg *CacheConfigCreateGetQueryStringVaryParametersAttributeType, val CacheConfigCreateGetQueryStringVaryParametersRetType) { - *arg = &val -} - -// CacheConfigCreate Groups the cache options that influence how the CDN builds its cache key on distribution creation. **Cache cardinality warning:** enabling query-string vary produces one cache entry per unique query-string combination (**unbounded** when `queryStringVaryParameters` is empty). Each entry in `cacheKeyHeaders` multiplies the number of cache variants by the number of distinct values observed for that header. Use these settings sparingly. `queryStringVaryParameters` is stored independently of `queryStringVaryEnabled` so that this feature can be toggled on and off without losing the configured allowlist. Only `queryStringVaryEnabled` gates whether the parameter allowlist actually varies the cache. **Optimizer interaction:** when the Optimizer is enabled, the CDN automatically enables query-string vary for image responses regardless of this setting. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigCreate struct { - // HTTP request header names whose values participate in the cache key. Each entry multiplies the number of cache variants by the number of distinct values observed for that header. - CacheKeyHeaders CacheConfigCreateGetCacheKeyHeadersAttributeType `json:"cacheKeyHeaders,omitempty"` - // When true, the CDN varies its cache by the request query string. If `queryStringVaryParameters` is empty, every unique query-string combination produces its own cache entry; if non-empty, only the listed parameters influence the cache key. - QueryStringVaryEnabled CacheConfigCreategetQueryStringVaryEnabledAttributeType `json:"queryStringVaryEnabled,omitempty"` - // Allowlist of query-string parameter names that participate in the cache key when `queryStringVaryEnabled` is true. Ignored while `queryStringVaryEnabled` is false, but still stored so it can be re-activated without losing the list. - QueryStringVaryParameters CacheConfigCreateGetQueryStringVaryParametersAttributeType `json:"queryStringVaryParameters,omitempty"` -} - -// NewCacheConfigCreate instantiates a new CacheConfigCreate 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCacheConfigCreate() *CacheConfigCreate { - this := CacheConfigCreate{} - return &this -} - -// NewCacheConfigCreateWithDefaults instantiates a new CacheConfigCreate 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCacheConfigCreateWithDefaults() *CacheConfigCreate { - this := CacheConfigCreate{} - var queryStringVaryEnabled bool = false - this.QueryStringVaryEnabled = &queryStringVaryEnabled - return &this -} - -// GetCacheKeyHeaders returns the CacheKeyHeaders field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigCreate) GetCacheKeyHeaders() (res CacheConfigCreateGetCacheKeyHeadersRetType) { - res, _ = o.GetCacheKeyHeadersOk() - return -} - -// GetCacheKeyHeadersOk returns a tuple with the CacheKeyHeaders field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigCreate) GetCacheKeyHeadersOk() (ret CacheConfigCreateGetCacheKeyHeadersRetType, ok bool) { - return getCacheConfigCreateGetCacheKeyHeadersAttributeTypeOk(o.CacheKeyHeaders) -} - -// HasCacheKeyHeaders returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigCreate) HasCacheKeyHeaders() bool { - _, ok := o.GetCacheKeyHeadersOk() - return ok -} - -// SetCacheKeyHeaders gets a reference to the given []string and assigns it to the CacheKeyHeaders field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigCreate) SetCacheKeyHeaders(v CacheConfigCreateGetCacheKeyHeadersRetType) { - setCacheConfigCreateGetCacheKeyHeadersAttributeType(&o.CacheKeyHeaders, v) -} - -// GetQueryStringVaryEnabled returns the QueryStringVaryEnabled field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigCreate) GetQueryStringVaryEnabled() (res CacheConfigCreategetQueryStringVaryEnabledRetType) { - res, _ = o.GetQueryStringVaryEnabledOk() - return -} - -// GetQueryStringVaryEnabledOk returns a tuple with the QueryStringVaryEnabled field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigCreate) GetQueryStringVaryEnabledOk() (ret CacheConfigCreategetQueryStringVaryEnabledRetType, ok bool) { - return getCacheConfigCreategetQueryStringVaryEnabledAttributeTypeOk(o.QueryStringVaryEnabled) -} - -// HasQueryStringVaryEnabled returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigCreate) HasQueryStringVaryEnabled() bool { - _, ok := o.GetQueryStringVaryEnabledOk() - return ok -} - -// SetQueryStringVaryEnabled gets a reference to the given bool and assigns it to the QueryStringVaryEnabled field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigCreate) SetQueryStringVaryEnabled(v CacheConfigCreategetQueryStringVaryEnabledRetType) { - setCacheConfigCreategetQueryStringVaryEnabledAttributeType(&o.QueryStringVaryEnabled, v) -} - -// GetQueryStringVaryParameters returns the QueryStringVaryParameters field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigCreate) GetQueryStringVaryParameters() (res CacheConfigCreateGetQueryStringVaryParametersRetType) { - res, _ = o.GetQueryStringVaryParametersOk() - return -} - -// GetQueryStringVaryParametersOk returns a tuple with the QueryStringVaryParameters field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigCreate) GetQueryStringVaryParametersOk() (ret CacheConfigCreateGetQueryStringVaryParametersRetType, ok bool) { - return getCacheConfigCreateGetQueryStringVaryParametersAttributeTypeOk(o.QueryStringVaryParameters) -} - -// HasQueryStringVaryParameters returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigCreate) HasQueryStringVaryParameters() bool { - _, ok := o.GetQueryStringVaryParametersOk() - return ok -} - -// SetQueryStringVaryParameters gets a reference to the given []string and assigns it to the QueryStringVaryParameters field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigCreate) SetQueryStringVaryParameters(v CacheConfigCreateGetQueryStringVaryParametersRetType) { - setCacheConfigCreateGetQueryStringVaryParametersAttributeType(&o.QueryStringVaryParameters, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CacheConfigCreate) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCacheConfigCreateGetCacheKeyHeadersAttributeTypeOk(o.CacheKeyHeaders); ok { - toSerialize["CacheKeyHeaders"] = val - } - if val, ok := getCacheConfigCreategetQueryStringVaryEnabledAttributeTypeOk(o.QueryStringVaryEnabled); ok { - toSerialize["QueryStringVaryEnabled"] = val - } - if val, ok := getCacheConfigCreateGetQueryStringVaryParametersAttributeTypeOk(o.QueryStringVaryParameters); ok { - toSerialize["QueryStringVaryParameters"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCacheConfigCreate struct { - value *CacheConfigCreate - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCacheConfigCreate) Get() *CacheConfigCreate { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCacheConfigCreate) Set(val *CacheConfigCreate) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCacheConfigCreate) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCacheConfigCreate) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableCacheConfigCreate(val *CacheConfigCreate) *NullableCacheConfigCreate { - return &NullableCacheConfigCreate{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCacheConfigCreate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCacheConfigCreate) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_cache_config_create_test.go b/services/cdn/model_cache_config_create_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_cache_config_create_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_cache_config_patch.go b/services/cdn/model_cache_config_patch.go deleted file mode 100644 index 2532d60229..0000000000 --- a/services/cdn/model_cache_config_patch.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the CacheConfigPatch type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CacheConfigPatch{} - -/* - types and functions for cacheKeyHeaders -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigPatchGetCacheKeyHeadersAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigPatchGetCacheKeyHeadersArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigPatchGetCacheKeyHeadersRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCacheConfigPatchGetCacheKeyHeadersAttributeTypeOk(arg CacheConfigPatchGetCacheKeyHeadersAttributeType) (ret CacheConfigPatchGetCacheKeyHeadersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCacheConfigPatchGetCacheKeyHeadersAttributeType(arg *CacheConfigPatchGetCacheKeyHeadersAttributeType, val CacheConfigPatchGetCacheKeyHeadersRetType) { - *arg = &val -} - -/* - types and functions for queryStringVaryEnabled -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigPatchgetQueryStringVaryEnabledAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigPatchgetQueryStringVaryEnabledArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigPatchgetQueryStringVaryEnabledRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCacheConfigPatchgetQueryStringVaryEnabledAttributeTypeOk(arg CacheConfigPatchgetQueryStringVaryEnabledAttributeType) (ret CacheConfigPatchgetQueryStringVaryEnabledRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCacheConfigPatchgetQueryStringVaryEnabledAttributeType(arg *CacheConfigPatchgetQueryStringVaryEnabledAttributeType, val CacheConfigPatchgetQueryStringVaryEnabledRetType) { - *arg = &val -} - -/* - types and functions for queryStringVaryParameters -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigPatchGetQueryStringVaryParametersAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigPatchGetQueryStringVaryParametersArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigPatchGetQueryStringVaryParametersRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCacheConfigPatchGetQueryStringVaryParametersAttributeTypeOk(arg CacheConfigPatchGetQueryStringVaryParametersAttributeType) (ret CacheConfigPatchGetQueryStringVaryParametersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCacheConfigPatchGetQueryStringVaryParametersAttributeType(arg *CacheConfigPatchGetQueryStringVaryParametersAttributeType, val CacheConfigPatchGetQueryStringVaryParametersRetType) { - *arg = &val -} - -// CacheConfigPatch PATCH variant of `CacheConfig`. Follows the standard PATCH conventions for this API: - Field omitted from the request: current value is left unchanged. - Array field sent as `[]`: current list is cleared. - `queryStringVaryEnabled` is a plain boolean (non-nullable); omit it to leave unchanged. `queryStringVaryParameters` is stored independently of `queryStringVaryEnabled`. Sending a non-empty `queryStringVaryParameters` together with `queryStringVaryEnabled=false` is accepted: the list is persisted for later re-activation but does not affect the cache while the flag is false. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CacheConfigPatch struct { - // HTTP request header names that participate in the cache key. Omit to leave unchanged; send `[]` to clear. - CacheKeyHeaders CacheConfigPatchGetCacheKeyHeadersAttributeType `json:"cacheKeyHeaders,omitempty"` - // When true, the CDN varies its cache by the request query string. Omit to leave unchanged. - QueryStringVaryEnabled CacheConfigPatchgetQueryStringVaryEnabledAttributeType `json:"queryStringVaryEnabled,omitempty"` - // Allowlist of query-string parameter names. Omit to leave unchanged; send `[]` to clear. - QueryStringVaryParameters CacheConfigPatchGetQueryStringVaryParametersAttributeType `json:"queryStringVaryParameters,omitempty"` -} - -// NewCacheConfigPatch instantiates a new CacheConfigPatch 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCacheConfigPatch() *CacheConfigPatch { - this := CacheConfigPatch{} - return &this -} - -// NewCacheConfigPatchWithDefaults instantiates a new CacheConfigPatch 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCacheConfigPatchWithDefaults() *CacheConfigPatch { - this := CacheConfigPatch{} - return &this -} - -// GetCacheKeyHeaders returns the CacheKeyHeaders field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigPatch) GetCacheKeyHeaders() (res CacheConfigPatchGetCacheKeyHeadersRetType) { - res, _ = o.GetCacheKeyHeadersOk() - return -} - -// GetCacheKeyHeadersOk returns a tuple with the CacheKeyHeaders field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigPatch) GetCacheKeyHeadersOk() (ret CacheConfigPatchGetCacheKeyHeadersRetType, ok bool) { - return getCacheConfigPatchGetCacheKeyHeadersAttributeTypeOk(o.CacheKeyHeaders) -} - -// HasCacheKeyHeaders returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigPatch) HasCacheKeyHeaders() bool { - _, ok := o.GetCacheKeyHeadersOk() - return ok -} - -// SetCacheKeyHeaders gets a reference to the given []string and assigns it to the CacheKeyHeaders field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigPatch) SetCacheKeyHeaders(v CacheConfigPatchGetCacheKeyHeadersRetType) { - setCacheConfigPatchGetCacheKeyHeadersAttributeType(&o.CacheKeyHeaders, v) -} - -// GetQueryStringVaryEnabled returns the QueryStringVaryEnabled field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigPatch) GetQueryStringVaryEnabled() (res CacheConfigPatchgetQueryStringVaryEnabledRetType) { - res, _ = o.GetQueryStringVaryEnabledOk() - return -} - -// GetQueryStringVaryEnabledOk returns a tuple with the QueryStringVaryEnabled field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigPatch) GetQueryStringVaryEnabledOk() (ret CacheConfigPatchgetQueryStringVaryEnabledRetType, ok bool) { - return getCacheConfigPatchgetQueryStringVaryEnabledAttributeTypeOk(o.QueryStringVaryEnabled) -} - -// HasQueryStringVaryEnabled returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigPatch) HasQueryStringVaryEnabled() bool { - _, ok := o.GetQueryStringVaryEnabledOk() - return ok -} - -// SetQueryStringVaryEnabled gets a reference to the given bool and assigns it to the QueryStringVaryEnabled field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigPatch) SetQueryStringVaryEnabled(v CacheConfigPatchgetQueryStringVaryEnabledRetType) { - setCacheConfigPatchgetQueryStringVaryEnabledAttributeType(&o.QueryStringVaryEnabled, v) -} - -// GetQueryStringVaryParameters returns the QueryStringVaryParameters field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigPatch) GetQueryStringVaryParameters() (res CacheConfigPatchGetQueryStringVaryParametersRetType) { - res, _ = o.GetQueryStringVaryParametersOk() - return -} - -// GetQueryStringVaryParametersOk returns a tuple with the QueryStringVaryParameters field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigPatch) GetQueryStringVaryParametersOk() (ret CacheConfigPatchGetQueryStringVaryParametersRetType, ok bool) { - return getCacheConfigPatchGetQueryStringVaryParametersAttributeTypeOk(o.QueryStringVaryParameters) -} - -// HasQueryStringVaryParameters returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigPatch) HasQueryStringVaryParameters() bool { - _, ok := o.GetQueryStringVaryParametersOk() - return ok -} - -// SetQueryStringVaryParameters gets a reference to the given []string and assigns it to the QueryStringVaryParameters field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CacheConfigPatch) SetQueryStringVaryParameters(v CacheConfigPatchGetQueryStringVaryParametersRetType) { - setCacheConfigPatchGetQueryStringVaryParametersAttributeType(&o.QueryStringVaryParameters, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CacheConfigPatch) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCacheConfigPatchGetCacheKeyHeadersAttributeTypeOk(o.CacheKeyHeaders); ok { - toSerialize["CacheKeyHeaders"] = val - } - if val, ok := getCacheConfigPatchgetQueryStringVaryEnabledAttributeTypeOk(o.QueryStringVaryEnabled); ok { - toSerialize["QueryStringVaryEnabled"] = val - } - if val, ok := getCacheConfigPatchGetQueryStringVaryParametersAttributeTypeOk(o.QueryStringVaryParameters); ok { - toSerialize["QueryStringVaryParameters"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCacheConfigPatch struct { - value *CacheConfigPatch - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCacheConfigPatch) Get() *CacheConfigPatch { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCacheConfigPatch) Set(val *CacheConfigPatch) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCacheConfigPatch) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCacheConfigPatch) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableCacheConfigPatch(val *CacheConfigPatch) *NullableCacheConfigPatch { - return &NullableCacheConfigPatch{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCacheConfigPatch) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCacheConfigPatch) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_cache_config_patch_test.go b/services/cdn/model_cache_config_patch_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_cache_config_patch_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_cache_config_test.go b/services/cdn/model_cache_config_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_cache_config_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_config.go b/services/cdn/model_config.go deleted file mode 100644 index 67dea99f1d..0000000000 --- a/services/cdn/model_config.go +++ /dev/null @@ -1,958 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the Config type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Config{} - -/* - types and functions for backend -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetBackendAttributeType = *ConfigBackend - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetBackendArgType = ConfigBackend - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetBackendRetType = ConfigBackend - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigGetBackendAttributeTypeOk(arg ConfigGetBackendAttributeType) (ret ConfigGetBackendRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigGetBackendAttributeType(arg *ConfigGetBackendAttributeType, val ConfigGetBackendRetType) { - *arg = &val -} - -/* - types and functions for blockedCountries -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetBlockedCountriesAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetBlockedCountriesArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetBlockedCountriesRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigGetBlockedCountriesAttributeTypeOk(arg ConfigGetBlockedCountriesAttributeType) (ret ConfigGetBlockedCountriesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigGetBlockedCountriesAttributeType(arg *ConfigGetBlockedCountriesAttributeType, val ConfigGetBlockedCountriesRetType) { - *arg = &val -} - -/* - types and functions for blockedIps -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetBlockedIpsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetBlockedIpsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetBlockedIpsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigGetBlockedIpsAttributeTypeOk(arg ConfigGetBlockedIpsAttributeType) (ret ConfigGetBlockedIpsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigGetBlockedIpsAttributeType(arg *ConfigGetBlockedIpsAttributeType, val ConfigGetBlockedIpsRetType) { - *arg = &val -} - -/* - types and functions for cacheConfig -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetCacheConfigAttributeType = *CacheConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetCacheConfigArgType = CacheConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetCacheConfigRetType = CacheConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigGetCacheConfigAttributeTypeOk(arg ConfigGetCacheConfigAttributeType) (ret ConfigGetCacheConfigRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigGetCacheConfigAttributeType(arg *ConfigGetCacheConfigAttributeType, val ConfigGetCacheConfigRetType) { - *arg = &val -} - -/* - types and functions for defaultCacheDuration -*/ - -// isNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetDefaultCacheDurationAttributeType = *NullableString - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigGetDefaultCacheDurationAttributeTypeOk(arg ConfigGetDefaultCacheDurationAttributeType) (ret ConfigGetDefaultCacheDurationRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg.Get(), true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigGetDefaultCacheDurationAttributeType(arg *ConfigGetDefaultCacheDurationAttributeType, val ConfigGetDefaultCacheDurationRetType) { - if IsNil(*arg) { - *arg = NewNullableString(val) - } else { - (*arg).Set(val) - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetDefaultCacheDurationArgType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetDefaultCacheDurationRetType = *string - -/* - types and functions for forwardHostHeader -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfiggetForwardHostHeaderAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfiggetForwardHostHeaderArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfiggetForwardHostHeaderRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfiggetForwardHostHeaderAttributeTypeOk(arg ConfiggetForwardHostHeaderAttributeType) (ret ConfiggetForwardHostHeaderRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfiggetForwardHostHeaderAttributeType(arg *ConfiggetForwardHostHeaderAttributeType, val ConfiggetForwardHostHeaderRetType) { - *arg = &val -} - -/* - types and functions for labels -*/ - -// isContainer -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetLabelsAttributeType = *map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetLabelsArgType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetLabelsRetType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigGetLabelsAttributeTypeOk(arg ConfigGetLabelsAttributeType) (ret ConfigGetLabelsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigGetLabelsAttributeType(arg *ConfigGetLabelsAttributeType, val ConfigGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for logSink -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetLogSinkAttributeType = *ConfigLogSink - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetLogSinkArgType = ConfigLogSink - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetLogSinkRetType = ConfigLogSink - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigGetLogSinkAttributeTypeOk(arg ConfigGetLogSinkAttributeType) (ret ConfigGetLogSinkRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigGetLogSinkAttributeType(arg *ConfigGetLogSinkAttributeType, val ConfigGetLogSinkRetType) { - *arg = &val -} - -/* - types and functions for monthlyLimitBytes -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetMonthlyLimitBytesAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetMonthlyLimitBytesArgType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetMonthlyLimitBytesRetType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigGetMonthlyLimitBytesAttributeTypeOk(arg ConfigGetMonthlyLimitBytesAttributeType) (ret ConfigGetMonthlyLimitBytesRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigGetMonthlyLimitBytesAttributeType(arg *ConfigGetMonthlyLimitBytesAttributeType, val ConfigGetMonthlyLimitBytesRetType) { - *arg = val -} - -/* - types and functions for optimizer -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetOptimizerAttributeType = *Optimizer - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetOptimizerArgType = Optimizer - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetOptimizerRetType = Optimizer - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigGetOptimizerAttributeTypeOk(arg ConfigGetOptimizerAttributeType) (ret ConfigGetOptimizerRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigGetOptimizerAttributeType(arg *ConfigGetOptimizerAttributeType, val ConfigGetOptimizerRetType) { - *arg = &val -} - -/* - types and functions for redirects -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetRedirectsAttributeType = *RedirectConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetRedirectsArgType = RedirectConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetRedirectsRetType = RedirectConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigGetRedirectsAttributeTypeOk(arg ConfigGetRedirectsAttributeType) (ret ConfigGetRedirectsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigGetRedirectsAttributeType(arg *ConfigGetRedirectsAttributeType, val ConfigGetRedirectsRetType) { - *arg = &val -} - -/* - types and functions for regions -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetRegionsAttributeType = *[]Region - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetRegionsArgType = []Region - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetRegionsRetType = []Region - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigGetRegionsAttributeTypeOk(arg ConfigGetRegionsAttributeType) (ret ConfigGetRegionsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigGetRegionsAttributeType(arg *ConfigGetRegionsAttributeType, val ConfigGetRegionsRetType) { - *arg = &val -} - -/* - types and functions for stripResponseCookies -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfiggetStripResponseCookiesAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfiggetStripResponseCookiesArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfiggetStripResponseCookiesRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfiggetStripResponseCookiesAttributeTypeOk(arg ConfiggetStripResponseCookiesAttributeType) (ret ConfiggetStripResponseCookiesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfiggetStripResponseCookiesAttributeType(arg *ConfiggetStripResponseCookiesAttributeType, val ConfiggetStripResponseCookiesRetType) { - *arg = &val -} - -/* - types and functions for tls -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetTlsAttributeType = *TlsConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetTlsArgType = TlsConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetTlsRetType = TlsConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigGetTlsAttributeTypeOk(arg ConfigGetTlsAttributeType) (ret ConfigGetTlsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigGetTlsAttributeType(arg *ConfigGetTlsAttributeType, val ConfigGetTlsRetType) { - *arg = &val -} - -/* - types and functions for waf -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetWafAttributeType = *WafConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetWafArgType = WafConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigGetWafRetType = WafConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigGetWafAttributeTypeOk(arg ConfigGetWafAttributeType) (ret ConfigGetWafRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigGetWafAttributeType(arg *ConfigGetWafAttributeType, val ConfigGetWafRetType) { - *arg = &val -} - -// Config struct for Config -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. - // 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"` - // REQUIRED - CacheConfig ConfigGetCacheConfigAttributeType `json:"cacheConfig" 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"` - // Enabling this allows the 'Host' header to be passed through to the origin. - // REQUIRED - ForwardHostHeader ConfiggetForwardHostHeaderAttributeType `json:"forwardHostHeader" required:"true"` - // Labels are key-value string pairs that can be attached to a distribution. - Labels ConfigGetLabelsAttributeType `json:"labels,omitempty"` - LogSink ConfigGetLogSinkAttributeType `json:"logSink,omitempty"` - // Sets the monthly limit of bandwidth in bytes that the pullzone is allowed to use. - MonthlyLimitBytes ConfigGetMonthlyLimitBytesAttributeType `json:"monthlyLimitBytes,omitempty"` - Optimizer ConfigGetOptimizerAttributeType `json:"optimizer,omitempty"` - Redirects ConfigGetRedirectsAttributeType `json:"redirects,omitempty"` - // REQUIRED - Regions ConfigGetRegionsAttributeType `json:"regions" required:"true"` - // Enable this to prevent origin-level cookies from being forwarded to the end user. - // REQUIRED - StripResponseCookies ConfiggetStripResponseCookiesAttributeType `json:"stripResponseCookies" required:"true"` - // REQUIRED - Tls ConfigGetTlsAttributeType `json:"tls" required:"true"` - // REQUIRED - Waf ConfigGetWafAttributeType `json:"waf" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _Config Config - -// NewConfig instantiates a new Config 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewConfig(backend ConfigGetBackendArgType, blockedCountries ConfigGetBlockedCountriesArgType, blockedIps ConfigGetBlockedIpsArgType, cacheConfig ConfigGetCacheConfigArgType, forwardHostHeader ConfiggetForwardHostHeaderArgType, regions ConfigGetRegionsArgType, stripResponseCookies ConfiggetStripResponseCookiesArgType, tls ConfigGetTlsArgType, waf ConfigGetWafArgType) *Config { - this := Config{} - setConfigGetBackendAttributeType(&this.Backend, backend) - setConfigGetBlockedCountriesAttributeType(&this.BlockedCountries, blockedCountries) - setConfigGetBlockedIpsAttributeType(&this.BlockedIps, blockedIps) - setConfigGetCacheConfigAttributeType(&this.CacheConfig, cacheConfig) - setConfiggetForwardHostHeaderAttributeType(&this.ForwardHostHeader, forwardHostHeader) - setConfigGetRegionsAttributeType(&this.Regions, regions) - setConfiggetStripResponseCookiesAttributeType(&this.StripResponseCookies, stripResponseCookies) - setConfigGetTlsAttributeType(&this.Tls, tls) - setConfigGetWafAttributeType(&this.Waf, waf) - return &this -} - -// NewConfigWithDefaults instantiates a new Config 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewConfigWithDefaults() *Config { - this := Config{} - return &this -} - -// GetBackend returns the Backend field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetBackend() (ret ConfigGetBackendRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetBackendOk() (ret ConfigGetBackendRetType, ok bool) { - return getConfigGetBackendAttributeTypeOk(o.Backend) -} - -// SetBackend sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) SetBackend(v ConfigGetBackendRetType) { - setConfigGetBackendAttributeType(&o.Backend, v) -} - -// GetBlockedCountries returns the BlockedCountries field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetBlockedCountries() (ret ConfigGetBlockedCountriesRetType) { - ret, _ = o.GetBlockedCountriesOk() - return ret -} - -// GetBlockedCountriesOk returns a tuple with the BlockedCountries field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetBlockedCountriesOk() (ret ConfigGetBlockedCountriesRetType, ok bool) { - return getConfigGetBlockedCountriesAttributeTypeOk(o.BlockedCountries) -} - -// SetBlockedCountries sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) SetBlockedCountries(v ConfigGetBlockedCountriesRetType) { - setConfigGetBlockedCountriesAttributeType(&o.BlockedCountries, v) -} - -// GetBlockedIps returns the BlockedIps field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetBlockedIps() (ret ConfigGetBlockedIpsRetType) { - ret, _ = o.GetBlockedIpsOk() - return ret -} - -// GetBlockedIpsOk returns a tuple with the BlockedIps field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetBlockedIpsOk() (ret ConfigGetBlockedIpsRetType, ok bool) { - return getConfigGetBlockedIpsAttributeTypeOk(o.BlockedIps) -} - -// SetBlockedIps sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) SetBlockedIps(v ConfigGetBlockedIpsRetType) { - setConfigGetBlockedIpsAttributeType(&o.BlockedIps, v) -} - -// GetCacheConfig returns the CacheConfig field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetCacheConfig() (ret ConfigGetCacheConfigRetType) { - ret, _ = o.GetCacheConfigOk() - return ret -} - -// GetCacheConfigOk returns a tuple with the CacheConfig field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetCacheConfigOk() (ret ConfigGetCacheConfigRetType, ok bool) { - return getConfigGetCacheConfigAttributeTypeOk(o.CacheConfig) -} - -// SetCacheConfig sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) SetCacheConfig(v ConfigGetCacheConfigRetType) { - setConfigGetCacheConfigAttributeType(&o.CacheConfig, v) -} - -// GetDefaultCacheDuration returns the DefaultCacheDuration field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetDefaultCacheDuration() (res ConfigGetDefaultCacheDurationRetType) { - res, _ = o.GetDefaultCacheDurationOk() - return -} - -// GetDefaultCacheDurationOk returns a tuple with the DefaultCacheDuration field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetDefaultCacheDurationOk() (ret ConfigGetDefaultCacheDurationRetType, ok bool) { - return getConfigGetDefaultCacheDurationAttributeTypeOk(o.DefaultCacheDuration) -} - -// HasDefaultCacheDuration returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) HasDefaultCacheDuration() bool { - _, ok := o.GetDefaultCacheDurationOk() - return ok -} - -// SetDefaultCacheDuration gets a reference to the given string and assigns it to the DefaultCacheDuration field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) SetDefaultCacheDuration(v ConfigGetDefaultCacheDurationRetType) { - setConfigGetDefaultCacheDurationAttributeType(&o.DefaultCacheDuration, v) -} - -// SetDefaultCacheDurationNil sets the value for DefaultCacheDuration to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) SetDefaultCacheDurationNil() { - o.DefaultCacheDuration = nil -} - -// UnsetDefaultCacheDuration ensures that no value is present for DefaultCacheDuration, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) UnsetDefaultCacheDuration() { - o.DefaultCacheDuration = nil -} - -// GetForwardHostHeader returns the ForwardHostHeader field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetForwardHostHeader() (ret ConfiggetForwardHostHeaderRetType) { - ret, _ = o.GetForwardHostHeaderOk() - return ret -} - -// GetForwardHostHeaderOk returns a tuple with the ForwardHostHeader field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetForwardHostHeaderOk() (ret ConfiggetForwardHostHeaderRetType, ok bool) { - return getConfiggetForwardHostHeaderAttributeTypeOk(o.ForwardHostHeader) -} - -// SetForwardHostHeader sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) SetForwardHostHeader(v ConfiggetForwardHostHeaderRetType) { - setConfiggetForwardHostHeaderAttributeType(&o.ForwardHostHeader, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetLabels() (res ConfigGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetLabelsOk() (ret ConfigGetLabelsRetType, ok bool) { - return getConfigGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) SetLabels(v ConfigGetLabelsRetType) { - setConfigGetLabelsAttributeType(&o.Labels, v) -} - -// GetLogSink returns the LogSink field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetLogSink() (res ConfigGetLogSinkRetType) { - res, _ = o.GetLogSinkOk() - return -} - -// GetLogSinkOk returns a tuple with the LogSink field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetLogSinkOk() (ret ConfigGetLogSinkRetType, ok bool) { - return getConfigGetLogSinkAttributeTypeOk(o.LogSink) -} - -// HasLogSink returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) HasLogSink() bool { - _, ok := o.GetLogSinkOk() - return ok -} - -// SetLogSink gets a reference to the given ConfigLogSink and assigns it to the LogSink field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) SetLogSink(v ConfigGetLogSinkRetType) { - setConfigGetLogSinkAttributeType(&o.LogSink, v) -} - -// GetMonthlyLimitBytes returns the MonthlyLimitBytes field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetMonthlyLimitBytes() (res ConfigGetMonthlyLimitBytesRetType) { - res, _ = o.GetMonthlyLimitBytesOk() - return -} - -// GetMonthlyLimitBytesOk returns a tuple with the MonthlyLimitBytes field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetMonthlyLimitBytesOk() (ret ConfigGetMonthlyLimitBytesRetType, ok bool) { - return getConfigGetMonthlyLimitBytesAttributeTypeOk(o.MonthlyLimitBytes) -} - -// HasMonthlyLimitBytes returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) HasMonthlyLimitBytes() bool { - _, ok := o.GetMonthlyLimitBytesOk() - return ok -} - -// SetMonthlyLimitBytes gets a reference to the given int64 and assigns it to the MonthlyLimitBytes field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) SetMonthlyLimitBytes(v ConfigGetMonthlyLimitBytesRetType) { - setConfigGetMonthlyLimitBytesAttributeType(&o.MonthlyLimitBytes, v) -} - -// SetMonthlyLimitBytesNil sets the value for MonthlyLimitBytes to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) SetMonthlyLimitBytesNil() { - o.MonthlyLimitBytes = nil -} - -// UnsetMonthlyLimitBytes ensures that no value is present for MonthlyLimitBytes, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) UnsetMonthlyLimitBytes() { - o.MonthlyLimitBytes = nil -} - -// GetOptimizer returns the Optimizer field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetOptimizer() (res ConfigGetOptimizerRetType) { - res, _ = o.GetOptimizerOk() - return -} - -// GetOptimizerOk returns a tuple with the Optimizer field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetOptimizerOk() (ret ConfigGetOptimizerRetType, ok bool) { - return getConfigGetOptimizerAttributeTypeOk(o.Optimizer) -} - -// HasOptimizer returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) HasOptimizer() bool { - _, ok := o.GetOptimizerOk() - return ok -} - -// SetOptimizer gets a reference to the given Optimizer and assigns it to the Optimizer field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) SetOptimizer(v ConfigGetOptimizerRetType) { - setConfigGetOptimizerAttributeType(&o.Optimizer, v) -} - -// GetRedirects returns the Redirects field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetRedirects() (res ConfigGetRedirectsRetType) { - res, _ = o.GetRedirectsOk() - return -} - -// GetRedirectsOk returns a tuple with the Redirects field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetRedirectsOk() (ret ConfigGetRedirectsRetType, ok bool) { - return getConfigGetRedirectsAttributeTypeOk(o.Redirects) -} - -// HasRedirects returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) HasRedirects() bool { - _, ok := o.GetRedirectsOk() - return ok -} - -// SetRedirects gets a reference to the given RedirectConfig and assigns it to the Redirects field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) SetRedirects(v ConfigGetRedirectsRetType) { - setConfigGetRedirectsAttributeType(&o.Redirects, v) -} - -// GetRegions returns the Regions field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetRegions() (ret ConfigGetRegionsRetType) { - ret, _ = o.GetRegionsOk() - return ret -} - -// GetRegionsOk returns a tuple with the Regions field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetRegionsOk() (ret ConfigGetRegionsRetType, ok bool) { - return getConfigGetRegionsAttributeTypeOk(o.Regions) -} - -// SetRegions sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) SetRegions(v ConfigGetRegionsRetType) { - setConfigGetRegionsAttributeType(&o.Regions, v) -} - -// GetStripResponseCookies returns the StripResponseCookies field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetStripResponseCookies() (ret ConfiggetStripResponseCookiesRetType) { - ret, _ = o.GetStripResponseCookiesOk() - return ret -} - -// GetStripResponseCookiesOk returns a tuple with the StripResponseCookies field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetStripResponseCookiesOk() (ret ConfiggetStripResponseCookiesRetType, ok bool) { - return getConfiggetStripResponseCookiesAttributeTypeOk(o.StripResponseCookies) -} - -// SetStripResponseCookies sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) SetStripResponseCookies(v ConfiggetStripResponseCookiesRetType) { - setConfiggetStripResponseCookiesAttributeType(&o.StripResponseCookies, v) -} - -// GetTls returns the Tls field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetTls() (ret ConfigGetTlsRetType) { - ret, _ = o.GetTlsOk() - return ret -} - -// GetTlsOk returns a tuple with the Tls field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetTlsOk() (ret ConfigGetTlsRetType, ok bool) { - return getConfigGetTlsAttributeTypeOk(o.Tls) -} - -// SetTls sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) SetTls(v ConfigGetTlsRetType) { - setConfigGetTlsAttributeType(&o.Tls, v) -} - -// GetWaf returns the Waf field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetWaf() (ret ConfigGetWafRetType) { - ret, _ = o.GetWafOk() - return ret -} - -// GetWafOk returns a tuple with the Waf field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) GetWafOk() (ret ConfigGetWafRetType, ok bool) { - return getConfigGetWafAttributeTypeOk(o.Waf) -} - -// SetWaf sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Config) SetWaf(v ConfigGetWafRetType) { - setConfigGetWafAttributeType(&o.Waf, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Config) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getConfigGetBackendAttributeTypeOk(o.Backend); ok { - toSerialize["Backend"] = val - } - if val, ok := getConfigGetBlockedCountriesAttributeTypeOk(o.BlockedCountries); ok { - toSerialize["BlockedCountries"] = val - } - if val, ok := getConfigGetBlockedIpsAttributeTypeOk(o.BlockedIps); ok { - toSerialize["BlockedIps"] = val - } - if val, ok := getConfigGetCacheConfigAttributeTypeOk(o.CacheConfig); ok { - toSerialize["CacheConfig"] = val - } - if val, ok := getConfigGetDefaultCacheDurationAttributeTypeOk(o.DefaultCacheDuration); ok { - toSerialize["DefaultCacheDuration"] = val - } - if val, ok := getConfiggetForwardHostHeaderAttributeTypeOk(o.ForwardHostHeader); ok { - toSerialize["ForwardHostHeader"] = val - } - if val, ok := getConfigGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getConfigGetLogSinkAttributeTypeOk(o.LogSink); ok { - toSerialize["LogSink"] = val - } - if val, ok := getConfigGetMonthlyLimitBytesAttributeTypeOk(o.MonthlyLimitBytes); ok { - toSerialize["MonthlyLimitBytes"] = val - } - if val, ok := getConfigGetOptimizerAttributeTypeOk(o.Optimizer); ok { - toSerialize["Optimizer"] = val - } - if val, ok := getConfigGetRedirectsAttributeTypeOk(o.Redirects); ok { - toSerialize["Redirects"] = val - } - if val, ok := getConfigGetRegionsAttributeTypeOk(o.Regions); ok { - toSerialize["Regions"] = val - } - if val, ok := getConfiggetStripResponseCookiesAttributeTypeOk(o.StripResponseCookies); ok { - toSerialize["StripResponseCookies"] = val - } - if val, ok := getConfigGetTlsAttributeTypeOk(o.Tls); ok { - toSerialize["Tls"] = val - } - if val, ok := getConfigGetWafAttributeTypeOk(o.Waf); ok { - toSerialize["Waf"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableConfig struct { - value *Config - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableConfig) Get() *Config { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableConfig) Set(val *Config) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableConfig) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableConfig) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableConfig(val *Config) *NullableConfig { - return &NullableConfig{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_config_backend.go b/services/cdn/model_config_backend.go deleted file mode 100644 index 27271d9c45..0000000000 --- a/services/cdn/model_config_backend.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// ConfigBackend - struct for ConfigBackend -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigBackend struct { - BucketBackend *BucketBackend - HttpBackend *HttpBackend -} - -// BucketBackendAsConfigBackend is a convenience function that returns BucketBackend wrapped in ConfigBackend -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func BucketBackendAsConfigBackend(v *BucketBackend) ConfigBackend { - return ConfigBackend{ - BucketBackend: v, - } -} - -// HttpBackendAsConfigBackend is a convenience function that returns HttpBackend wrapped in ConfigBackend -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func HttpBackendAsConfigBackend(v *HttpBackend) ConfigBackend { - return ConfigBackend{ - HttpBackend: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (dst *ConfigBackend) 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 '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 - err = json.Unmarshal(data, &dst.HttpBackend) - if err == nil { - return nil // data stored in dst.HttpBackend, return on the first match - } else { - dst.HttpBackend = nil - return fmt.Errorf("failed to unmarshal ConfigBackend as HttpBackend: %s", err.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 - err = json.Unmarshal(data, &dst.HttpBackend) - if err == nil { - return nil // data stored in dst.HttpBackend, return on the first match - } else { - dst.HttpBackend = nil - return fmt.Errorf("failed to unmarshal ConfigBackend as HttpBackend: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src ConfigBackend) MarshalJSON() ([]byte, error) { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - if src.BucketBackend != nil { - return json.Marshal(&src.BucketBackend) - } - - if src.HttpBackend != nil { - return json.Marshal(&src.HttpBackend) - } - - return []byte("{}"), nil // no data in oneOf schemas => empty JSON object -} - -// Get the actual instance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (obj *ConfigBackend) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.BucketBackend != nil { - return obj.BucketBackend - } - - if obj.HttpBackend != nil { - return obj.HttpBackend - } - - // all schemas are nil - return nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableConfigBackend struct { - value *ConfigBackend - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableConfigBackend) Get() *ConfigBackend { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableConfigBackend) Set(val *ConfigBackend) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableConfigBackend) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableConfigBackend) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableConfigBackend(val *ConfigBackend) *NullableConfigBackend { - return &NullableConfigBackend{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableConfigBackend) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableConfigBackend) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_config_backend_test.go b/services/cdn/model_config_backend_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_config_backend_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_config_log_sink.go b/services/cdn/model_config_log_sink.go deleted file mode 100644 index 448b0a8ddd..0000000000 --- a/services/cdn/model_config_log_sink.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// ConfigLogSink - struct for ConfigLogSink -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigLogSink struct { - LokiLogSink *LokiLogSink - OtlpLogSink *OtlpLogSink -} - -// LokiLogSinkAsConfigLogSink is a convenience function that returns LokiLogSink wrapped in ConfigLogSink -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func LokiLogSinkAsConfigLogSink(v *LokiLogSink) ConfigLogSink { - return ConfigLogSink{ - LokiLogSink: v, - } -} - -// OtlpLogSinkAsConfigLogSink is a convenience function that returns OtlpLogSink wrapped in ConfigLogSink -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func OtlpLogSinkAsConfigLogSink(v *OtlpLogSink) ConfigLogSink { - return ConfigLogSink{ - OtlpLogSink: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (dst *ConfigLogSink) 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 'LokiLogSink' - if jsonDict["type"] == "LokiLogSink" { - // try to unmarshal JSON data into LokiLogSink - err = json.Unmarshal(data, &dst.LokiLogSink) - if err == nil { - return nil // data stored in dst.LokiLogSink, return on the first match - } else { - dst.LokiLogSink = nil - return fmt.Errorf("failed to unmarshal ConfigLogSink as LokiLogSink: %s", err.Error()) - } - } - - // check if the discriminator value is 'OtlpLogSink' - if jsonDict["type"] == "OtlpLogSink" { - // try to unmarshal JSON data into OtlpLogSink - err = json.Unmarshal(data, &dst.OtlpLogSink) - if err == nil { - return nil // data stored in dst.OtlpLogSink, return on the first match - } else { - dst.OtlpLogSink = nil - return fmt.Errorf("failed to unmarshal ConfigLogSink as OtlpLogSink: %s", err.Error()) - } - } - - // check if the discriminator value is 'loki' - if jsonDict["type"] == "loki" { - // try to unmarshal JSON data into LokiLogSink - err = json.Unmarshal(data, &dst.LokiLogSink) - if err == nil { - return nil // data stored in dst.LokiLogSink, return on the first match - } else { - dst.LokiLogSink = nil - return fmt.Errorf("failed to unmarshal ConfigLogSink as LokiLogSink: %s", err.Error()) - } - } - - // check if the discriminator value is 'otlp' - if jsonDict["type"] == "otlp" { - // try to unmarshal JSON data into OtlpLogSink - err = json.Unmarshal(data, &dst.OtlpLogSink) - if err == nil { - return nil // data stored in dst.OtlpLogSink, return on the first match - } else { - dst.OtlpLogSink = nil - return fmt.Errorf("failed to unmarshal ConfigLogSink as OtlpLogSink: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src ConfigLogSink) MarshalJSON() ([]byte, error) { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - if src.LokiLogSink != nil { - return json.Marshal(&src.LokiLogSink) - } - - if src.OtlpLogSink != nil { - return json.Marshal(&src.OtlpLogSink) - } - - return []byte("{}"), nil // no data in oneOf schemas => empty JSON object -} - -// Get the actual instance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (obj *ConfigLogSink) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.LokiLogSink != nil { - return obj.LokiLogSink - } - - if obj.OtlpLogSink != nil { - return obj.OtlpLogSink - } - - // all schemas are nil - return nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableConfigLogSink struct { - value *ConfigLogSink - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableConfigLogSink) Get() *ConfigLogSink { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableConfigLogSink) Set(val *ConfigLogSink) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableConfigLogSink) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableConfigLogSink) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableConfigLogSink(val *ConfigLogSink) *NullableConfigLogSink { - return &NullableConfigLogSink{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableConfigLogSink) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableConfigLogSink) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_config_log_sink_test.go b/services/cdn/model_config_log_sink_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_config_log_sink_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_config_patch.go b/services/cdn/model_config_patch.go deleted file mode 100644 index e6e6fd8751..0000000000 --- a/services/cdn/model_config_patch.go +++ /dev/null @@ -1,1013 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the ConfigPatch type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConfigPatch{} - -/* - types and functions for backend -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetBackendAttributeType = *ConfigPatchBackend - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetBackendArgType = ConfigPatchBackend - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetBackendRetType = ConfigPatchBackend - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigPatchGetBackendAttributeTypeOk(arg ConfigPatchGetBackendAttributeType) (ret ConfigPatchGetBackendRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigPatchGetBackendAttributeType(arg *ConfigPatchGetBackendAttributeType, val ConfigPatchGetBackendRetType) { - *arg = &val -} - -/* - types and functions for blockedCountries -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetBlockedCountriesAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetBlockedCountriesArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetBlockedCountriesRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigPatchGetBlockedCountriesAttributeTypeOk(arg ConfigPatchGetBlockedCountriesAttributeType) (ret ConfigPatchGetBlockedCountriesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigPatchGetBlockedCountriesAttributeType(arg *ConfigPatchGetBlockedCountriesAttributeType, val ConfigPatchGetBlockedCountriesRetType) { - *arg = &val -} - -/* - types and functions for blockedIps -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetBlockedIpsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetBlockedIpsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetBlockedIpsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigPatchGetBlockedIpsAttributeTypeOk(arg ConfigPatchGetBlockedIpsAttributeType) (ret ConfigPatchGetBlockedIpsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigPatchGetBlockedIpsAttributeType(arg *ConfigPatchGetBlockedIpsAttributeType, val ConfigPatchGetBlockedIpsRetType) { - *arg = &val -} - -/* - types and functions for cacheConfig -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetCacheConfigAttributeType = *CacheConfigPatch - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetCacheConfigArgType = CacheConfigPatch - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetCacheConfigRetType = CacheConfigPatch - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigPatchGetCacheConfigAttributeTypeOk(arg ConfigPatchGetCacheConfigAttributeType) (ret ConfigPatchGetCacheConfigRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigPatchGetCacheConfigAttributeType(arg *ConfigPatchGetCacheConfigAttributeType, val ConfigPatchGetCacheConfigRetType) { - *arg = &val -} - -/* - types and functions for defaultCacheDuration -*/ - -// isNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetDefaultCacheDurationAttributeType = *NullableString - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigPatchGetDefaultCacheDurationAttributeTypeOk(arg ConfigPatchGetDefaultCacheDurationAttributeType) (ret ConfigPatchGetDefaultCacheDurationRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg.Get(), true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigPatchGetDefaultCacheDurationAttributeType(arg *ConfigPatchGetDefaultCacheDurationAttributeType, val ConfigPatchGetDefaultCacheDurationRetType) { - if IsNil(*arg) { - *arg = NewNullableString(val) - } else { - (*arg).Set(val) - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetDefaultCacheDurationArgType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetDefaultCacheDurationRetType = *string - -/* - types and functions for forwardHostHeader -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchgetForwardHostHeaderAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchgetForwardHostHeaderArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchgetForwardHostHeaderRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigPatchgetForwardHostHeaderAttributeTypeOk(arg ConfigPatchgetForwardHostHeaderAttributeType) (ret ConfigPatchgetForwardHostHeaderRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigPatchgetForwardHostHeaderAttributeType(arg *ConfigPatchgetForwardHostHeaderAttributeType, val ConfigPatchgetForwardHostHeaderRetType) { - *arg = &val -} - -/* - types and functions for labels -*/ - -// isContainer -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetLabelsAttributeType = *map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetLabelsArgType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetLabelsRetType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigPatchGetLabelsAttributeTypeOk(arg ConfigPatchGetLabelsAttributeType) (ret ConfigPatchGetLabelsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigPatchGetLabelsAttributeType(arg *ConfigPatchGetLabelsAttributeType, val ConfigPatchGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for logSink -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetLogSinkAttributeType = *NullableConfigPatchLogSink - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetLogSinkArgType = *NullableConfigPatchLogSink - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetLogSinkRetType = *NullableConfigPatchLogSink - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigPatchGetLogSinkAttributeTypeOk(arg ConfigPatchGetLogSinkAttributeType) (ret ConfigPatchGetLogSinkRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigPatchGetLogSinkAttributeType(arg *ConfigPatchGetLogSinkAttributeType, val ConfigPatchGetLogSinkRetType) { - *arg = val -} - -/* - types and functions for monthlyLimitBytes -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetMonthlyLimitBytesAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetMonthlyLimitBytesArgType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetMonthlyLimitBytesRetType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigPatchGetMonthlyLimitBytesAttributeTypeOk(arg ConfigPatchGetMonthlyLimitBytesAttributeType) (ret ConfigPatchGetMonthlyLimitBytesRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigPatchGetMonthlyLimitBytesAttributeType(arg *ConfigPatchGetMonthlyLimitBytesAttributeType, val ConfigPatchGetMonthlyLimitBytesRetType) { - *arg = val -} - -/* - types and functions for optimizer -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetOptimizerAttributeType = *OptimizerPatch - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetOptimizerArgType = OptimizerPatch - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetOptimizerRetType = OptimizerPatch - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigPatchGetOptimizerAttributeTypeOk(arg ConfigPatchGetOptimizerAttributeType) (ret ConfigPatchGetOptimizerRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigPatchGetOptimizerAttributeType(arg *ConfigPatchGetOptimizerAttributeType, val ConfigPatchGetOptimizerRetType) { - *arg = &val -} - -/* - types and functions for redirects -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetRedirectsAttributeType = *RedirectConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetRedirectsArgType = RedirectConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetRedirectsRetType = RedirectConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigPatchGetRedirectsAttributeTypeOk(arg ConfigPatchGetRedirectsAttributeType) (ret ConfigPatchGetRedirectsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigPatchGetRedirectsAttributeType(arg *ConfigPatchGetRedirectsAttributeType, val ConfigPatchGetRedirectsRetType) { - *arg = &val -} - -/* - types and functions for regions -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetRegionsAttributeType = *[]Region - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetRegionsArgType = []Region - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetRegionsRetType = []Region - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigPatchGetRegionsAttributeTypeOk(arg ConfigPatchGetRegionsAttributeType) (ret ConfigPatchGetRegionsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigPatchGetRegionsAttributeType(arg *ConfigPatchGetRegionsAttributeType, val ConfigPatchGetRegionsRetType) { - *arg = &val -} - -/* - types and functions for stripResponseCookies -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchgetStripResponseCookiesAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchgetStripResponseCookiesArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchgetStripResponseCookiesRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigPatchgetStripResponseCookiesAttributeTypeOk(arg ConfigPatchgetStripResponseCookiesAttributeType) (ret ConfigPatchgetStripResponseCookiesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigPatchgetStripResponseCookiesAttributeType(arg *ConfigPatchgetStripResponseCookiesAttributeType, val ConfigPatchgetStripResponseCookiesRetType) { - *arg = &val -} - -/* - types and functions for tls -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetTlsAttributeType = *TlsConfigPatch - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetTlsArgType = TlsConfigPatch - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetTlsRetType = TlsConfigPatch - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigPatchGetTlsAttributeTypeOk(arg ConfigPatchGetTlsAttributeType) (ret ConfigPatchGetTlsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigPatchGetTlsAttributeType(arg *ConfigPatchGetTlsAttributeType, val ConfigPatchGetTlsRetType) { - *arg = &val -} - -/* - types and functions for waf -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetWafAttributeType = *WafConfigPatch - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetWafArgType = WafConfigPatch - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchGetWafRetType = WafConfigPatch - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getConfigPatchGetWafAttributeTypeOk(arg ConfigPatchGetWafAttributeType) (ret ConfigPatchGetWafRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setConfigPatchGetWafAttributeType(arg *ConfigPatchGetWafAttributeType, val ConfigPatchGetWafRetType) { - *arg = &val -} - -// ConfigPatch struct for ConfigPatch -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatch struct { - Backend ConfigPatchGetBackendAttributeType `json:"backend,omitempty"` - // 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"` - CacheConfig ConfigPatchGetCacheConfigAttributeType `json:"cacheConfig,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"` - // Enabling this allows the 'Host' header to be passed through to the origin. - ForwardHostHeader ConfigPatchgetForwardHostHeaderAttributeType `json:"forwardHostHeader,omitempty"` - // Labels are key-value string pairs that can be attached to a distribution. JSON Merge Patch is supported, meaning setting a key to null will remove it. - Labels ConfigPatchGetLabelsAttributeType `json:"labels,omitempty"` - LogSink ConfigPatchGetLogSinkAttributeType `json:"logSink,omitempty"` - // Sets the monthly limit of bandwidth in bytes that the pullzone is allowed to use. - MonthlyLimitBytes ConfigPatchGetMonthlyLimitBytesAttributeType `json:"monthlyLimitBytes,omitempty"` - Optimizer ConfigPatchGetOptimizerAttributeType `json:"optimizer,omitempty"` - Redirects ConfigPatchGetRedirectsAttributeType `json:"redirects,omitempty"` - Regions ConfigPatchGetRegionsAttributeType `json:"regions,omitempty"` - // Enable this to prevent origin-level cookies from being forwarded to the end user. - StripResponseCookies ConfigPatchgetStripResponseCookiesAttributeType `json:"stripResponseCookies,omitempty"` - Tls ConfigPatchGetTlsAttributeType `json:"tls,omitempty"` - Waf ConfigPatchGetWafAttributeType `json:"waf,omitempty"` -} - -// NewConfigPatch instantiates a new ConfigPatch 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewConfigPatch() *ConfigPatch { - this := ConfigPatch{} - return &this -} - -// NewConfigPatchWithDefaults instantiates a new ConfigPatch 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewConfigPatchWithDefaults() *ConfigPatch { - this := ConfigPatch{} - return &this -} - -// GetBackend returns the Backend field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetBackend() (res ConfigPatchGetBackendRetType) { - res, _ = o.GetBackendOk() - return -} - -// GetBackendOk returns a tuple with the Backend field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetBackendOk() (ret ConfigPatchGetBackendRetType, ok bool) { - return getConfigPatchGetBackendAttributeTypeOk(o.Backend) -} - -// HasBackend returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) HasBackend() bool { - _, ok := o.GetBackendOk() - return ok -} - -// SetBackend gets a reference to the given ConfigPatchBackend and assigns it to the Backend field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) SetBackend(v ConfigPatchGetBackendRetType) { - setConfigPatchGetBackendAttributeType(&o.Backend, v) -} - -// GetBlockedCountries returns the BlockedCountries field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetBlockedCountries() (res ConfigPatchGetBlockedCountriesRetType) { - res, _ = o.GetBlockedCountriesOk() - return -} - -// GetBlockedCountriesOk returns a tuple with the BlockedCountries field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetBlockedCountriesOk() (ret ConfigPatchGetBlockedCountriesRetType, ok bool) { - return getConfigPatchGetBlockedCountriesAttributeTypeOk(o.BlockedCountries) -} - -// HasBlockedCountries returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) HasBlockedCountries() bool { - _, ok := o.GetBlockedCountriesOk() - return ok -} - -// SetBlockedCountries gets a reference to the given []string and assigns it to the BlockedCountries field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) SetBlockedCountries(v ConfigPatchGetBlockedCountriesRetType) { - setConfigPatchGetBlockedCountriesAttributeType(&o.BlockedCountries, v) -} - -// GetBlockedIps returns the BlockedIps field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetBlockedIps() (res ConfigPatchGetBlockedIpsRetType) { - res, _ = o.GetBlockedIpsOk() - return -} - -// GetBlockedIpsOk returns a tuple with the BlockedIps field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetBlockedIpsOk() (ret ConfigPatchGetBlockedIpsRetType, ok bool) { - return getConfigPatchGetBlockedIpsAttributeTypeOk(o.BlockedIps) -} - -// HasBlockedIps returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) SetBlockedIps(v ConfigPatchGetBlockedIpsRetType) { - setConfigPatchGetBlockedIpsAttributeType(&o.BlockedIps, v) -} - -// GetCacheConfig returns the CacheConfig field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetCacheConfig() (res ConfigPatchGetCacheConfigRetType) { - res, _ = o.GetCacheConfigOk() - return -} - -// GetCacheConfigOk returns a tuple with the CacheConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetCacheConfigOk() (ret ConfigPatchGetCacheConfigRetType, ok bool) { - return getConfigPatchGetCacheConfigAttributeTypeOk(o.CacheConfig) -} - -// HasCacheConfig returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) HasCacheConfig() bool { - _, ok := o.GetCacheConfigOk() - return ok -} - -// SetCacheConfig gets a reference to the given CacheConfigPatch and assigns it to the CacheConfig field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) SetCacheConfig(v ConfigPatchGetCacheConfigRetType) { - setConfigPatchGetCacheConfigAttributeType(&o.CacheConfig, v) -} - -// GetDefaultCacheDuration returns the DefaultCacheDuration field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetDefaultCacheDuration() (res ConfigPatchGetDefaultCacheDurationRetType) { - res, _ = o.GetDefaultCacheDurationOk() - return -} - -// GetDefaultCacheDurationOk returns a tuple with the DefaultCacheDuration field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetDefaultCacheDurationOk() (ret ConfigPatchGetDefaultCacheDurationRetType, ok bool) { - return getConfigPatchGetDefaultCacheDurationAttributeTypeOk(o.DefaultCacheDuration) -} - -// HasDefaultCacheDuration returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) HasDefaultCacheDuration() bool { - _, ok := o.GetDefaultCacheDurationOk() - return ok -} - -// SetDefaultCacheDuration gets a reference to the given string and assigns it to the DefaultCacheDuration field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) SetDefaultCacheDuration(v ConfigPatchGetDefaultCacheDurationRetType) { - setConfigPatchGetDefaultCacheDurationAttributeType(&o.DefaultCacheDuration, v) -} - -// SetDefaultCacheDurationNil sets the value for DefaultCacheDuration to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) SetDefaultCacheDurationNil() { - o.DefaultCacheDuration = nil -} - -// UnsetDefaultCacheDuration ensures that no value is present for DefaultCacheDuration, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) UnsetDefaultCacheDuration() { - o.DefaultCacheDuration = nil -} - -// GetForwardHostHeader returns the ForwardHostHeader field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetForwardHostHeader() (res ConfigPatchgetForwardHostHeaderRetType) { - res, _ = o.GetForwardHostHeaderOk() - return -} - -// GetForwardHostHeaderOk returns a tuple with the ForwardHostHeader field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetForwardHostHeaderOk() (ret ConfigPatchgetForwardHostHeaderRetType, ok bool) { - return getConfigPatchgetForwardHostHeaderAttributeTypeOk(o.ForwardHostHeader) -} - -// HasForwardHostHeader returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) HasForwardHostHeader() bool { - _, ok := o.GetForwardHostHeaderOk() - return ok -} - -// SetForwardHostHeader gets a reference to the given bool and assigns it to the ForwardHostHeader field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) SetForwardHostHeader(v ConfigPatchgetForwardHostHeaderRetType) { - setConfigPatchgetForwardHostHeaderAttributeType(&o.ForwardHostHeader, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetLabels() (res ConfigPatchGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetLabelsOk() (ret ConfigPatchGetLabelsRetType, ok bool) { - return getConfigPatchGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) SetLabels(v ConfigPatchGetLabelsRetType) { - setConfigPatchGetLabelsAttributeType(&o.Labels, v) -} - -// GetLogSink returns the LogSink field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetLogSink() (res ConfigPatchGetLogSinkRetType) { - res, _ = o.GetLogSinkOk() - return -} - -// GetLogSinkOk returns a tuple with the LogSink field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetLogSinkOk() (ret ConfigPatchGetLogSinkRetType, ok bool) { - return getConfigPatchGetLogSinkAttributeTypeOk(o.LogSink) -} - -// HasLogSink returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) HasLogSink() bool { - _, ok := o.GetLogSinkOk() - return ok -} - -// SetLogSink gets a reference to the given ConfigPatchLogSink and assigns it to the LogSink field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) SetLogSink(v ConfigPatchGetLogSinkRetType) { - setConfigPatchGetLogSinkAttributeType(&o.LogSink, v) -} - -// SetLogSinkNil sets the value for LogSink to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) SetLogSinkNil() { - o.LogSink = nil -} - -// UnsetLogSink ensures that no value is present for LogSink, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) UnsetLogSink() { - o.LogSink = nil -} - -// GetMonthlyLimitBytes returns the MonthlyLimitBytes field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetMonthlyLimitBytes() (res ConfigPatchGetMonthlyLimitBytesRetType) { - res, _ = o.GetMonthlyLimitBytesOk() - return -} - -// GetMonthlyLimitBytesOk returns a tuple with the MonthlyLimitBytes field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetMonthlyLimitBytesOk() (ret ConfigPatchGetMonthlyLimitBytesRetType, ok bool) { - return getConfigPatchGetMonthlyLimitBytesAttributeTypeOk(o.MonthlyLimitBytes) -} - -// HasMonthlyLimitBytes returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) HasMonthlyLimitBytes() bool { - _, ok := o.GetMonthlyLimitBytesOk() - return ok -} - -// SetMonthlyLimitBytes gets a reference to the given int64 and assigns it to the MonthlyLimitBytes field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) SetMonthlyLimitBytes(v ConfigPatchGetMonthlyLimitBytesRetType) { - setConfigPatchGetMonthlyLimitBytesAttributeType(&o.MonthlyLimitBytes, v) -} - -// SetMonthlyLimitBytesNil sets the value for MonthlyLimitBytes to be an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) SetMonthlyLimitBytesNil() { - o.MonthlyLimitBytes = nil -} - -// UnsetMonthlyLimitBytes ensures that no value is present for MonthlyLimitBytes, not even an explicit nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) UnsetMonthlyLimitBytes() { - o.MonthlyLimitBytes = nil -} - -// GetOptimizer returns the Optimizer field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetOptimizer() (res ConfigPatchGetOptimizerRetType) { - res, _ = o.GetOptimizerOk() - return -} - -// GetOptimizerOk returns a tuple with the Optimizer field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetOptimizerOk() (ret ConfigPatchGetOptimizerRetType, ok bool) { - return getConfigPatchGetOptimizerAttributeTypeOk(o.Optimizer) -} - -// HasOptimizer returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) HasOptimizer() bool { - _, ok := o.GetOptimizerOk() - return ok -} - -// SetOptimizer gets a reference to the given OptimizerPatch and assigns it to the Optimizer field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) SetOptimizer(v ConfigPatchGetOptimizerRetType) { - setConfigPatchGetOptimizerAttributeType(&o.Optimizer, v) -} - -// GetRedirects returns the Redirects field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetRedirects() (res ConfigPatchGetRedirectsRetType) { - res, _ = o.GetRedirectsOk() - return -} - -// GetRedirectsOk returns a tuple with the Redirects field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetRedirectsOk() (ret ConfigPatchGetRedirectsRetType, ok bool) { - return getConfigPatchGetRedirectsAttributeTypeOk(o.Redirects) -} - -// HasRedirects returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) HasRedirects() bool { - _, ok := o.GetRedirectsOk() - return ok -} - -// SetRedirects gets a reference to the given RedirectConfig and assigns it to the Redirects field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) SetRedirects(v ConfigPatchGetRedirectsRetType) { - setConfigPatchGetRedirectsAttributeType(&o.Redirects, v) -} - -// GetRegions returns the Regions field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetRegions() (res ConfigPatchGetRegionsRetType) { - res, _ = o.GetRegionsOk() - return -} - -// GetRegionsOk returns a tuple with the Regions field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetRegionsOk() (ret ConfigPatchGetRegionsRetType, ok bool) { - return getConfigPatchGetRegionsAttributeTypeOk(o.Regions) -} - -// HasRegions returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) HasRegions() bool { - _, ok := o.GetRegionsOk() - return ok -} - -// SetRegions gets a reference to the given []Region and assigns it to the Regions field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) SetRegions(v ConfigPatchGetRegionsRetType) { - setConfigPatchGetRegionsAttributeType(&o.Regions, v) -} - -// GetStripResponseCookies returns the StripResponseCookies field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetStripResponseCookies() (res ConfigPatchgetStripResponseCookiesRetType) { - res, _ = o.GetStripResponseCookiesOk() - return -} - -// GetStripResponseCookiesOk returns a tuple with the StripResponseCookies field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetStripResponseCookiesOk() (ret ConfigPatchgetStripResponseCookiesRetType, ok bool) { - return getConfigPatchgetStripResponseCookiesAttributeTypeOk(o.StripResponseCookies) -} - -// HasStripResponseCookies returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) HasStripResponseCookies() bool { - _, ok := o.GetStripResponseCookiesOk() - return ok -} - -// SetStripResponseCookies gets a reference to the given bool and assigns it to the StripResponseCookies field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) SetStripResponseCookies(v ConfigPatchgetStripResponseCookiesRetType) { - setConfigPatchgetStripResponseCookiesAttributeType(&o.StripResponseCookies, v) -} - -// GetTls returns the Tls field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetTls() (res ConfigPatchGetTlsRetType) { - res, _ = o.GetTlsOk() - return -} - -// GetTlsOk returns a tuple with the Tls field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetTlsOk() (ret ConfigPatchGetTlsRetType, ok bool) { - return getConfigPatchGetTlsAttributeTypeOk(o.Tls) -} - -// HasTls returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) HasTls() bool { - _, ok := o.GetTlsOk() - return ok -} - -// SetTls gets a reference to the given TlsConfigPatch and assigns it to the Tls field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) SetTls(v ConfigPatchGetTlsRetType) { - setConfigPatchGetTlsAttributeType(&o.Tls, v) -} - -// GetWaf returns the Waf field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetWaf() (res ConfigPatchGetWafRetType) { - res, _ = o.GetWafOk() - return -} - -// GetWafOk returns a tuple with the Waf field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) GetWafOk() (ret ConfigPatchGetWafRetType, ok bool) { - return getConfigPatchGetWafAttributeTypeOk(o.Waf) -} - -// HasWaf returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) HasWaf() bool { - _, ok := o.GetWafOk() - return ok -} - -// SetWaf gets a reference to the given WafConfigPatch and assigns it to the Waf field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ConfigPatch) SetWaf(v ConfigPatchGetWafRetType) { - setConfigPatchGetWafAttributeType(&o.Waf, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ConfigPatch) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getConfigPatchGetBackendAttributeTypeOk(o.Backend); ok { - toSerialize["Backend"] = val - } - if val, ok := getConfigPatchGetBlockedCountriesAttributeTypeOk(o.BlockedCountries); ok { - toSerialize["BlockedCountries"] = val - } - if val, ok := getConfigPatchGetBlockedIpsAttributeTypeOk(o.BlockedIps); ok { - toSerialize["BlockedIps"] = val - } - if val, ok := getConfigPatchGetCacheConfigAttributeTypeOk(o.CacheConfig); ok { - toSerialize["CacheConfig"] = val - } - if val, ok := getConfigPatchGetDefaultCacheDurationAttributeTypeOk(o.DefaultCacheDuration); ok { - toSerialize["DefaultCacheDuration"] = val - } - if val, ok := getConfigPatchgetForwardHostHeaderAttributeTypeOk(o.ForwardHostHeader); ok { - toSerialize["ForwardHostHeader"] = val - } - if val, ok := getConfigPatchGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getConfigPatchGetLogSinkAttributeTypeOk(o.LogSink); ok { - toSerialize["LogSink"] = val - } - if val, ok := getConfigPatchGetMonthlyLimitBytesAttributeTypeOk(o.MonthlyLimitBytes); ok { - toSerialize["MonthlyLimitBytes"] = val - } - if val, ok := getConfigPatchGetOptimizerAttributeTypeOk(o.Optimizer); ok { - toSerialize["Optimizer"] = val - } - if val, ok := getConfigPatchGetRedirectsAttributeTypeOk(o.Redirects); ok { - toSerialize["Redirects"] = val - } - if val, ok := getConfigPatchGetRegionsAttributeTypeOk(o.Regions); ok { - toSerialize["Regions"] = val - } - if val, ok := getConfigPatchgetStripResponseCookiesAttributeTypeOk(o.StripResponseCookies); ok { - toSerialize["StripResponseCookies"] = val - } - if val, ok := getConfigPatchGetTlsAttributeTypeOk(o.Tls); ok { - toSerialize["Tls"] = val - } - if val, ok := getConfigPatchGetWafAttributeTypeOk(o.Waf); ok { - toSerialize["Waf"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableConfigPatch struct { - value *ConfigPatch - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableConfigPatch) Get() *ConfigPatch { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableConfigPatch) Set(val *ConfigPatch) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableConfigPatch) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableConfigPatch) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableConfigPatch(val *ConfigPatch) *NullableConfigPatch { - return &NullableConfigPatch{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableConfigPatch) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableConfigPatch) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_config_patch_backend.go b/services/cdn/model_config_patch_backend.go deleted file mode 100644 index 44a9b45c50..0000000000 --- a/services/cdn/model_config_patch_backend.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// ConfigPatchBackend - struct for ConfigPatchBackend -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchBackend struct { - BucketBackendPatch *BucketBackendPatch - HttpBackendPatch *HttpBackendPatch -} - -// BucketBackendPatchAsConfigPatchBackend is a convenience function that returns BucketBackendPatch wrapped in ConfigPatchBackend -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func BucketBackendPatchAsConfigPatchBackend(v *BucketBackendPatch) ConfigPatchBackend { - return ConfigPatchBackend{ - BucketBackendPatch: v, - } -} - -// HttpBackendPatchAsConfigPatchBackend is a convenience function that returns HttpBackendPatch wrapped in ConfigPatchBackend -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func HttpBackendPatchAsConfigPatchBackend(v *HttpBackendPatch) ConfigPatchBackend { - return ConfigPatchBackend{ - HttpBackendPatch: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (dst *ConfigPatchBackend) 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 '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 - err = json.Unmarshal(data, &dst.HttpBackendPatch) - if err == nil { - return nil // data stored in dst.HttpBackendPatch, return on the first match - } else { - dst.HttpBackendPatch = nil - return fmt.Errorf("failed to unmarshal ConfigPatchBackend as HttpBackendPatch: %s", err.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 - err = json.Unmarshal(data, &dst.HttpBackendPatch) - if err == nil { - return nil // data stored in dst.HttpBackendPatch, return on the first match - } else { - dst.HttpBackendPatch = nil - return fmt.Errorf("failed to unmarshal ConfigPatchBackend as HttpBackendPatch: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src ConfigPatchBackend) MarshalJSON() ([]byte, error) { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - if src.BucketBackendPatch != nil { - return json.Marshal(&src.BucketBackendPatch) - } - - if src.HttpBackendPatch != nil { - return json.Marshal(&src.HttpBackendPatch) - } - - return []byte("{}"), nil // no data in oneOf schemas => empty JSON object -} - -// Get the actual instance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (obj *ConfigPatchBackend) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.BucketBackendPatch != nil { - return obj.BucketBackendPatch - } - - if obj.HttpBackendPatch != nil { - return obj.HttpBackendPatch - } - - // all schemas are nil - return nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableConfigPatchBackend struct { - value *ConfigPatchBackend - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableConfigPatchBackend) Get() *ConfigPatchBackend { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableConfigPatchBackend) Set(val *ConfigPatchBackend) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableConfigPatchBackend) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableConfigPatchBackend) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableConfigPatchBackend(val *ConfigPatchBackend) *NullableConfigPatchBackend { - return &NullableConfigPatchBackend{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableConfigPatchBackend) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableConfigPatchBackend) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_config_patch_backend_test.go b/services/cdn/model_config_patch_backend_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_config_patch_backend_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_config_patch_log_sink.go b/services/cdn/model_config_patch_log_sink.go deleted file mode 100644 index 326c4df8cb..0000000000 --- a/services/cdn/model_config_patch_log_sink.go +++ /dev/null @@ -1,183 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// ConfigPatchLogSink - struct for ConfigPatchLogSink -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ConfigPatchLogSink struct { - LokiLogSinkPatch *LokiLogSinkPatch - OtlpLogSinkPatch *OtlpLogSinkPatch -} - -// LokiLogSinkPatchAsConfigPatchLogSink is a convenience function that returns LokiLogSinkPatch wrapped in ConfigPatchLogSink -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func LokiLogSinkPatchAsConfigPatchLogSink(v *LokiLogSinkPatch) ConfigPatchLogSink { - return ConfigPatchLogSink{ - LokiLogSinkPatch: v, - } -} - -// OtlpLogSinkPatchAsConfigPatchLogSink is a convenience function that returns OtlpLogSinkPatch wrapped in ConfigPatchLogSink -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func OtlpLogSinkPatchAsConfigPatchLogSink(v *OtlpLogSinkPatch) ConfigPatchLogSink { - return ConfigPatchLogSink{ - OtlpLogSinkPatch: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (dst *ConfigPatchLogSink) UnmarshalJSON(data []byte) error { - var err error - // this object is nullable so check if the payload is null or empty string - if string(data) == "" || string(data) == "{}" { - return nil - } - - // use discriminator value to speed up the lookup - var jsonDict map[string]interface{} - err = newStrictDecoder(data).Decode(&jsonDict) - if err != nil { - return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") - } - - // check if the discriminator value is '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.LokiLogSinkPatch, return on the first match - } else { - dst.LokiLogSinkPatch = nil - return fmt.Errorf("failed to unmarshal ConfigPatchLogSink as LokiLogSinkPatch: %s", err.Error()) - } - } - - // check if the discriminator value is 'OtlpLogSinkPatch' - if jsonDict["type"] == "OtlpLogSinkPatch" { - // try to unmarshal JSON data into OtlpLogSinkPatch - err = json.Unmarshal(data, &dst.OtlpLogSinkPatch) - if err == nil { - return nil // data stored in dst.OtlpLogSinkPatch, return on the first match - } else { - dst.OtlpLogSinkPatch = nil - return fmt.Errorf("failed to unmarshal ConfigPatchLogSink as OtlpLogSinkPatch: %s", err.Error()) - } - } - - // check if the discriminator value is 'loki' - if jsonDict["type"] == "loki" { - // try to unmarshal JSON data into LokiLogSinkPatch - err = json.Unmarshal(data, &dst.LokiLogSinkPatch) - if err == nil { - return nil // data stored in dst.LokiLogSinkPatch, return on the first match - } else { - dst.LokiLogSinkPatch = nil - return fmt.Errorf("failed to unmarshal ConfigPatchLogSink as LokiLogSinkPatch: %s", err.Error()) - } - } - - // check if the discriminator value is 'otlp' - if jsonDict["type"] == "otlp" { - // try to unmarshal JSON data into OtlpLogSinkPatch - err = json.Unmarshal(data, &dst.OtlpLogSinkPatch) - if err == nil { - return nil // data stored in dst.OtlpLogSinkPatch, return on the first match - } else { - dst.OtlpLogSinkPatch = nil - return fmt.Errorf("failed to unmarshal ConfigPatchLogSink as OtlpLogSinkPatch: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src ConfigPatchLogSink) MarshalJSON() ([]byte, error) { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - if src.LokiLogSinkPatch != nil { - return json.Marshal(&src.LokiLogSinkPatch) - } - - if src.OtlpLogSinkPatch != nil { - return json.Marshal(&src.OtlpLogSinkPatch) - } - - return []byte("{}"), nil // no data in oneOf schemas => empty JSON object -} - -// Get the actual instance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (obj *ConfigPatchLogSink) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.LokiLogSinkPatch != nil { - return obj.LokiLogSinkPatch - } - - if obj.OtlpLogSinkPatch != nil { - return obj.OtlpLogSinkPatch - } - - // all schemas are nil - return nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableConfigPatchLogSink struct { - value *ConfigPatchLogSink - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableConfigPatchLogSink) Get() *ConfigPatchLogSink { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableConfigPatchLogSink) Set(val *ConfigPatchLogSink) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableConfigPatchLogSink) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableConfigPatchLogSink) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableConfigPatchLogSink(val *ConfigPatchLogSink) *NullableConfigPatchLogSink { - return &NullableConfigPatchLogSink{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableConfigPatchLogSink) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableConfigPatchLogSink) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_config_patch_log_sink_test.go b/services/cdn/model_config_patch_log_sink_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_config_patch_log_sink_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_config_patch_test.go b/services/cdn/model_config_patch_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_config_patch_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_config_test.go b/services/cdn/model_config_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_config_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_create_distribution_payload.go b/services/cdn/model_create_distribution_payload.go deleted file mode 100644 index b4228b1387..0000000000 --- a/services/cdn/model_create_distribution_payload.go +++ /dev/null @@ -1,1023 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the CreateDistributionPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateDistributionPayload{} - -/* - types and functions for backend -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetBackendAttributeType = *CreateDistributionPayloadBackend - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetBackendArgType = CreateDistributionPayloadBackend - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetBackendRetType = CreateDistributionPayloadBackend - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateDistributionPayloadGetBackendAttributeTypeOk(arg CreateDistributionPayloadGetBackendAttributeType) (ret CreateDistributionPayloadGetBackendRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateDistributionPayloadGetBackendAttributeType(arg *CreateDistributionPayloadGetBackendAttributeType, val CreateDistributionPayloadGetBackendRetType) { - *arg = &val -} - -/* - types and functions for blockedCountries -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetBlockedCountriesAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetBlockedCountriesArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetBlockedCountriesRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateDistributionPayloadGetBlockedCountriesAttributeTypeOk(arg CreateDistributionPayloadGetBlockedCountriesAttributeType) (ret CreateDistributionPayloadGetBlockedCountriesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateDistributionPayloadGetBlockedCountriesAttributeType(arg *CreateDistributionPayloadGetBlockedCountriesAttributeType, val CreateDistributionPayloadGetBlockedCountriesRetType) { - *arg = &val -} - -/* - types and functions for blockedIps -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetBlockedIpsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetBlockedIpsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetBlockedIpsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateDistributionPayloadGetBlockedIpsAttributeTypeOk(arg CreateDistributionPayloadGetBlockedIpsAttributeType) (ret CreateDistributionPayloadGetBlockedIpsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateDistributionPayloadGetBlockedIpsAttributeType(arg *CreateDistributionPayloadGetBlockedIpsAttributeType, val CreateDistributionPayloadGetBlockedIpsRetType) { - *arg = &val -} - -/* - types and functions for cacheConfig -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetCacheConfigAttributeType = *CacheConfigCreate - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetCacheConfigArgType = CacheConfigCreate - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetCacheConfigRetType = CacheConfigCreate - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateDistributionPayloadGetCacheConfigAttributeTypeOk(arg CreateDistributionPayloadGetCacheConfigAttributeType) (ret CreateDistributionPayloadGetCacheConfigRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateDistributionPayloadGetCacheConfigAttributeType(arg *CreateDistributionPayloadGetCacheConfigAttributeType, val CreateDistributionPayloadGetCacheConfigRetType) { - *arg = &val -} - -/* - types and functions for defaultCacheDuration -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetDefaultCacheDurationAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateDistributionPayloadGetDefaultCacheDurationAttributeTypeOk(arg CreateDistributionPayloadGetDefaultCacheDurationAttributeType) (ret CreateDistributionPayloadGetDefaultCacheDurationRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateDistributionPayloadGetDefaultCacheDurationAttributeType(arg *CreateDistributionPayloadGetDefaultCacheDurationAttributeType, val CreateDistributionPayloadGetDefaultCacheDurationRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetDefaultCacheDurationArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetDefaultCacheDurationRetType = string - -/* - types and functions for forwardHostHeader -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadgetForwardHostHeaderAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadgetForwardHostHeaderArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadgetForwardHostHeaderRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateDistributionPayloadgetForwardHostHeaderAttributeTypeOk(arg CreateDistributionPayloadgetForwardHostHeaderAttributeType) (ret CreateDistributionPayloadgetForwardHostHeaderRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateDistributionPayloadgetForwardHostHeaderAttributeType(arg *CreateDistributionPayloadgetForwardHostHeaderAttributeType, val CreateDistributionPayloadgetForwardHostHeaderRetType) { - *arg = &val -} - -/* - types and functions for intentId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetIntentIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateDistributionPayloadGetIntentIdAttributeTypeOk(arg CreateDistributionPayloadGetIntentIdAttributeType) (ret CreateDistributionPayloadGetIntentIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateDistributionPayloadGetIntentIdAttributeType(arg *CreateDistributionPayloadGetIntentIdAttributeType, val CreateDistributionPayloadGetIntentIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetIntentIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetIntentIdRetType = string - -/* - types and functions for labels -*/ - -// isContainer -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetLabelsAttributeType = *map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetLabelsArgType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetLabelsRetType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateDistributionPayloadGetLabelsAttributeTypeOk(arg CreateDistributionPayloadGetLabelsAttributeType) (ret CreateDistributionPayloadGetLabelsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateDistributionPayloadGetLabelsAttributeType(arg *CreateDistributionPayloadGetLabelsAttributeType, val CreateDistributionPayloadGetLabelsRetType) { - *arg = &val -} - -/* - types and functions for logSink -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetLogSinkAttributeType = *CreateDistributionPayloadLogSink - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetLogSinkArgType = CreateDistributionPayloadLogSink - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetLogSinkRetType = CreateDistributionPayloadLogSink - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateDistributionPayloadGetLogSinkAttributeTypeOk(arg CreateDistributionPayloadGetLogSinkAttributeType) (ret CreateDistributionPayloadGetLogSinkRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateDistributionPayloadGetLogSinkAttributeType(arg *CreateDistributionPayloadGetLogSinkAttributeType, val CreateDistributionPayloadGetLogSinkRetType) { - *arg = &val -} - -/* - types and functions for monthlyLimitBytes -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetMonthlyLimitBytesAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetMonthlyLimitBytesArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetMonthlyLimitBytesRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateDistributionPayloadGetMonthlyLimitBytesAttributeTypeOk(arg CreateDistributionPayloadGetMonthlyLimitBytesAttributeType) (ret CreateDistributionPayloadGetMonthlyLimitBytesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateDistributionPayloadGetMonthlyLimitBytesAttributeType(arg *CreateDistributionPayloadGetMonthlyLimitBytesAttributeType, val CreateDistributionPayloadGetMonthlyLimitBytesRetType) { - *arg = &val -} - -/* - types and functions for optimizer -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetOptimizerAttributeType = *Optimizer - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetOptimizerArgType = Optimizer - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetOptimizerRetType = Optimizer - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateDistributionPayloadGetOptimizerAttributeTypeOk(arg CreateDistributionPayloadGetOptimizerAttributeType) (ret CreateDistributionPayloadGetOptimizerRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateDistributionPayloadGetOptimizerAttributeType(arg *CreateDistributionPayloadGetOptimizerAttributeType, val CreateDistributionPayloadGetOptimizerRetType) { - *arg = &val -} - -/* - types and functions for redirects -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetRedirectsAttributeType = *RedirectConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetRedirectsArgType = RedirectConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetRedirectsRetType = RedirectConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateDistributionPayloadGetRedirectsAttributeTypeOk(arg CreateDistributionPayloadGetRedirectsAttributeType) (ret CreateDistributionPayloadGetRedirectsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateDistributionPayloadGetRedirectsAttributeType(arg *CreateDistributionPayloadGetRedirectsAttributeType, val CreateDistributionPayloadGetRedirectsRetType) { - *arg = &val -} - -/* - types and functions for regions -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetRegionsAttributeType = *[]Region - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetRegionsArgType = []Region - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetRegionsRetType = []Region - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateDistributionPayloadGetRegionsAttributeTypeOk(arg CreateDistributionPayloadGetRegionsAttributeType) (ret CreateDistributionPayloadGetRegionsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateDistributionPayloadGetRegionsAttributeType(arg *CreateDistributionPayloadGetRegionsAttributeType, val CreateDistributionPayloadGetRegionsRetType) { - *arg = &val -} - -/* - types and functions for stripResponseCookies -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadgetStripResponseCookiesAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadgetStripResponseCookiesArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadgetStripResponseCookiesRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateDistributionPayloadgetStripResponseCookiesAttributeTypeOk(arg CreateDistributionPayloadgetStripResponseCookiesAttributeType) (ret CreateDistributionPayloadgetStripResponseCookiesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateDistributionPayloadgetStripResponseCookiesAttributeType(arg *CreateDistributionPayloadgetStripResponseCookiesAttributeType, val CreateDistributionPayloadgetStripResponseCookiesRetType) { - *arg = &val -} - -/* - types and functions for tls -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetTlsAttributeType = *TlsConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetTlsArgType = TlsConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetTlsRetType = TlsConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateDistributionPayloadGetTlsAttributeTypeOk(arg CreateDistributionPayloadGetTlsAttributeType) (ret CreateDistributionPayloadGetTlsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateDistributionPayloadGetTlsAttributeType(arg *CreateDistributionPayloadGetTlsAttributeType, val CreateDistributionPayloadGetTlsRetType) { - *arg = &val -} - -/* - types and functions for waf -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetWafAttributeType = *WafConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetWafArgType = WafConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadGetWafRetType = WafConfig - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateDistributionPayloadGetWafAttributeTypeOk(arg CreateDistributionPayloadGetWafAttributeType) (ret CreateDistributionPayloadGetWafRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateDistributionPayloadGetWafAttributeType(arg *CreateDistributionPayloadGetWafAttributeType, val CreateDistributionPayloadGetWafRetType) { - *arg = &val -} - -// CreateDistributionPayload struct for CreateDistributionPayload -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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"` - CacheConfig CreateDistributionPayloadGetCacheConfigAttributeType `json:"cacheConfig,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"` - // Enabling this allows the 'Host' header to be passed through to the origin. - ForwardHostHeader CreateDistributionPayloadgetForwardHostHeaderAttributeType `json:"forwardHostHeader,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"` - // Labels are key-value string pairs that can be attached to a distribution. - Labels CreateDistributionPayloadGetLabelsAttributeType `json:"labels,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"` - Redirects CreateDistributionPayloadGetRedirectsAttributeType `json:"redirects,omitempty"` - // Define in which regions you would like your content to be cached. - // REQUIRED - Regions CreateDistributionPayloadGetRegionsAttributeType `json:"regions" required:"true"` - // Enable this to prevent origin-level cookies from being forwarded to the end user. - StripResponseCookies CreateDistributionPayloadgetStripResponseCookiesAttributeType `json:"stripResponseCookies,omitempty"` - Tls CreateDistributionPayloadGetTlsAttributeType `json:"tls,omitempty"` - Waf CreateDistributionPayloadGetWafAttributeType `json:"waf,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _CreateDistributionPayload CreateDistributionPayload - -// NewCreateDistributionPayload instantiates a new CreateDistributionPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateDistributionPayload(backend CreateDistributionPayloadGetBackendArgType, regions CreateDistributionPayloadGetRegionsArgType) *CreateDistributionPayload { - this := CreateDistributionPayload{} - setCreateDistributionPayloadGetBackendAttributeType(&this.Backend, backend) - setCreateDistributionPayloadGetRegionsAttributeType(&this.Regions, regions) - return &this -} - -// NewCreateDistributionPayloadWithDefaults instantiates a new CreateDistributionPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateDistributionPayloadWithDefaults() *CreateDistributionPayload { - this := CreateDistributionPayload{} - return &this -} - -// GetBackend returns the Backend field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetBackendOk() (ret CreateDistributionPayloadGetBackendRetType, ok bool) { - return getCreateDistributionPayloadGetBackendAttributeTypeOk(o.Backend) -} - -// SetBackend sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) SetBackend(v CreateDistributionPayloadGetBackendRetType) { - setCreateDistributionPayloadGetBackendAttributeType(&o.Backend, v) -} - -// GetBlockedCountries returns the BlockedCountries field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetBlockedCountries() (res CreateDistributionPayloadGetBlockedCountriesRetType) { - res, _ = o.GetBlockedCountriesOk() - return -} - -// GetBlockedCountriesOk returns a tuple with the BlockedCountries field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetBlockedCountriesOk() (ret CreateDistributionPayloadGetBlockedCountriesRetType, ok bool) { - return getCreateDistributionPayloadGetBlockedCountriesAttributeTypeOk(o.BlockedCountries) -} - -// HasBlockedCountries returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) HasBlockedCountries() bool { - _, ok := o.GetBlockedCountriesOk() - return ok -} - -// SetBlockedCountries gets a reference to the given []string and assigns it to the BlockedCountries field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) SetBlockedCountries(v CreateDistributionPayloadGetBlockedCountriesRetType) { - setCreateDistributionPayloadGetBlockedCountriesAttributeType(&o.BlockedCountries, v) -} - -// GetBlockedIps returns the BlockedIps field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetBlockedIps() (res CreateDistributionPayloadGetBlockedIpsRetType) { - res, _ = o.GetBlockedIpsOk() - return -} - -// GetBlockedIpsOk returns a tuple with the BlockedIps field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetBlockedIpsOk() (ret CreateDistributionPayloadGetBlockedIpsRetType, ok bool) { - return getCreateDistributionPayloadGetBlockedIpsAttributeTypeOk(o.BlockedIps) -} - -// HasBlockedIps returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) SetBlockedIps(v CreateDistributionPayloadGetBlockedIpsRetType) { - setCreateDistributionPayloadGetBlockedIpsAttributeType(&o.BlockedIps, v) -} - -// GetCacheConfig returns the CacheConfig field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetCacheConfig() (res CreateDistributionPayloadGetCacheConfigRetType) { - res, _ = o.GetCacheConfigOk() - return -} - -// GetCacheConfigOk returns a tuple with the CacheConfig field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetCacheConfigOk() (ret CreateDistributionPayloadGetCacheConfigRetType, ok bool) { - return getCreateDistributionPayloadGetCacheConfigAttributeTypeOk(o.CacheConfig) -} - -// HasCacheConfig returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) HasCacheConfig() bool { - _, ok := o.GetCacheConfigOk() - return ok -} - -// SetCacheConfig gets a reference to the given CacheConfigCreate and assigns it to the CacheConfig field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) SetCacheConfig(v CreateDistributionPayloadGetCacheConfigRetType) { - setCreateDistributionPayloadGetCacheConfigAttributeType(&o.CacheConfig, v) -} - -// GetDefaultCacheDuration returns the DefaultCacheDuration field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetDefaultCacheDuration() (res CreateDistributionPayloadGetDefaultCacheDurationRetType) { - res, _ = o.GetDefaultCacheDurationOk() - return -} - -// GetDefaultCacheDurationOk returns a tuple with the DefaultCacheDuration field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetDefaultCacheDurationOk() (ret CreateDistributionPayloadGetDefaultCacheDurationRetType, ok bool) { - return getCreateDistributionPayloadGetDefaultCacheDurationAttributeTypeOk(o.DefaultCacheDuration) -} - -// HasDefaultCacheDuration returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) HasDefaultCacheDuration() bool { - _, ok := o.GetDefaultCacheDurationOk() - return ok -} - -// SetDefaultCacheDuration gets a reference to the given string and assigns it to the DefaultCacheDuration field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) SetDefaultCacheDuration(v CreateDistributionPayloadGetDefaultCacheDurationRetType) { - setCreateDistributionPayloadGetDefaultCacheDurationAttributeType(&o.DefaultCacheDuration, v) -} - -// GetForwardHostHeader returns the ForwardHostHeader field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetForwardHostHeader() (res CreateDistributionPayloadgetForwardHostHeaderRetType) { - res, _ = o.GetForwardHostHeaderOk() - return -} - -// GetForwardHostHeaderOk returns a tuple with the ForwardHostHeader field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetForwardHostHeaderOk() (ret CreateDistributionPayloadgetForwardHostHeaderRetType, ok bool) { - return getCreateDistributionPayloadgetForwardHostHeaderAttributeTypeOk(o.ForwardHostHeader) -} - -// HasForwardHostHeader returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) HasForwardHostHeader() bool { - _, ok := o.GetForwardHostHeaderOk() - return ok -} - -// SetForwardHostHeader gets a reference to the given bool and assigns it to the ForwardHostHeader field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) SetForwardHostHeader(v CreateDistributionPayloadgetForwardHostHeaderRetType) { - setCreateDistributionPayloadgetForwardHostHeaderAttributeType(&o.ForwardHostHeader, v) -} - -// GetIntentId returns the IntentId field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetIntentId() (res CreateDistributionPayloadGetIntentIdRetType) { - res, _ = o.GetIntentIdOk() - return -} - -// GetIntentIdOk returns a tuple with the IntentId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetIntentIdOk() (ret CreateDistributionPayloadGetIntentIdRetType, ok bool) { - return getCreateDistributionPayloadGetIntentIdAttributeTypeOk(o.IntentId) -} - -// HasIntentId returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) HasIntentId() bool { - _, ok := o.GetIntentIdOk() - return ok -} - -// SetIntentId gets a reference to the given string and assigns it to the IntentId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) SetIntentId(v CreateDistributionPayloadGetIntentIdRetType) { - setCreateDistributionPayloadGetIntentIdAttributeType(&o.IntentId, v) -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetLabels() (res CreateDistributionPayloadGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetLabelsOk() (ret CreateDistributionPayloadGetLabelsRetType, ok bool) { - return getCreateDistributionPayloadGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) SetLabels(v CreateDistributionPayloadGetLabelsRetType) { - setCreateDistributionPayloadGetLabelsAttributeType(&o.Labels, v) -} - -// GetLogSink returns the LogSink field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetLogSink() (res CreateDistributionPayloadGetLogSinkRetType) { - res, _ = o.GetLogSinkOk() - return -} - -// GetLogSinkOk returns a tuple with the LogSink field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetLogSinkOk() (ret CreateDistributionPayloadGetLogSinkRetType, ok bool) { - return getCreateDistributionPayloadGetLogSinkAttributeTypeOk(o.LogSink) -} - -// HasLogSink returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) HasLogSink() bool { - _, ok := o.GetLogSinkOk() - return ok -} - -// SetLogSink gets a reference to the given CreateDistributionPayloadLogSink and assigns it to the LogSink field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) SetLogSink(v CreateDistributionPayloadGetLogSinkRetType) { - setCreateDistributionPayloadGetLogSinkAttributeType(&o.LogSink, v) -} - -// GetMonthlyLimitBytes returns the MonthlyLimitBytes field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetMonthlyLimitBytes() (res CreateDistributionPayloadGetMonthlyLimitBytesRetType) { - res, _ = o.GetMonthlyLimitBytesOk() - return -} - -// GetMonthlyLimitBytesOk returns a tuple with the MonthlyLimitBytes field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetMonthlyLimitBytesOk() (ret CreateDistributionPayloadGetMonthlyLimitBytesRetType, ok bool) { - return getCreateDistributionPayloadGetMonthlyLimitBytesAttributeTypeOk(o.MonthlyLimitBytes) -} - -// HasMonthlyLimitBytes returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) HasMonthlyLimitBytes() bool { - _, ok := o.GetMonthlyLimitBytesOk() - return ok -} - -// SetMonthlyLimitBytes gets a reference to the given int64 and assigns it to the MonthlyLimitBytes field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) SetMonthlyLimitBytes(v CreateDistributionPayloadGetMonthlyLimitBytesRetType) { - setCreateDistributionPayloadGetMonthlyLimitBytesAttributeType(&o.MonthlyLimitBytes, v) -} - -// GetOptimizer returns the Optimizer field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetOptimizer() (res CreateDistributionPayloadGetOptimizerRetType) { - res, _ = o.GetOptimizerOk() - return -} - -// GetOptimizerOk returns a tuple with the Optimizer field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetOptimizerOk() (ret CreateDistributionPayloadGetOptimizerRetType, ok bool) { - return getCreateDistributionPayloadGetOptimizerAttributeTypeOk(o.Optimizer) -} - -// HasOptimizer returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) HasOptimizer() bool { - _, ok := o.GetOptimizerOk() - return ok -} - -// SetOptimizer gets a reference to the given Optimizer and assigns it to the Optimizer field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) SetOptimizer(v CreateDistributionPayloadGetOptimizerRetType) { - setCreateDistributionPayloadGetOptimizerAttributeType(&o.Optimizer, v) -} - -// GetRedirects returns the Redirects field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetRedirects() (res CreateDistributionPayloadGetRedirectsRetType) { - res, _ = o.GetRedirectsOk() - return -} - -// GetRedirectsOk returns a tuple with the Redirects field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetRedirectsOk() (ret CreateDistributionPayloadGetRedirectsRetType, ok bool) { - return getCreateDistributionPayloadGetRedirectsAttributeTypeOk(o.Redirects) -} - -// HasRedirects returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) HasRedirects() bool { - _, ok := o.GetRedirectsOk() - return ok -} - -// SetRedirects gets a reference to the given RedirectConfig and assigns it to the Redirects field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) SetRedirects(v CreateDistributionPayloadGetRedirectsRetType) { - setCreateDistributionPayloadGetRedirectsAttributeType(&o.Redirects, v) -} - -// GetRegions returns the Regions field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetRegions() (ret CreateDistributionPayloadGetRegionsRetType) { - ret, _ = o.GetRegionsOk() - return ret -} - -// GetRegionsOk returns a tuple with the Regions field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetRegionsOk() (ret CreateDistributionPayloadGetRegionsRetType, ok bool) { - return getCreateDistributionPayloadGetRegionsAttributeTypeOk(o.Regions) -} - -// SetRegions sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) SetRegions(v CreateDistributionPayloadGetRegionsRetType) { - setCreateDistributionPayloadGetRegionsAttributeType(&o.Regions, v) -} - -// GetStripResponseCookies returns the StripResponseCookies field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetStripResponseCookies() (res CreateDistributionPayloadgetStripResponseCookiesRetType) { - res, _ = o.GetStripResponseCookiesOk() - return -} - -// GetStripResponseCookiesOk returns a tuple with the StripResponseCookies field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetStripResponseCookiesOk() (ret CreateDistributionPayloadgetStripResponseCookiesRetType, ok bool) { - return getCreateDistributionPayloadgetStripResponseCookiesAttributeTypeOk(o.StripResponseCookies) -} - -// HasStripResponseCookies returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) HasStripResponseCookies() bool { - _, ok := o.GetStripResponseCookiesOk() - return ok -} - -// SetStripResponseCookies gets a reference to the given bool and assigns it to the StripResponseCookies field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) SetStripResponseCookies(v CreateDistributionPayloadgetStripResponseCookiesRetType) { - setCreateDistributionPayloadgetStripResponseCookiesAttributeType(&o.StripResponseCookies, v) -} - -// GetTls returns the Tls field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetTls() (res CreateDistributionPayloadGetTlsRetType) { - res, _ = o.GetTlsOk() - return -} - -// GetTlsOk returns a tuple with the Tls field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetTlsOk() (ret CreateDistributionPayloadGetTlsRetType, ok bool) { - return getCreateDistributionPayloadGetTlsAttributeTypeOk(o.Tls) -} - -// HasTls returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) HasTls() bool { - _, ok := o.GetTlsOk() - return ok -} - -// SetTls gets a reference to the given TlsConfig and assigns it to the Tls field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) SetTls(v CreateDistributionPayloadGetTlsRetType) { - setCreateDistributionPayloadGetTlsAttributeType(&o.Tls, v) -} - -// GetWaf returns the Waf field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetWaf() (res CreateDistributionPayloadGetWafRetType) { - res, _ = o.GetWafOk() - return -} - -// GetWafOk returns a tuple with the Waf field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) GetWafOk() (ret CreateDistributionPayloadGetWafRetType, ok bool) { - return getCreateDistributionPayloadGetWafAttributeTypeOk(o.Waf) -} - -// HasWaf returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) HasWaf() bool { - _, ok := o.GetWafOk() - return ok -} - -// SetWaf gets a reference to the given WafConfig and assigns it to the Waf field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionPayload) SetWaf(v CreateDistributionPayloadGetWafRetType) { - setCreateDistributionPayloadGetWafAttributeType(&o.Waf, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 := getCreateDistributionPayloadGetCacheConfigAttributeTypeOk(o.CacheConfig); ok { - toSerialize["CacheConfig"] = val - } - if val, ok := getCreateDistributionPayloadGetDefaultCacheDurationAttributeTypeOk(o.DefaultCacheDuration); ok { - toSerialize["DefaultCacheDuration"] = val - } - if val, ok := getCreateDistributionPayloadgetForwardHostHeaderAttributeTypeOk(o.ForwardHostHeader); ok { - toSerialize["ForwardHostHeader"] = val - } - if val, ok := getCreateDistributionPayloadGetIntentIdAttributeTypeOk(o.IntentId); ok { - toSerialize["IntentId"] = val - } - if val, ok := getCreateDistributionPayloadGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } - if val, ok := getCreateDistributionPayloadGetLogSinkAttributeTypeOk(o.LogSink); ok { - toSerialize["LogSink"] = val - } - if val, ok := getCreateDistributionPayloadGetMonthlyLimitBytesAttributeTypeOk(o.MonthlyLimitBytes); ok { - toSerialize["MonthlyLimitBytes"] = val - } - if val, ok := getCreateDistributionPayloadGetOptimizerAttributeTypeOk(o.Optimizer); ok { - toSerialize["Optimizer"] = val - } - if val, ok := getCreateDistributionPayloadGetRedirectsAttributeTypeOk(o.Redirects); ok { - toSerialize["Redirects"] = val - } - if val, ok := getCreateDistributionPayloadGetRegionsAttributeTypeOk(o.Regions); ok { - toSerialize["Regions"] = val - } - if val, ok := getCreateDistributionPayloadgetStripResponseCookiesAttributeTypeOk(o.StripResponseCookies); ok { - toSerialize["StripResponseCookies"] = val - } - if val, ok := getCreateDistributionPayloadGetTlsAttributeTypeOk(o.Tls); ok { - toSerialize["Tls"] = val - } - if val, ok := getCreateDistributionPayloadGetWafAttributeTypeOk(o.Waf); ok { - toSerialize["Waf"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateDistributionPayload struct { - value *CreateDistributionPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateDistributionPayload) Get() *CreateDistributionPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateDistributionPayload) Set(val *CreateDistributionPayload) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateDistributionPayload) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateDistributionPayload) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableCreateDistributionPayload(val *CreateDistributionPayload) *NullableCreateDistributionPayload { - return &NullableCreateDistributionPayload{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateDistributionPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateDistributionPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_create_distribution_payload_backend.go b/services/cdn/model_create_distribution_payload_backend.go deleted file mode 100644 index 110023585b..0000000000 --- a/services/cdn/model_create_distribution_payload_backend.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// CreateDistributionPayloadBackend - Configuration for the content origin backend. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadBackend struct { - BucketBackendCreate *BucketBackendCreate - HttpBackendCreate *HttpBackendCreate -} - -// BucketBackendCreateAsCreateDistributionPayloadBackend is a convenience function that returns BucketBackendCreate wrapped in CreateDistributionPayloadBackend -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func BucketBackendCreateAsCreateDistributionPayloadBackend(v *BucketBackendCreate) CreateDistributionPayloadBackend { - return CreateDistributionPayloadBackend{ - BucketBackendCreate: v, - } -} - -// HttpBackendCreateAsCreateDistributionPayloadBackend is a convenience function that returns HttpBackendCreate wrapped in CreateDistributionPayloadBackend -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func HttpBackendCreateAsCreateDistributionPayloadBackend(v *HttpBackendCreate) CreateDistributionPayloadBackend { - return CreateDistributionPayloadBackend{ - HttpBackendCreate: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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) { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateDistributionPayloadBackend struct { - value *CreateDistributionPayloadBackend - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateDistributionPayloadBackend) Get() *CreateDistributionPayloadBackend { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateDistributionPayloadBackend) Set(val *CreateDistributionPayloadBackend) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateDistributionPayloadBackend) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateDistributionPayloadBackend) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableCreateDistributionPayloadBackend(val *CreateDistributionPayloadBackend) *NullableCreateDistributionPayloadBackend { - return &NullableCreateDistributionPayloadBackend{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateDistributionPayloadBackend) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_create_distribution_payload_backend_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_create_distribution_payload_log_sink.go b/services/cdn/model_create_distribution_payload_log_sink.go deleted file mode 100644 index 1b49021f0c..0000000000 --- a/services/cdn/model_create_distribution_payload_log_sink.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// CreateDistributionPayloadLogSink - struct for CreateDistributionPayloadLogSink -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionPayloadLogSink struct { - LokiLogSinkCreate *LokiLogSinkCreate - OtlpLogSinkCreate *OtlpLogSinkCreate -} - -// LokiLogSinkCreateAsCreateDistributionPayloadLogSink is a convenience function that returns LokiLogSinkCreate wrapped in CreateDistributionPayloadLogSink -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func LokiLogSinkCreateAsCreateDistributionPayloadLogSink(v *LokiLogSinkCreate) CreateDistributionPayloadLogSink { - return CreateDistributionPayloadLogSink{ - LokiLogSinkCreate: v, - } -} - -// OtlpLogSinkCreateAsCreateDistributionPayloadLogSink is a convenience function that returns OtlpLogSinkCreate wrapped in CreateDistributionPayloadLogSink -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func OtlpLogSinkCreateAsCreateDistributionPayloadLogSink(v *OtlpLogSinkCreate) CreateDistributionPayloadLogSink { - return CreateDistributionPayloadLogSink{ - OtlpLogSinkCreate: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (dst *CreateDistributionPayloadLogSink) 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 '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.LokiLogSinkCreate, return on the first match - } else { - dst.LokiLogSinkCreate = nil - return fmt.Errorf("failed to unmarshal CreateDistributionPayloadLogSink as LokiLogSinkCreate: %s", err.Error()) - } - } - - // check if the discriminator value is 'OtlpLogSinkCreate' - if jsonDict["type"] == "OtlpLogSinkCreate" { - // try to unmarshal JSON data into OtlpLogSinkCreate - err = json.Unmarshal(data, &dst.OtlpLogSinkCreate) - if err == nil { - return nil // data stored in dst.OtlpLogSinkCreate, return on the first match - } else { - dst.OtlpLogSinkCreate = nil - return fmt.Errorf("failed to unmarshal CreateDistributionPayloadLogSink as OtlpLogSinkCreate: %s", err.Error()) - } - } - - // check if the discriminator value is 'loki' - if jsonDict["type"] == "loki" { - // try to unmarshal JSON data into LokiLogSinkCreate - err = json.Unmarshal(data, &dst.LokiLogSinkCreate) - if err == nil { - return nil // data stored in dst.LokiLogSinkCreate, return on the first match - } else { - dst.LokiLogSinkCreate = nil - return fmt.Errorf("failed to unmarshal CreateDistributionPayloadLogSink as LokiLogSinkCreate: %s", err.Error()) - } - } - - // check if the discriminator value is 'otlp' - if jsonDict["type"] == "otlp" { - // try to unmarshal JSON data into OtlpLogSinkCreate - err = json.Unmarshal(data, &dst.OtlpLogSinkCreate) - if err == nil { - return nil // data stored in dst.OtlpLogSinkCreate, return on the first match - } else { - dst.OtlpLogSinkCreate = nil - return fmt.Errorf("failed to unmarshal CreateDistributionPayloadLogSink as OtlpLogSinkCreate: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src CreateDistributionPayloadLogSink) MarshalJSON() ([]byte, error) { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - if src.LokiLogSinkCreate != nil { - return json.Marshal(&src.LokiLogSinkCreate) - } - - if src.OtlpLogSinkCreate != nil { - return json.Marshal(&src.OtlpLogSinkCreate) - } - - return []byte("{}"), nil // no data in oneOf schemas => empty JSON object -} - -// Get the actual instance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (obj *CreateDistributionPayloadLogSink) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.LokiLogSinkCreate != nil { - return obj.LokiLogSinkCreate - } - - if obj.OtlpLogSinkCreate != nil { - return obj.OtlpLogSinkCreate - } - - // all schemas are nil - return nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateDistributionPayloadLogSink struct { - value *CreateDistributionPayloadLogSink - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateDistributionPayloadLogSink) Get() *CreateDistributionPayloadLogSink { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateDistributionPayloadLogSink) Set(val *CreateDistributionPayloadLogSink) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateDistributionPayloadLogSink) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateDistributionPayloadLogSink) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableCreateDistributionPayloadLogSink(val *CreateDistributionPayloadLogSink) *NullableCreateDistributionPayloadLogSink { - return &NullableCreateDistributionPayloadLogSink{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateDistributionPayloadLogSink) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateDistributionPayloadLogSink) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_create_distribution_payload_log_sink_test.go b/services/cdn/model_create_distribution_payload_log_sink_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_create_distribution_payload_log_sink_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_create_distribution_payload_test.go b/services/cdn/model_create_distribution_payload_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_create_distribution_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_create_distribution_response.go b/services/cdn/model_create_distribution_response.go deleted file mode 100644 index 0b5a8f8828..0000000000 --- a/services/cdn/model_create_distribution_response.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the CreateDistributionResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateDistributionResponse{} - -/* - types and functions for distribution -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionResponseGetDistributionAttributeType = *Distribution - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionResponseGetDistributionArgType = Distribution - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionResponseGetDistributionRetType = Distribution - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateDistributionResponseGetDistributionAttributeTypeOk(arg CreateDistributionResponseGetDistributionAttributeType) (ret CreateDistributionResponseGetDistributionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateDistributionResponseGetDistributionAttributeType(arg *CreateDistributionResponseGetDistributionAttributeType, val CreateDistributionResponseGetDistributionRetType) { - *arg = &val -} - -// CreateDistributionResponse struct for CreateDistributionResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDistributionResponse struct { - // REQUIRED - Distribution CreateDistributionResponseGetDistributionAttributeType `json:"distribution" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _CreateDistributionResponse CreateDistributionResponse - -// NewCreateDistributionResponse instantiates a new CreateDistributionResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateDistributionResponse(distribution CreateDistributionResponseGetDistributionArgType) *CreateDistributionResponse { - this := CreateDistributionResponse{} - setCreateDistributionResponseGetDistributionAttributeType(&this.Distribution, distribution) - return &this -} - -// NewCreateDistributionResponseWithDefaults instantiates a new CreateDistributionResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCreateDistributionResponseWithDefaults() *CreateDistributionResponse { - this := CreateDistributionResponse{} - return &this -} - -// GetDistribution returns the Distribution field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionResponse) GetDistribution() (ret CreateDistributionResponseGetDistributionRetType) { - ret, _ = o.GetDistributionOk() - return ret -} - -// GetDistributionOk returns a tuple with the Distribution field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionResponse) GetDistributionOk() (ret CreateDistributionResponseGetDistributionRetType, ok bool) { - return getCreateDistributionResponseGetDistributionAttributeTypeOk(o.Distribution) -} - -// SetDistribution sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDistributionResponse) SetDistribution(v CreateDistributionResponseGetDistributionRetType) { - setCreateDistributionResponseGetDistributionAttributeType(&o.Distribution, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateDistributionResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateDistributionResponseGetDistributionAttributeTypeOk(o.Distribution); ok { - toSerialize["Distribution"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateDistributionResponse struct { - value *CreateDistributionResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateDistributionResponse) Get() *CreateDistributionResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateDistributionResponse) Set(val *CreateDistributionResponse) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateDistributionResponse) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateDistributionResponse) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableCreateDistributionResponse(val *CreateDistributionResponse) *NullableCreateDistributionResponse { - return &NullableCreateDistributionResponse{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateDistributionResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateDistributionResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_create_distribution_response_test.go b/services/cdn/model_create_distribution_response_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_create_distribution_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_custom_domain.go b/services/cdn/model_custom_domain.go deleted file mode 100644 index 4d9ad501d1..0000000000 --- a/services/cdn/model_custom_domain.go +++ /dev/null @@ -1,262 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the CustomDomain type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CustomDomain{} - -/* - types and functions for errors -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CustomDomainGetErrorsAttributeType = *[]StatusError - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CustomDomainGetErrorsArgType = []StatusError - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CustomDomainGetErrorsRetType = []StatusError - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCustomDomainGetErrorsAttributeTypeOk(arg CustomDomainGetErrorsAttributeType) (ret CustomDomainGetErrorsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCustomDomainGetErrorsAttributeType(arg *CustomDomainGetErrorsAttributeType, val CustomDomainGetErrorsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CustomDomainGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCustomDomainGetNameAttributeTypeOk(arg CustomDomainGetNameAttributeType) (ret CustomDomainGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCustomDomainGetNameAttributeType(arg *CustomDomainGetNameAttributeType, val CustomDomainGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CustomDomainGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CustomDomainGetNameRetType = string - -/* - types and functions for status -*/ - -// isEnumRef -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CustomDomainGetStatusAttributeType = *DomainStatus - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CustomDomainGetStatusArgType = DomainStatus - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CustomDomainGetStatusRetType = DomainStatus - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCustomDomainGetStatusAttributeTypeOk(arg CustomDomainGetStatusAttributeType) (ret CustomDomainGetStatusRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCustomDomainGetStatusAttributeType(arg *CustomDomainGetStatusAttributeType, val CustomDomainGetStatusRetType) { - *arg = &val -} - -// CustomDomain Definition of a custom domain -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CustomDomain struct { - // This object is present if the custom domain has errors. - Errors CustomDomainGetErrorsAttributeType `json:"errors,omitempty"` - // The domain. Can be used as input for the GetCustomDomain endpoint - // REQUIRED - Name CustomDomainGetNameAttributeType `json:"name" required:"true"` - // REQUIRED - Status CustomDomainGetStatusAttributeType `json:"status" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _CustomDomain CustomDomain - -// NewCustomDomain instantiates a new CustomDomain 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCustomDomain(name CustomDomainGetNameArgType, status CustomDomainGetStatusArgType) *CustomDomain { - this := CustomDomain{} - setCustomDomainGetNameAttributeType(&this.Name, name) - setCustomDomainGetStatusAttributeType(&this.Status, status) - return &this -} - -// NewCustomDomainWithDefaults instantiates a new CustomDomain 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewCustomDomainWithDefaults() *CustomDomain { - this := CustomDomain{} - return &this -} - -// GetErrors returns the Errors field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CustomDomain) GetErrors() (res CustomDomainGetErrorsRetType) { - res, _ = o.GetErrorsOk() - return -} - -// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CustomDomain) GetErrorsOk() (ret CustomDomainGetErrorsRetType, ok bool) { - return getCustomDomainGetErrorsAttributeTypeOk(o.Errors) -} - -// HasErrors returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CustomDomain) HasErrors() bool { - _, ok := o.GetErrorsOk() - return ok -} - -// SetErrors gets a reference to the given []StatusError and assigns it to the Errors field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CustomDomain) SetErrors(v CustomDomainGetErrorsRetType) { - setCustomDomainGetErrorsAttributeType(&o.Errors, v) -} - -// GetName returns the Name field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CustomDomain) GetName() (ret CustomDomainGetNameRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CustomDomain) GetNameOk() (ret CustomDomainGetNameRetType, ok bool) { - return getCustomDomainGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CustomDomain) SetName(v CustomDomainGetNameRetType) { - setCustomDomainGetNameAttributeType(&o.Name, v) -} - -// GetStatus returns the Status field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CustomDomain) GetStatus() (ret CustomDomainGetStatusRetType) { - ret, _ = o.GetStatusOk() - return ret -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CustomDomain) GetStatusOk() (ret CustomDomainGetStatusRetType, ok bool) { - return getCustomDomainGetStatusAttributeTypeOk(o.Status) -} - -// SetStatus sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CustomDomain) SetStatus(v CustomDomainGetStatusRetType) { - setCustomDomainGetStatusAttributeType(&o.Status, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CustomDomain) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCustomDomainGetErrorsAttributeTypeOk(o.Errors); ok { - toSerialize["Errors"] = val - } - if val, ok := getCustomDomainGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getCustomDomainGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCustomDomain struct { - value *CustomDomain - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCustomDomain) Get() *CustomDomain { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCustomDomain) Set(val *CustomDomain) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCustomDomain) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCustomDomain) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableCustomDomain(val *CustomDomain) *NullableCustomDomain { - return &NullableCustomDomain{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCustomDomain) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCustomDomain) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_custom_domain_test.go b/services/cdn/model_custom_domain_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_custom_domain_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_delete_custom_domain_response.go b/services/cdn/model_delete_custom_domain_response.go deleted file mode 100644 index 4795f5f6c8..0000000000 --- a/services/cdn/model_delete_custom_domain_response.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the DeleteCustomDomainResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeleteCustomDomainResponse{} - -/* - types and functions for customDomain -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteCustomDomainResponseGetCustomDomainAttributeType = *CustomDomain - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteCustomDomainResponseGetCustomDomainArgType = CustomDomain - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteCustomDomainResponseGetCustomDomainRetType = CustomDomain - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDeleteCustomDomainResponseGetCustomDomainAttributeTypeOk(arg DeleteCustomDomainResponseGetCustomDomainAttributeType) (ret DeleteCustomDomainResponseGetCustomDomainRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDeleteCustomDomainResponseGetCustomDomainAttributeType(arg *DeleteCustomDomainResponseGetCustomDomainAttributeType, val DeleteCustomDomainResponseGetCustomDomainRetType) { - *arg = &val -} - -// DeleteCustomDomainResponse Returns the custom domain that was deleted while the deletion has not completed yet. After the deletion was successful the response will be empty. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteCustomDomainResponse struct { - CustomDomain DeleteCustomDomainResponseGetCustomDomainAttributeType `json:"customDomain,omitempty"` -} - -// NewDeleteCustomDomainResponse instantiates a new DeleteCustomDomainResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDeleteCustomDomainResponse() *DeleteCustomDomainResponse { - this := DeleteCustomDomainResponse{} - return &this -} - -// NewDeleteCustomDomainResponseWithDefaults instantiates a new DeleteCustomDomainResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDeleteCustomDomainResponseWithDefaults() *DeleteCustomDomainResponse { - this := DeleteCustomDomainResponse{} - return &this -} - -// GetCustomDomain returns the CustomDomain field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DeleteCustomDomainResponse) GetCustomDomain() (res DeleteCustomDomainResponseGetCustomDomainRetType) { - res, _ = o.GetCustomDomainOk() - return -} - -// GetCustomDomainOk returns a tuple with the CustomDomain field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DeleteCustomDomainResponse) GetCustomDomainOk() (ret DeleteCustomDomainResponseGetCustomDomainRetType, ok bool) { - return getDeleteCustomDomainResponseGetCustomDomainAttributeTypeOk(o.CustomDomain) -} - -// HasCustomDomain returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DeleteCustomDomainResponse) HasCustomDomain() bool { - _, ok := o.GetCustomDomainOk() - return ok -} - -// SetCustomDomain gets a reference to the given CustomDomain and assigns it to the CustomDomain field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DeleteCustomDomainResponse) SetCustomDomain(v DeleteCustomDomainResponseGetCustomDomainRetType) { - setDeleteCustomDomainResponseGetCustomDomainAttributeType(&o.CustomDomain, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o DeleteCustomDomainResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getDeleteCustomDomainResponseGetCustomDomainAttributeTypeOk(o.CustomDomain); ok { - toSerialize["CustomDomain"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableDeleteCustomDomainResponse struct { - value *DeleteCustomDomainResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDeleteCustomDomainResponse) Get() *DeleteCustomDomainResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDeleteCustomDomainResponse) Set(val *DeleteCustomDomainResponse) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDeleteCustomDomainResponse) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDeleteCustomDomainResponse) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableDeleteCustomDomainResponse(val *DeleteCustomDomainResponse) *NullableDeleteCustomDomainResponse { - return &NullableDeleteCustomDomainResponse{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDeleteCustomDomainResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDeleteCustomDomainResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_delete_custom_domain_response_test.go b/services/cdn/model_delete_custom_domain_response_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_delete_custom_domain_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_delete_distribution_response.go b/services/cdn/model_delete_distribution_response.go deleted file mode 100644 index 089e61fe8a..0000000000 --- a/services/cdn/model_delete_distribution_response.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the DeleteDistributionResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DeleteDistributionResponse{} - -/* - types and functions for distribution -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteDistributionResponseGetDistributionAttributeType = *Distribution - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteDistributionResponseGetDistributionArgType = Distribution - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteDistributionResponseGetDistributionRetType = Distribution - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDeleteDistributionResponseGetDistributionAttributeTypeOk(arg DeleteDistributionResponseGetDistributionAttributeType) (ret DeleteDistributionResponseGetDistributionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDeleteDistributionResponseGetDistributionAttributeType(arg *DeleteDistributionResponseGetDistributionAttributeType, val DeleteDistributionResponseGetDistributionRetType) { - *arg = &val -} - -// DeleteDistributionResponse struct for DeleteDistributionResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DeleteDistributionResponse struct { - Distribution DeleteDistributionResponseGetDistributionAttributeType `json:"distribution,omitempty"` -} - -// NewDeleteDistributionResponse instantiates a new DeleteDistributionResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDeleteDistributionResponse() *DeleteDistributionResponse { - this := DeleteDistributionResponse{} - return &this -} - -// NewDeleteDistributionResponseWithDefaults instantiates a new DeleteDistributionResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDeleteDistributionResponseWithDefaults() *DeleteDistributionResponse { - this := DeleteDistributionResponse{} - return &this -} - -// GetDistribution returns the Distribution field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DeleteDistributionResponse) GetDistribution() (res DeleteDistributionResponseGetDistributionRetType) { - res, _ = o.GetDistributionOk() - return -} - -// GetDistributionOk returns a tuple with the Distribution field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DeleteDistributionResponse) GetDistributionOk() (ret DeleteDistributionResponseGetDistributionRetType, ok bool) { - return getDeleteDistributionResponseGetDistributionAttributeTypeOk(o.Distribution) -} - -// HasDistribution returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DeleteDistributionResponse) HasDistribution() bool { - _, ok := o.GetDistributionOk() - return ok -} - -// SetDistribution gets a reference to the given Distribution and assigns it to the Distribution field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DeleteDistributionResponse) SetDistribution(v DeleteDistributionResponseGetDistributionRetType) { - setDeleteDistributionResponseGetDistributionAttributeType(&o.Distribution, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o DeleteDistributionResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getDeleteDistributionResponseGetDistributionAttributeTypeOk(o.Distribution); ok { - toSerialize["Distribution"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableDeleteDistributionResponse struct { - value *DeleteDistributionResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDeleteDistributionResponse) Get() *DeleteDistributionResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDeleteDistributionResponse) Set(val *DeleteDistributionResponse) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDeleteDistributionResponse) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDeleteDistributionResponse) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableDeleteDistributionResponse(val *DeleteDistributionResponse) *NullableDeleteDistributionResponse { - return &NullableDeleteDistributionResponse{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDeleteDistributionResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDeleteDistributionResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_delete_distribution_response_test.go b/services/cdn/model_delete_distribution_response_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_delete_distribution_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_distribution.go b/services/cdn/model_distribution.go deleted file mode 100644 index 7f0b9f5285..0000000000 --- a/services/cdn/model_distribution.go +++ /dev/null @@ -1,718 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" - "time" -) - -// checks if the Distribution type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Distribution{} - -/* - types and functions for config -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetConfigAttributeType = *Config - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetConfigArgType = Config - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetConfigRetType = Config - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionGetConfigAttributeTypeOk(arg DistributionGetConfigAttributeType) (ret DistributionGetConfigRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionGetConfigAttributeType(arg *DistributionGetConfigAttributeType, val DistributionGetConfigRetType) { - *arg = &val -} - -/* - types and functions for createdAt -*/ - -// isDateTime -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetCreatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetCreatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetCreatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionGetCreatedAtAttributeTypeOk(arg DistributionGetCreatedAtAttributeType) (ret DistributionGetCreatedAtRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionGetCreatedAtAttributeType(arg *DistributionGetCreatedAtAttributeType, val DistributionGetCreatedAtRetType) { - *arg = &val -} - -/* - types and functions for domains -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetDomainsAttributeType = *[]Domain - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetDomainsArgType = []Domain - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetDomainsRetType = []Domain - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionGetDomainsAttributeTypeOk(arg DistributionGetDomainsAttributeType) (ret DistributionGetDomainsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionGetDomainsAttributeType(arg *DistributionGetDomainsAttributeType, val DistributionGetDomainsRetType) { - *arg = &val -} - -/* - types and functions for errors -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetErrorsAttributeType = *[]StatusError - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetErrorsArgType = []StatusError - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetErrorsRetType = []StatusError - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionGetErrorsAttributeTypeOk(arg DistributionGetErrorsAttributeType) (ret DistributionGetErrorsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionGetErrorsAttributeType(arg *DistributionGetErrorsAttributeType, val DistributionGetErrorsRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionGetIdAttributeTypeOk(arg DistributionGetIdAttributeType) (ret DistributionGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionGetIdAttributeType(arg *DistributionGetIdAttributeType, val DistributionGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetIdRetType = string - -/* - types and functions for projectId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetProjectIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionGetProjectIdAttributeTypeOk(arg DistributionGetProjectIdAttributeType) (ret DistributionGetProjectIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionGetProjectIdAttributeType(arg *DistributionGetProjectIdAttributeType, val DistributionGetProjectIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetProjectIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetProjectIdRetType = string - -/* - types and functions for status -*/ - -// isEnum - -// DistributionStatus - `CREATING`: The distribution was just created. All the relevant resources are created in the background. Once fully reconciled, this switches to `ACTIVE`. If there are any issues, the status changes to `ERROR`. You can look at the `errors` array to get more infos. - `ACTIVE`: The usual state. The desired configuration is synced, there are no errors - `UPDATING`: The state when there is a discrepancy between the desired and actual configuration state. This occurs right after an update. Will switch to `ACTIVE` or `ERROR`, depending on if synchronizing succeeds or not. - `DELETING`: The state right after a delete request was received. The distribution will stay in this status until all resources have been successfully removed, or until we encounter an `ERROR` state. **NOTE:** You can keep fetching the distribution while it is deleting. After successful deletion, trying to get a distribution will return a 404 Not Found response - `ERROR`: The error state. Look at the `errors` array for more info. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatus string - -// List of Status -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - DISTRIBUTIONSTATUS_CREATING DistributionStatus = "CREATING" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - DISTRIBUTIONSTATUS_ACTIVE DistributionStatus = "ACTIVE" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - DISTRIBUTIONSTATUS_UPDATING DistributionStatus = "UPDATING" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - DISTRIBUTIONSTATUS_DELETING DistributionStatus = "DELETING" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - DISTRIBUTIONSTATUS_ERROR DistributionStatus = "ERROR" -) - -// All allowed values of Distribution enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedDistributionStatusEnumValues = []DistributionStatus{ - "CREATING", - "ACTIVE", - "UPDATING", - "DELETING", - "ERROR", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *DistributionStatus) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson DistributionStatus - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := DistributionStatus(value) - for _, existing := range AllowedDistributionStatusEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid Distribution", value) -} - -// NewDistributionStatusFromValue returns a pointer to a valid DistributionStatus -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDistributionStatusFromValue(v DistributionStatus) (*DistributionStatus, error) { - ev := DistributionStatus(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for DistributionStatus: valid values are %v", v, AllowedDistributionStatusEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v DistributionStatus) IsValid() bool { - for _, existing := range AllowedDistributionStatusEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to StatusStatus value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v DistributionStatus) Ptr() *DistributionStatus { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableDistributionStatus struct { - value *DistributionStatus - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistributionStatus) Get() *DistributionStatus { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistributionStatus) Set(val *DistributionStatus) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistributionStatus) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistributionStatus) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableDistributionStatus(val *DistributionStatus) *NullableDistributionStatus { - return &NullableDistributionStatus{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistributionStatus) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistributionStatus) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetStatusAttributeType = *DistributionStatus - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetStatusArgType = DistributionStatus - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetStatusRetType = DistributionStatus - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionGetStatusAttributeTypeOk(arg DistributionGetStatusAttributeType) (ret DistributionGetStatusRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionGetStatusAttributeType(arg *DistributionGetStatusAttributeType, val DistributionGetStatusRetType) { - *arg = &val -} - -/* - types and functions for updatedAt -*/ - -// isDateTime -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetUpdatedAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetUpdatedAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetUpdatedAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionGetUpdatedAtAttributeTypeOk(arg DistributionGetUpdatedAtAttributeType) (ret DistributionGetUpdatedAtRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionGetUpdatedAtAttributeType(arg *DistributionGetUpdatedAtAttributeType, val DistributionGetUpdatedAtRetType) { - *arg = &val -} - -/* - types and functions for waf -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetWafAttributeType = *DistributionWaf - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetWafArgType = DistributionWaf - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionGetWafRetType = DistributionWaf - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionGetWafAttributeTypeOk(arg DistributionGetWafAttributeType) (ret DistributionGetWafRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionGetWafAttributeType(arg *DistributionGetWafAttributeType, val DistributionGetWafRetType) { - *arg = &val -} - -// Distribution struct for Distribution -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Distribution struct { - // REQUIRED - Config DistributionGetConfigAttributeType `json:"config" required:"true"` - // RFC3339 string defining when the distribution was created - // REQUIRED - CreatedAt DistributionGetCreatedAtAttributeType `json:"createdAt" required:"true"` - // REQUIRED - Domains DistributionGetDomainsAttributeType `json:"domains" required:"true"` - // This object may be present if, and only if the distribution has encountered an error state. - Errors DistributionGetErrorsAttributeType `json:"errors,omitempty"` - // REQUIRED - Id DistributionGetIdAttributeType `json:"id" required:"true"` - // REQUIRED - ProjectId DistributionGetProjectIdAttributeType `json:"projectId" required:"true"` - // - `CREATING`: The distribution was just created. All the relevant resources are created in the background. Once fully reconciled, this switches to `ACTIVE`. If there are any issues, the status changes to `ERROR`. You can look at the `errors` array to get more infos. - `ACTIVE`: The usual state. The desired configuration is synced, there are no errors - `UPDATING`: The state when there is a discrepancy between the desired and actual configuration state. This occurs right after an update. Will switch to `ACTIVE` or `ERROR`, depending on if synchronizing succeeds or not. - `DELETING`: The state right after a delete request was received. The distribution will stay in this status until all resources have been successfully removed, or until we encounter an `ERROR` state. **NOTE:** You can keep fetching the distribution while it is deleting. After successful deletion, trying to get a distribution will return a 404 Not Found response - `ERROR`: The error state. Look at the `errors` array for more info. - // REQUIRED - Status DistributionGetStatusAttributeType `json:"status" required:"true"` - // RFC3339 string which returns the last time the distribution configuration was modified. - // REQUIRED - UpdatedAt DistributionGetUpdatedAtAttributeType `json:"updatedAt" required:"true"` - Waf DistributionGetWafAttributeType `json:"waf,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _Distribution Distribution - -// NewDistribution instantiates a new Distribution 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDistribution(config DistributionGetConfigArgType, createdAt DistributionGetCreatedAtArgType, domains DistributionGetDomainsArgType, id DistributionGetIdArgType, projectId DistributionGetProjectIdArgType, status DistributionGetStatusArgType, updatedAt DistributionGetUpdatedAtArgType) *Distribution { - this := Distribution{} - setDistributionGetConfigAttributeType(&this.Config, config) - setDistributionGetCreatedAtAttributeType(&this.CreatedAt, createdAt) - setDistributionGetDomainsAttributeType(&this.Domains, domains) - setDistributionGetIdAttributeType(&this.Id, id) - setDistributionGetProjectIdAttributeType(&this.ProjectId, projectId) - setDistributionGetStatusAttributeType(&this.Status, status) - setDistributionGetUpdatedAtAttributeType(&this.UpdatedAt, updatedAt) - return &this -} - -// NewDistributionWithDefaults instantiates a new Distribution 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDistributionWithDefaults() *Distribution { - this := Distribution{} - return &this -} - -// GetConfig returns the Config field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) GetConfig() (ret DistributionGetConfigRetType) { - ret, _ = o.GetConfigOk() - return ret -} - -// GetConfigOk returns a tuple with the Config field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) GetConfigOk() (ret DistributionGetConfigRetType, ok bool) { - return getDistributionGetConfigAttributeTypeOk(o.Config) -} - -// SetConfig sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) SetConfig(v DistributionGetConfigRetType) { - setDistributionGetConfigAttributeType(&o.Config, v) -} - -// GetCreatedAt returns the CreatedAt field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) GetCreatedAt() (ret DistributionGetCreatedAtRetType) { - ret, _ = o.GetCreatedAtOk() - return ret -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) GetCreatedAtOk() (ret DistributionGetCreatedAtRetType, ok bool) { - return getDistributionGetCreatedAtAttributeTypeOk(o.CreatedAt) -} - -// SetCreatedAt sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) SetCreatedAt(v DistributionGetCreatedAtRetType) { - setDistributionGetCreatedAtAttributeType(&o.CreatedAt, v) -} - -// GetDomains returns the Domains field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) GetDomains() (ret DistributionGetDomainsRetType) { - ret, _ = o.GetDomainsOk() - return ret -} - -// GetDomainsOk returns a tuple with the Domains field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) GetDomainsOk() (ret DistributionGetDomainsRetType, ok bool) { - return getDistributionGetDomainsAttributeTypeOk(o.Domains) -} - -// SetDomains sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) SetDomains(v DistributionGetDomainsRetType) { - setDistributionGetDomainsAttributeType(&o.Domains, v) -} - -// GetErrors returns the Errors field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) GetErrors() (res DistributionGetErrorsRetType) { - res, _ = o.GetErrorsOk() - return -} - -// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) GetErrorsOk() (ret DistributionGetErrorsRetType, ok bool) { - return getDistributionGetErrorsAttributeTypeOk(o.Errors) -} - -// HasErrors returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) HasErrors() bool { - _, ok := o.GetErrorsOk() - return ok -} - -// SetErrors gets a reference to the given []StatusError and assigns it to the Errors field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) SetErrors(v DistributionGetErrorsRetType) { - setDistributionGetErrorsAttributeType(&o.Errors, v) -} - -// GetId returns the Id field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) GetId() (ret DistributionGetIdRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) GetIdOk() (ret DistributionGetIdRetType, ok bool) { - return getDistributionGetIdAttributeTypeOk(o.Id) -} - -// SetId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) SetId(v DistributionGetIdRetType) { - setDistributionGetIdAttributeType(&o.Id, v) -} - -// GetProjectId returns the ProjectId field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) GetProjectId() (ret DistributionGetProjectIdRetType) { - ret, _ = o.GetProjectIdOk() - return ret -} - -// GetProjectIdOk returns a tuple with the ProjectId field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) GetProjectIdOk() (ret DistributionGetProjectIdRetType, ok bool) { - return getDistributionGetProjectIdAttributeTypeOk(o.ProjectId) -} - -// SetProjectId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) SetProjectId(v DistributionGetProjectIdRetType) { - setDistributionGetProjectIdAttributeType(&o.ProjectId, v) -} - -// GetStatus returns the Status field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) GetStatus() (ret DistributionGetStatusRetType) { - ret, _ = o.GetStatusOk() - return ret -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) GetStatusOk() (ret DistributionGetStatusRetType, ok bool) { - return getDistributionGetStatusAttributeTypeOk(o.Status) -} - -// SetStatus sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) SetStatus(v DistributionGetStatusRetType) { - setDistributionGetStatusAttributeType(&o.Status, v) -} - -// GetUpdatedAt returns the UpdatedAt field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) GetUpdatedAt() (ret DistributionGetUpdatedAtRetType) { - ret, _ = o.GetUpdatedAtOk() - return ret -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) GetUpdatedAtOk() (ret DistributionGetUpdatedAtRetType, ok bool) { - return getDistributionGetUpdatedAtAttributeTypeOk(o.UpdatedAt) -} - -// SetUpdatedAt sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) SetUpdatedAt(v DistributionGetUpdatedAtRetType) { - setDistributionGetUpdatedAtAttributeType(&o.UpdatedAt, v) -} - -// GetWaf returns the Waf field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) GetWaf() (res DistributionGetWafRetType) { - res, _ = o.GetWafOk() - return -} - -// GetWafOk returns a tuple with the Waf field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) GetWafOk() (ret DistributionGetWafRetType, ok bool) { - return getDistributionGetWafAttributeTypeOk(o.Waf) -} - -// HasWaf returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) HasWaf() bool { - _, ok := o.GetWafOk() - return ok -} - -// SetWaf gets a reference to the given DistributionWaf and assigns it to the Waf field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Distribution) SetWaf(v DistributionGetWafRetType) { - setDistributionGetWafAttributeType(&o.Waf, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Distribution) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getDistributionGetConfigAttributeTypeOk(o.Config); ok { - toSerialize["Config"] = val - } - if val, ok := getDistributionGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { - toSerialize["CreatedAt"] = val - } - if val, ok := getDistributionGetDomainsAttributeTypeOk(o.Domains); ok { - toSerialize["Domains"] = val - } - if val, ok := getDistributionGetErrorsAttributeTypeOk(o.Errors); ok { - toSerialize["Errors"] = val - } - if val, ok := getDistributionGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getDistributionGetProjectIdAttributeTypeOk(o.ProjectId); ok { - toSerialize["ProjectId"] = val - } - if val, ok := getDistributionGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getDistributionGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok { - toSerialize["UpdatedAt"] = val - } - if val, ok := getDistributionGetWafAttributeTypeOk(o.Waf); ok { - toSerialize["Waf"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableDistribution struct { - value *Distribution - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistribution) Get() *Distribution { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistribution) Set(val *Distribution) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistribution) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistribution) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableDistribution(val *Distribution) *NullableDistribution { - return &NullableDistribution{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistribution) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistribution) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_distribution_logs_record.go b/services/cdn/model_distribution_logs_record.go deleted file mode 100644 index 0ba4a0b01f..0000000000 --- a/services/cdn/model_distribution_logs_record.go +++ /dev/null @@ -1,634 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "time" -) - -// checks if the DistributionLogsRecord type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DistributionLogsRecord{} - -/* - types and functions for cacheHit -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordgetCacheHitAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordgetCacheHitArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordgetCacheHitRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionLogsRecordgetCacheHitAttributeTypeOk(arg DistributionLogsRecordgetCacheHitAttributeType) (ret DistributionLogsRecordgetCacheHitRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionLogsRecordgetCacheHitAttributeType(arg *DistributionLogsRecordgetCacheHitAttributeType, val DistributionLogsRecordgetCacheHitRetType) { - *arg = &val -} - -/* - types and functions for dataCenterRegion -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetDataCenterRegionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionLogsRecordGetDataCenterRegionAttributeTypeOk(arg DistributionLogsRecordGetDataCenterRegionAttributeType) (ret DistributionLogsRecordGetDataCenterRegionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionLogsRecordGetDataCenterRegionAttributeType(arg *DistributionLogsRecordGetDataCenterRegionAttributeType, val DistributionLogsRecordGetDataCenterRegionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetDataCenterRegionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetDataCenterRegionRetType = string - -/* - types and functions for distributionId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetDistributionIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionLogsRecordGetDistributionIdAttributeTypeOk(arg DistributionLogsRecordGetDistributionIdAttributeType) (ret DistributionLogsRecordGetDistributionIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionLogsRecordGetDistributionIdAttributeType(arg *DistributionLogsRecordGetDistributionIdAttributeType, val DistributionLogsRecordGetDistributionIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetDistributionIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetDistributionIdRetType = string - -/* - types and functions for host -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetHostAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionLogsRecordGetHostAttributeTypeOk(arg DistributionLogsRecordGetHostAttributeType) (ret DistributionLogsRecordGetHostRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionLogsRecordGetHostAttributeType(arg *DistributionLogsRecordGetHostAttributeType, val DistributionLogsRecordGetHostRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetHostArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetHostRetType = string - -/* - types and functions for path -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetPathAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionLogsRecordGetPathAttributeTypeOk(arg DistributionLogsRecordGetPathAttributeType) (ret DistributionLogsRecordGetPathRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionLogsRecordGetPathAttributeType(arg *DistributionLogsRecordGetPathAttributeType, val DistributionLogsRecordGetPathRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetPathArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetPathRetType = string - -/* - types and functions for requestCountryCode -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetRequestCountryCodeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionLogsRecordGetRequestCountryCodeAttributeTypeOk(arg DistributionLogsRecordGetRequestCountryCodeAttributeType) (ret DistributionLogsRecordGetRequestCountryCodeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionLogsRecordGetRequestCountryCodeAttributeType(arg *DistributionLogsRecordGetRequestCountryCodeAttributeType, val DistributionLogsRecordGetRequestCountryCodeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetRequestCountryCodeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetRequestCountryCodeRetType = string - -/* - types and functions for size -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetSizeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetSizeArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetSizeRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionLogsRecordGetSizeAttributeTypeOk(arg DistributionLogsRecordGetSizeAttributeType) (ret DistributionLogsRecordGetSizeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionLogsRecordGetSizeAttributeType(arg *DistributionLogsRecordGetSizeAttributeType, val DistributionLogsRecordGetSizeRetType) { - *arg = &val -} - -/* - types and functions for statusCode -*/ - -// isInteger -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetStatusCodeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetStatusCodeArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetStatusCodeRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionLogsRecordGetStatusCodeAttributeTypeOk(arg DistributionLogsRecordGetStatusCodeAttributeType) (ret DistributionLogsRecordGetStatusCodeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionLogsRecordGetStatusCodeAttributeType(arg *DistributionLogsRecordGetStatusCodeAttributeType, val DistributionLogsRecordGetStatusCodeRetType) { - *arg = &val -} - -/* - types and functions for timestamp -*/ - -// isDateTime -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetTimestampAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetTimestampArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetTimestampRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionLogsRecordGetTimestampAttributeTypeOk(arg DistributionLogsRecordGetTimestampAttributeType) (ret DistributionLogsRecordGetTimestampRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionLogsRecordGetTimestampAttributeType(arg *DistributionLogsRecordGetTimestampAttributeType, val DistributionLogsRecordGetTimestampRetType) { - *arg = &val -} - -/* - types and functions for wafViolation -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetWafViolationAttributeType = *WAFViolation - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetWafViolationArgType = WAFViolation - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecordGetWafViolationRetType = WAFViolation - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionLogsRecordGetWafViolationAttributeTypeOk(arg DistributionLogsRecordGetWafViolationAttributeType) (ret DistributionLogsRecordGetWafViolationRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionLogsRecordGetWafViolationAttributeType(arg *DistributionLogsRecordGetWafViolationAttributeType, val DistributionLogsRecordGetWafViolationRetType) { - *arg = &val -} - -// DistributionLogsRecord struct for DistributionLogsRecord -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionLogsRecord struct { - // REQUIRED - CacheHit DistributionLogsRecordgetCacheHitAttributeType `json:"cacheHit" required:"true"` - // REQUIRED - DataCenterRegion DistributionLogsRecordGetDataCenterRegionAttributeType `json:"dataCenterRegion" required:"true"` - // REQUIRED - DistributionId DistributionLogsRecordGetDistributionIdAttributeType `json:"distributionId" required:"true"` - // REQUIRED - Host DistributionLogsRecordGetHostAttributeType `json:"host" required:"true"` - // REQUIRED - Path DistributionLogsRecordGetPathAttributeType `json:"path" required:"true"` - // ISO 3166-1 A2 compliant country code - // REQUIRED - RequestCountryCode DistributionLogsRecordGetRequestCountryCodeAttributeType `json:"requestCountryCode" required:"true"` - // REQUIRED - Size DistributionLogsRecordGetSizeAttributeType `json:"size" required:"true"` - // Can be cast to int32 without loss of precision. - // REQUIRED - StatusCode DistributionLogsRecordGetStatusCodeAttributeType `json:"statusCode" required:"true"` - // REQUIRED - Timestamp DistributionLogsRecordGetTimestampAttributeType `json:"timestamp" required:"true"` - WafViolation DistributionLogsRecordGetWafViolationAttributeType `json:"wafViolation,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _DistributionLogsRecord DistributionLogsRecord - -// NewDistributionLogsRecord instantiates a new DistributionLogsRecord 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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) - setDistributionLogsRecordGetHostAttributeType(&this.Host, host) - setDistributionLogsRecordGetPathAttributeType(&this.Path, path) - setDistributionLogsRecordGetRequestCountryCodeAttributeType(&this.RequestCountryCode, requestCountryCode) - setDistributionLogsRecordGetSizeAttributeType(&this.Size, size) - setDistributionLogsRecordGetStatusCodeAttributeType(&this.StatusCode, statusCode) - setDistributionLogsRecordGetTimestampAttributeType(&this.Timestamp, timestamp) - return &this -} - -// NewDistributionLogsRecordWithDefaults instantiates a new DistributionLogsRecord 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDistributionLogsRecordWithDefaults() *DistributionLogsRecord { - this := DistributionLogsRecord{} - return &this -} - -// GetCacheHit returns the CacheHit field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) GetCacheHit() (ret DistributionLogsRecordgetCacheHitRetType) { - ret, _ = o.GetCacheHitOk() - return ret -} - -// GetCacheHitOk returns a tuple with the CacheHit field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) GetCacheHitOk() (ret DistributionLogsRecordgetCacheHitRetType, ok bool) { - return getDistributionLogsRecordgetCacheHitAttributeTypeOk(o.CacheHit) -} - -// SetCacheHit sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) SetCacheHit(v DistributionLogsRecordgetCacheHitRetType) { - setDistributionLogsRecordgetCacheHitAttributeType(&o.CacheHit, v) -} - -// GetDataCenterRegion returns the DataCenterRegion field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) GetDataCenterRegion() (ret DistributionLogsRecordGetDataCenterRegionRetType) { - ret, _ = o.GetDataCenterRegionOk() - return ret -} - -// GetDataCenterRegionOk returns a tuple with the DataCenterRegion field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) GetDataCenterRegionOk() (ret DistributionLogsRecordGetDataCenterRegionRetType, ok bool) { - return getDistributionLogsRecordGetDataCenterRegionAttributeTypeOk(o.DataCenterRegion) -} - -// SetDataCenterRegion sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) SetDataCenterRegion(v DistributionLogsRecordGetDataCenterRegionRetType) { - setDistributionLogsRecordGetDataCenterRegionAttributeType(&o.DataCenterRegion, v) -} - -// GetDistributionId returns the DistributionId field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) GetDistributionId() (ret DistributionLogsRecordGetDistributionIdRetType) { - ret, _ = o.GetDistributionIdOk() - return ret -} - -// GetDistributionIdOk returns a tuple with the DistributionId field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) GetDistributionIdOk() (ret DistributionLogsRecordGetDistributionIdRetType, ok bool) { - return getDistributionLogsRecordGetDistributionIdAttributeTypeOk(o.DistributionId) -} - -// SetDistributionId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) SetDistributionId(v DistributionLogsRecordGetDistributionIdRetType) { - setDistributionLogsRecordGetDistributionIdAttributeType(&o.DistributionId, v) -} - -// GetHost returns the Host field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) GetHost() (ret DistributionLogsRecordGetHostRetType) { - ret, _ = o.GetHostOk() - return ret -} - -// GetHostOk returns a tuple with the Host field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) GetHostOk() (ret DistributionLogsRecordGetHostRetType, ok bool) { - return getDistributionLogsRecordGetHostAttributeTypeOk(o.Host) -} - -// SetHost sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) SetHost(v DistributionLogsRecordGetHostRetType) { - setDistributionLogsRecordGetHostAttributeType(&o.Host, v) -} - -// GetPath returns the Path field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) GetPath() (ret DistributionLogsRecordGetPathRetType) { - ret, _ = o.GetPathOk() - return ret -} - -// GetPathOk returns a tuple with the Path field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) GetPathOk() (ret DistributionLogsRecordGetPathRetType, ok bool) { - return getDistributionLogsRecordGetPathAttributeTypeOk(o.Path) -} - -// SetPath sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) SetPath(v DistributionLogsRecordGetPathRetType) { - setDistributionLogsRecordGetPathAttributeType(&o.Path, v) -} - -// GetRequestCountryCode returns the RequestCountryCode field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) GetRequestCountryCode() (ret DistributionLogsRecordGetRequestCountryCodeRetType) { - ret, _ = o.GetRequestCountryCodeOk() - return ret -} - -// GetRequestCountryCodeOk returns a tuple with the RequestCountryCode field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) GetRequestCountryCodeOk() (ret DistributionLogsRecordGetRequestCountryCodeRetType, ok bool) { - return getDistributionLogsRecordGetRequestCountryCodeAttributeTypeOk(o.RequestCountryCode) -} - -// SetRequestCountryCode sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) SetRequestCountryCode(v DistributionLogsRecordGetRequestCountryCodeRetType) { - setDistributionLogsRecordGetRequestCountryCodeAttributeType(&o.RequestCountryCode, v) -} - -// GetSize returns the Size field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) GetSize() (ret DistributionLogsRecordGetSizeRetType) { - ret, _ = o.GetSizeOk() - return ret -} - -// GetSizeOk returns a tuple with the Size field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) GetSizeOk() (ret DistributionLogsRecordGetSizeRetType, ok bool) { - return getDistributionLogsRecordGetSizeAttributeTypeOk(o.Size) -} - -// SetSize sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) SetSize(v DistributionLogsRecordGetSizeRetType) { - setDistributionLogsRecordGetSizeAttributeType(&o.Size, v) -} - -// GetStatusCode returns the StatusCode field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) GetStatusCode() (ret DistributionLogsRecordGetStatusCodeRetType) { - ret, _ = o.GetStatusCodeOk() - return ret -} - -// GetStatusCodeOk returns a tuple with the StatusCode field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) GetStatusCodeOk() (ret DistributionLogsRecordGetStatusCodeRetType, ok bool) { - return getDistributionLogsRecordGetStatusCodeAttributeTypeOk(o.StatusCode) -} - -// SetStatusCode sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) SetStatusCode(v DistributionLogsRecordGetStatusCodeRetType) { - setDistributionLogsRecordGetStatusCodeAttributeType(&o.StatusCode, v) -} - -// GetTimestamp returns the Timestamp field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) GetTimestamp() (ret DistributionLogsRecordGetTimestampRetType) { - ret, _ = o.GetTimestampOk() - return ret -} - -// GetTimestampOk returns a tuple with the Timestamp field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) GetTimestampOk() (ret DistributionLogsRecordGetTimestampRetType, ok bool) { - return getDistributionLogsRecordGetTimestampAttributeTypeOk(o.Timestamp) -} - -// SetTimestamp sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) SetTimestamp(v DistributionLogsRecordGetTimestampRetType) { - setDistributionLogsRecordGetTimestampAttributeType(&o.Timestamp, v) -} - -// GetWafViolation returns the WafViolation field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) GetWafViolation() (res DistributionLogsRecordGetWafViolationRetType) { - res, _ = o.GetWafViolationOk() - return -} - -// GetWafViolationOk returns a tuple with the WafViolation field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) GetWafViolationOk() (ret DistributionLogsRecordGetWafViolationRetType, ok bool) { - return getDistributionLogsRecordGetWafViolationAttributeTypeOk(o.WafViolation) -} - -// HasWafViolation returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) HasWafViolation() bool { - _, ok := o.GetWafViolationOk() - return ok -} - -// SetWafViolation gets a reference to the given WAFViolation and assigns it to the WafViolation field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionLogsRecord) SetWafViolation(v DistributionLogsRecordGetWafViolationRetType) { - setDistributionLogsRecordGetWafViolationAttributeType(&o.WafViolation, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o DistributionLogsRecord) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getDistributionLogsRecordgetCacheHitAttributeTypeOk(o.CacheHit); ok { - toSerialize["CacheHit"] = val - } - if val, ok := getDistributionLogsRecordGetDataCenterRegionAttributeTypeOk(o.DataCenterRegion); ok { - toSerialize["DataCenterRegion"] = val - } - if val, ok := getDistributionLogsRecordGetDistributionIdAttributeTypeOk(o.DistributionId); ok { - toSerialize["DistributionId"] = val - } - if val, ok := getDistributionLogsRecordGetHostAttributeTypeOk(o.Host); ok { - toSerialize["Host"] = val - } - if val, ok := getDistributionLogsRecordGetPathAttributeTypeOk(o.Path); ok { - toSerialize["Path"] = val - } - if val, ok := getDistributionLogsRecordGetRequestCountryCodeAttributeTypeOk(o.RequestCountryCode); ok { - toSerialize["RequestCountryCode"] = val - } - if val, ok := getDistributionLogsRecordGetSizeAttributeTypeOk(o.Size); ok { - toSerialize["Size"] = val - } - if val, ok := getDistributionLogsRecordGetStatusCodeAttributeTypeOk(o.StatusCode); ok { - toSerialize["StatusCode"] = val - } - if val, ok := getDistributionLogsRecordGetTimestampAttributeTypeOk(o.Timestamp); ok { - toSerialize["Timestamp"] = val - } - if val, ok := getDistributionLogsRecordGetWafViolationAttributeTypeOk(o.WafViolation); ok { - toSerialize["WafViolation"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableDistributionLogsRecord struct { - value *DistributionLogsRecord - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistributionLogsRecord) Get() *DistributionLogsRecord { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistributionLogsRecord) Set(val *DistributionLogsRecord) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistributionLogsRecord) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistributionLogsRecord) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableDistributionLogsRecord(val *DistributionLogsRecord) *NullableDistributionLogsRecord { - return &NullableDistributionLogsRecord{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistributionLogsRecord) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistributionLogsRecord) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_distribution_logs_record_test.go b/services/cdn/model_distribution_logs_record_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_distribution_logs_record_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_distribution_statistics_record.go b/services/cdn/model_distribution_statistics_record.go deleted file mode 100644 index 3f5a799d1e..0000000000 --- a/services/cdn/model_distribution_statistics_record.go +++ /dev/null @@ -1,420 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "time" -) - -// checks if the DistributionStatisticsRecord type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DistributionStatisticsRecord{} - -/* - types and functions for cachedRequests -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordGetCachedRequestsAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordGetCachedRequestsArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordGetCachedRequestsRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionStatisticsRecordGetCachedRequestsAttributeTypeOk(arg DistributionStatisticsRecordGetCachedRequestsAttributeType) (ret DistributionStatisticsRecordGetCachedRequestsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionStatisticsRecordGetCachedRequestsAttributeType(arg *DistributionStatisticsRecordGetCachedRequestsAttributeType, val DistributionStatisticsRecordGetCachedRequestsRetType) { - *arg = &val -} - -/* - types and functions for totalRequests -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordGetTotalRequestsAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordGetTotalRequestsArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordGetTotalRequestsRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionStatisticsRecordGetTotalRequestsAttributeTypeOk(arg DistributionStatisticsRecordGetTotalRequestsAttributeType) (ret DistributionStatisticsRecordGetTotalRequestsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionStatisticsRecordGetTotalRequestsAttributeType(arg *DistributionStatisticsRecordGetTotalRequestsAttributeType, val DistributionStatisticsRecordGetTotalRequestsRetType) { - *arg = &val -} - -/* - types and functions for totalTrafficBytes -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordGetTotalTrafficBytesAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordGetTotalTrafficBytesArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordGetTotalTrafficBytesRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionStatisticsRecordGetTotalTrafficBytesAttributeTypeOk(arg DistributionStatisticsRecordGetTotalTrafficBytesAttributeType) (ret DistributionStatisticsRecordGetTotalTrafficBytesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionStatisticsRecordGetTotalTrafficBytesAttributeType(arg *DistributionStatisticsRecordGetTotalTrafficBytesAttributeType, val DistributionStatisticsRecordGetTotalTrafficBytesRetType) { - *arg = &val -} - -/* - types and functions for end -*/ - -// isDateTime -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordGetEndAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordGetEndArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordGetEndRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionStatisticsRecordGetEndAttributeTypeOk(arg DistributionStatisticsRecordGetEndAttributeType) (ret DistributionStatisticsRecordGetEndRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionStatisticsRecordGetEndAttributeType(arg *DistributionStatisticsRecordGetEndAttributeType, val DistributionStatisticsRecordGetEndRetType) { - *arg = &val -} - -/* - types and functions for regions -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordGetRegionsAttributeType = *DistributionStatisticsRecordRegions - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordGetRegionsArgType = DistributionStatisticsRecordRegions - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordGetRegionsRetType = DistributionStatisticsRecordRegions - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionStatisticsRecordGetRegionsAttributeTypeOk(arg DistributionStatisticsRecordGetRegionsAttributeType) (ret DistributionStatisticsRecordGetRegionsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionStatisticsRecordGetRegionsAttributeType(arg *DistributionStatisticsRecordGetRegionsAttributeType, val DistributionStatisticsRecordGetRegionsRetType) { - *arg = &val -} - -/* - types and functions for start -*/ - -// isDateTime -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordGetStartAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordGetStartArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordGetStartRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionStatisticsRecordGetStartAttributeTypeOk(arg DistributionStatisticsRecordGetStartAttributeType) (ret DistributionStatisticsRecordGetStartRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionStatisticsRecordGetStartAttributeType(arg *DistributionStatisticsRecordGetStartAttributeType, val DistributionStatisticsRecordGetStartRetType) { - *arg = &val -} - -// DistributionStatisticsRecord Aggregated statistics of a distribution during a time interval -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecord struct { - // Number of cached requests that were served - // REQUIRED - CachedRequests DistributionStatisticsRecordGetCachedRequestsAttributeType `json:"cachedRequests" required:"true"` - // Total number of requests that were served - // REQUIRED - TotalRequests DistributionStatisticsRecordGetTotalRequestsAttributeType `json:"totalRequests" required:"true"` - // Total traffic in bytes that occurred during the time interval - // REQUIRED - TotalTrafficBytes DistributionStatisticsRecordGetTotalTrafficBytesAttributeType `json:"totalTrafficBytes" required:"true"` - // Exclusive end of the time interval the statistics refer to - // REQUIRED - End DistributionStatisticsRecordGetEndAttributeType `json:"end" required:"true"` - // REQUIRED - Regions DistributionStatisticsRecordGetRegionsAttributeType `json:"regions" required:"true"` - // Start of the time interval the statistics refer to - // REQUIRED - Start DistributionStatisticsRecordGetStartAttributeType `json:"start" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _DistributionStatisticsRecord DistributionStatisticsRecord - -// NewDistributionStatisticsRecord instantiates a new DistributionStatisticsRecord 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDistributionStatisticsRecord(cachedRequests DistributionStatisticsRecordGetCachedRequestsArgType, totalRequests DistributionStatisticsRecordGetTotalRequestsArgType, totalTrafficBytes DistributionStatisticsRecordGetTotalTrafficBytesArgType, end DistributionStatisticsRecordGetEndArgType, regions DistributionStatisticsRecordGetRegionsArgType, start DistributionStatisticsRecordGetStartArgType) *DistributionStatisticsRecord { - this := DistributionStatisticsRecord{} - setDistributionStatisticsRecordGetCachedRequestsAttributeType(&this.CachedRequests, cachedRequests) - setDistributionStatisticsRecordGetTotalRequestsAttributeType(&this.TotalRequests, totalRequests) - setDistributionStatisticsRecordGetTotalTrafficBytesAttributeType(&this.TotalTrafficBytes, totalTrafficBytes) - setDistributionStatisticsRecordGetEndAttributeType(&this.End, end) - setDistributionStatisticsRecordGetRegionsAttributeType(&this.Regions, regions) - setDistributionStatisticsRecordGetStartAttributeType(&this.Start, start) - return &this -} - -// NewDistributionStatisticsRecordWithDefaults instantiates a new DistributionStatisticsRecord 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDistributionStatisticsRecordWithDefaults() *DistributionStatisticsRecord { - this := DistributionStatisticsRecord{} - return &this -} - -// GetCachedRequests returns the CachedRequests field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecord) GetCachedRequests() (ret DistributionStatisticsRecordGetCachedRequestsRetType) { - ret, _ = o.GetCachedRequestsOk() - return ret -} - -// GetCachedRequestsOk returns a tuple with the CachedRequests field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecord) GetCachedRequestsOk() (ret DistributionStatisticsRecordGetCachedRequestsRetType, ok bool) { - return getDistributionStatisticsRecordGetCachedRequestsAttributeTypeOk(o.CachedRequests) -} - -// SetCachedRequests sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecord) SetCachedRequests(v DistributionStatisticsRecordGetCachedRequestsRetType) { - setDistributionStatisticsRecordGetCachedRequestsAttributeType(&o.CachedRequests, v) -} - -// GetTotalRequests returns the TotalRequests field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecord) GetTotalRequests() (ret DistributionStatisticsRecordGetTotalRequestsRetType) { - ret, _ = o.GetTotalRequestsOk() - return ret -} - -// GetTotalRequestsOk returns a tuple with the TotalRequests field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecord) GetTotalRequestsOk() (ret DistributionStatisticsRecordGetTotalRequestsRetType, ok bool) { - return getDistributionStatisticsRecordGetTotalRequestsAttributeTypeOk(o.TotalRequests) -} - -// SetTotalRequests sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecord) SetTotalRequests(v DistributionStatisticsRecordGetTotalRequestsRetType) { - setDistributionStatisticsRecordGetTotalRequestsAttributeType(&o.TotalRequests, v) -} - -// GetTotalTrafficBytes returns the TotalTrafficBytes field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecord) GetTotalTrafficBytes() (ret DistributionStatisticsRecordGetTotalTrafficBytesRetType) { - ret, _ = o.GetTotalTrafficBytesOk() - return ret -} - -// GetTotalTrafficBytesOk returns a tuple with the TotalTrafficBytes field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecord) GetTotalTrafficBytesOk() (ret DistributionStatisticsRecordGetTotalTrafficBytesRetType, ok bool) { - return getDistributionStatisticsRecordGetTotalTrafficBytesAttributeTypeOk(o.TotalTrafficBytes) -} - -// SetTotalTrafficBytes sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecord) SetTotalTrafficBytes(v DistributionStatisticsRecordGetTotalTrafficBytesRetType) { - setDistributionStatisticsRecordGetTotalTrafficBytesAttributeType(&o.TotalTrafficBytes, v) -} - -// GetEnd returns the End field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecord) GetEnd() (ret DistributionStatisticsRecordGetEndRetType) { - ret, _ = o.GetEndOk() - return ret -} - -// GetEndOk returns a tuple with the End field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecord) GetEndOk() (ret DistributionStatisticsRecordGetEndRetType, ok bool) { - return getDistributionStatisticsRecordGetEndAttributeTypeOk(o.End) -} - -// SetEnd sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecord) SetEnd(v DistributionStatisticsRecordGetEndRetType) { - setDistributionStatisticsRecordGetEndAttributeType(&o.End, v) -} - -// GetRegions returns the Regions field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecord) GetRegions() (ret DistributionStatisticsRecordGetRegionsRetType) { - ret, _ = o.GetRegionsOk() - return ret -} - -// GetRegionsOk returns a tuple with the Regions field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecord) GetRegionsOk() (ret DistributionStatisticsRecordGetRegionsRetType, ok bool) { - return getDistributionStatisticsRecordGetRegionsAttributeTypeOk(o.Regions) -} - -// SetRegions sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecord) SetRegions(v DistributionStatisticsRecordGetRegionsRetType) { - setDistributionStatisticsRecordGetRegionsAttributeType(&o.Regions, v) -} - -// GetStart returns the Start field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecord) GetStart() (ret DistributionStatisticsRecordGetStartRetType) { - ret, _ = o.GetStartOk() - return ret -} - -// GetStartOk returns a tuple with the Start field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecord) GetStartOk() (ret DistributionStatisticsRecordGetStartRetType, ok bool) { - return getDistributionStatisticsRecordGetStartAttributeTypeOk(o.Start) -} - -// SetStart sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecord) SetStart(v DistributionStatisticsRecordGetStartRetType) { - setDistributionStatisticsRecordGetStartAttributeType(&o.Start, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o DistributionStatisticsRecord) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getDistributionStatisticsRecordGetCachedRequestsAttributeTypeOk(o.CachedRequests); ok { - toSerialize["CachedRequests"] = val - } - if val, ok := getDistributionStatisticsRecordGetTotalRequestsAttributeTypeOk(o.TotalRequests); ok { - toSerialize["TotalRequests"] = val - } - if val, ok := getDistributionStatisticsRecordGetTotalTrafficBytesAttributeTypeOk(o.TotalTrafficBytes); ok { - toSerialize["TotalTrafficBytes"] = val - } - if val, ok := getDistributionStatisticsRecordGetEndAttributeTypeOk(o.End); ok { - toSerialize["End"] = val - } - if val, ok := getDistributionStatisticsRecordGetRegionsAttributeTypeOk(o.Regions); ok { - toSerialize["Regions"] = val - } - if val, ok := getDistributionStatisticsRecordGetStartAttributeTypeOk(o.Start); ok { - toSerialize["Start"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableDistributionStatisticsRecord struct { - value *DistributionStatisticsRecord - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistributionStatisticsRecord) Get() *DistributionStatisticsRecord { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistributionStatisticsRecord) Set(val *DistributionStatisticsRecord) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistributionStatisticsRecord) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistributionStatisticsRecord) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableDistributionStatisticsRecord(val *DistributionStatisticsRecord) *NullableDistributionStatisticsRecord { - return &NullableDistributionStatisticsRecord{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistributionStatisticsRecord) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistributionStatisticsRecord) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_distribution_statistics_record_all_of.go b/services/cdn/model_distribution_statistics_record_all_of.go deleted file mode 100644 index d97267f5fa..0000000000 --- a/services/cdn/model_distribution_statistics_record_all_of.go +++ /dev/null @@ -1,258 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "time" -) - -// checks if the DistributionStatisticsRecordAllOf type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DistributionStatisticsRecordAllOf{} - -/* - types and functions for end -*/ - -// isDateTime -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordAllOfGetEndAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordAllOfGetEndArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordAllOfGetEndRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionStatisticsRecordAllOfGetEndAttributeTypeOk(arg DistributionStatisticsRecordAllOfGetEndAttributeType) (ret DistributionStatisticsRecordAllOfGetEndRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionStatisticsRecordAllOfGetEndAttributeType(arg *DistributionStatisticsRecordAllOfGetEndAttributeType, val DistributionStatisticsRecordAllOfGetEndRetType) { - *arg = &val -} - -/* - types and functions for regions -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordAllOfGetRegionsAttributeType = *DistributionStatisticsRecordRegions - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordAllOfGetRegionsArgType = DistributionStatisticsRecordRegions - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordAllOfGetRegionsRetType = DistributionStatisticsRecordRegions - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionStatisticsRecordAllOfGetRegionsAttributeTypeOk(arg DistributionStatisticsRecordAllOfGetRegionsAttributeType) (ret DistributionStatisticsRecordAllOfGetRegionsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionStatisticsRecordAllOfGetRegionsAttributeType(arg *DistributionStatisticsRecordAllOfGetRegionsAttributeType, val DistributionStatisticsRecordAllOfGetRegionsRetType) { - *arg = &val -} - -/* - types and functions for start -*/ - -// isDateTime -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordAllOfGetStartAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordAllOfGetStartArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordAllOfGetStartRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionStatisticsRecordAllOfGetStartAttributeTypeOk(arg DistributionStatisticsRecordAllOfGetStartAttributeType) (ret DistributionStatisticsRecordAllOfGetStartRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionStatisticsRecordAllOfGetStartAttributeType(arg *DistributionStatisticsRecordAllOfGetStartAttributeType, val DistributionStatisticsRecordAllOfGetStartRetType) { - *arg = &val -} - -// DistributionStatisticsRecordAllOf struct for DistributionStatisticsRecordAllOf -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordAllOf struct { - // Exclusive end of the time interval the statistics refer to - // REQUIRED - End DistributionStatisticsRecordAllOfGetEndAttributeType `json:"end" required:"true"` - // REQUIRED - Regions DistributionStatisticsRecordAllOfGetRegionsAttributeType `json:"regions" required:"true"` - // Start of the time interval the statistics refer to - // REQUIRED - Start DistributionStatisticsRecordAllOfGetStartAttributeType `json:"start" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _DistributionStatisticsRecordAllOf DistributionStatisticsRecordAllOf - -// NewDistributionStatisticsRecordAllOf instantiates a new DistributionStatisticsRecordAllOf 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDistributionStatisticsRecordAllOf(end DistributionStatisticsRecordAllOfGetEndArgType, regions DistributionStatisticsRecordAllOfGetRegionsArgType, start DistributionStatisticsRecordAllOfGetStartArgType) *DistributionStatisticsRecordAllOf { - this := DistributionStatisticsRecordAllOf{} - setDistributionStatisticsRecordAllOfGetEndAttributeType(&this.End, end) - setDistributionStatisticsRecordAllOfGetRegionsAttributeType(&this.Regions, regions) - setDistributionStatisticsRecordAllOfGetStartAttributeType(&this.Start, start) - return &this -} - -// NewDistributionStatisticsRecordAllOfWithDefaults instantiates a new DistributionStatisticsRecordAllOf 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDistributionStatisticsRecordAllOfWithDefaults() *DistributionStatisticsRecordAllOf { - this := DistributionStatisticsRecordAllOf{} - return &this -} - -// GetEnd returns the End field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordAllOf) GetEnd() (ret DistributionStatisticsRecordAllOfGetEndRetType) { - ret, _ = o.GetEndOk() - return ret -} - -// GetEndOk returns a tuple with the End field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordAllOf) GetEndOk() (ret DistributionStatisticsRecordAllOfGetEndRetType, ok bool) { - return getDistributionStatisticsRecordAllOfGetEndAttributeTypeOk(o.End) -} - -// SetEnd sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordAllOf) SetEnd(v DistributionStatisticsRecordAllOfGetEndRetType) { - setDistributionStatisticsRecordAllOfGetEndAttributeType(&o.End, v) -} - -// GetRegions returns the Regions field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordAllOf) GetRegions() (ret DistributionStatisticsRecordAllOfGetRegionsRetType) { - ret, _ = o.GetRegionsOk() - return ret -} - -// GetRegionsOk returns a tuple with the Regions field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordAllOf) GetRegionsOk() (ret DistributionStatisticsRecordAllOfGetRegionsRetType, ok bool) { - return getDistributionStatisticsRecordAllOfGetRegionsAttributeTypeOk(o.Regions) -} - -// SetRegions sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordAllOf) SetRegions(v DistributionStatisticsRecordAllOfGetRegionsRetType) { - setDistributionStatisticsRecordAllOfGetRegionsAttributeType(&o.Regions, v) -} - -// GetStart returns the Start field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordAllOf) GetStart() (ret DistributionStatisticsRecordAllOfGetStartRetType) { - ret, _ = o.GetStartOk() - return ret -} - -// GetStartOk returns a tuple with the Start field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordAllOf) GetStartOk() (ret DistributionStatisticsRecordAllOfGetStartRetType, ok bool) { - return getDistributionStatisticsRecordAllOfGetStartAttributeTypeOk(o.Start) -} - -// SetStart sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordAllOf) SetStart(v DistributionStatisticsRecordAllOfGetStartRetType) { - setDistributionStatisticsRecordAllOfGetStartAttributeType(&o.Start, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o DistributionStatisticsRecordAllOf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getDistributionStatisticsRecordAllOfGetEndAttributeTypeOk(o.End); ok { - toSerialize["End"] = val - } - if val, ok := getDistributionStatisticsRecordAllOfGetRegionsAttributeTypeOk(o.Regions); ok { - toSerialize["Regions"] = val - } - if val, ok := getDistributionStatisticsRecordAllOfGetStartAttributeTypeOk(o.Start); ok { - toSerialize["Start"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableDistributionStatisticsRecordAllOf struct { - value *DistributionStatisticsRecordAllOf - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistributionStatisticsRecordAllOf) Get() *DistributionStatisticsRecordAllOf { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistributionStatisticsRecordAllOf) Set(val *DistributionStatisticsRecordAllOf) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistributionStatisticsRecordAllOf) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistributionStatisticsRecordAllOf) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableDistributionStatisticsRecordAllOf(val *DistributionStatisticsRecordAllOf) *NullableDistributionStatisticsRecordAllOf { - return &NullableDistributionStatisticsRecordAllOf{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistributionStatisticsRecordAllOf) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistributionStatisticsRecordAllOf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_distribution_statistics_record_all_of_test.go b/services/cdn/model_distribution_statistics_record_all_of_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_distribution_statistics_record_all_of_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_distribution_statistics_record_entry.go b/services/cdn/model_distribution_statistics_record_entry.go deleted file mode 100644 index fc01dedd85..0000000000 --- a/services/cdn/model_distribution_statistics_record_entry.go +++ /dev/null @@ -1,258 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the DistributionStatisticsRecordEntry type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DistributionStatisticsRecordEntry{} - -/* - types and functions for cachedRequests -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordEntryGetCachedRequestsAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordEntryGetCachedRequestsArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordEntryGetCachedRequestsRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionStatisticsRecordEntryGetCachedRequestsAttributeTypeOk(arg DistributionStatisticsRecordEntryGetCachedRequestsAttributeType) (ret DistributionStatisticsRecordEntryGetCachedRequestsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionStatisticsRecordEntryGetCachedRequestsAttributeType(arg *DistributionStatisticsRecordEntryGetCachedRequestsAttributeType, val DistributionStatisticsRecordEntryGetCachedRequestsRetType) { - *arg = &val -} - -/* - types and functions for totalRequests -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordEntryGetTotalRequestsAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordEntryGetTotalRequestsArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordEntryGetTotalRequestsRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionStatisticsRecordEntryGetTotalRequestsAttributeTypeOk(arg DistributionStatisticsRecordEntryGetTotalRequestsAttributeType) (ret DistributionStatisticsRecordEntryGetTotalRequestsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionStatisticsRecordEntryGetTotalRequestsAttributeType(arg *DistributionStatisticsRecordEntryGetTotalRequestsAttributeType, val DistributionStatisticsRecordEntryGetTotalRequestsRetType) { - *arg = &val -} - -/* - types and functions for totalTrafficBytes -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordEntryGetTotalTrafficBytesAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordEntryGetTotalTrafficBytesArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordEntryGetTotalTrafficBytesRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionStatisticsRecordEntryGetTotalTrafficBytesAttributeTypeOk(arg DistributionStatisticsRecordEntryGetTotalTrafficBytesAttributeType) (ret DistributionStatisticsRecordEntryGetTotalTrafficBytesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionStatisticsRecordEntryGetTotalTrafficBytesAttributeType(arg *DistributionStatisticsRecordEntryGetTotalTrafficBytesAttributeType, val DistributionStatisticsRecordEntryGetTotalTrafficBytesRetType) { - *arg = &val -} - -// DistributionStatisticsRecordEntry struct for DistributionStatisticsRecordEntry -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordEntry struct { - // Number of cached requests that were served - // REQUIRED - CachedRequests DistributionStatisticsRecordEntryGetCachedRequestsAttributeType `json:"cachedRequests" required:"true"` - // Total number of requests that were served - // REQUIRED - TotalRequests DistributionStatisticsRecordEntryGetTotalRequestsAttributeType `json:"totalRequests" required:"true"` - // Total traffic in bytes that occurred during the time interval - // REQUIRED - TotalTrafficBytes DistributionStatisticsRecordEntryGetTotalTrafficBytesAttributeType `json:"totalTrafficBytes" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _DistributionStatisticsRecordEntry DistributionStatisticsRecordEntry - -// NewDistributionStatisticsRecordEntry instantiates a new DistributionStatisticsRecordEntry 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDistributionStatisticsRecordEntry(cachedRequests DistributionStatisticsRecordEntryGetCachedRequestsArgType, totalRequests DistributionStatisticsRecordEntryGetTotalRequestsArgType, totalTrafficBytes DistributionStatisticsRecordEntryGetTotalTrafficBytesArgType) *DistributionStatisticsRecordEntry { - this := DistributionStatisticsRecordEntry{} - setDistributionStatisticsRecordEntryGetCachedRequestsAttributeType(&this.CachedRequests, cachedRequests) - setDistributionStatisticsRecordEntryGetTotalRequestsAttributeType(&this.TotalRequests, totalRequests) - setDistributionStatisticsRecordEntryGetTotalTrafficBytesAttributeType(&this.TotalTrafficBytes, totalTrafficBytes) - return &this -} - -// NewDistributionStatisticsRecordEntryWithDefaults instantiates a new DistributionStatisticsRecordEntry 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDistributionStatisticsRecordEntryWithDefaults() *DistributionStatisticsRecordEntry { - this := DistributionStatisticsRecordEntry{} - return &this -} - -// GetCachedRequests returns the CachedRequests field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordEntry) GetCachedRequests() (ret DistributionStatisticsRecordEntryGetCachedRequestsRetType) { - ret, _ = o.GetCachedRequestsOk() - return ret -} - -// GetCachedRequestsOk returns a tuple with the CachedRequests field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordEntry) GetCachedRequestsOk() (ret DistributionStatisticsRecordEntryGetCachedRequestsRetType, ok bool) { - return getDistributionStatisticsRecordEntryGetCachedRequestsAttributeTypeOk(o.CachedRequests) -} - -// SetCachedRequests sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordEntry) SetCachedRequests(v DistributionStatisticsRecordEntryGetCachedRequestsRetType) { - setDistributionStatisticsRecordEntryGetCachedRequestsAttributeType(&o.CachedRequests, v) -} - -// GetTotalRequests returns the TotalRequests field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordEntry) GetTotalRequests() (ret DistributionStatisticsRecordEntryGetTotalRequestsRetType) { - ret, _ = o.GetTotalRequestsOk() - return ret -} - -// GetTotalRequestsOk returns a tuple with the TotalRequests field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordEntry) GetTotalRequestsOk() (ret DistributionStatisticsRecordEntryGetTotalRequestsRetType, ok bool) { - return getDistributionStatisticsRecordEntryGetTotalRequestsAttributeTypeOk(o.TotalRequests) -} - -// SetTotalRequests sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordEntry) SetTotalRequests(v DistributionStatisticsRecordEntryGetTotalRequestsRetType) { - setDistributionStatisticsRecordEntryGetTotalRequestsAttributeType(&o.TotalRequests, v) -} - -// GetTotalTrafficBytes returns the TotalTrafficBytes field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordEntry) GetTotalTrafficBytes() (ret DistributionStatisticsRecordEntryGetTotalTrafficBytesRetType) { - ret, _ = o.GetTotalTrafficBytesOk() - return ret -} - -// GetTotalTrafficBytesOk returns a tuple with the TotalTrafficBytes field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordEntry) GetTotalTrafficBytesOk() (ret DistributionStatisticsRecordEntryGetTotalTrafficBytesRetType, ok bool) { - return getDistributionStatisticsRecordEntryGetTotalTrafficBytesAttributeTypeOk(o.TotalTrafficBytes) -} - -// SetTotalTrafficBytes sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordEntry) SetTotalTrafficBytes(v DistributionStatisticsRecordEntryGetTotalTrafficBytesRetType) { - setDistributionStatisticsRecordEntryGetTotalTrafficBytesAttributeType(&o.TotalTrafficBytes, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o DistributionStatisticsRecordEntry) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getDistributionStatisticsRecordEntryGetCachedRequestsAttributeTypeOk(o.CachedRequests); ok { - toSerialize["CachedRequests"] = val - } - if val, ok := getDistributionStatisticsRecordEntryGetTotalRequestsAttributeTypeOk(o.TotalRequests); ok { - toSerialize["TotalRequests"] = val - } - if val, ok := getDistributionStatisticsRecordEntryGetTotalTrafficBytesAttributeTypeOk(o.TotalTrafficBytes); ok { - toSerialize["TotalTrafficBytes"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableDistributionStatisticsRecordEntry struct { - value *DistributionStatisticsRecordEntry - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistributionStatisticsRecordEntry) Get() *DistributionStatisticsRecordEntry { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistributionStatisticsRecordEntry) Set(val *DistributionStatisticsRecordEntry) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistributionStatisticsRecordEntry) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistributionStatisticsRecordEntry) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableDistributionStatisticsRecordEntry(val *DistributionStatisticsRecordEntry) *NullableDistributionStatisticsRecordEntry { - return &NullableDistributionStatisticsRecordEntry{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistributionStatisticsRecordEntry) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistributionStatisticsRecordEntry) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_distribution_statistics_record_entry_test.go b/services/cdn/model_distribution_statistics_record_entry_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_distribution_statistics_record_entry_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_distribution_statistics_record_regions.go b/services/cdn/model_distribution_statistics_record_regions.go deleted file mode 100644 index a270adb66c..0000000000 --- a/services/cdn/model_distribution_statistics_record_regions.go +++ /dev/null @@ -1,361 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the DistributionStatisticsRecordRegions type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DistributionStatisticsRecordRegions{} - -/* - types and functions for AF -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordRegionsGetAFAttributeType = *DistributionStatisticsRecordEntry - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordRegionsGetAFArgType = DistributionStatisticsRecordEntry - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordRegionsGetAFRetType = DistributionStatisticsRecordEntry - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionStatisticsRecordRegionsGetAFAttributeTypeOk(arg DistributionStatisticsRecordRegionsGetAFAttributeType) (ret DistributionStatisticsRecordRegionsGetAFRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionStatisticsRecordRegionsGetAFAttributeType(arg *DistributionStatisticsRecordRegionsGetAFAttributeType, val DistributionStatisticsRecordRegionsGetAFRetType) { - *arg = &val -} - -/* - types and functions for ASIA -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordRegionsGetASIAAttributeType = *DistributionStatisticsRecordEntry - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordRegionsGetASIAArgType = DistributionStatisticsRecordEntry - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordRegionsGetASIARetType = DistributionStatisticsRecordEntry - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionStatisticsRecordRegionsGetASIAAttributeTypeOk(arg DistributionStatisticsRecordRegionsGetASIAAttributeType) (ret DistributionStatisticsRecordRegionsGetASIARetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionStatisticsRecordRegionsGetASIAAttributeType(arg *DistributionStatisticsRecordRegionsGetASIAAttributeType, val DistributionStatisticsRecordRegionsGetASIARetType) { - *arg = &val -} - -/* - types and functions for EU -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordRegionsGetEUAttributeType = *DistributionStatisticsRecordEntry - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordRegionsGetEUArgType = DistributionStatisticsRecordEntry - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordRegionsGetEURetType = DistributionStatisticsRecordEntry - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionStatisticsRecordRegionsGetEUAttributeTypeOk(arg DistributionStatisticsRecordRegionsGetEUAttributeType) (ret DistributionStatisticsRecordRegionsGetEURetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionStatisticsRecordRegionsGetEUAttributeType(arg *DistributionStatisticsRecordRegionsGetEUAttributeType, val DistributionStatisticsRecordRegionsGetEURetType) { - *arg = &val -} - -/* - types and functions for SA -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordRegionsGetSAAttributeType = *DistributionStatisticsRecordEntry - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordRegionsGetSAArgType = DistributionStatisticsRecordEntry - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordRegionsGetSARetType = DistributionStatisticsRecordEntry - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionStatisticsRecordRegionsGetSAAttributeTypeOk(arg DistributionStatisticsRecordRegionsGetSAAttributeType) (ret DistributionStatisticsRecordRegionsGetSARetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionStatisticsRecordRegionsGetSAAttributeType(arg *DistributionStatisticsRecordRegionsGetSAAttributeType, val DistributionStatisticsRecordRegionsGetSARetType) { - *arg = &val -} - -/* - types and functions for US -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordRegionsGetUSAttributeType = *DistributionStatisticsRecordEntry - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordRegionsGetUSArgType = DistributionStatisticsRecordEntry - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordRegionsGetUSRetType = DistributionStatisticsRecordEntry - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionStatisticsRecordRegionsGetUSAttributeTypeOk(arg DistributionStatisticsRecordRegionsGetUSAttributeType) (ret DistributionStatisticsRecordRegionsGetUSRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionStatisticsRecordRegionsGetUSAttributeType(arg *DistributionStatisticsRecordRegionsGetUSAttributeType, val DistributionStatisticsRecordRegionsGetUSRetType) { - *arg = &val -} - -// DistributionStatisticsRecordRegions Mapping of regions to the metrics for this region for the defined time interval All regions are always present. If no traffic was reported for a region, it will still contain 0-filled properties -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionStatisticsRecordRegions struct { - // REQUIRED - AF DistributionStatisticsRecordRegionsGetAFAttributeType `json:"AF" required:"true"` - // REQUIRED - ASIA DistributionStatisticsRecordRegionsGetASIAAttributeType `json:"ASIA" required:"true"` - // REQUIRED - EU DistributionStatisticsRecordRegionsGetEUAttributeType `json:"EU" required:"true"` - // REQUIRED - SA DistributionStatisticsRecordRegionsGetSAAttributeType `json:"SA" required:"true"` - // REQUIRED - US DistributionStatisticsRecordRegionsGetUSAttributeType `json:"US" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _DistributionStatisticsRecordRegions DistributionStatisticsRecordRegions - -// NewDistributionStatisticsRecordRegions instantiates a new DistributionStatisticsRecordRegions 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDistributionStatisticsRecordRegions(aF DistributionStatisticsRecordRegionsGetAFArgType, aSIA DistributionStatisticsRecordRegionsGetASIAArgType, eU DistributionStatisticsRecordRegionsGetEUArgType, sA DistributionStatisticsRecordRegionsGetSAArgType, uS DistributionStatisticsRecordRegionsGetUSArgType) *DistributionStatisticsRecordRegions { - this := DistributionStatisticsRecordRegions{} - setDistributionStatisticsRecordRegionsGetAFAttributeType(&this.AF, aF) - setDistributionStatisticsRecordRegionsGetASIAAttributeType(&this.ASIA, aSIA) - setDistributionStatisticsRecordRegionsGetEUAttributeType(&this.EU, eU) - setDistributionStatisticsRecordRegionsGetSAAttributeType(&this.SA, sA) - setDistributionStatisticsRecordRegionsGetUSAttributeType(&this.US, uS) - return &this -} - -// NewDistributionStatisticsRecordRegionsWithDefaults instantiates a new DistributionStatisticsRecordRegions 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDistributionStatisticsRecordRegionsWithDefaults() *DistributionStatisticsRecordRegions { - this := DistributionStatisticsRecordRegions{} - return &this -} - -// GetAF returns the AF field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordRegions) GetAF() (ret DistributionStatisticsRecordRegionsGetAFRetType) { - ret, _ = o.GetAFOk() - return ret -} - -// GetAFOk returns a tuple with the AF field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordRegions) GetAFOk() (ret DistributionStatisticsRecordRegionsGetAFRetType, ok bool) { - return getDistributionStatisticsRecordRegionsGetAFAttributeTypeOk(o.AF) -} - -// SetAF sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordRegions) SetAF(v DistributionStatisticsRecordRegionsGetAFRetType) { - setDistributionStatisticsRecordRegionsGetAFAttributeType(&o.AF, v) -} - -// GetASIA returns the ASIA field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordRegions) GetASIA() (ret DistributionStatisticsRecordRegionsGetASIARetType) { - ret, _ = o.GetASIAOk() - return ret -} - -// GetASIAOk returns a tuple with the ASIA field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordRegions) GetASIAOk() (ret DistributionStatisticsRecordRegionsGetASIARetType, ok bool) { - return getDistributionStatisticsRecordRegionsGetASIAAttributeTypeOk(o.ASIA) -} - -// SetASIA sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordRegions) SetASIA(v DistributionStatisticsRecordRegionsGetASIARetType) { - setDistributionStatisticsRecordRegionsGetASIAAttributeType(&o.ASIA, v) -} - -// GetEU returns the EU field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordRegions) GetEU() (ret DistributionStatisticsRecordRegionsGetEURetType) { - ret, _ = o.GetEUOk() - return ret -} - -// GetEUOk returns a tuple with the EU field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordRegions) GetEUOk() (ret DistributionStatisticsRecordRegionsGetEURetType, ok bool) { - return getDistributionStatisticsRecordRegionsGetEUAttributeTypeOk(o.EU) -} - -// SetEU sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordRegions) SetEU(v DistributionStatisticsRecordRegionsGetEURetType) { - setDistributionStatisticsRecordRegionsGetEUAttributeType(&o.EU, v) -} - -// GetSA returns the SA field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordRegions) GetSA() (ret DistributionStatisticsRecordRegionsGetSARetType) { - ret, _ = o.GetSAOk() - return ret -} - -// GetSAOk returns a tuple with the SA field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordRegions) GetSAOk() (ret DistributionStatisticsRecordRegionsGetSARetType, ok bool) { - return getDistributionStatisticsRecordRegionsGetSAAttributeTypeOk(o.SA) -} - -// SetSA sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordRegions) SetSA(v DistributionStatisticsRecordRegionsGetSARetType) { - setDistributionStatisticsRecordRegionsGetSAAttributeType(&o.SA, v) -} - -// GetUS returns the US field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordRegions) GetUS() (ret DistributionStatisticsRecordRegionsGetUSRetType) { - ret, _ = o.GetUSOk() - return ret -} - -// GetUSOk returns a tuple with the US field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordRegions) GetUSOk() (ret DistributionStatisticsRecordRegionsGetUSRetType, ok bool) { - return getDistributionStatisticsRecordRegionsGetUSAttributeTypeOk(o.US) -} - -// SetUS sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionStatisticsRecordRegions) SetUS(v DistributionStatisticsRecordRegionsGetUSRetType) { - setDistributionStatisticsRecordRegionsGetUSAttributeType(&o.US, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o DistributionStatisticsRecordRegions) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getDistributionStatisticsRecordRegionsGetAFAttributeTypeOk(o.AF); ok { - toSerialize["AF"] = val - } - if val, ok := getDistributionStatisticsRecordRegionsGetASIAAttributeTypeOk(o.ASIA); ok { - toSerialize["ASIA"] = val - } - if val, ok := getDistributionStatisticsRecordRegionsGetEUAttributeTypeOk(o.EU); ok { - toSerialize["EU"] = val - } - if val, ok := getDistributionStatisticsRecordRegionsGetSAAttributeTypeOk(o.SA); ok { - toSerialize["SA"] = val - } - if val, ok := getDistributionStatisticsRecordRegionsGetUSAttributeTypeOk(o.US); ok { - toSerialize["US"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableDistributionStatisticsRecordRegions struct { - value *DistributionStatisticsRecordRegions - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistributionStatisticsRecordRegions) Get() *DistributionStatisticsRecordRegions { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistributionStatisticsRecordRegions) Set(val *DistributionStatisticsRecordRegions) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistributionStatisticsRecordRegions) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistributionStatisticsRecordRegions) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableDistributionStatisticsRecordRegions(val *DistributionStatisticsRecordRegions) *NullableDistributionStatisticsRecordRegions { - return &NullableDistributionStatisticsRecordRegions{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistributionStatisticsRecordRegions) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistributionStatisticsRecordRegions) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_distribution_statistics_record_regions_test.go b/services/cdn/model_distribution_statistics_record_regions_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_distribution_statistics_record_regions_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_distribution_statistics_record_test.go b/services/cdn/model_distribution_statistics_record_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_distribution_statistics_record_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_distribution_test.go b/services/cdn/model_distribution_test.go deleted file mode 100644 index ec88c4f32e..0000000000 --- a/services/cdn/model_distribution_test.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn - -import ( - "testing" -) - -// isEnum - -func TestDistributionStatus_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"CREATING"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"ACTIVE"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`"UPDATING"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 4`, - args: args{ - src: []byte(`"DELETING"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 5`, - args: args{ - src: []byte(`"ERROR"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := DistributionStatus("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/cdn/model_distribution_waf.go b/services/cdn/model_distribution_waf.go deleted file mode 100644 index 0f279d5e12..0000000000 --- a/services/cdn/model_distribution_waf.go +++ /dev/null @@ -1,255 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the DistributionWaf type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DistributionWaf{} - -/* - types and functions for disabledRules -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionWafGetDisabledRulesAttributeType = *[]WafStatusRuleBlock - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionWafGetDisabledRulesArgType = []WafStatusRuleBlock - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionWafGetDisabledRulesRetType = []WafStatusRuleBlock - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionWafGetDisabledRulesAttributeTypeOk(arg DistributionWafGetDisabledRulesAttributeType) (ret DistributionWafGetDisabledRulesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionWafGetDisabledRulesAttributeType(arg *DistributionWafGetDisabledRulesAttributeType, val DistributionWafGetDisabledRulesRetType) { - *arg = &val -} - -/* - types and functions for enabledRules -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionWafGetEnabledRulesAttributeType = *[]WafStatusRuleBlock - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionWafGetEnabledRulesArgType = []WafStatusRuleBlock - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionWafGetEnabledRulesRetType = []WafStatusRuleBlock - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionWafGetEnabledRulesAttributeTypeOk(arg DistributionWafGetEnabledRulesAttributeType) (ret DistributionWafGetEnabledRulesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionWafGetEnabledRulesAttributeType(arg *DistributionWafGetEnabledRulesAttributeType, val DistributionWafGetEnabledRulesRetType) { - *arg = &val -} - -/* - types and functions for logOnlyRules -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionWafGetLogOnlyRulesAttributeType = *[]WafStatusRuleBlock - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionWafGetLogOnlyRulesArgType = []WafStatusRuleBlock - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionWafGetLogOnlyRulesRetType = []WafStatusRuleBlock - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDistributionWafGetLogOnlyRulesAttributeTypeOk(arg DistributionWafGetLogOnlyRulesAttributeType) (ret DistributionWafGetLogOnlyRulesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDistributionWafGetLogOnlyRulesAttributeType(arg *DistributionWafGetLogOnlyRulesAttributeType, val DistributionWafGetLogOnlyRulesRetType) { - *arg = &val -} - -// DistributionWaf For this property to be present two pre-conditions must be met: - the WAF was enabled at least once - the query parameter ?withWafStatus is truthy This property contains the waf Status. At this point in time, this contains all resolved rules. Rules are split into 3 groups: - enabledRules - logOnlyRules - disabledRules **Do note that the global waf mode (Disabled, LogOnly, Enabled) is *NOT* reflected in this list!** -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DistributionWaf struct { - // REQUIRED - DisabledRules DistributionWafGetDisabledRulesAttributeType `json:"disabledRules" required:"true"` - // REQUIRED - EnabledRules DistributionWafGetEnabledRulesAttributeType `json:"enabledRules" required:"true"` - // REQUIRED - LogOnlyRules DistributionWafGetLogOnlyRulesAttributeType `json:"logOnlyRules" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _DistributionWaf DistributionWaf - -// NewDistributionWaf instantiates a new DistributionWaf 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDistributionWaf(disabledRules DistributionWafGetDisabledRulesArgType, enabledRules DistributionWafGetEnabledRulesArgType, logOnlyRules DistributionWafGetLogOnlyRulesArgType) *DistributionWaf { - this := DistributionWaf{} - setDistributionWafGetDisabledRulesAttributeType(&this.DisabledRules, disabledRules) - setDistributionWafGetEnabledRulesAttributeType(&this.EnabledRules, enabledRules) - setDistributionWafGetLogOnlyRulesAttributeType(&this.LogOnlyRules, logOnlyRules) - return &this -} - -// NewDistributionWafWithDefaults instantiates a new DistributionWaf 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDistributionWafWithDefaults() *DistributionWaf { - this := DistributionWaf{} - return &this -} - -// GetDisabledRules returns the DisabledRules field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionWaf) GetDisabledRules() (ret DistributionWafGetDisabledRulesRetType) { - ret, _ = o.GetDisabledRulesOk() - return ret -} - -// GetDisabledRulesOk returns a tuple with the DisabledRules field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionWaf) GetDisabledRulesOk() (ret DistributionWafGetDisabledRulesRetType, ok bool) { - return getDistributionWafGetDisabledRulesAttributeTypeOk(o.DisabledRules) -} - -// SetDisabledRules sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionWaf) SetDisabledRules(v DistributionWafGetDisabledRulesRetType) { - setDistributionWafGetDisabledRulesAttributeType(&o.DisabledRules, v) -} - -// GetEnabledRules returns the EnabledRules field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionWaf) GetEnabledRules() (ret DistributionWafGetEnabledRulesRetType) { - ret, _ = o.GetEnabledRulesOk() - return ret -} - -// GetEnabledRulesOk returns a tuple with the EnabledRules field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionWaf) GetEnabledRulesOk() (ret DistributionWafGetEnabledRulesRetType, ok bool) { - return getDistributionWafGetEnabledRulesAttributeTypeOk(o.EnabledRules) -} - -// SetEnabledRules sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionWaf) SetEnabledRules(v DistributionWafGetEnabledRulesRetType) { - setDistributionWafGetEnabledRulesAttributeType(&o.EnabledRules, v) -} - -// GetLogOnlyRules returns the LogOnlyRules field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionWaf) GetLogOnlyRules() (ret DistributionWafGetLogOnlyRulesRetType) { - ret, _ = o.GetLogOnlyRulesOk() - return ret -} - -// GetLogOnlyRulesOk returns a tuple with the LogOnlyRules field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionWaf) GetLogOnlyRulesOk() (ret DistributionWafGetLogOnlyRulesRetType, ok bool) { - return getDistributionWafGetLogOnlyRulesAttributeTypeOk(o.LogOnlyRules) -} - -// SetLogOnlyRules sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DistributionWaf) SetLogOnlyRules(v DistributionWafGetLogOnlyRulesRetType) { - setDistributionWafGetLogOnlyRulesAttributeType(&o.LogOnlyRules, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o DistributionWaf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getDistributionWafGetDisabledRulesAttributeTypeOk(o.DisabledRules); ok { - toSerialize["DisabledRules"] = val - } - if val, ok := getDistributionWafGetEnabledRulesAttributeTypeOk(o.EnabledRules); ok { - toSerialize["EnabledRules"] = val - } - if val, ok := getDistributionWafGetLogOnlyRulesAttributeTypeOk(o.LogOnlyRules); ok { - toSerialize["LogOnlyRules"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableDistributionWaf struct { - value *DistributionWaf - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistributionWaf) Get() *DistributionWaf { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistributionWaf) Set(val *DistributionWaf) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistributionWaf) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistributionWaf) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableDistributionWaf(val *DistributionWaf) *NullableDistributionWaf { - return &NullableDistributionWaf{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDistributionWaf) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDistributionWaf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_distribution_waf_test.go b/services/cdn/model_distribution_waf_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_distribution_waf_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_domain.go b/services/cdn/model_domain.go deleted file mode 100644 index f407e41427..0000000000 --- a/services/cdn/model_domain.go +++ /dev/null @@ -1,610 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// checks if the Domain type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Domain{} - -/* - types and functions for certificateType -*/ - -// isEnum - -// DomainCertificateType the model 'Domain' -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DomainCertificateType string - -// List of CertificateType -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - DOMAINCERTIFICATE_TYPE_MANAGED DomainCertificateType = "managed" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - DOMAINCERTIFICATE_TYPE_CUSTOM DomainCertificateType = "custom" -) - -// All allowed values of Domain enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedDomainCertificateTypeEnumValues = []DomainCertificateType{ - "managed", - "custom", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *DomainCertificateType) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson DomainCertificateType - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := DomainCertificateType(value) - for _, existing := range AllowedDomainCertificateTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid Domain", value) -} - -// NewDomainCertificateTypeFromValue returns a pointer to a valid DomainCertificateType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDomainCertificateTypeFromValue(v DomainCertificateType) (*DomainCertificateType, error) { - ev := DomainCertificateType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for DomainCertificateType: valid values are %v", v, AllowedDomainCertificateTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v DomainCertificateType) IsValid() bool { - for _, existing := range AllowedDomainCertificateTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to CertificateTypeCertificateType value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v DomainCertificateType) Ptr() *DomainCertificateType { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableDomainCertificateType struct { - value *DomainCertificateType - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDomainCertificateType) Get() *DomainCertificateType { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDomainCertificateType) Set(val *DomainCertificateType) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDomainCertificateType) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDomainCertificateType) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableDomainCertificateType(val *DomainCertificateType) *NullableDomainCertificateType { - return &NullableDomainCertificateType{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDomainCertificateType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDomainCertificateType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DomainGetCertificateTypeAttributeType = *DomainCertificateType - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DomainGetCertificateTypeArgType = DomainCertificateType - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DomainGetCertificateTypeRetType = DomainCertificateType - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDomainGetCertificateTypeAttributeTypeOk(arg DomainGetCertificateTypeAttributeType) (ret DomainGetCertificateTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDomainGetCertificateTypeAttributeType(arg *DomainGetCertificateTypeAttributeType, val DomainGetCertificateTypeRetType) { - *arg = &val -} - -/* - types and functions for errors -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DomainGetErrorsAttributeType = *[]StatusError - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DomainGetErrorsArgType = []StatusError - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DomainGetErrorsRetType = []StatusError - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDomainGetErrorsAttributeTypeOk(arg DomainGetErrorsAttributeType) (ret DomainGetErrorsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDomainGetErrorsAttributeType(arg *DomainGetErrorsAttributeType, val DomainGetErrorsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DomainGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDomainGetNameAttributeTypeOk(arg DomainGetNameAttributeType) (ret DomainGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDomainGetNameAttributeType(arg *DomainGetNameAttributeType, val DomainGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DomainGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DomainGetNameRetType = string - -/* - types and functions for status -*/ - -// isEnumRef -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DomainGetStatusAttributeType = *DomainStatus - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DomainGetStatusArgType = DomainStatus - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DomainGetStatusRetType = DomainStatus - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDomainGetStatusAttributeTypeOk(arg DomainGetStatusAttributeType) (ret DomainGetStatusRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDomainGetStatusAttributeType(arg *DomainGetStatusAttributeType, val DomainGetStatusRetType) { - *arg = &val -} - -/* - types and functions for type -*/ - -// isEnum - -// DomainTypes Specifies the type of this Domain. Custom Domain can be further queries using the GetCustomDomain Endpoint -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DomainTypes string - -// List of Type -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - DOMAINTYPE_MANAGED DomainTypes = "managed" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - DOMAINTYPE_CUSTOM DomainTypes = "custom" -) - -// All allowed values of Domain enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedDomainTypesEnumValues = []DomainTypes{ - "managed", - "custom", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *DomainTypes) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson DomainTypes - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := DomainTypes(value) - for _, existing := range AllowedDomainTypesEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid Domain", value) -} - -// NewDomainTypesFromValue returns a pointer to a valid DomainTypes -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDomainTypesFromValue(v DomainTypes) (*DomainTypes, error) { - ev := DomainTypes(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for DomainTypes: valid values are %v", v, AllowedDomainTypesEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v DomainTypes) IsValid() bool { - for _, existing := range AllowedDomainTypesEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TypeTypes value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v DomainTypes) Ptr() *DomainTypes { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableDomainTypes struct { - value *DomainTypes - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDomainTypes) Get() *DomainTypes { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDomainTypes) Set(val *DomainTypes) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDomainTypes) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDomainTypes) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableDomainTypes(val *DomainTypes) *NullableDomainTypes { - return &NullableDomainTypes{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDomainTypes) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDomainTypes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DomainGetTypeAttributeType = *DomainTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DomainGetTypeArgType = DomainTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DomainGetTypeRetType = DomainTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDomainGetTypeAttributeTypeOk(arg DomainGetTypeAttributeType) (ret DomainGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDomainGetTypeAttributeType(arg *DomainGetTypeAttributeType, val DomainGetTypeRetType) { - *arg = &val -} - -// Domain Definition of a custom or managed domain without any certificates or keys -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Domain struct { - // REQUIRED - CertificateType DomainGetCertificateTypeAttributeType `json:"certificateType" required:"true"` - // This object is present if the custom domain has errors. - Errors DomainGetErrorsAttributeType `json:"errors,omitempty"` - // The domain. If this is a custom domain, you can call the GetCustomDomain Endpoint - // REQUIRED - Name DomainGetNameAttributeType `json:"name" required:"true"` - // REQUIRED - Status DomainGetStatusAttributeType `json:"status" required:"true"` - // Specifies the type of this Domain. Custom Domain can be further queries using the GetCustomDomain Endpoint - // REQUIRED - Type DomainGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _Domain Domain - -// NewDomain instantiates a new Domain 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDomain(certificateType DomainGetCertificateTypeArgType, name DomainGetNameArgType, status DomainGetStatusArgType, types DomainGetTypeArgType) *Domain { - this := Domain{} - setDomainGetCertificateTypeAttributeType(&this.CertificateType, certificateType) - setDomainGetNameAttributeType(&this.Name, name) - setDomainGetStatusAttributeType(&this.Status, status) - setDomainGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewDomainWithDefaults instantiates a new Domain 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDomainWithDefaults() *Domain { - this := Domain{} - return &this -} - -// GetCertificateType returns the CertificateType field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Domain) GetCertificateType() (ret DomainGetCertificateTypeRetType) { - ret, _ = o.GetCertificateTypeOk() - return ret -} - -// GetCertificateTypeOk returns a tuple with the CertificateType field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Domain) GetCertificateTypeOk() (ret DomainGetCertificateTypeRetType, ok bool) { - return getDomainGetCertificateTypeAttributeTypeOk(o.CertificateType) -} - -// SetCertificateType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Domain) SetCertificateType(v DomainGetCertificateTypeRetType) { - setDomainGetCertificateTypeAttributeType(&o.CertificateType, v) -} - -// GetErrors returns the Errors field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Domain) GetErrors() (res DomainGetErrorsRetType) { - res, _ = o.GetErrorsOk() - return -} - -// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Domain) GetErrorsOk() (ret DomainGetErrorsRetType, ok bool) { - return getDomainGetErrorsAttributeTypeOk(o.Errors) -} - -// HasErrors returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Domain) HasErrors() bool { - _, ok := o.GetErrorsOk() - return ok -} - -// SetErrors gets a reference to the given []StatusError and assigns it to the Errors field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Domain) SetErrors(v DomainGetErrorsRetType) { - setDomainGetErrorsAttributeType(&o.Errors, v) -} - -// GetName returns the Name field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Domain) GetName() (ret DomainGetNameRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Domain) GetNameOk() (ret DomainGetNameRetType, ok bool) { - return getDomainGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Domain) SetName(v DomainGetNameRetType) { - setDomainGetNameAttributeType(&o.Name, v) -} - -// GetStatus returns the Status field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Domain) GetStatus() (ret DomainGetStatusRetType) { - ret, _ = o.GetStatusOk() - return ret -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Domain) GetStatusOk() (ret DomainGetStatusRetType, ok bool) { - return getDomainGetStatusAttributeTypeOk(o.Status) -} - -// SetStatus sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Domain) SetStatus(v DomainGetStatusRetType) { - setDomainGetStatusAttributeType(&o.Status, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Domain) GetType() (ret DomainGetTypeRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Domain) GetTypeOk() (ret DomainGetTypeRetType, ok bool) { - return getDomainGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Domain) SetType(v DomainGetTypeRetType) { - setDomainGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Domain) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getDomainGetCertificateTypeAttributeTypeOk(o.CertificateType); ok { - toSerialize["CertificateType"] = val - } - if val, ok := getDomainGetErrorsAttributeTypeOk(o.Errors); ok { - toSerialize["Errors"] = val - } - if val, ok := getDomainGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getDomainGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getDomainGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableDomain struct { - value *Domain - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDomain) Get() *Domain { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDomain) Set(val *Domain) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDomain) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDomain) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableDomain(val *Domain) *NullableDomain { - return &NullableDomain{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDomain) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDomain) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_domain_status.go b/services/cdn/model_domain_status.go deleted file mode 100644 index 9f4b02505a..0000000000 --- a/services/cdn/model_domain_status.go +++ /dev/null @@ -1,141 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// DomainStatus The status of the domain: CREATING indicates that the custom domain is being set up. UPDATING means that requested changes are being applied to the custom domain. ACTIVE means the custom domain is currently configured and active. DELETING means that the domain is in the process of being removed from the distribution. In case the domain has the ERROR state, more information will be available in the errors list. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DomainStatus string - -// List of DomainStatus -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - DOMAINSTATUS_CREATING DomainStatus = "CREATING" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - DOMAINSTATUS_ACTIVE DomainStatus = "ACTIVE" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - DOMAINSTATUS_UPDATING DomainStatus = "UPDATING" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - DOMAINSTATUS_DELETING DomainStatus = "DELETING" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - DOMAINSTATUS_ERROR DomainStatus = "ERROR" -) - -// All allowed values of DomainStatus enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedDomainStatusEnumValues = []DomainStatus{ - "CREATING", - "ACTIVE", - "UPDATING", - "DELETING", - "ERROR", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *DomainStatus) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue string - if value == zeroValue { - return nil - } - enumTypeValue := DomainStatus(value) - for _, existing := range AllowedDomainStatusEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid DomainStatus", value) -} - -// NewDomainStatusFromValue returns a pointer to a valid DomainStatus -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewDomainStatusFromValue(v string) (*DomainStatus, error) { - ev := DomainStatus(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for DomainStatus: valid values are %v", v, AllowedDomainStatusEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v DomainStatus) IsValid() bool { - for _, existing := range AllowedDomainStatusEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to DomainStatus value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v DomainStatus) Ptr() *DomainStatus { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableDomainStatus struct { - value *DomainStatus - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDomainStatus) Get() *DomainStatus { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDomainStatus) Set(val *DomainStatus) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDomainStatus) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDomainStatus) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableDomainStatus(val *DomainStatus) *NullableDomainStatus { - return &NullableDomainStatus{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDomainStatus) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDomainStatus) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_domain_status_test.go b/services/cdn/model_domain_status_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_domain_status_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_domain_test.go b/services/cdn/model_domain_test.go deleted file mode 100644 index 2a9c7e4375..0000000000 --- a/services/cdn/model_domain_test.go +++ /dev/null @@ -1,101 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn - -import ( - "testing" -) - -// isEnum - -func TestDomainCertificateType_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"managed"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"custom"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := DomainCertificateType("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} - -// isEnum - -func TestDomainTypes_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"managed"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"custom"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := DomainTypes("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/cdn/model_error_details.go b/services/cdn/model_error_details.go deleted file mode 100644 index bb4498de96..0000000000 --- a/services/cdn/model_error_details.go +++ /dev/null @@ -1,448 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// checks if the ErrorDetails type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ErrorDetails{} - -/* - types and functions for de -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorDetailsGetDeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getErrorDetailsGetDeAttributeTypeOk(arg ErrorDetailsGetDeAttributeType) (ret ErrorDetailsGetDeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setErrorDetailsGetDeAttributeType(arg *ErrorDetailsGetDeAttributeType, val ErrorDetailsGetDeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorDetailsGetDeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorDetailsGetDeRetType = string - -/* - types and functions for en -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorDetailsGetEnAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getErrorDetailsGetEnAttributeTypeOk(arg ErrorDetailsGetEnAttributeType) (ret ErrorDetailsGetEnRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setErrorDetailsGetEnAttributeType(arg *ErrorDetailsGetEnAttributeType, val ErrorDetailsGetEnRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorDetailsGetEnArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorDetailsGetEnRetType = string - -/* - types and functions for field -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorDetailsGetFieldAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getErrorDetailsGetFieldAttributeTypeOk(arg ErrorDetailsGetFieldAttributeType) (ret ErrorDetailsGetFieldRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setErrorDetailsGetFieldAttributeType(arg *ErrorDetailsGetFieldAttributeType, val ErrorDetailsGetFieldRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorDetailsGetFieldArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorDetailsGetFieldRetType = string - -/* - types and functions for key -*/ - -// isEnum - -// ErrorDetailsKey the model 'ErrorDetails' -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorDetailsKey string - -// List of Key -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - ERRORDETAILSKEY_UNKNOWN ErrorDetailsKey = "UNKNOWN" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - ERRORDETAILSKEY_CUSTOM_DOMAIN_CNAME_MISSING ErrorDetailsKey = "CUSTOM_DOMAIN_CNAME_MISSING" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - ERRORDETAILSKEY_INVALID_ARGUMENT ErrorDetailsKey = "INVALID_ARGUMENT" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - ERRORDETAILSKEY_LOG_SINK_INSTANCE_UNAVAILABLE ErrorDetailsKey = "LOG_SINK_INSTANCE_UNAVAILABLE" -) - -// All allowed values of ErrorDetails enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedErrorDetailsKeyEnumValues = []ErrorDetailsKey{ - "UNKNOWN", - "CUSTOM_DOMAIN_CNAME_MISSING", - "INVALID_ARGUMENT", - "LOG_SINK_INSTANCE_UNAVAILABLE", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *ErrorDetailsKey) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson ErrorDetailsKey - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := ErrorDetailsKey(value) - for _, existing := range AllowedErrorDetailsKeyEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid ErrorDetails", value) -} - -// NewErrorDetailsKeyFromValue returns a pointer to a valid ErrorDetailsKey -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewErrorDetailsKeyFromValue(v ErrorDetailsKey) (*ErrorDetailsKey, error) { - ev := ErrorDetailsKey(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for ErrorDetailsKey: valid values are %v", v, AllowedErrorDetailsKeyEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v ErrorDetailsKey) IsValid() bool { - for _, existing := range AllowedErrorDetailsKeyEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to KeyKey value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v ErrorDetailsKey) Ptr() *ErrorDetailsKey { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableErrorDetailsKey struct { - value *ErrorDetailsKey - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableErrorDetailsKey) Get() *ErrorDetailsKey { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableErrorDetailsKey) Set(val *ErrorDetailsKey) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableErrorDetailsKey) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableErrorDetailsKey) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableErrorDetailsKey(val *ErrorDetailsKey) *NullableErrorDetailsKey { - return &NullableErrorDetailsKey{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableErrorDetailsKey) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableErrorDetailsKey) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorDetailsGetKeyAttributeType = *ErrorDetailsKey - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorDetailsGetKeyArgType = ErrorDetailsKey - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorDetailsGetKeyRetType = ErrorDetailsKey - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getErrorDetailsGetKeyAttributeTypeOk(arg ErrorDetailsGetKeyAttributeType) (ret ErrorDetailsGetKeyRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setErrorDetailsGetKeyAttributeType(arg *ErrorDetailsGetKeyAttributeType, val ErrorDetailsGetKeyRetType) { - *arg = &val -} - -// ErrorDetails struct for ErrorDetails -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorDetails struct { - // German description of the error - De ErrorDetailsGetDeAttributeType `json:"de,omitempty"` - // English description of the error - // REQUIRED - En ErrorDetailsGetEnAttributeType `json:"en" required:"true"` - // Optional field in the request this error detail refers to - Field ErrorDetailsGetFieldAttributeType `json:"field,omitempty"` - // REQUIRED - Key ErrorDetailsGetKeyAttributeType `json:"key" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _ErrorDetails ErrorDetails - -// NewErrorDetails instantiates a new ErrorDetails 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewErrorDetails(en ErrorDetailsGetEnArgType, key ErrorDetailsGetKeyArgType) *ErrorDetails { - this := ErrorDetails{} - setErrorDetailsGetEnAttributeType(&this.En, en) - setErrorDetailsGetKeyAttributeType(&this.Key, key) - return &this -} - -// NewErrorDetailsWithDefaults instantiates a new ErrorDetails 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewErrorDetailsWithDefaults() *ErrorDetails { - this := ErrorDetails{} - return &this -} - -// GetDe returns the De field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ErrorDetails) GetDe() (res ErrorDetailsGetDeRetType) { - res, _ = o.GetDeOk() - return -} - -// GetDeOk returns a tuple with the De field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ErrorDetails) GetDeOk() (ret ErrorDetailsGetDeRetType, ok bool) { - return getErrorDetailsGetDeAttributeTypeOk(o.De) -} - -// HasDe returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ErrorDetails) HasDe() bool { - _, ok := o.GetDeOk() - return ok -} - -// SetDe gets a reference to the given string and assigns it to the De field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ErrorDetails) SetDe(v ErrorDetailsGetDeRetType) { - setErrorDetailsGetDeAttributeType(&o.De, v) -} - -// GetEn returns the En field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ErrorDetails) GetEn() (ret ErrorDetailsGetEnRetType) { - ret, _ = o.GetEnOk() - return ret -} - -// GetEnOk returns a tuple with the En field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ErrorDetails) GetEnOk() (ret ErrorDetailsGetEnRetType, ok bool) { - return getErrorDetailsGetEnAttributeTypeOk(o.En) -} - -// SetEn sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ErrorDetails) SetEn(v ErrorDetailsGetEnRetType) { - setErrorDetailsGetEnAttributeType(&o.En, v) -} - -// GetField returns the Field field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ErrorDetails) GetField() (res ErrorDetailsGetFieldRetType) { - res, _ = o.GetFieldOk() - return -} - -// GetFieldOk returns a tuple with the Field field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ErrorDetails) GetFieldOk() (ret ErrorDetailsGetFieldRetType, ok bool) { - return getErrorDetailsGetFieldAttributeTypeOk(o.Field) -} - -// HasField returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ErrorDetails) HasField() bool { - _, ok := o.GetFieldOk() - return ok -} - -// SetField gets a reference to the given string and assigns it to the Field field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ErrorDetails) SetField(v ErrorDetailsGetFieldRetType) { - setErrorDetailsGetFieldAttributeType(&o.Field, v) -} - -// GetKey returns the Key field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ErrorDetails) GetKey() (ret ErrorDetailsGetKeyRetType) { - ret, _ = o.GetKeyOk() - return ret -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ErrorDetails) GetKeyOk() (ret ErrorDetailsGetKeyRetType, ok bool) { - return getErrorDetailsGetKeyAttributeTypeOk(o.Key) -} - -// SetKey sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ErrorDetails) SetKey(v ErrorDetailsGetKeyRetType) { - setErrorDetailsGetKeyAttributeType(&o.Key, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ErrorDetails) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getErrorDetailsGetDeAttributeTypeOk(o.De); ok { - toSerialize["De"] = val - } - if val, ok := getErrorDetailsGetEnAttributeTypeOk(o.En); ok { - toSerialize["En"] = val - } - if val, ok := getErrorDetailsGetFieldAttributeTypeOk(o.Field); ok { - toSerialize["Field"] = val - } - if val, ok := getErrorDetailsGetKeyAttributeTypeOk(o.Key); ok { - toSerialize["Key"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableErrorDetails struct { - value *ErrorDetails - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableErrorDetails) Get() *ErrorDetails { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableErrorDetails) Set(val *ErrorDetails) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableErrorDetails) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableErrorDetails) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableErrorDetails(val *ErrorDetails) *NullableErrorDetails { - return &NullableErrorDetails{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableErrorDetails) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableErrorDetails) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_error_details_test.go b/services/cdn/model_error_details_test.go deleted file mode 100644 index fceacae402..0000000000 --- a/services/cdn/model_error_details_test.go +++ /dev/null @@ -1,72 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn - -import ( - "testing" -) - -// isEnum - -func TestErrorDetailsKey_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"UNKNOWN"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"CUSTOM_DOMAIN_CNAME_MISSING"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`"INVALID_ARGUMENT"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 4`, - args: args{ - src: []byte(`"LOG_SINK_INSTANCE_UNAVAILABLE"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := ErrorDetailsKey("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/cdn/model_find_cache_paths_response.go b/services/cdn/model_find_cache_paths_response.go deleted file mode 100644 index 6129bbfe21..0000000000 --- a/services/cdn/model_find_cache_paths_response.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the FindCachePathsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FindCachePathsResponse{} - -/* - types and functions for response -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FindCachePathsResponseGetResponseAttributeType = *[]FindCachePathsResponseEntry - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FindCachePathsResponseGetResponseArgType = []FindCachePathsResponseEntry - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FindCachePathsResponseGetResponseRetType = []FindCachePathsResponseEntry - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getFindCachePathsResponseGetResponseAttributeTypeOk(arg FindCachePathsResponseGetResponseAttributeType) (ret FindCachePathsResponseGetResponseRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setFindCachePathsResponseGetResponseAttributeType(arg *FindCachePathsResponseGetResponseAttributeType, val FindCachePathsResponseGetResponseRetType) { - *arg = &val -} - -// FindCachePathsResponse struct for FindCachePathsResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FindCachePathsResponse struct { - // REQUIRED - Response FindCachePathsResponseGetResponseAttributeType `json:"response" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _FindCachePathsResponse FindCachePathsResponse - -// NewFindCachePathsResponse instantiates a new FindCachePathsResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewFindCachePathsResponse(response FindCachePathsResponseGetResponseArgType) *FindCachePathsResponse { - this := FindCachePathsResponse{} - setFindCachePathsResponseGetResponseAttributeType(&this.Response, response) - return &this -} - -// NewFindCachePathsResponseWithDefaults instantiates a new FindCachePathsResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewFindCachePathsResponseWithDefaults() *FindCachePathsResponse { - this := FindCachePathsResponse{} - return &this -} - -// GetResponse returns the Response field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *FindCachePathsResponse) GetResponse() (ret FindCachePathsResponseGetResponseRetType) { - ret, _ = o.GetResponseOk() - return ret -} - -// GetResponseOk returns a tuple with the Response field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *FindCachePathsResponse) GetResponseOk() (ret FindCachePathsResponseGetResponseRetType, ok bool) { - return getFindCachePathsResponseGetResponseAttributeTypeOk(o.Response) -} - -// SetResponse sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *FindCachePathsResponse) SetResponse(v FindCachePathsResponseGetResponseRetType) { - setFindCachePathsResponseGetResponseAttributeType(&o.Response, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o FindCachePathsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getFindCachePathsResponseGetResponseAttributeTypeOk(o.Response); ok { - toSerialize["Response"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableFindCachePathsResponse struct { - value *FindCachePathsResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableFindCachePathsResponse) Get() *FindCachePathsResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableFindCachePathsResponse) Set(val *FindCachePathsResponse) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableFindCachePathsResponse) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableFindCachePathsResponse) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableFindCachePathsResponse(val *FindCachePathsResponse) *NullableFindCachePathsResponse { - return &NullableFindCachePathsResponse{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableFindCachePathsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableFindCachePathsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_find_cache_paths_response_entry.go b/services/cdn/model_find_cache_paths_response_entry.go deleted file mode 100644 index c16a61c5e7..0000000000 --- a/services/cdn/model_find_cache_paths_response_entry.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the FindCachePathsResponseEntry type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FindCachePathsResponseEntry{} - -/* - types and functions for path -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FindCachePathsResponseEntryGetPathAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getFindCachePathsResponseEntryGetPathAttributeTypeOk(arg FindCachePathsResponseEntryGetPathAttributeType) (ret FindCachePathsResponseEntryGetPathRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setFindCachePathsResponseEntryGetPathAttributeType(arg *FindCachePathsResponseEntryGetPathAttributeType, val FindCachePathsResponseEntryGetPathRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FindCachePathsResponseEntryGetPathArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FindCachePathsResponseEntryGetPathRetType = string - -// FindCachePathsResponseEntry struct for FindCachePathsResponseEntry -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FindCachePathsResponseEntry struct { - // Defines one path that was previously used as part of a granular purge - // REQUIRED - Path FindCachePathsResponseEntryGetPathAttributeType `json:"path" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _FindCachePathsResponseEntry FindCachePathsResponseEntry - -// NewFindCachePathsResponseEntry instantiates a new FindCachePathsResponseEntry 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewFindCachePathsResponseEntry(path FindCachePathsResponseEntryGetPathArgType) *FindCachePathsResponseEntry { - this := FindCachePathsResponseEntry{} - setFindCachePathsResponseEntryGetPathAttributeType(&this.Path, path) - return &this -} - -// NewFindCachePathsResponseEntryWithDefaults instantiates a new FindCachePathsResponseEntry 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewFindCachePathsResponseEntryWithDefaults() *FindCachePathsResponseEntry { - this := FindCachePathsResponseEntry{} - return &this -} - -// GetPath returns the Path field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *FindCachePathsResponseEntry) GetPath() (ret FindCachePathsResponseEntryGetPathRetType) { - ret, _ = o.GetPathOk() - return ret -} - -// GetPathOk returns a tuple with the Path field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *FindCachePathsResponseEntry) GetPathOk() (ret FindCachePathsResponseEntryGetPathRetType, ok bool) { - return getFindCachePathsResponseEntryGetPathAttributeTypeOk(o.Path) -} - -// SetPath sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *FindCachePathsResponseEntry) SetPath(v FindCachePathsResponseEntryGetPathRetType) { - setFindCachePathsResponseEntryGetPathAttributeType(&o.Path, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o FindCachePathsResponseEntry) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getFindCachePathsResponseEntryGetPathAttributeTypeOk(o.Path); ok { - toSerialize["Path"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableFindCachePathsResponseEntry struct { - value *FindCachePathsResponseEntry - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableFindCachePathsResponseEntry) Get() *FindCachePathsResponseEntry { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableFindCachePathsResponseEntry) Set(val *FindCachePathsResponseEntry) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableFindCachePathsResponseEntry) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableFindCachePathsResponseEntry) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableFindCachePathsResponseEntry(val *FindCachePathsResponseEntry) *NullableFindCachePathsResponseEntry { - return &NullableFindCachePathsResponseEntry{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableFindCachePathsResponseEntry) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableFindCachePathsResponseEntry) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_find_cache_paths_response_entry_test.go b/services/cdn/model_find_cache_paths_response_entry_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_find_cache_paths_response_entry_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_find_cache_paths_response_test.go b/services/cdn/model_find_cache_paths_response_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_find_cache_paths_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_generic_json_response.go b/services/cdn/model_generic_json_response.go deleted file mode 100644 index fa765a8273..0000000000 --- a/services/cdn/model_generic_json_response.go +++ /dev/null @@ -1,208 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the GenericJsonResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GenericJsonResponse{} - -/* - types and functions for details -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GenericJsonResponseGetDetailsAttributeType = *[]ErrorDetails - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GenericJsonResponseGetDetailsArgType = []ErrorDetails - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GenericJsonResponseGetDetailsRetType = []ErrorDetails - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGenericJsonResponseGetDetailsAttributeTypeOk(arg GenericJsonResponseGetDetailsAttributeType) (ret GenericJsonResponseGetDetailsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGenericJsonResponseGetDetailsAttributeType(arg *GenericJsonResponseGetDetailsAttributeType, val GenericJsonResponseGetDetailsRetType) { - *arg = &val -} - -/* - types and functions for message -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GenericJsonResponseGetMessageAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGenericJsonResponseGetMessageAttributeTypeOk(arg GenericJsonResponseGetMessageAttributeType) (ret GenericJsonResponseGetMessageRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGenericJsonResponseGetMessageAttributeType(arg *GenericJsonResponseGetMessageAttributeType, val GenericJsonResponseGetMessageRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GenericJsonResponseGetMessageArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GenericJsonResponseGetMessageRetType = string - -// GenericJsonResponse struct for GenericJsonResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GenericJsonResponse struct { - // Listing of issues with your request - Details GenericJsonResponseGetDetailsAttributeType `json:"details,omitempty"` - // REQUIRED - Message GenericJsonResponseGetMessageAttributeType `json:"message" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _GenericJsonResponse GenericJsonResponse - -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGenericJsonResponse(message GenericJsonResponseGetMessageArgType) *GenericJsonResponse { - this := GenericJsonResponse{} - setGenericJsonResponseGetMessageAttributeType(&this.Message, message) - return &this -} - -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGenericJsonResponseWithDefaults() *GenericJsonResponse { - this := GenericJsonResponse{} - return &this -} - -// GetDetails returns the Details field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GenericJsonResponse) GetDetailsOk() (ret GenericJsonResponseGetDetailsRetType, ok bool) { - return getGenericJsonResponseGetDetailsAttributeTypeOk(o.Details) -} - -// HasDetails returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GenericJsonResponse) SetDetails(v GenericJsonResponseGetDetailsRetType) { - setGenericJsonResponseGetDetailsAttributeType(&o.Details, v) -} - -// GetMessage returns the Message field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GenericJsonResponse) GetMessageOk() (ret GenericJsonResponseGetMessageRetType, ok bool) { - return getGenericJsonResponseGetMessageAttributeTypeOk(o.Message) -} - -// SetMessage sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GenericJsonResponse) SetMessage(v GenericJsonResponseGetMessageRetType) { - setGenericJsonResponseGetMessageAttributeType(&o.Message, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o GenericJsonResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGenericJsonResponseGetDetailsAttributeTypeOk(o.Details); ok { - toSerialize["Details"] = val - } - if val, ok := getGenericJsonResponseGetMessageAttributeTypeOk(o.Message); ok { - toSerialize["Message"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableGenericJsonResponse struct { - value *GenericJsonResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGenericJsonResponse) Get() *GenericJsonResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGenericJsonResponse) Set(val *GenericJsonResponse) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGenericJsonResponse) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGenericJsonResponse) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableGenericJsonResponse(val *GenericJsonResponse) *NullableGenericJsonResponse { - return &NullableGenericJsonResponse{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGenericJsonResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_generic_json_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_get_cache_info_response.go b/services/cdn/model_get_cache_info_response.go deleted file mode 100644 index 22440b81a9..0000000000 --- a/services/cdn/model_get_cache_info_response.go +++ /dev/null @@ -1,206 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "time" -) - -// checks if the GetCacheInfoResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetCacheInfoResponse{} - -/* - types and functions for history -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCacheInfoResponseGetHistoryAttributeType = *[]GetCacheInfoResponseHistoryEntry - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCacheInfoResponseGetHistoryArgType = []GetCacheInfoResponseHistoryEntry - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCacheInfoResponseGetHistoryRetType = []GetCacheInfoResponseHistoryEntry - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetCacheInfoResponseGetHistoryAttributeTypeOk(arg GetCacheInfoResponseGetHistoryAttributeType) (ret GetCacheInfoResponseGetHistoryRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetCacheInfoResponseGetHistoryAttributeType(arg *GetCacheInfoResponseGetHistoryAttributeType, val GetCacheInfoResponseGetHistoryRetType) { - *arg = &val -} - -/* - types and functions for lastPurgeTime -*/ - -// isDateTime -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCacheInfoResponseGetLastPurgeTimeAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCacheInfoResponseGetLastPurgeTimeArgType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCacheInfoResponseGetLastPurgeTimeRetType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetCacheInfoResponseGetLastPurgeTimeAttributeTypeOk(arg GetCacheInfoResponseGetLastPurgeTimeAttributeType) (ret GetCacheInfoResponseGetLastPurgeTimeRetType, ok bool) { - if arg == nil { - return nil, false - } - return arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetCacheInfoResponseGetLastPurgeTimeAttributeType(arg *GetCacheInfoResponseGetLastPurgeTimeAttributeType, val GetCacheInfoResponseGetLastPurgeTimeRetType) { - *arg = val -} - -// GetCacheInfoResponse struct for GetCacheInfoResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCacheInfoResponse struct { - // REQUIRED - History GetCacheInfoResponseGetHistoryAttributeType `json:"history" required:"true"` - // Returns the last time the cache was purged by calling the PurgeCache endpoint. Time represented as RFC3339 compliant string. If the cache was never purged, this returns `null` - // REQUIRED - LastPurgeTime GetCacheInfoResponseGetLastPurgeTimeAttributeType `json:"lastPurgeTime" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _GetCacheInfoResponse GetCacheInfoResponse - -// NewGetCacheInfoResponse instantiates a new GetCacheInfoResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetCacheInfoResponse(history GetCacheInfoResponseGetHistoryArgType, lastPurgeTime GetCacheInfoResponseGetLastPurgeTimeArgType) *GetCacheInfoResponse { - this := GetCacheInfoResponse{} - setGetCacheInfoResponseGetHistoryAttributeType(&this.History, history) - setGetCacheInfoResponseGetLastPurgeTimeAttributeType(&this.LastPurgeTime, lastPurgeTime) - return &this -} - -// NewGetCacheInfoResponseWithDefaults instantiates a new GetCacheInfoResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetCacheInfoResponseWithDefaults() *GetCacheInfoResponse { - this := GetCacheInfoResponse{} - return &this -} - -// GetHistory returns the History field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCacheInfoResponse) GetHistory() (ret GetCacheInfoResponseGetHistoryRetType) { - ret, _ = o.GetHistoryOk() - return ret -} - -// GetHistoryOk returns a tuple with the History field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCacheInfoResponse) GetHistoryOk() (ret GetCacheInfoResponseGetHistoryRetType, ok bool) { - return getGetCacheInfoResponseGetHistoryAttributeTypeOk(o.History) -} - -// SetHistory sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCacheInfoResponse) SetHistory(v GetCacheInfoResponseGetHistoryRetType) { - setGetCacheInfoResponseGetHistoryAttributeType(&o.History, v) -} - -// GetLastPurgeTime returns the LastPurgeTime field value -// If the value is explicit nil, the zero value for time.Time will be returned -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCacheInfoResponse) GetLastPurgeTime() (ret GetCacheInfoResponseGetLastPurgeTimeRetType) { - ret, _ = o.GetLastPurgeTimeOk() - return ret -} - -// GetLastPurgeTimeOk returns a tuple with the LastPurgeTime field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCacheInfoResponse) GetLastPurgeTimeOk() (ret GetCacheInfoResponseGetLastPurgeTimeRetType, ok bool) { - return getGetCacheInfoResponseGetLastPurgeTimeAttributeTypeOk(o.LastPurgeTime) -} - -// SetLastPurgeTime sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCacheInfoResponse) SetLastPurgeTime(v GetCacheInfoResponseGetLastPurgeTimeRetType) { - setGetCacheInfoResponseGetLastPurgeTimeAttributeType(&o.LastPurgeTime, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o GetCacheInfoResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGetCacheInfoResponseGetHistoryAttributeTypeOk(o.History); ok { - toSerialize["History"] = val - } - if val, ok := getGetCacheInfoResponseGetLastPurgeTimeAttributeTypeOk(o.LastPurgeTime); ok { - toSerialize["LastPurgeTime"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableGetCacheInfoResponse struct { - value *GetCacheInfoResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCacheInfoResponse) Get() *GetCacheInfoResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCacheInfoResponse) Set(val *GetCacheInfoResponse) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCacheInfoResponse) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCacheInfoResponse) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableGetCacheInfoResponse(val *GetCacheInfoResponse) *NullableGetCacheInfoResponse { - return &NullableGetCacheInfoResponse{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCacheInfoResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCacheInfoResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_get_cache_info_response_history_entry.go b/services/cdn/model_get_cache_info_response_history_entry.go deleted file mode 100644 index 31d819a66a..0000000000 --- a/services/cdn/model_get_cache_info_response_history_entry.go +++ /dev/null @@ -1,324 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" - "time" -) - -// checks if the GetCacheInfoResponseHistoryEntry type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetCacheInfoResponseHistoryEntry{} - -/* - types and functions for occurredAt -*/ - -// isDateTime -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCacheInfoResponseHistoryEntryGetOccurredAtAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCacheInfoResponseHistoryEntryGetOccurredAtArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCacheInfoResponseHistoryEntryGetOccurredAtRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetCacheInfoResponseHistoryEntryGetOccurredAtAttributeTypeOk(arg GetCacheInfoResponseHistoryEntryGetOccurredAtAttributeType) (ret GetCacheInfoResponseHistoryEntryGetOccurredAtRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetCacheInfoResponseHistoryEntryGetOccurredAtAttributeType(arg *GetCacheInfoResponseHistoryEntryGetOccurredAtAttributeType, val GetCacheInfoResponseHistoryEntryGetOccurredAtRetType) { - *arg = &val -} - -/* - types and functions for type -*/ - -// isEnum - -// GetCacheInfoResponseHistoryEntryTypes the model 'GetCacheInfoResponseHistoryEntry' -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCacheInfoResponseHistoryEntryTypes string - -// List of Type -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - GETCACHEINFORESPONSEHISTORYENTRYTYPE_FULL GetCacheInfoResponseHistoryEntryTypes = "full" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - GETCACHEINFORESPONSEHISTORYENTRYTYPE_GRANULAR GetCacheInfoResponseHistoryEntryTypes = "granular" -) - -// All allowed values of GetCacheInfoResponseHistoryEntry enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedGetCacheInfoResponseHistoryEntryTypesEnumValues = []GetCacheInfoResponseHistoryEntryTypes{ - "full", - "granular", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *GetCacheInfoResponseHistoryEntryTypes) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson GetCacheInfoResponseHistoryEntryTypes - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := GetCacheInfoResponseHistoryEntryTypes(value) - for _, existing := range AllowedGetCacheInfoResponseHistoryEntryTypesEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid GetCacheInfoResponseHistoryEntry", value) -} - -// NewGetCacheInfoResponseHistoryEntryTypesFromValue returns a pointer to a valid GetCacheInfoResponseHistoryEntryTypes -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetCacheInfoResponseHistoryEntryTypesFromValue(v GetCacheInfoResponseHistoryEntryTypes) (*GetCacheInfoResponseHistoryEntryTypes, error) { - ev := GetCacheInfoResponseHistoryEntryTypes(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for GetCacheInfoResponseHistoryEntryTypes: valid values are %v", v, AllowedGetCacheInfoResponseHistoryEntryTypesEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v GetCacheInfoResponseHistoryEntryTypes) IsValid() bool { - for _, existing := range AllowedGetCacheInfoResponseHistoryEntryTypesEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TypeTypes value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v GetCacheInfoResponseHistoryEntryTypes) Ptr() *GetCacheInfoResponseHistoryEntryTypes { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableGetCacheInfoResponseHistoryEntryTypes struct { - value *GetCacheInfoResponseHistoryEntryTypes - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCacheInfoResponseHistoryEntryTypes) Get() *GetCacheInfoResponseHistoryEntryTypes { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCacheInfoResponseHistoryEntryTypes) Set(val *GetCacheInfoResponseHistoryEntryTypes) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCacheInfoResponseHistoryEntryTypes) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCacheInfoResponseHistoryEntryTypes) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableGetCacheInfoResponseHistoryEntryTypes(val *GetCacheInfoResponseHistoryEntryTypes) *NullableGetCacheInfoResponseHistoryEntryTypes { - return &NullableGetCacheInfoResponseHistoryEntryTypes{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCacheInfoResponseHistoryEntryTypes) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCacheInfoResponseHistoryEntryTypes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCacheInfoResponseHistoryEntryGetTypeAttributeType = *GetCacheInfoResponseHistoryEntryTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCacheInfoResponseHistoryEntryGetTypeArgType = GetCacheInfoResponseHistoryEntryTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCacheInfoResponseHistoryEntryGetTypeRetType = GetCacheInfoResponseHistoryEntryTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetCacheInfoResponseHistoryEntryGetTypeAttributeTypeOk(arg GetCacheInfoResponseHistoryEntryGetTypeAttributeType) (ret GetCacheInfoResponseHistoryEntryGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetCacheInfoResponseHistoryEntryGetTypeAttributeType(arg *GetCacheInfoResponseHistoryEntryGetTypeAttributeType, val GetCacheInfoResponseHistoryEntryGetTypeRetType) { - *arg = &val -} - -// GetCacheInfoResponseHistoryEntry struct for GetCacheInfoResponseHistoryEntry -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCacheInfoResponseHistoryEntry struct { - // REQUIRED - OccurredAt GetCacheInfoResponseHistoryEntryGetOccurredAtAttributeType `json:"occurredAt" required:"true"` - // REQUIRED - Type GetCacheInfoResponseHistoryEntryGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _GetCacheInfoResponseHistoryEntry GetCacheInfoResponseHistoryEntry - -// NewGetCacheInfoResponseHistoryEntry instantiates a new GetCacheInfoResponseHistoryEntry 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetCacheInfoResponseHistoryEntry(occurredAt GetCacheInfoResponseHistoryEntryGetOccurredAtArgType, types GetCacheInfoResponseHistoryEntryGetTypeArgType) *GetCacheInfoResponseHistoryEntry { - this := GetCacheInfoResponseHistoryEntry{} - setGetCacheInfoResponseHistoryEntryGetOccurredAtAttributeType(&this.OccurredAt, occurredAt) - setGetCacheInfoResponseHistoryEntryGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewGetCacheInfoResponseHistoryEntryWithDefaults instantiates a new GetCacheInfoResponseHistoryEntry 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetCacheInfoResponseHistoryEntryWithDefaults() *GetCacheInfoResponseHistoryEntry { - this := GetCacheInfoResponseHistoryEntry{} - return &this -} - -// GetOccurredAt returns the OccurredAt field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCacheInfoResponseHistoryEntry) GetOccurredAt() (ret GetCacheInfoResponseHistoryEntryGetOccurredAtRetType) { - ret, _ = o.GetOccurredAtOk() - return ret -} - -// GetOccurredAtOk returns a tuple with the OccurredAt field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCacheInfoResponseHistoryEntry) GetOccurredAtOk() (ret GetCacheInfoResponseHistoryEntryGetOccurredAtRetType, ok bool) { - return getGetCacheInfoResponseHistoryEntryGetOccurredAtAttributeTypeOk(o.OccurredAt) -} - -// SetOccurredAt sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCacheInfoResponseHistoryEntry) SetOccurredAt(v GetCacheInfoResponseHistoryEntryGetOccurredAtRetType) { - setGetCacheInfoResponseHistoryEntryGetOccurredAtAttributeType(&o.OccurredAt, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCacheInfoResponseHistoryEntry) GetType() (ret GetCacheInfoResponseHistoryEntryGetTypeRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCacheInfoResponseHistoryEntry) GetTypeOk() (ret GetCacheInfoResponseHistoryEntryGetTypeRetType, ok bool) { - return getGetCacheInfoResponseHistoryEntryGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCacheInfoResponseHistoryEntry) SetType(v GetCacheInfoResponseHistoryEntryGetTypeRetType) { - setGetCacheInfoResponseHistoryEntryGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o GetCacheInfoResponseHistoryEntry) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGetCacheInfoResponseHistoryEntryGetOccurredAtAttributeTypeOk(o.OccurredAt); ok { - toSerialize["OccurredAt"] = val - } - if val, ok := getGetCacheInfoResponseHistoryEntryGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableGetCacheInfoResponseHistoryEntry struct { - value *GetCacheInfoResponseHistoryEntry - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCacheInfoResponseHistoryEntry) Get() *GetCacheInfoResponseHistoryEntry { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCacheInfoResponseHistoryEntry) Set(val *GetCacheInfoResponseHistoryEntry) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCacheInfoResponseHistoryEntry) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCacheInfoResponseHistoryEntry) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableGetCacheInfoResponseHistoryEntry(val *GetCacheInfoResponseHistoryEntry) *NullableGetCacheInfoResponseHistoryEntry { - return &NullableGetCacheInfoResponseHistoryEntry{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCacheInfoResponseHistoryEntry) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCacheInfoResponseHistoryEntry) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} 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 deleted file mode 100644 index 3a5f131329..0000000000 --- a/services/cdn/model_get_cache_info_response_history_entry_test.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn - -import ( - "testing" -) - -// isEnum - -func TestGetCacheInfoResponseHistoryEntryTypes_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"full"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"granular"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := GetCacheInfoResponseHistoryEntryTypes("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/cdn/model_get_cache_info_response_test.go b/services/cdn/model_get_cache_info_response_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_get_cache_info_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_get_custom_domain_custom_certificate.go b/services/cdn/model_get_custom_domain_custom_certificate.go deleted file mode 100644 index 3ec4cd252c..0000000000 --- a/services/cdn/model_get_custom_domain_custom_certificate.go +++ /dev/null @@ -1,260 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the GetCustomDomainCustomCertificate type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetCustomDomainCustomCertificate{} - -/* - types and functions for skipDnsCheck -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainCustomCertificategetSkipDnsCheckAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainCustomCertificategetSkipDnsCheckArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainCustomCertificategetSkipDnsCheckRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetCustomDomainCustomCertificategetSkipDnsCheckAttributeTypeOk(arg GetCustomDomainCustomCertificategetSkipDnsCheckAttributeType) (ret GetCustomDomainCustomCertificategetSkipDnsCheckRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetCustomDomainCustomCertificategetSkipDnsCheckAttributeType(arg *GetCustomDomainCustomCertificategetSkipDnsCheckAttributeType, val GetCustomDomainCustomCertificategetSkipDnsCheckRetType) { - *arg = &val -} - -/* - types and functions for type -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainCustomCertificateGetTypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetCustomDomainCustomCertificateGetTypeAttributeTypeOk(arg GetCustomDomainCustomCertificateGetTypeAttributeType) (ret GetCustomDomainCustomCertificateGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetCustomDomainCustomCertificateGetTypeAttributeType(arg *GetCustomDomainCustomCertificateGetTypeAttributeType, val GetCustomDomainCustomCertificateGetTypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainCustomCertificateGetTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainCustomCertificateGetTypeRetType = string - -/* - types and functions for version -*/ - -// isInteger -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainCustomCertificateGetVersionAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainCustomCertificateGetVersionArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainCustomCertificateGetVersionRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetCustomDomainCustomCertificateGetVersionAttributeTypeOk(arg GetCustomDomainCustomCertificateGetVersionAttributeType) (ret GetCustomDomainCustomCertificateGetVersionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetCustomDomainCustomCertificateGetVersionAttributeType(arg *GetCustomDomainCustomCertificateGetVersionAttributeType, val GetCustomDomainCustomCertificateGetVersionRetType) { - *arg = &val -} - -// GetCustomDomainCustomCertificate Returned if a custom certificate is used. Response does not contain the certificate or key. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainCustomCertificate struct { - // Returns if the CNAME Check has been disabled for this Custom Domain. This is usually set for migrations to allow for no downtime. - // REQUIRED - SkipDnsCheck GetCustomDomainCustomCertificategetSkipDnsCheckAttributeType `json:"skipDnsCheck" required:"true"` - // REQUIRED - Type GetCustomDomainCustomCertificateGetTypeAttributeType `json:"type" required:"true"` - // Whenever a new custom certificate is added the version is increased by 1. - // Can be cast to int32 without loss of precision. - // REQUIRED - Version GetCustomDomainCustomCertificateGetVersionAttributeType `json:"version" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _GetCustomDomainCustomCertificate GetCustomDomainCustomCertificate - -// NewGetCustomDomainCustomCertificate instantiates a new GetCustomDomainCustomCertificate 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetCustomDomainCustomCertificate(skipDnsCheck GetCustomDomainCustomCertificategetSkipDnsCheckArgType, types GetCustomDomainCustomCertificateGetTypeArgType, version GetCustomDomainCustomCertificateGetVersionArgType) *GetCustomDomainCustomCertificate { - this := GetCustomDomainCustomCertificate{} - setGetCustomDomainCustomCertificategetSkipDnsCheckAttributeType(&this.SkipDnsCheck, skipDnsCheck) - setGetCustomDomainCustomCertificateGetTypeAttributeType(&this.Type, types) - setGetCustomDomainCustomCertificateGetVersionAttributeType(&this.Version, version) - return &this -} - -// NewGetCustomDomainCustomCertificateWithDefaults instantiates a new GetCustomDomainCustomCertificate 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetCustomDomainCustomCertificateWithDefaults() *GetCustomDomainCustomCertificate { - this := GetCustomDomainCustomCertificate{} - var skipDnsCheck bool = false - this.SkipDnsCheck = &skipDnsCheck - return &this -} - -// GetSkipDnsCheck returns the SkipDnsCheck field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCustomDomainCustomCertificate) GetSkipDnsCheck() (ret GetCustomDomainCustomCertificategetSkipDnsCheckRetType) { - ret, _ = o.GetSkipDnsCheckOk() - return ret -} - -// GetSkipDnsCheckOk returns a tuple with the SkipDnsCheck field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCustomDomainCustomCertificate) GetSkipDnsCheckOk() (ret GetCustomDomainCustomCertificategetSkipDnsCheckRetType, ok bool) { - return getGetCustomDomainCustomCertificategetSkipDnsCheckAttributeTypeOk(o.SkipDnsCheck) -} - -// SetSkipDnsCheck sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCustomDomainCustomCertificate) SetSkipDnsCheck(v GetCustomDomainCustomCertificategetSkipDnsCheckRetType) { - setGetCustomDomainCustomCertificategetSkipDnsCheckAttributeType(&o.SkipDnsCheck, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCustomDomainCustomCertificate) GetType() (ret GetCustomDomainCustomCertificateGetTypeRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCustomDomainCustomCertificate) GetTypeOk() (ret GetCustomDomainCustomCertificateGetTypeRetType, ok bool) { - return getGetCustomDomainCustomCertificateGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCustomDomainCustomCertificate) SetType(v GetCustomDomainCustomCertificateGetTypeRetType) { - setGetCustomDomainCustomCertificateGetTypeAttributeType(&o.Type, v) -} - -// GetVersion returns the Version field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCustomDomainCustomCertificate) GetVersion() (ret GetCustomDomainCustomCertificateGetVersionRetType) { - ret, _ = o.GetVersionOk() - return ret -} - -// GetVersionOk returns a tuple with the Version field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCustomDomainCustomCertificate) GetVersionOk() (ret GetCustomDomainCustomCertificateGetVersionRetType, ok bool) { - return getGetCustomDomainCustomCertificateGetVersionAttributeTypeOk(o.Version) -} - -// SetVersion sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCustomDomainCustomCertificate) SetVersion(v GetCustomDomainCustomCertificateGetVersionRetType) { - setGetCustomDomainCustomCertificateGetVersionAttributeType(&o.Version, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o GetCustomDomainCustomCertificate) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGetCustomDomainCustomCertificategetSkipDnsCheckAttributeTypeOk(o.SkipDnsCheck); ok { - toSerialize["SkipDnsCheck"] = val - } - if val, ok := getGetCustomDomainCustomCertificateGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - if val, ok := getGetCustomDomainCustomCertificateGetVersionAttributeTypeOk(o.Version); ok { - toSerialize["Version"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableGetCustomDomainCustomCertificate struct { - value *GetCustomDomainCustomCertificate - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCustomDomainCustomCertificate) Get() *GetCustomDomainCustomCertificate { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCustomDomainCustomCertificate) Set(val *GetCustomDomainCustomCertificate) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCustomDomainCustomCertificate) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCustomDomainCustomCertificate) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableGetCustomDomainCustomCertificate(val *GetCustomDomainCustomCertificate) *NullableGetCustomDomainCustomCertificate { - return &NullableGetCustomDomainCustomCertificate{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCustomDomainCustomCertificate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCustomDomainCustomCertificate) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_get_custom_domain_custom_certificate_test.go b/services/cdn/model_get_custom_domain_custom_certificate_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_get_custom_domain_custom_certificate_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_get_custom_domain_managed_certificate.go b/services/cdn/model_get_custom_domain_managed_certificate.go deleted file mode 100644 index 5ea759623a..0000000000 --- a/services/cdn/model_get_custom_domain_managed_certificate.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the GetCustomDomainManagedCertificate type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetCustomDomainManagedCertificate{} - -/* - types and functions for type -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainManagedCertificateGetTypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetCustomDomainManagedCertificateGetTypeAttributeTypeOk(arg GetCustomDomainManagedCertificateGetTypeAttributeType) (ret GetCustomDomainManagedCertificateGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetCustomDomainManagedCertificateGetTypeAttributeType(arg *GetCustomDomainManagedCertificateGetTypeAttributeType, val GetCustomDomainManagedCertificateGetTypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainManagedCertificateGetTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainManagedCertificateGetTypeRetType = string - -// GetCustomDomainManagedCertificate This is returned when no custom certificate is used. We provision and manage a Let's Encrypt Certificate for you -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainManagedCertificate struct { - // REQUIRED - Type GetCustomDomainManagedCertificateGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _GetCustomDomainManagedCertificate GetCustomDomainManagedCertificate - -// NewGetCustomDomainManagedCertificate instantiates a new GetCustomDomainManagedCertificate 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetCustomDomainManagedCertificate(types GetCustomDomainManagedCertificateGetTypeArgType) *GetCustomDomainManagedCertificate { - this := GetCustomDomainManagedCertificate{} - setGetCustomDomainManagedCertificateGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewGetCustomDomainManagedCertificateWithDefaults instantiates a new GetCustomDomainManagedCertificate 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetCustomDomainManagedCertificateWithDefaults() *GetCustomDomainManagedCertificate { - this := GetCustomDomainManagedCertificate{} - return &this -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCustomDomainManagedCertificate) GetType() (ret GetCustomDomainManagedCertificateGetTypeRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCustomDomainManagedCertificate) GetTypeOk() (ret GetCustomDomainManagedCertificateGetTypeRetType, ok bool) { - return getGetCustomDomainManagedCertificateGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCustomDomainManagedCertificate) SetType(v GetCustomDomainManagedCertificateGetTypeRetType) { - setGetCustomDomainManagedCertificateGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o GetCustomDomainManagedCertificate) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGetCustomDomainManagedCertificateGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableGetCustomDomainManagedCertificate struct { - value *GetCustomDomainManagedCertificate - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCustomDomainManagedCertificate) Get() *GetCustomDomainManagedCertificate { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCustomDomainManagedCertificate) Set(val *GetCustomDomainManagedCertificate) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCustomDomainManagedCertificate) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCustomDomainManagedCertificate) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableGetCustomDomainManagedCertificate(val *GetCustomDomainManagedCertificate) *NullableGetCustomDomainManagedCertificate { - return &NullableGetCustomDomainManagedCertificate{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCustomDomainManagedCertificate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCustomDomainManagedCertificate) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_get_custom_domain_managed_certificate_test.go b/services/cdn/model_get_custom_domain_managed_certificate_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_get_custom_domain_managed_certificate_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_get_custom_domain_response.go b/services/cdn/model_get_custom_domain_response.go deleted file mode 100644 index ee260a1209..0000000000 --- a/services/cdn/model_get_custom_domain_response.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the GetCustomDomainResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetCustomDomainResponse{} - -/* - types and functions for certificate -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainResponseGetCertificateAttributeType = *GetCustomDomainResponseCertificate - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainResponseGetCertificateArgType = GetCustomDomainResponseCertificate - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainResponseGetCertificateRetType = GetCustomDomainResponseCertificate - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetCustomDomainResponseGetCertificateAttributeTypeOk(arg GetCustomDomainResponseGetCertificateAttributeType) (ret GetCustomDomainResponseGetCertificateRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetCustomDomainResponseGetCertificateAttributeType(arg *GetCustomDomainResponseGetCertificateAttributeType, val GetCustomDomainResponseGetCertificateRetType) { - *arg = &val -} - -/* - types and functions for customDomain -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainResponseGetCustomDomainAttributeType = *CustomDomain - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainResponseGetCustomDomainArgType = CustomDomain - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainResponseGetCustomDomainRetType = CustomDomain - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetCustomDomainResponseGetCustomDomainAttributeTypeOk(arg GetCustomDomainResponseGetCustomDomainAttributeType) (ret GetCustomDomainResponseGetCustomDomainRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetCustomDomainResponseGetCustomDomainAttributeType(arg *GetCustomDomainResponseGetCustomDomainAttributeType, val GetCustomDomainResponseGetCustomDomainRetType) { - *arg = &val -} - -// GetCustomDomainResponse struct for GetCustomDomainResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainResponse struct { - // REQUIRED - Certificate GetCustomDomainResponseGetCertificateAttributeType `json:"certificate" required:"true"` - // REQUIRED - CustomDomain GetCustomDomainResponseGetCustomDomainAttributeType `json:"customDomain" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _GetCustomDomainResponse GetCustomDomainResponse - -// NewGetCustomDomainResponse instantiates a new GetCustomDomainResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetCustomDomainResponse(certificate GetCustomDomainResponseGetCertificateArgType, customDomain GetCustomDomainResponseGetCustomDomainArgType) *GetCustomDomainResponse { - this := GetCustomDomainResponse{} - setGetCustomDomainResponseGetCertificateAttributeType(&this.Certificate, certificate) - setGetCustomDomainResponseGetCustomDomainAttributeType(&this.CustomDomain, customDomain) - return &this -} - -// NewGetCustomDomainResponseWithDefaults instantiates a new GetCustomDomainResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetCustomDomainResponseWithDefaults() *GetCustomDomainResponse { - this := GetCustomDomainResponse{} - return &this -} - -// GetCertificate returns the Certificate field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCustomDomainResponse) GetCertificate() (ret GetCustomDomainResponseGetCertificateRetType) { - ret, _ = o.GetCertificateOk() - return ret -} - -// GetCertificateOk returns a tuple with the Certificate field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCustomDomainResponse) GetCertificateOk() (ret GetCustomDomainResponseGetCertificateRetType, ok bool) { - return getGetCustomDomainResponseGetCertificateAttributeTypeOk(o.Certificate) -} - -// SetCertificate sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCustomDomainResponse) SetCertificate(v GetCustomDomainResponseGetCertificateRetType) { - setGetCustomDomainResponseGetCertificateAttributeType(&o.Certificate, v) -} - -// GetCustomDomain returns the CustomDomain field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCustomDomainResponse) GetCustomDomain() (ret GetCustomDomainResponseGetCustomDomainRetType) { - ret, _ = o.GetCustomDomainOk() - return ret -} - -// GetCustomDomainOk returns a tuple with the CustomDomain field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCustomDomainResponse) GetCustomDomainOk() (ret GetCustomDomainResponseGetCustomDomainRetType, ok bool) { - return getGetCustomDomainResponseGetCustomDomainAttributeTypeOk(o.CustomDomain) -} - -// SetCustomDomain sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetCustomDomainResponse) SetCustomDomain(v GetCustomDomainResponseGetCustomDomainRetType) { - setGetCustomDomainResponseGetCustomDomainAttributeType(&o.CustomDomain, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o GetCustomDomainResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGetCustomDomainResponseGetCertificateAttributeTypeOk(o.Certificate); ok { - toSerialize["Certificate"] = val - } - if val, ok := getGetCustomDomainResponseGetCustomDomainAttributeTypeOk(o.CustomDomain); ok { - toSerialize["CustomDomain"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableGetCustomDomainResponse struct { - value *GetCustomDomainResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCustomDomainResponse) Get() *GetCustomDomainResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCustomDomainResponse) Set(val *GetCustomDomainResponse) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCustomDomainResponse) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCustomDomainResponse) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableGetCustomDomainResponse(val *GetCustomDomainResponse) *NullableGetCustomDomainResponse { - return &NullableGetCustomDomainResponse{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCustomDomainResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCustomDomainResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_get_custom_domain_response_certificate.go b/services/cdn/model_get_custom_domain_response_certificate.go deleted file mode 100644 index 2cfc5a5225..0000000000 --- a/services/cdn/model_get_custom_domain_response_certificate.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// GetCustomDomainResponseCertificate - struct for GetCustomDomainResponseCertificate -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetCustomDomainResponseCertificate struct { - GetCustomDomainCustomCertificate *GetCustomDomainCustomCertificate - GetCustomDomainManagedCertificate *GetCustomDomainManagedCertificate -} - -// GetCustomDomainCustomCertificateAsGetCustomDomainResponseCertificate is a convenience function that returns GetCustomDomainCustomCertificate wrapped in GetCustomDomainResponseCertificate -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func GetCustomDomainCustomCertificateAsGetCustomDomainResponseCertificate(v *GetCustomDomainCustomCertificate) GetCustomDomainResponseCertificate { - return GetCustomDomainResponseCertificate{ - GetCustomDomainCustomCertificate: v, - } -} - -// GetCustomDomainManagedCertificateAsGetCustomDomainResponseCertificate is a convenience function that returns GetCustomDomainManagedCertificate wrapped in GetCustomDomainResponseCertificate -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func GetCustomDomainManagedCertificateAsGetCustomDomainResponseCertificate(v *GetCustomDomainManagedCertificate) GetCustomDomainResponseCertificate { - return GetCustomDomainResponseCertificate{ - GetCustomDomainManagedCertificate: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (dst *GetCustomDomainResponseCertificate) 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 'GetCustomDomainCustomCertificate' - if jsonDict["type"] == "GetCustomDomainCustomCertificate" { - // try to unmarshal JSON data into GetCustomDomainCustomCertificate - err = json.Unmarshal(data, &dst.GetCustomDomainCustomCertificate) - if err == nil { - return nil // data stored in dst.GetCustomDomainCustomCertificate, return on the first match - } else { - dst.GetCustomDomainCustomCertificate = nil - return fmt.Errorf("failed to unmarshal GetCustomDomainResponseCertificate as GetCustomDomainCustomCertificate: %s", err.Error()) - } - } - - // check if the discriminator value is 'GetCustomDomainManagedCertificate' - if jsonDict["type"] == "GetCustomDomainManagedCertificate" { - // try to unmarshal JSON data into GetCustomDomainManagedCertificate - err = json.Unmarshal(data, &dst.GetCustomDomainManagedCertificate) - if err == nil { - return nil // data stored in dst.GetCustomDomainManagedCertificate, return on the first match - } else { - dst.GetCustomDomainManagedCertificate = nil - return fmt.Errorf("failed to unmarshal GetCustomDomainResponseCertificate as GetCustomDomainManagedCertificate: %s", err.Error()) - } - } - - // check if the discriminator value is 'custom' - if jsonDict["type"] == "custom" { - // try to unmarshal JSON data into GetCustomDomainCustomCertificate - err = json.Unmarshal(data, &dst.GetCustomDomainCustomCertificate) - if err == nil { - return nil // data stored in dst.GetCustomDomainCustomCertificate, return on the first match - } else { - dst.GetCustomDomainCustomCertificate = nil - return fmt.Errorf("failed to unmarshal GetCustomDomainResponseCertificate as GetCustomDomainCustomCertificate: %s", err.Error()) - } - } - - // check if the discriminator value is 'managed' - if jsonDict["type"] == "managed" { - // try to unmarshal JSON data into GetCustomDomainManagedCertificate - err = json.Unmarshal(data, &dst.GetCustomDomainManagedCertificate) - if err == nil { - return nil // data stored in dst.GetCustomDomainManagedCertificate, return on the first match - } else { - dst.GetCustomDomainManagedCertificate = nil - return fmt.Errorf("failed to unmarshal GetCustomDomainResponseCertificate as GetCustomDomainManagedCertificate: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src GetCustomDomainResponseCertificate) MarshalJSON() ([]byte, error) { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - if src.GetCustomDomainCustomCertificate != nil { - return json.Marshal(&src.GetCustomDomainCustomCertificate) - } - - if src.GetCustomDomainManagedCertificate != nil { - return json.Marshal(&src.GetCustomDomainManagedCertificate) - } - - return []byte("{}"), nil // no data in oneOf schemas => empty JSON object -} - -// Get the actual instance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (obj *GetCustomDomainResponseCertificate) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.GetCustomDomainCustomCertificate != nil { - return obj.GetCustomDomainCustomCertificate - } - - if obj.GetCustomDomainManagedCertificate != nil { - return obj.GetCustomDomainManagedCertificate - } - - // all schemas are nil - return nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableGetCustomDomainResponseCertificate struct { - value *GetCustomDomainResponseCertificate - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCustomDomainResponseCertificate) Get() *GetCustomDomainResponseCertificate { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCustomDomainResponseCertificate) Set(val *GetCustomDomainResponseCertificate) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCustomDomainResponseCertificate) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCustomDomainResponseCertificate) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableGetCustomDomainResponseCertificate(val *GetCustomDomainResponseCertificate) *NullableGetCustomDomainResponseCertificate { - return &NullableGetCustomDomainResponseCertificate{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetCustomDomainResponseCertificate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetCustomDomainResponseCertificate) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_get_custom_domain_response_certificate_test.go b/services/cdn/model_get_custom_domain_response_certificate_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_get_custom_domain_response_certificate_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_get_custom_domain_response_test.go b/services/cdn/model_get_custom_domain_response_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_get_custom_domain_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_get_distribution_response.go b/services/cdn/model_get_distribution_response.go deleted file mode 100644 index 79fde7d316..0000000000 --- a/services/cdn/model_get_distribution_response.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the GetDistributionResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetDistributionResponse{} - -/* - types and functions for distribution -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetDistributionResponseGetDistributionAttributeType = *Distribution - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetDistributionResponseGetDistributionArgType = Distribution - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetDistributionResponseGetDistributionRetType = Distribution - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetDistributionResponseGetDistributionAttributeTypeOk(arg GetDistributionResponseGetDistributionAttributeType) (ret GetDistributionResponseGetDistributionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetDistributionResponseGetDistributionAttributeType(arg *GetDistributionResponseGetDistributionAttributeType, val GetDistributionResponseGetDistributionRetType) { - *arg = &val -} - -// GetDistributionResponse struct for GetDistributionResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetDistributionResponse struct { - // REQUIRED - Distribution GetDistributionResponseGetDistributionAttributeType `json:"distribution" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _GetDistributionResponse GetDistributionResponse - -// NewGetDistributionResponse instantiates a new GetDistributionResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetDistributionResponse(distribution GetDistributionResponseGetDistributionArgType) *GetDistributionResponse { - this := GetDistributionResponse{} - setGetDistributionResponseGetDistributionAttributeType(&this.Distribution, distribution) - return &this -} - -// NewGetDistributionResponseWithDefaults instantiates a new GetDistributionResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetDistributionResponseWithDefaults() *GetDistributionResponse { - this := GetDistributionResponse{} - return &this -} - -// GetDistribution returns the Distribution field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetDistributionResponse) GetDistribution() (ret GetDistributionResponseGetDistributionRetType) { - ret, _ = o.GetDistributionOk() - return ret -} - -// GetDistributionOk returns a tuple with the Distribution field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetDistributionResponse) GetDistributionOk() (ret GetDistributionResponseGetDistributionRetType, ok bool) { - return getGetDistributionResponseGetDistributionAttributeTypeOk(o.Distribution) -} - -// SetDistribution sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetDistributionResponse) SetDistribution(v GetDistributionResponseGetDistributionRetType) { - setGetDistributionResponseGetDistributionAttributeType(&o.Distribution, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o GetDistributionResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGetDistributionResponseGetDistributionAttributeTypeOk(o.Distribution); ok { - toSerialize["Distribution"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableGetDistributionResponse struct { - value *GetDistributionResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetDistributionResponse) Get() *GetDistributionResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetDistributionResponse) Set(val *GetDistributionResponse) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetDistributionResponse) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetDistributionResponse) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableGetDistributionResponse(val *GetDistributionResponse) *NullableGetDistributionResponse { - return &NullableGetDistributionResponse{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetDistributionResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetDistributionResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_get_distribution_response_test.go b/services/cdn/model_get_distribution_response_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_get_distribution_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_get_logs_response.go b/services/cdn/model_get_logs_response.go deleted file mode 100644 index ec950a26fc..0000000000 --- a/services/cdn/model_get_logs_response.go +++ /dev/null @@ -1,207 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the GetLogsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetLogsResponse{} - -/* - types and functions for logs -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsResponseGetLogsAttributeType = *[]DistributionLogsRecord - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsResponseGetLogsArgType = []DistributionLogsRecord - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsResponseGetLogsRetType = []DistributionLogsRecord - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetLogsResponseGetLogsAttributeTypeOk(arg GetLogsResponseGetLogsAttributeType) (ret GetLogsResponseGetLogsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetLogsResponseGetLogsAttributeType(arg *GetLogsResponseGetLogsAttributeType, val GetLogsResponseGetLogsRetType) { - *arg = &val -} - -/* - types and functions for nextPageIdentifier -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsResponseGetNextPageIdentifierAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetLogsResponseGetNextPageIdentifierAttributeTypeOk(arg GetLogsResponseGetNextPageIdentifierAttributeType) (ret GetLogsResponseGetNextPageIdentifierRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetLogsResponseGetNextPageIdentifierAttributeType(arg *GetLogsResponseGetNextPageIdentifierAttributeType, val GetLogsResponseGetNextPageIdentifierRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsResponseGetNextPageIdentifierArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsResponseGetNextPageIdentifierRetType = string - -// GetLogsResponse struct for GetLogsResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsResponse struct { - // REQUIRED - Logs GetLogsResponseGetLogsAttributeType `json:"logs" required:"true"` - NextPageIdentifier GetLogsResponseGetNextPageIdentifierAttributeType `json:"nextPageIdentifier,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _GetLogsResponse GetLogsResponse - -// NewGetLogsResponse instantiates a new GetLogsResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetLogsResponse(logs GetLogsResponseGetLogsArgType) *GetLogsResponse { - this := GetLogsResponse{} - setGetLogsResponseGetLogsAttributeType(&this.Logs, logs) - return &this -} - -// NewGetLogsResponseWithDefaults instantiates a new GetLogsResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetLogsResponseWithDefaults() *GetLogsResponse { - this := GetLogsResponse{} - return &this -} - -// GetLogs returns the Logs field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsResponse) GetLogs() (ret GetLogsResponseGetLogsRetType) { - ret, _ = o.GetLogsOk() - return ret -} - -// GetLogsOk returns a tuple with the Logs field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsResponse) GetLogsOk() (ret GetLogsResponseGetLogsRetType, ok bool) { - return getGetLogsResponseGetLogsAttributeTypeOk(o.Logs) -} - -// SetLogs sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsResponse) SetLogs(v GetLogsResponseGetLogsRetType) { - setGetLogsResponseGetLogsAttributeType(&o.Logs, v) -} - -// GetNextPageIdentifier returns the NextPageIdentifier field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsResponse) GetNextPageIdentifier() (res GetLogsResponseGetNextPageIdentifierRetType) { - res, _ = o.GetNextPageIdentifierOk() - return -} - -// GetNextPageIdentifierOk returns a tuple with the NextPageIdentifier field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsResponse) GetNextPageIdentifierOk() (ret GetLogsResponseGetNextPageIdentifierRetType, ok bool) { - return getGetLogsResponseGetNextPageIdentifierAttributeTypeOk(o.NextPageIdentifier) -} - -// HasNextPageIdentifier returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsResponse) HasNextPageIdentifier() bool { - _, ok := o.GetNextPageIdentifierOk() - return ok -} - -// SetNextPageIdentifier gets a reference to the given string and assigns it to the NextPageIdentifier field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsResponse) SetNextPageIdentifier(v GetLogsResponseGetNextPageIdentifierRetType) { - setGetLogsResponseGetNextPageIdentifierAttributeType(&o.NextPageIdentifier, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o GetLogsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGetLogsResponseGetLogsAttributeTypeOk(o.Logs); ok { - toSerialize["Logs"] = val - } - if val, ok := getGetLogsResponseGetNextPageIdentifierAttributeTypeOk(o.NextPageIdentifier); ok { - toSerialize["NextPageIdentifier"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableGetLogsResponse struct { - value *GetLogsResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetLogsResponse) Get() *GetLogsResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetLogsResponse) Set(val *GetLogsResponse) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetLogsResponse) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetLogsResponse) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableGetLogsResponse(val *GetLogsResponse) *NullableGetLogsResponse { - return &NullableGetLogsResponse{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetLogsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetLogsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_get_logs_response_test.go b/services/cdn/model_get_logs_response_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_get_logs_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_get_logs_search_filters_response.go b/services/cdn/model_get_logs_search_filters_response.go deleted file mode 100644 index 0d2857554d..0000000000 --- a/services/cdn/model_get_logs_search_filters_response.go +++ /dev/null @@ -1,310 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the GetLogsSearchFiltersResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetLogsSearchFiltersResponse{} - -/* - types and functions for cache -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseGetCacheAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseGetCacheArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseGetCacheRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetLogsSearchFiltersResponseGetCacheAttributeTypeOk(arg GetLogsSearchFiltersResponseGetCacheAttributeType) (ret GetLogsSearchFiltersResponseGetCacheRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetLogsSearchFiltersResponseGetCacheAttributeType(arg *GetLogsSearchFiltersResponseGetCacheAttributeType, val GetLogsSearchFiltersResponseGetCacheRetType) { - *arg = &val -} - -/* - types and functions for dataCenter -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseGetDataCenterAttributeType = *GetLogsSearchFiltersResponseDatacenterBlock - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseGetDataCenterArgType = GetLogsSearchFiltersResponseDatacenterBlock - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseGetDataCenterRetType = GetLogsSearchFiltersResponseDatacenterBlock - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetLogsSearchFiltersResponseGetDataCenterAttributeTypeOk(arg GetLogsSearchFiltersResponseGetDataCenterAttributeType) (ret GetLogsSearchFiltersResponseGetDataCenterRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetLogsSearchFiltersResponseGetDataCenterAttributeType(arg *GetLogsSearchFiltersResponseGetDataCenterAttributeType, val GetLogsSearchFiltersResponseGetDataCenterRetType) { - *arg = &val -} - -/* - types and functions for remoteCountry -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseGetRemoteCountryAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseGetRemoteCountryArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseGetRemoteCountryRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetLogsSearchFiltersResponseGetRemoteCountryAttributeTypeOk(arg GetLogsSearchFiltersResponseGetRemoteCountryAttributeType) (ret GetLogsSearchFiltersResponseGetRemoteCountryRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetLogsSearchFiltersResponseGetRemoteCountryAttributeType(arg *GetLogsSearchFiltersResponseGetRemoteCountryAttributeType, val GetLogsSearchFiltersResponseGetRemoteCountryRetType) { - *arg = &val -} - -/* - types and functions for status -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseGetStatusAttributeType = *[]int32 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseGetStatusArgType = []int32 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseGetStatusRetType = []int32 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetLogsSearchFiltersResponseGetStatusAttributeTypeOk(arg GetLogsSearchFiltersResponseGetStatusAttributeType) (ret GetLogsSearchFiltersResponseGetStatusRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetLogsSearchFiltersResponseGetStatusAttributeType(arg *GetLogsSearchFiltersResponseGetStatusAttributeType, val GetLogsSearchFiltersResponseGetStatusRetType) { - *arg = &val -} - -// GetLogsSearchFiltersResponse struct for GetLogsSearchFiltersResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponse struct { - // REQUIRED - Cache GetLogsSearchFiltersResponseGetCacheAttributeType `json:"cache" required:"true"` - // REQUIRED - DataCenter GetLogsSearchFiltersResponseGetDataCenterAttributeType `json:"dataCenter" required:"true"` - // List of ISO-3166 Alpha2 Country Codes matching the input filter. Response is ordered in ascending order. For more Info about the country codes, see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 - // REQUIRED - RemoteCountry GetLogsSearchFiltersResponseGetRemoteCountryAttributeType `json:"remoteCountry" required:"true"` - // List of Status Codes matching the input filter. Response is ordered in ascending order. - // REQUIRED - Status GetLogsSearchFiltersResponseGetStatusAttributeType `json:"status" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _GetLogsSearchFiltersResponse GetLogsSearchFiltersResponse - -// NewGetLogsSearchFiltersResponse instantiates a new GetLogsSearchFiltersResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetLogsSearchFiltersResponse(cache GetLogsSearchFiltersResponseGetCacheArgType, dataCenter GetLogsSearchFiltersResponseGetDataCenterArgType, remoteCountry GetLogsSearchFiltersResponseGetRemoteCountryArgType, status GetLogsSearchFiltersResponseGetStatusArgType) *GetLogsSearchFiltersResponse { - this := GetLogsSearchFiltersResponse{} - setGetLogsSearchFiltersResponseGetCacheAttributeType(&this.Cache, cache) - setGetLogsSearchFiltersResponseGetDataCenterAttributeType(&this.DataCenter, dataCenter) - setGetLogsSearchFiltersResponseGetRemoteCountryAttributeType(&this.RemoteCountry, remoteCountry) - setGetLogsSearchFiltersResponseGetStatusAttributeType(&this.Status, status) - return &this -} - -// NewGetLogsSearchFiltersResponseWithDefaults instantiates a new GetLogsSearchFiltersResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetLogsSearchFiltersResponseWithDefaults() *GetLogsSearchFiltersResponse { - this := GetLogsSearchFiltersResponse{} - return &this -} - -// GetCache returns the Cache field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponse) GetCache() (ret GetLogsSearchFiltersResponseGetCacheRetType) { - ret, _ = o.GetCacheOk() - return ret -} - -// GetCacheOk returns a tuple with the Cache field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponse) GetCacheOk() (ret GetLogsSearchFiltersResponseGetCacheRetType, ok bool) { - return getGetLogsSearchFiltersResponseGetCacheAttributeTypeOk(o.Cache) -} - -// SetCache sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponse) SetCache(v GetLogsSearchFiltersResponseGetCacheRetType) { - setGetLogsSearchFiltersResponseGetCacheAttributeType(&o.Cache, v) -} - -// GetDataCenter returns the DataCenter field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponse) GetDataCenter() (ret GetLogsSearchFiltersResponseGetDataCenterRetType) { - ret, _ = o.GetDataCenterOk() - return ret -} - -// GetDataCenterOk returns a tuple with the DataCenter field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponse) GetDataCenterOk() (ret GetLogsSearchFiltersResponseGetDataCenterRetType, ok bool) { - return getGetLogsSearchFiltersResponseGetDataCenterAttributeTypeOk(o.DataCenter) -} - -// SetDataCenter sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponse) SetDataCenter(v GetLogsSearchFiltersResponseGetDataCenterRetType) { - setGetLogsSearchFiltersResponseGetDataCenterAttributeType(&o.DataCenter, v) -} - -// GetRemoteCountry returns the RemoteCountry field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponse) GetRemoteCountry() (ret GetLogsSearchFiltersResponseGetRemoteCountryRetType) { - ret, _ = o.GetRemoteCountryOk() - return ret -} - -// GetRemoteCountryOk returns a tuple with the RemoteCountry field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponse) GetRemoteCountryOk() (ret GetLogsSearchFiltersResponseGetRemoteCountryRetType, ok bool) { - return getGetLogsSearchFiltersResponseGetRemoteCountryAttributeTypeOk(o.RemoteCountry) -} - -// SetRemoteCountry sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponse) SetRemoteCountry(v GetLogsSearchFiltersResponseGetRemoteCountryRetType) { - setGetLogsSearchFiltersResponseGetRemoteCountryAttributeType(&o.RemoteCountry, v) -} - -// GetStatus returns the Status field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponse) GetStatus() (ret GetLogsSearchFiltersResponseGetStatusRetType) { - ret, _ = o.GetStatusOk() - return ret -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponse) GetStatusOk() (ret GetLogsSearchFiltersResponseGetStatusRetType, ok bool) { - return getGetLogsSearchFiltersResponseGetStatusAttributeTypeOk(o.Status) -} - -// SetStatus sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponse) SetStatus(v GetLogsSearchFiltersResponseGetStatusRetType) { - setGetLogsSearchFiltersResponseGetStatusAttributeType(&o.Status, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o GetLogsSearchFiltersResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGetLogsSearchFiltersResponseGetCacheAttributeTypeOk(o.Cache); ok { - toSerialize["Cache"] = val - } - if val, ok := getGetLogsSearchFiltersResponseGetDataCenterAttributeTypeOk(o.DataCenter); ok { - toSerialize["DataCenter"] = val - } - if val, ok := getGetLogsSearchFiltersResponseGetRemoteCountryAttributeTypeOk(o.RemoteCountry); ok { - toSerialize["RemoteCountry"] = val - } - if val, ok := getGetLogsSearchFiltersResponseGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableGetLogsSearchFiltersResponse struct { - value *GetLogsSearchFiltersResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetLogsSearchFiltersResponse) Get() *GetLogsSearchFiltersResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetLogsSearchFiltersResponse) Set(val *GetLogsSearchFiltersResponse) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetLogsSearchFiltersResponse) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetLogsSearchFiltersResponse) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableGetLogsSearchFiltersResponse(val *GetLogsSearchFiltersResponse) *NullableGetLogsSearchFiltersResponse { - return &NullableGetLogsSearchFiltersResponse{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetLogsSearchFiltersResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetLogsSearchFiltersResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_get_logs_search_filters_response_datacenter_block.go b/services/cdn/model_get_logs_search_filters_response_datacenter_block.go deleted file mode 100644 index cfe773542c..0000000000 --- a/services/cdn/model_get_logs_search_filters_response_datacenter_block.go +++ /dev/null @@ -1,361 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the GetLogsSearchFiltersResponseDatacenterBlock type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetLogsSearchFiltersResponseDatacenterBlock{} - -/* - types and functions for AF -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockGetAFAttributeType = *[]GetLogsSearchFiltersResponseDatacenterBlockItem - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockGetAFArgType = []GetLogsSearchFiltersResponseDatacenterBlockItem - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockGetAFRetType = []GetLogsSearchFiltersResponseDatacenterBlockItem - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetLogsSearchFiltersResponseDatacenterBlockGetAFAttributeTypeOk(arg GetLogsSearchFiltersResponseDatacenterBlockGetAFAttributeType) (ret GetLogsSearchFiltersResponseDatacenterBlockGetAFRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetLogsSearchFiltersResponseDatacenterBlockGetAFAttributeType(arg *GetLogsSearchFiltersResponseDatacenterBlockGetAFAttributeType, val GetLogsSearchFiltersResponseDatacenterBlockGetAFRetType) { - *arg = &val -} - -/* - types and functions for ASIA -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockGetASIAAttributeType = *[]GetLogsSearchFiltersResponseDatacenterBlockItem - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockGetASIAArgType = []GetLogsSearchFiltersResponseDatacenterBlockItem - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockGetASIARetType = []GetLogsSearchFiltersResponseDatacenterBlockItem - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetLogsSearchFiltersResponseDatacenterBlockGetASIAAttributeTypeOk(arg GetLogsSearchFiltersResponseDatacenterBlockGetASIAAttributeType) (ret GetLogsSearchFiltersResponseDatacenterBlockGetASIARetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetLogsSearchFiltersResponseDatacenterBlockGetASIAAttributeType(arg *GetLogsSearchFiltersResponseDatacenterBlockGetASIAAttributeType, val GetLogsSearchFiltersResponseDatacenterBlockGetASIARetType) { - *arg = &val -} - -/* - types and functions for EU -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockGetEUAttributeType = *[]GetLogsSearchFiltersResponseDatacenterBlockItem - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockGetEUArgType = []GetLogsSearchFiltersResponseDatacenterBlockItem - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockGetEURetType = []GetLogsSearchFiltersResponseDatacenterBlockItem - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetLogsSearchFiltersResponseDatacenterBlockGetEUAttributeTypeOk(arg GetLogsSearchFiltersResponseDatacenterBlockGetEUAttributeType) (ret GetLogsSearchFiltersResponseDatacenterBlockGetEURetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetLogsSearchFiltersResponseDatacenterBlockGetEUAttributeType(arg *GetLogsSearchFiltersResponseDatacenterBlockGetEUAttributeType, val GetLogsSearchFiltersResponseDatacenterBlockGetEURetType) { - *arg = &val -} - -/* - types and functions for NA -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockGetNAAttributeType = *[]GetLogsSearchFiltersResponseDatacenterBlockItem - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockGetNAArgType = []GetLogsSearchFiltersResponseDatacenterBlockItem - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockGetNARetType = []GetLogsSearchFiltersResponseDatacenterBlockItem - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetLogsSearchFiltersResponseDatacenterBlockGetNAAttributeTypeOk(arg GetLogsSearchFiltersResponseDatacenterBlockGetNAAttributeType) (ret GetLogsSearchFiltersResponseDatacenterBlockGetNARetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetLogsSearchFiltersResponseDatacenterBlockGetNAAttributeType(arg *GetLogsSearchFiltersResponseDatacenterBlockGetNAAttributeType, val GetLogsSearchFiltersResponseDatacenterBlockGetNARetType) { - *arg = &val -} - -/* - types and functions for SA -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockGetSAAttributeType = *[]GetLogsSearchFiltersResponseDatacenterBlockItem - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockGetSAArgType = []GetLogsSearchFiltersResponseDatacenterBlockItem - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockGetSARetType = []GetLogsSearchFiltersResponseDatacenterBlockItem - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetLogsSearchFiltersResponseDatacenterBlockGetSAAttributeTypeOk(arg GetLogsSearchFiltersResponseDatacenterBlockGetSAAttributeType) (ret GetLogsSearchFiltersResponseDatacenterBlockGetSARetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetLogsSearchFiltersResponseDatacenterBlockGetSAAttributeType(arg *GetLogsSearchFiltersResponseDatacenterBlockGetSAAttributeType, val GetLogsSearchFiltersResponseDatacenterBlockGetSARetType) { - *arg = &val -} - -// GetLogsSearchFiltersResponseDatacenterBlock Object containing Datacenters to filter for. Each datacenter is grouped to the respective region. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlock struct { - // REQUIRED - AF GetLogsSearchFiltersResponseDatacenterBlockGetAFAttributeType `json:"AF" required:"true"` - // REQUIRED - ASIA GetLogsSearchFiltersResponseDatacenterBlockGetASIAAttributeType `json:"ASIA" required:"true"` - // REQUIRED - EU GetLogsSearchFiltersResponseDatacenterBlockGetEUAttributeType `json:"EU" required:"true"` - // REQUIRED - NA GetLogsSearchFiltersResponseDatacenterBlockGetNAAttributeType `json:"NA" required:"true"` - // REQUIRED - SA GetLogsSearchFiltersResponseDatacenterBlockGetSAAttributeType `json:"SA" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _GetLogsSearchFiltersResponseDatacenterBlock GetLogsSearchFiltersResponseDatacenterBlock - -// NewGetLogsSearchFiltersResponseDatacenterBlock instantiates a new GetLogsSearchFiltersResponseDatacenterBlock object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetLogsSearchFiltersResponseDatacenterBlock(aF GetLogsSearchFiltersResponseDatacenterBlockGetAFArgType, aSIA GetLogsSearchFiltersResponseDatacenterBlockGetASIAArgType, eU GetLogsSearchFiltersResponseDatacenterBlockGetEUArgType, nA GetLogsSearchFiltersResponseDatacenterBlockGetNAArgType, sA GetLogsSearchFiltersResponseDatacenterBlockGetSAArgType) *GetLogsSearchFiltersResponseDatacenterBlock { - this := GetLogsSearchFiltersResponseDatacenterBlock{} - setGetLogsSearchFiltersResponseDatacenterBlockGetAFAttributeType(&this.AF, aF) - setGetLogsSearchFiltersResponseDatacenterBlockGetASIAAttributeType(&this.ASIA, aSIA) - setGetLogsSearchFiltersResponseDatacenterBlockGetEUAttributeType(&this.EU, eU) - setGetLogsSearchFiltersResponseDatacenterBlockGetNAAttributeType(&this.NA, nA) - setGetLogsSearchFiltersResponseDatacenterBlockGetSAAttributeType(&this.SA, sA) - return &this -} - -// NewGetLogsSearchFiltersResponseDatacenterBlockWithDefaults instantiates a new GetLogsSearchFiltersResponseDatacenterBlock object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetLogsSearchFiltersResponseDatacenterBlockWithDefaults() *GetLogsSearchFiltersResponseDatacenterBlock { - this := GetLogsSearchFiltersResponseDatacenterBlock{} - return &this -} - -// GetAF returns the AF field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponseDatacenterBlock) GetAF() (ret GetLogsSearchFiltersResponseDatacenterBlockGetAFRetType) { - ret, _ = o.GetAFOk() - return ret -} - -// GetAFOk returns a tuple with the AF field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponseDatacenterBlock) GetAFOk() (ret GetLogsSearchFiltersResponseDatacenterBlockGetAFRetType, ok bool) { - return getGetLogsSearchFiltersResponseDatacenterBlockGetAFAttributeTypeOk(o.AF) -} - -// SetAF sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponseDatacenterBlock) SetAF(v GetLogsSearchFiltersResponseDatacenterBlockGetAFRetType) { - setGetLogsSearchFiltersResponseDatacenterBlockGetAFAttributeType(&o.AF, v) -} - -// GetASIA returns the ASIA field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponseDatacenterBlock) GetASIA() (ret GetLogsSearchFiltersResponseDatacenterBlockGetASIARetType) { - ret, _ = o.GetASIAOk() - return ret -} - -// GetASIAOk returns a tuple with the ASIA field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponseDatacenterBlock) GetASIAOk() (ret GetLogsSearchFiltersResponseDatacenterBlockGetASIARetType, ok bool) { - return getGetLogsSearchFiltersResponseDatacenterBlockGetASIAAttributeTypeOk(o.ASIA) -} - -// SetASIA sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponseDatacenterBlock) SetASIA(v GetLogsSearchFiltersResponseDatacenterBlockGetASIARetType) { - setGetLogsSearchFiltersResponseDatacenterBlockGetASIAAttributeType(&o.ASIA, v) -} - -// GetEU returns the EU field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponseDatacenterBlock) GetEU() (ret GetLogsSearchFiltersResponseDatacenterBlockGetEURetType) { - ret, _ = o.GetEUOk() - return ret -} - -// GetEUOk returns a tuple with the EU field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponseDatacenterBlock) GetEUOk() (ret GetLogsSearchFiltersResponseDatacenterBlockGetEURetType, ok bool) { - return getGetLogsSearchFiltersResponseDatacenterBlockGetEUAttributeTypeOk(o.EU) -} - -// SetEU sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponseDatacenterBlock) SetEU(v GetLogsSearchFiltersResponseDatacenterBlockGetEURetType) { - setGetLogsSearchFiltersResponseDatacenterBlockGetEUAttributeType(&o.EU, v) -} - -// GetNA returns the NA field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponseDatacenterBlock) GetNA() (ret GetLogsSearchFiltersResponseDatacenterBlockGetNARetType) { - ret, _ = o.GetNAOk() - return ret -} - -// GetNAOk returns a tuple with the NA field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponseDatacenterBlock) GetNAOk() (ret GetLogsSearchFiltersResponseDatacenterBlockGetNARetType, ok bool) { - return getGetLogsSearchFiltersResponseDatacenterBlockGetNAAttributeTypeOk(o.NA) -} - -// SetNA sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponseDatacenterBlock) SetNA(v GetLogsSearchFiltersResponseDatacenterBlockGetNARetType) { - setGetLogsSearchFiltersResponseDatacenterBlockGetNAAttributeType(&o.NA, v) -} - -// GetSA returns the SA field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponseDatacenterBlock) GetSA() (ret GetLogsSearchFiltersResponseDatacenterBlockGetSARetType) { - ret, _ = o.GetSAOk() - return ret -} - -// GetSAOk returns a tuple with the SA field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponseDatacenterBlock) GetSAOk() (ret GetLogsSearchFiltersResponseDatacenterBlockGetSARetType, ok bool) { - return getGetLogsSearchFiltersResponseDatacenterBlockGetSAAttributeTypeOk(o.SA) -} - -// SetSA sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponseDatacenterBlock) SetSA(v GetLogsSearchFiltersResponseDatacenterBlockGetSARetType) { - setGetLogsSearchFiltersResponseDatacenterBlockGetSAAttributeType(&o.SA, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o GetLogsSearchFiltersResponseDatacenterBlock) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGetLogsSearchFiltersResponseDatacenterBlockGetAFAttributeTypeOk(o.AF); ok { - toSerialize["AF"] = val - } - if val, ok := getGetLogsSearchFiltersResponseDatacenterBlockGetASIAAttributeTypeOk(o.ASIA); ok { - toSerialize["ASIA"] = val - } - if val, ok := getGetLogsSearchFiltersResponseDatacenterBlockGetEUAttributeTypeOk(o.EU); ok { - toSerialize["EU"] = val - } - if val, ok := getGetLogsSearchFiltersResponseDatacenterBlockGetNAAttributeTypeOk(o.NA); ok { - toSerialize["NA"] = val - } - if val, ok := getGetLogsSearchFiltersResponseDatacenterBlockGetSAAttributeTypeOk(o.SA); ok { - toSerialize["SA"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableGetLogsSearchFiltersResponseDatacenterBlock struct { - value *GetLogsSearchFiltersResponseDatacenterBlock - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetLogsSearchFiltersResponseDatacenterBlock) Get() *GetLogsSearchFiltersResponseDatacenterBlock { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetLogsSearchFiltersResponseDatacenterBlock) Set(val *GetLogsSearchFiltersResponseDatacenterBlock) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetLogsSearchFiltersResponseDatacenterBlock) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetLogsSearchFiltersResponseDatacenterBlock) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableGetLogsSearchFiltersResponseDatacenterBlock(val *GetLogsSearchFiltersResponseDatacenterBlock) *NullableGetLogsSearchFiltersResponseDatacenterBlock { - return &NullableGetLogsSearchFiltersResponseDatacenterBlock{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetLogsSearchFiltersResponseDatacenterBlock) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetLogsSearchFiltersResponseDatacenterBlock) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_get_logs_search_filters_response_datacenter_block_item.go b/services/cdn/model_get_logs_search_filters_response_datacenter_block_item.go deleted file mode 100644 index a837410df3..0000000000 --- a/services/cdn/model_get_logs_search_filters_response_datacenter_block_item.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the GetLogsSearchFiltersResponseDatacenterBlockItem type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetLogsSearchFiltersResponseDatacenterBlockItem{} - -/* - types and functions for displayName -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameAttributeTypeOk(arg GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameAttributeType) (ret GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameAttributeType(arg *GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameAttributeType, val GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameRetType = string - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockItemGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetLogsSearchFiltersResponseDatacenterBlockItemGetIdAttributeTypeOk(arg GetLogsSearchFiltersResponseDatacenterBlockItemGetIdAttributeType) (ret GetLogsSearchFiltersResponseDatacenterBlockItemGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetLogsSearchFiltersResponseDatacenterBlockItemGetIdAttributeType(arg *GetLogsSearchFiltersResponseDatacenterBlockItemGetIdAttributeType, val GetLogsSearchFiltersResponseDatacenterBlockItemGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockItemGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockItemGetIdRetType = string - -// GetLogsSearchFiltersResponseDatacenterBlockItem A datacenter. The `id` defines the key needed to filter against the logs endpoint, while the `displayName` defines a human-readable Name. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetLogsSearchFiltersResponseDatacenterBlockItem struct { - // REQUIRED - DisplayName GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameAttributeType `json:"displayName" required:"true"` - // REQUIRED - Id GetLogsSearchFiltersResponseDatacenterBlockItemGetIdAttributeType `json:"id" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _GetLogsSearchFiltersResponseDatacenterBlockItem GetLogsSearchFiltersResponseDatacenterBlockItem - -// NewGetLogsSearchFiltersResponseDatacenterBlockItem instantiates a new GetLogsSearchFiltersResponseDatacenterBlockItem object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetLogsSearchFiltersResponseDatacenterBlockItem(displayName GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameArgType, id GetLogsSearchFiltersResponseDatacenterBlockItemGetIdArgType) *GetLogsSearchFiltersResponseDatacenterBlockItem { - this := GetLogsSearchFiltersResponseDatacenterBlockItem{} - setGetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameAttributeType(&this.DisplayName, displayName) - setGetLogsSearchFiltersResponseDatacenterBlockItemGetIdAttributeType(&this.Id, id) - return &this -} - -// NewGetLogsSearchFiltersResponseDatacenterBlockItemWithDefaults instantiates a new GetLogsSearchFiltersResponseDatacenterBlockItem object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetLogsSearchFiltersResponseDatacenterBlockItemWithDefaults() *GetLogsSearchFiltersResponseDatacenterBlockItem { - this := GetLogsSearchFiltersResponseDatacenterBlockItem{} - return &this -} - -// GetDisplayName returns the DisplayName field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponseDatacenterBlockItem) GetDisplayName() (ret GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameRetType) { - ret, _ = o.GetDisplayNameOk() - return ret -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponseDatacenterBlockItem) GetDisplayNameOk() (ret GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameRetType, ok bool) { - return getGetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameAttributeTypeOk(o.DisplayName) -} - -// SetDisplayName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponseDatacenterBlockItem) SetDisplayName(v GetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameRetType) { - setGetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameAttributeType(&o.DisplayName, v) -} - -// GetId returns the Id field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponseDatacenterBlockItem) GetId() (ret GetLogsSearchFiltersResponseDatacenterBlockItemGetIdRetType) { - ret, _ = o.GetIdOk() - return ret -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponseDatacenterBlockItem) GetIdOk() (ret GetLogsSearchFiltersResponseDatacenterBlockItemGetIdRetType, ok bool) { - return getGetLogsSearchFiltersResponseDatacenterBlockItemGetIdAttributeTypeOk(o.Id) -} - -// SetId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetLogsSearchFiltersResponseDatacenterBlockItem) SetId(v GetLogsSearchFiltersResponseDatacenterBlockItemGetIdRetType) { - setGetLogsSearchFiltersResponseDatacenterBlockItemGetIdAttributeType(&o.Id, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o GetLogsSearchFiltersResponseDatacenterBlockItem) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGetLogsSearchFiltersResponseDatacenterBlockItemGetDisplayNameAttributeTypeOk(o.DisplayName); ok { - toSerialize["DisplayName"] = val - } - if val, ok := getGetLogsSearchFiltersResponseDatacenterBlockItemGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableGetLogsSearchFiltersResponseDatacenterBlockItem struct { - value *GetLogsSearchFiltersResponseDatacenterBlockItem - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetLogsSearchFiltersResponseDatacenterBlockItem) Get() *GetLogsSearchFiltersResponseDatacenterBlockItem { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetLogsSearchFiltersResponseDatacenterBlockItem) Set(val *GetLogsSearchFiltersResponseDatacenterBlockItem) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetLogsSearchFiltersResponseDatacenterBlockItem) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetLogsSearchFiltersResponseDatacenterBlockItem) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableGetLogsSearchFiltersResponseDatacenterBlockItem(val *GetLogsSearchFiltersResponseDatacenterBlockItem) *NullableGetLogsSearchFiltersResponseDatacenterBlockItem { - return &NullableGetLogsSearchFiltersResponseDatacenterBlockItem{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetLogsSearchFiltersResponseDatacenterBlockItem) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetLogsSearchFiltersResponseDatacenterBlockItem) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_get_logs_search_filters_response_datacenter_block_item_test.go b/services/cdn/model_get_logs_search_filters_response_datacenter_block_item_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_get_logs_search_filters_response_datacenter_block_item_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_get_logs_search_filters_response_datacenter_block_test.go b/services/cdn/model_get_logs_search_filters_response_datacenter_block_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_get_logs_search_filters_response_datacenter_block_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_get_logs_search_filters_response_test.go b/services/cdn/model_get_logs_search_filters_response_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_get_logs_search_filters_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_get_statistics_response.go b/services/cdn/model_get_statistics_response.go deleted file mode 100644 index 537379b90a..0000000000 --- a/services/cdn/model_get_statistics_response.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the GetStatisticsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetStatisticsResponse{} - -/* - types and functions for records -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetStatisticsResponseGetRecordsAttributeType = *[]DistributionStatisticsRecord - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetStatisticsResponseGetRecordsArgType = []DistributionStatisticsRecord - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetStatisticsResponseGetRecordsRetType = []DistributionStatisticsRecord - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetStatisticsResponseGetRecordsAttributeTypeOk(arg GetStatisticsResponseGetRecordsAttributeType) (ret GetStatisticsResponseGetRecordsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetStatisticsResponseGetRecordsAttributeType(arg *GetStatisticsResponseGetRecordsAttributeType, val GetStatisticsResponseGetRecordsRetType) { - *arg = &val -} - -// GetStatisticsResponse struct for GetStatisticsResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetStatisticsResponse struct { - // REQUIRED - Records GetStatisticsResponseGetRecordsAttributeType `json:"records" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _GetStatisticsResponse GetStatisticsResponse - -// NewGetStatisticsResponse instantiates a new GetStatisticsResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetStatisticsResponse(records GetStatisticsResponseGetRecordsArgType) *GetStatisticsResponse { - this := GetStatisticsResponse{} - setGetStatisticsResponseGetRecordsAttributeType(&this.Records, records) - return &this -} - -// NewGetStatisticsResponseWithDefaults instantiates a new GetStatisticsResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewGetStatisticsResponseWithDefaults() *GetStatisticsResponse { - this := GetStatisticsResponse{} - return &this -} - -// GetRecords returns the Records field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetStatisticsResponse) GetRecords() (ret GetStatisticsResponseGetRecordsRetType) { - ret, _ = o.GetRecordsOk() - return ret -} - -// GetRecordsOk returns a tuple with the Records field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetStatisticsResponse) GetRecordsOk() (ret GetStatisticsResponseGetRecordsRetType, ok bool) { - return getGetStatisticsResponseGetRecordsAttributeTypeOk(o.Records) -} - -// SetRecords sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetStatisticsResponse) SetRecords(v GetStatisticsResponseGetRecordsRetType) { - setGetStatisticsResponseGetRecordsAttributeType(&o.Records, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o GetStatisticsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGetStatisticsResponseGetRecordsAttributeTypeOk(o.Records); ok { - toSerialize["Records"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableGetStatisticsResponse struct { - value *GetStatisticsResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetStatisticsResponse) Get() *GetStatisticsResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetStatisticsResponse) Set(val *GetStatisticsResponse) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetStatisticsResponse) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetStatisticsResponse) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableGetStatisticsResponse(val *GetStatisticsResponse) *NullableGetStatisticsResponse { - return &NullableGetStatisticsResponse{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGetStatisticsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGetStatisticsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_get_statistics_response_test.go b/services/cdn/model_get_statistics_response_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_get_statistics_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_http_backend.go b/services/cdn/model_http_backend.go deleted file mode 100644 index beeabce11a..0000000000 --- a/services/cdn/model_http_backend.go +++ /dev/null @@ -1,430 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// checks if the HttpBackend type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HttpBackend{} - -/* - types and functions for geofencing -*/ - -// isContainer -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendGetGeofencingAttributeType = *map[string][]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendGetGeofencingArgType = map[string][]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendGetGeofencingRetType = map[string][]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getHttpBackendGetGeofencingAttributeTypeOk(arg HttpBackendGetGeofencingAttributeType) (ret HttpBackendGetGeofencingRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setHttpBackendGetGeofencingAttributeType(arg *HttpBackendGetGeofencingAttributeType, val HttpBackendGetGeofencingRetType) { - *arg = &val -} - -/* - types and functions for originRequestHeaders -*/ - -// isContainer -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendGetOriginRequestHeadersAttributeType = *map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendGetOriginRequestHeadersArgType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendGetOriginRequestHeadersRetType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getHttpBackendGetOriginRequestHeadersAttributeTypeOk(arg HttpBackendGetOriginRequestHeadersAttributeType) (ret HttpBackendGetOriginRequestHeadersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setHttpBackendGetOriginRequestHeadersAttributeType(arg *HttpBackendGetOriginRequestHeadersAttributeType, val HttpBackendGetOriginRequestHeadersRetType) { - *arg = &val -} - -/* - types and functions for originUrl -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendGetOriginUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getHttpBackendGetOriginUrlAttributeTypeOk(arg HttpBackendGetOriginUrlAttributeType) (ret HttpBackendGetOriginUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setHttpBackendGetOriginUrlAttributeType(arg *HttpBackendGetOriginUrlAttributeType, val HttpBackendGetOriginUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendGetOriginUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendGetOriginUrlRetType = string - -/* - types and functions for type -*/ - -// isEnum - -// HttpBackendTypes Defines the type of content origin. For this schema, it must be set to `http`. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendTypes string - -// List of Type -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - HTTPBACKENDTYPE_HTTP HttpBackendTypes = "http" -) - -// All allowed values of HttpBackend enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedHttpBackendTypesEnumValues = []HttpBackendTypes{ - "http", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *HttpBackendTypes) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson HttpBackendTypes - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := HttpBackendTypes(value) - for _, existing := range AllowedHttpBackendTypesEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid HttpBackend", value) -} - -// NewHttpBackendTypesFromValue returns a pointer to a valid HttpBackendTypes -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewHttpBackendTypesFromValue(v HttpBackendTypes) (*HttpBackendTypes, error) { - ev := HttpBackendTypes(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for HttpBackendTypes: valid values are %v", v, AllowedHttpBackendTypesEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v HttpBackendTypes) IsValid() bool { - for _, existing := range AllowedHttpBackendTypesEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TypeTypes value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v HttpBackendTypes) Ptr() *HttpBackendTypes { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableHttpBackendTypes struct { - value *HttpBackendTypes - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableHttpBackendTypes) Get() *HttpBackendTypes { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableHttpBackendTypes) Set(val *HttpBackendTypes) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableHttpBackendTypes) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableHttpBackendTypes) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableHttpBackendTypes(val *HttpBackendTypes) *NullableHttpBackendTypes { - return &NullableHttpBackendTypes{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableHttpBackendTypes) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableHttpBackendTypes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendGetTypeAttributeType = *HttpBackendTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendGetTypeArgType = HttpBackendTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendGetTypeRetType = HttpBackendTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getHttpBackendGetTypeAttributeTypeOk(arg HttpBackendGetTypeAttributeType) (ret HttpBackendGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setHttpBackendGetTypeAttributeType(arg *HttpBackendGetTypeAttributeType, val HttpBackendGetTypeRetType) { - *arg = &val -} - -// HttpBackend struct for HttpBackend -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackend struct { - // An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You cannot have a country be assigned to multiple alternative origins. - // REQUIRED - Geofencing HttpBackendGetGeofencingAttributeType `json:"geofencing" required:"true"` - // Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text. - // REQUIRED - OriginRequestHeaders HttpBackendGetOriginRequestHeadersAttributeType `json:"originRequestHeaders" required:"true"` - // 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"` - // Defines the type of content origin. For this schema, it must be set to `http`. - // REQUIRED - Type HttpBackendGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _HttpBackend HttpBackend - -// NewHttpBackend instantiates a new HttpBackend 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewHttpBackend(geofencing HttpBackendGetGeofencingArgType, originRequestHeaders HttpBackendGetOriginRequestHeadersArgType, originUrl HttpBackendGetOriginUrlArgType, types HttpBackendGetTypeArgType) *HttpBackend { - this := HttpBackend{} - setHttpBackendGetGeofencingAttributeType(&this.Geofencing, geofencing) - setHttpBackendGetOriginRequestHeadersAttributeType(&this.OriginRequestHeaders, originRequestHeaders) - setHttpBackendGetOriginUrlAttributeType(&this.OriginUrl, originUrl) - setHttpBackendGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewHttpBackendWithDefaults instantiates a new HttpBackend 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewHttpBackendWithDefaults() *HttpBackend { - this := HttpBackend{} - return &this -} - -// GetGeofencing returns the Geofencing field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackend) GetGeofencing() (ret HttpBackendGetGeofencingRetType) { - ret, _ = o.GetGeofencingOk() - return ret -} - -// GetGeofencingOk returns a tuple with the Geofencing field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackend) GetGeofencingOk() (ret HttpBackendGetGeofencingRetType, ok bool) { - return getHttpBackendGetGeofencingAttributeTypeOk(o.Geofencing) -} - -// SetGeofencing sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackend) SetGeofencing(v HttpBackendGetGeofencingRetType) { - setHttpBackendGetGeofencingAttributeType(&o.Geofencing, v) -} - -// GetOriginRequestHeaders returns the OriginRequestHeaders field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackend) GetOriginRequestHeaders() (ret HttpBackendGetOriginRequestHeadersRetType) { - ret, _ = o.GetOriginRequestHeadersOk() - return ret -} - -// GetOriginRequestHeadersOk returns a tuple with the OriginRequestHeaders field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackend) GetOriginRequestHeadersOk() (ret HttpBackendGetOriginRequestHeadersRetType, ok bool) { - return getHttpBackendGetOriginRequestHeadersAttributeTypeOk(o.OriginRequestHeaders) -} - -// SetOriginRequestHeaders sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackend) SetOriginRequestHeaders(v HttpBackendGetOriginRequestHeadersRetType) { - setHttpBackendGetOriginRequestHeadersAttributeType(&o.OriginRequestHeaders, v) -} - -// GetOriginUrl returns the OriginUrl field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackend) GetOriginUrl() (ret HttpBackendGetOriginUrlRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackend) GetOriginUrlOk() (ret HttpBackendGetOriginUrlRetType, ok bool) { - return getHttpBackendGetOriginUrlAttributeTypeOk(o.OriginUrl) -} - -// SetOriginUrl sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackend) SetOriginUrl(v HttpBackendGetOriginUrlRetType) { - setHttpBackendGetOriginUrlAttributeType(&o.OriginUrl, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackend) GetType() (ret HttpBackendGetTypeRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackend) GetTypeOk() (ret HttpBackendGetTypeRetType, ok bool) { - return getHttpBackendGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackend) SetType(v HttpBackendGetTypeRetType) { - setHttpBackendGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o HttpBackend) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getHttpBackendGetGeofencingAttributeTypeOk(o.Geofencing); ok { - toSerialize["Geofencing"] = val - } - if val, ok := getHttpBackendGetOriginRequestHeadersAttributeTypeOk(o.OriginRequestHeaders); ok { - toSerialize["OriginRequestHeaders"] = val - } - if val, ok := getHttpBackendGetOriginUrlAttributeTypeOk(o.OriginUrl); ok { - toSerialize["OriginUrl"] = val - } - if val, ok := getHttpBackendGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableHttpBackend struct { - value *HttpBackend - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableHttpBackend) Get() *HttpBackend { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableHttpBackend) Set(val *HttpBackend) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableHttpBackend) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableHttpBackend) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableHttpBackend(val *HttpBackend) *NullableHttpBackend { - return &NullableHttpBackend{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableHttpBackend) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableHttpBackend) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_http_backend_create.go b/services/cdn/model_http_backend_create.go deleted file mode 100644 index 7b8d198396..0000000000 --- a/services/cdn/model_http_backend_create.go +++ /dev/null @@ -1,440 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// checks if the HttpBackendCreate type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HttpBackendCreate{} - -/* - types and functions for geofencing -*/ - -// isContainer -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendCreateGetGeofencingAttributeType = *map[string][]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendCreateGetGeofencingArgType = map[string][]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendCreateGetGeofencingRetType = map[string][]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getHttpBackendCreateGetGeofencingAttributeTypeOk(arg HttpBackendCreateGetGeofencingAttributeType) (ret HttpBackendCreateGetGeofencingRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setHttpBackendCreateGetGeofencingAttributeType(arg *HttpBackendCreateGetGeofencingAttributeType, val HttpBackendCreateGetGeofencingRetType) { - *arg = &val -} - -/* - types and functions for originRequestHeaders -*/ - -// isContainer -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendCreateGetOriginRequestHeadersAttributeType = *map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendCreateGetOriginRequestHeadersArgType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendCreateGetOriginRequestHeadersRetType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getHttpBackendCreateGetOriginRequestHeadersAttributeTypeOk(arg HttpBackendCreateGetOriginRequestHeadersAttributeType) (ret HttpBackendCreateGetOriginRequestHeadersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setHttpBackendCreateGetOriginRequestHeadersAttributeType(arg *HttpBackendCreateGetOriginRequestHeadersAttributeType, val HttpBackendCreateGetOriginRequestHeadersRetType) { - *arg = &val -} - -/* - types and functions for originUrl -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendCreateGetOriginUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getHttpBackendCreateGetOriginUrlAttributeTypeOk(arg HttpBackendCreateGetOriginUrlAttributeType) (ret HttpBackendCreateGetOriginUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setHttpBackendCreateGetOriginUrlAttributeType(arg *HttpBackendCreateGetOriginUrlAttributeType, val HttpBackendCreateGetOriginUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendCreateGetOriginUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendCreateGetOriginUrlRetType = string - -/* - types and functions for type -*/ - -// isEnum - -// HttpBackendCreateTypes Defines the type of content origin. For this schema, it must be set to `http`. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendCreateTypes string - -// List of Type -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - HTTPBACKENDCREATETYPE_HTTP HttpBackendCreateTypes = "http" -) - -// All allowed values of HttpBackendCreate enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedHttpBackendCreateTypesEnumValues = []HttpBackendCreateTypes{ - "http", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *HttpBackendCreateTypes) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson HttpBackendCreateTypes - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := HttpBackendCreateTypes(value) - for _, existing := range AllowedHttpBackendCreateTypesEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid HttpBackendCreate", value) -} - -// NewHttpBackendCreateTypesFromValue returns a pointer to a valid HttpBackendCreateTypes -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewHttpBackendCreateTypesFromValue(v HttpBackendCreateTypes) (*HttpBackendCreateTypes, error) { - ev := HttpBackendCreateTypes(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for HttpBackendCreateTypes: valid values are %v", v, AllowedHttpBackendCreateTypesEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v HttpBackendCreateTypes) IsValid() bool { - for _, existing := range AllowedHttpBackendCreateTypesEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TypeTypes value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v HttpBackendCreateTypes) Ptr() *HttpBackendCreateTypes { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableHttpBackendCreateTypes struct { - value *HttpBackendCreateTypes - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableHttpBackendCreateTypes) Get() *HttpBackendCreateTypes { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableHttpBackendCreateTypes) Set(val *HttpBackendCreateTypes) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableHttpBackendCreateTypes) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableHttpBackendCreateTypes) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableHttpBackendCreateTypes(val *HttpBackendCreateTypes) *NullableHttpBackendCreateTypes { - return &NullableHttpBackendCreateTypes{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableHttpBackendCreateTypes) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableHttpBackendCreateTypes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendCreateGetTypeAttributeType = *HttpBackendCreateTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendCreateGetTypeArgType = HttpBackendCreateTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendCreateGetTypeRetType = HttpBackendCreateTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getHttpBackendCreateGetTypeAttributeTypeOk(arg HttpBackendCreateGetTypeAttributeType) (ret HttpBackendCreateGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setHttpBackendCreateGetTypeAttributeType(arg *HttpBackendCreateGetTypeAttributeType, val HttpBackendCreateGetTypeRetType) { - *arg = &val -} - -// HttpBackendCreate struct for HttpBackendCreate -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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"` - // Defines the type of content origin. For this schema, it must be set to `http`. - // REQUIRED - Type HttpBackendCreateGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewHttpBackendCreateWithDefaults() *HttpBackendCreate { - this := HttpBackendCreate{} - return &this -} - -// GetGeofencing returns the Geofencing field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendCreate) GetGeofencingOk() (ret HttpBackendCreateGetGeofencingRetType, ok bool) { - return getHttpBackendCreateGetGeofencingAttributeTypeOk(o.Geofencing) -} - -// HasGeofencing returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendCreate) SetGeofencing(v HttpBackendCreateGetGeofencingRetType) { - setHttpBackendCreateGetGeofencingAttributeType(&o.Geofencing, v) -} - -// GetOriginRequestHeaders returns the OriginRequestHeaders field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendCreate) GetOriginRequestHeadersOk() (ret HttpBackendCreateGetOriginRequestHeadersRetType, ok bool) { - return getHttpBackendCreateGetOriginRequestHeadersAttributeTypeOk(o.OriginRequestHeaders) -} - -// HasOriginRequestHeaders returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendCreate) SetOriginRequestHeaders(v HttpBackendCreateGetOriginRequestHeadersRetType) { - setHttpBackendCreateGetOriginRequestHeadersAttributeType(&o.OriginRequestHeaders, v) -} - -// GetOriginUrl returns the OriginUrl field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendCreate) GetOriginUrlOk() (ret HttpBackendCreateGetOriginUrlRetType, ok bool) { - return getHttpBackendCreateGetOriginUrlAttributeTypeOk(o.OriginUrl) -} - -// SetOriginUrl sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendCreate) SetOriginUrl(v HttpBackendCreateGetOriginUrlRetType) { - setHttpBackendCreateGetOriginUrlAttributeType(&o.OriginUrl, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendCreate) GetTypeOk() (ret HttpBackendCreateGetTypeRetType, ok bool) { - return getHttpBackendCreateGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendCreate) SetType(v HttpBackendCreateGetTypeRetType) { - setHttpBackendCreateGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableHttpBackendCreate struct { - value *HttpBackendCreate - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableHttpBackendCreate) Get() *HttpBackendCreate { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableHttpBackendCreate) Set(val *HttpBackendCreate) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableHttpBackendCreate) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableHttpBackendCreate) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableHttpBackendCreate(val *HttpBackendCreate) *NullableHttpBackendCreate { - return &NullableHttpBackendCreate{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableHttpBackendCreate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 deleted file mode 100644 index 39bd56617d..0000000000 --- a/services/cdn/model_http_backend_create_test.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn - -import ( - "testing" -) - -// isEnum - -func TestHttpBackendCreateTypes_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"http"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := HttpBackendCreateTypes("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/cdn/model_http_backend_patch.go b/services/cdn/model_http_backend_patch.go deleted file mode 100644 index 1fceac6ebf..0000000000 --- a/services/cdn/model_http_backend_patch.go +++ /dev/null @@ -1,445 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// checks if the HttpBackendPatch type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HttpBackendPatch{} - -/* - types and functions for geofencing -*/ - -// isContainer -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendPatchGetGeofencingAttributeType = *map[string][]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendPatchGetGeofencingArgType = map[string][]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendPatchGetGeofencingRetType = map[string][]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getHttpBackendPatchGetGeofencingAttributeTypeOk(arg HttpBackendPatchGetGeofencingAttributeType) (ret HttpBackendPatchGetGeofencingRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setHttpBackendPatchGetGeofencingAttributeType(arg *HttpBackendPatchGetGeofencingAttributeType, val HttpBackendPatchGetGeofencingRetType) { - *arg = &val -} - -/* - types and functions for originRequestHeaders -*/ - -// isContainer -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendPatchGetOriginRequestHeadersAttributeType = *map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendPatchGetOriginRequestHeadersArgType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendPatchGetOriginRequestHeadersRetType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getHttpBackendPatchGetOriginRequestHeadersAttributeTypeOk(arg HttpBackendPatchGetOriginRequestHeadersAttributeType) (ret HttpBackendPatchGetOriginRequestHeadersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setHttpBackendPatchGetOriginRequestHeadersAttributeType(arg *HttpBackendPatchGetOriginRequestHeadersAttributeType, val HttpBackendPatchGetOriginRequestHeadersRetType) { - *arg = &val -} - -/* - types and functions for originUrl -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendPatchGetOriginUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getHttpBackendPatchGetOriginUrlAttributeTypeOk(arg HttpBackendPatchGetOriginUrlAttributeType) (ret HttpBackendPatchGetOriginUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setHttpBackendPatchGetOriginUrlAttributeType(arg *HttpBackendPatchGetOriginUrlAttributeType, val HttpBackendPatchGetOriginUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendPatchGetOriginUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendPatchGetOriginUrlRetType = string - -/* - types and functions for type -*/ - -// isEnum - -// HttpBackendPatchTypes Defines the type of content origin. For this schema, it must be set to `http`. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendPatchTypes string - -// List of Type -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - HTTPBACKENDPATCHTYPE_HTTP HttpBackendPatchTypes = "http" -) - -// All allowed values of HttpBackendPatch enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedHttpBackendPatchTypesEnumValues = []HttpBackendPatchTypes{ - "http", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *HttpBackendPatchTypes) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson HttpBackendPatchTypes - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := HttpBackendPatchTypes(value) - for _, existing := range AllowedHttpBackendPatchTypesEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid HttpBackendPatch", value) -} - -// NewHttpBackendPatchTypesFromValue returns a pointer to a valid HttpBackendPatchTypes -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewHttpBackendPatchTypesFromValue(v HttpBackendPatchTypes) (*HttpBackendPatchTypes, error) { - ev := HttpBackendPatchTypes(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for HttpBackendPatchTypes: valid values are %v", v, AllowedHttpBackendPatchTypesEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v HttpBackendPatchTypes) IsValid() bool { - for _, existing := range AllowedHttpBackendPatchTypesEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TypeTypes value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v HttpBackendPatchTypes) Ptr() *HttpBackendPatchTypes { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableHttpBackendPatchTypes struct { - value *HttpBackendPatchTypes - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableHttpBackendPatchTypes) Get() *HttpBackendPatchTypes { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableHttpBackendPatchTypes) Set(val *HttpBackendPatchTypes) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableHttpBackendPatchTypes) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableHttpBackendPatchTypes) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableHttpBackendPatchTypes(val *HttpBackendPatchTypes) *NullableHttpBackendPatchTypes { - return &NullableHttpBackendPatchTypes{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableHttpBackendPatchTypes) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableHttpBackendPatchTypes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendPatchGetTypeAttributeType = *HttpBackendPatchTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendPatchGetTypeArgType = HttpBackendPatchTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendPatchGetTypeRetType = HttpBackendPatchTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getHttpBackendPatchGetTypeAttributeTypeOk(arg HttpBackendPatchGetTypeAttributeType) (ret HttpBackendPatchGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setHttpBackendPatchGetTypeAttributeType(arg *HttpBackendPatchGetTypeAttributeType, val HttpBackendPatchGetTypeRetType) { - *arg = &val -} - -// HttpBackendPatch A partial HTTP Backend -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HttpBackendPatch struct { - // An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You cannot have a country be assigned to multiple alternative origins. - Geofencing HttpBackendPatchGetGeofencingAttributeType `json:"geofencing,omitempty"` - // Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text. - OriginRequestHeaders HttpBackendPatchGetOriginRequestHeadersAttributeType `json:"originRequestHeaders,omitempty"` - // 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` - OriginUrl HttpBackendPatchGetOriginUrlAttributeType `json:"originUrl,omitempty"` - // Defines the type of content origin. For this schema, it must be set to `http`. - // REQUIRED - Type HttpBackendPatchGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _HttpBackendPatch HttpBackendPatch - -// NewHttpBackendPatch instantiates a new HttpBackendPatch 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewHttpBackendPatch(types HttpBackendPatchGetTypeArgType) *HttpBackendPatch { - this := HttpBackendPatch{} - setHttpBackendPatchGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewHttpBackendPatchWithDefaults instantiates a new HttpBackendPatch 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewHttpBackendPatchWithDefaults() *HttpBackendPatch { - this := HttpBackendPatch{} - return &this -} - -// GetGeofencing returns the Geofencing field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendPatch) GetGeofencing() (res HttpBackendPatchGetGeofencingRetType) { - res, _ = o.GetGeofencingOk() - return -} - -// GetGeofencingOk returns a tuple with the Geofencing field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendPatch) GetGeofencingOk() (ret HttpBackendPatchGetGeofencingRetType, ok bool) { - return getHttpBackendPatchGetGeofencingAttributeTypeOk(o.Geofencing) -} - -// HasGeofencing returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendPatch) HasGeofencing() bool { - _, ok := o.GetGeofencingOk() - return ok -} - -// SetGeofencing gets a reference to the given map[string][]string and assigns it to the Geofencing field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendPatch) SetGeofencing(v HttpBackendPatchGetGeofencingRetType) { - setHttpBackendPatchGetGeofencingAttributeType(&o.Geofencing, v) -} - -// GetOriginRequestHeaders returns the OriginRequestHeaders field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendPatch) GetOriginRequestHeaders() (res HttpBackendPatchGetOriginRequestHeadersRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendPatch) GetOriginRequestHeadersOk() (ret HttpBackendPatchGetOriginRequestHeadersRetType, ok bool) { - return getHttpBackendPatchGetOriginRequestHeadersAttributeTypeOk(o.OriginRequestHeaders) -} - -// HasOriginRequestHeaders returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendPatch) HasOriginRequestHeaders() bool { - _, ok := o.GetOriginRequestHeadersOk() - return ok -} - -// SetOriginRequestHeaders gets a reference to the given map[string]string and assigns it to the OriginRequestHeaders field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendPatch) SetOriginRequestHeaders(v HttpBackendPatchGetOriginRequestHeadersRetType) { - setHttpBackendPatchGetOriginRequestHeadersAttributeType(&o.OriginRequestHeaders, v) -} - -// GetOriginUrl returns the OriginUrl field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendPatch) GetOriginUrl() (res HttpBackendPatchGetOriginUrlRetType) { - res, _ = o.GetOriginUrlOk() - return -} - -// GetOriginUrlOk returns a tuple with the OriginUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendPatch) GetOriginUrlOk() (ret HttpBackendPatchGetOriginUrlRetType, ok bool) { - return getHttpBackendPatchGetOriginUrlAttributeTypeOk(o.OriginUrl) -} - -// HasOriginUrl returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendPatch) HasOriginUrl() bool { - _, ok := o.GetOriginUrlOk() - return ok -} - -// SetOriginUrl gets a reference to the given string and assigns it to the OriginUrl field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendPatch) SetOriginUrl(v HttpBackendPatchGetOriginUrlRetType) { - setHttpBackendPatchGetOriginUrlAttributeType(&o.OriginUrl, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendPatch) GetType() (ret HttpBackendPatchGetTypeRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendPatch) GetTypeOk() (ret HttpBackendPatchGetTypeRetType, ok bool) { - return getHttpBackendPatchGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HttpBackendPatch) SetType(v HttpBackendPatchGetTypeRetType) { - setHttpBackendPatchGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o HttpBackendPatch) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getHttpBackendPatchGetGeofencingAttributeTypeOk(o.Geofencing); ok { - toSerialize["Geofencing"] = val - } - if val, ok := getHttpBackendPatchGetOriginRequestHeadersAttributeTypeOk(o.OriginRequestHeaders); ok { - toSerialize["OriginRequestHeaders"] = val - } - if val, ok := getHttpBackendPatchGetOriginUrlAttributeTypeOk(o.OriginUrl); ok { - toSerialize["OriginUrl"] = val - } - if val, ok := getHttpBackendPatchGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableHttpBackendPatch struct { - value *HttpBackendPatch - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableHttpBackendPatch) Get() *HttpBackendPatch { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableHttpBackendPatch) Set(val *HttpBackendPatch) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableHttpBackendPatch) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableHttpBackendPatch) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableHttpBackendPatch(val *HttpBackendPatch) *NullableHttpBackendPatch { - return &NullableHttpBackendPatch{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableHttpBackendPatch) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableHttpBackendPatch) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_http_backend_patch_test.go b/services/cdn/model_http_backend_patch_test.go deleted file mode 100644 index 996af145b9..0000000000 --- a/services/cdn/model_http_backend_patch_test.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn - -import ( - "testing" -) - -// isEnum - -func TestHttpBackendPatchTypes_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"http"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := HttpBackendPatchTypes("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/cdn/model_http_backend_test.go b/services/cdn/model_http_backend_test.go deleted file mode 100644 index f48efbb958..0000000000 --- a/services/cdn/model_http_backend_test.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn - -import ( - "testing" -) - -// isEnum - -func TestHttpBackendTypes_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"http"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := HttpBackendTypes("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/cdn/model_list_distributions_response.go b/services/cdn/model_list_distributions_response.go deleted file mode 100644 index c0da3464a1..0000000000 --- a/services/cdn/model_list_distributions_response.go +++ /dev/null @@ -1,207 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the ListDistributionsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListDistributionsResponse{} - -/* - types and functions for distributions -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListDistributionsResponseGetDistributionsAttributeType = *[]Distribution - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListDistributionsResponseGetDistributionsArgType = []Distribution - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListDistributionsResponseGetDistributionsRetType = []Distribution - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListDistributionsResponseGetDistributionsAttributeTypeOk(arg ListDistributionsResponseGetDistributionsAttributeType) (ret ListDistributionsResponseGetDistributionsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListDistributionsResponseGetDistributionsAttributeType(arg *ListDistributionsResponseGetDistributionsAttributeType, val ListDistributionsResponseGetDistributionsRetType) { - *arg = &val -} - -/* - types and functions for nextPageIdentifier -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListDistributionsResponseGetNextPageIdentifierAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListDistributionsResponseGetNextPageIdentifierAttributeTypeOk(arg ListDistributionsResponseGetNextPageIdentifierAttributeType) (ret ListDistributionsResponseGetNextPageIdentifierRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListDistributionsResponseGetNextPageIdentifierAttributeType(arg *ListDistributionsResponseGetNextPageIdentifierAttributeType, val ListDistributionsResponseGetNextPageIdentifierRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListDistributionsResponseGetNextPageIdentifierArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListDistributionsResponseGetNextPageIdentifierRetType = string - -// ListDistributionsResponse struct for ListDistributionsResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListDistributionsResponse struct { - // REQUIRED - Distributions ListDistributionsResponseGetDistributionsAttributeType `json:"distributions" required:"true"` - NextPageIdentifier ListDistributionsResponseGetNextPageIdentifierAttributeType `json:"nextPageIdentifier,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _ListDistributionsResponse ListDistributionsResponse - -// NewListDistributionsResponse instantiates a new ListDistributionsResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewListDistributionsResponse(distributions ListDistributionsResponseGetDistributionsArgType) *ListDistributionsResponse { - this := ListDistributionsResponse{} - setListDistributionsResponseGetDistributionsAttributeType(&this.Distributions, distributions) - return &this -} - -// NewListDistributionsResponseWithDefaults instantiates a new ListDistributionsResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewListDistributionsResponseWithDefaults() *ListDistributionsResponse { - this := ListDistributionsResponse{} - return &this -} - -// GetDistributions returns the Distributions field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListDistributionsResponse) GetDistributions() (ret ListDistributionsResponseGetDistributionsRetType) { - ret, _ = o.GetDistributionsOk() - return ret -} - -// GetDistributionsOk returns a tuple with the Distributions field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListDistributionsResponse) GetDistributionsOk() (ret ListDistributionsResponseGetDistributionsRetType, ok bool) { - return getListDistributionsResponseGetDistributionsAttributeTypeOk(o.Distributions) -} - -// SetDistributions sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListDistributionsResponse) SetDistributions(v ListDistributionsResponseGetDistributionsRetType) { - setListDistributionsResponseGetDistributionsAttributeType(&o.Distributions, v) -} - -// GetNextPageIdentifier returns the NextPageIdentifier field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListDistributionsResponse) GetNextPageIdentifier() (res ListDistributionsResponseGetNextPageIdentifierRetType) { - res, _ = o.GetNextPageIdentifierOk() - return -} - -// GetNextPageIdentifierOk returns a tuple with the NextPageIdentifier field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListDistributionsResponse) GetNextPageIdentifierOk() (ret ListDistributionsResponseGetNextPageIdentifierRetType, ok bool) { - return getListDistributionsResponseGetNextPageIdentifierAttributeTypeOk(o.NextPageIdentifier) -} - -// HasNextPageIdentifier returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListDistributionsResponse) HasNextPageIdentifier() bool { - _, ok := o.GetNextPageIdentifierOk() - return ok -} - -// SetNextPageIdentifier gets a reference to the given string and assigns it to the NextPageIdentifier field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListDistributionsResponse) SetNextPageIdentifier(v ListDistributionsResponseGetNextPageIdentifierRetType) { - setListDistributionsResponseGetNextPageIdentifierAttributeType(&o.NextPageIdentifier, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ListDistributionsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getListDistributionsResponseGetDistributionsAttributeTypeOk(o.Distributions); ok { - toSerialize["Distributions"] = val - } - if val, ok := getListDistributionsResponseGetNextPageIdentifierAttributeTypeOk(o.NextPageIdentifier); ok { - toSerialize["NextPageIdentifier"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableListDistributionsResponse struct { - value *ListDistributionsResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableListDistributionsResponse) Get() *ListDistributionsResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableListDistributionsResponse) Set(val *ListDistributionsResponse) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableListDistributionsResponse) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableListDistributionsResponse) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableListDistributionsResponse(val *ListDistributionsResponse) *NullableListDistributionsResponse { - return &NullableListDistributionsResponse{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableListDistributionsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableListDistributionsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_list_distributions_response_test.go b/services/cdn/model_list_distributions_response_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_list_distributions_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_list_waf_collections_response.go b/services/cdn/model_list_waf_collections_response.go deleted file mode 100644 index a9be43efbb..0000000000 --- a/services/cdn/model_list_waf_collections_response.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the ListWafCollectionsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListWafCollectionsResponse{} - -/* - types and functions for collections -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListWafCollectionsResponseGetCollectionsAttributeType = *[]WafRuleCollection - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListWafCollectionsResponseGetCollectionsArgType = []WafRuleCollection - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListWafCollectionsResponseGetCollectionsRetType = []WafRuleCollection - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListWafCollectionsResponseGetCollectionsAttributeTypeOk(arg ListWafCollectionsResponseGetCollectionsAttributeType) (ret ListWafCollectionsResponseGetCollectionsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListWafCollectionsResponseGetCollectionsAttributeType(arg *ListWafCollectionsResponseGetCollectionsAttributeType, val ListWafCollectionsResponseGetCollectionsRetType) { - *arg = &val -} - -// ListWafCollectionsResponse struct for ListWafCollectionsResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListWafCollectionsResponse struct { - // REQUIRED - Collections ListWafCollectionsResponseGetCollectionsAttributeType `json:"collections" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _ListWafCollectionsResponse ListWafCollectionsResponse - -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewListWafCollectionsResponse(collections ListWafCollectionsResponseGetCollectionsArgType) *ListWafCollectionsResponse { - this := ListWafCollectionsResponse{} - setListWafCollectionsResponseGetCollectionsAttributeType(&this.Collections, collections) - return &this -} - -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewListWafCollectionsResponseWithDefaults() *ListWafCollectionsResponse { - this := ListWafCollectionsResponse{} - return &this -} - -// GetCollections returns the Collections field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListWafCollectionsResponse) GetCollectionsOk() (ret ListWafCollectionsResponseGetCollectionsRetType, ok bool) { - return getListWafCollectionsResponseGetCollectionsAttributeTypeOk(o.Collections) -} - -// SetCollections sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListWafCollectionsResponse) SetCollections(v ListWafCollectionsResponseGetCollectionsRetType) { - setListWafCollectionsResponseGetCollectionsAttributeType(&o.Collections, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ListWafCollectionsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getListWafCollectionsResponseGetCollectionsAttributeTypeOk(o.Collections); ok { - toSerialize["Collections"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableListWafCollectionsResponse struct { - value *ListWafCollectionsResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableListWafCollectionsResponse) Get() *ListWafCollectionsResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableListWafCollectionsResponse) Set(val *ListWafCollectionsResponse) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableListWafCollectionsResponse) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableListWafCollectionsResponse) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableListWafCollectionsResponse(val *ListWafCollectionsResponse) *NullableListWafCollectionsResponse { - return &NullableListWafCollectionsResponse{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableListWafCollectionsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_list_waf_collections_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_loki_log_sink.go b/services/cdn/model_loki_log_sink.go deleted file mode 100644 index 29e99dd867..0000000000 --- a/services/cdn/model_loki_log_sink.go +++ /dev/null @@ -1,322 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// checks if the LokiLogSink type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LokiLogSink{} - -/* - types and functions for pushUrl -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkGetPushUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLokiLogSinkGetPushUrlAttributeTypeOk(arg LokiLogSinkGetPushUrlAttributeType) (ret LokiLogSinkGetPushUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLokiLogSinkGetPushUrlAttributeType(arg *LokiLogSinkGetPushUrlAttributeType, val LokiLogSinkGetPushUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkGetPushUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkGetPushUrlRetType = string - -/* - types and functions for type -*/ - -// isEnum - -// LokiLogSinkTypes Defines the type of the log sink. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkTypes string - -// List of Type -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LOKILOGSINKTYPE_LOKI LokiLogSinkTypes = "loki" -) - -// All allowed values of LokiLogSink enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedLokiLogSinkTypesEnumValues = []LokiLogSinkTypes{ - "loki", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *LokiLogSinkTypes) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson LokiLogSinkTypes - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := LokiLogSinkTypes(value) - for _, existing := range AllowedLokiLogSinkTypesEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid LokiLogSink", value) -} - -// NewLokiLogSinkTypesFromValue returns a pointer to a valid LokiLogSinkTypes -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewLokiLogSinkTypesFromValue(v LokiLogSinkTypes) (*LokiLogSinkTypes, error) { - ev := LokiLogSinkTypes(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for LokiLogSinkTypes: valid values are %v", v, AllowedLokiLogSinkTypesEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v LokiLogSinkTypes) IsValid() bool { - for _, existing := range AllowedLokiLogSinkTypesEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TypeTypes value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v LokiLogSinkTypes) Ptr() *LokiLogSinkTypes { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableLokiLogSinkTypes struct { - value *LokiLogSinkTypes - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLokiLogSinkTypes) Get() *LokiLogSinkTypes { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLokiLogSinkTypes) Set(val *LokiLogSinkTypes) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLokiLogSinkTypes) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLokiLogSinkTypes) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableLokiLogSinkTypes(val *LokiLogSinkTypes) *NullableLokiLogSinkTypes { - return &NullableLokiLogSinkTypes{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLokiLogSinkTypes) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLokiLogSinkTypes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkGetTypeAttributeType = *LokiLogSinkTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkGetTypeArgType = LokiLogSinkTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkGetTypeRetType = LokiLogSinkTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLokiLogSinkGetTypeAttributeTypeOk(arg LokiLogSinkGetTypeAttributeType) (ret LokiLogSinkGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLokiLogSinkGetTypeAttributeType(arg *LokiLogSinkGetTypeAttributeType, val LokiLogSinkGetTypeRetType) { - *arg = &val -} - -// LokiLogSink struct for LokiLogSink -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSink struct { - // The fully qualified URL where the CDN should push logs to your Loki instance (for example, `https://loki.example.com/loki/api/v1/push`). - // REQUIRED - PushUrl LokiLogSinkGetPushUrlAttributeType `json:"pushUrl" required:"true"` - // Defines the type of the log sink. - // REQUIRED - Type LokiLogSinkGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _LokiLogSink LokiLogSink - -// NewLokiLogSink instantiates a new LokiLogSink 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewLokiLogSink(pushUrl LokiLogSinkGetPushUrlArgType, types LokiLogSinkGetTypeArgType) *LokiLogSink { - this := LokiLogSink{} - setLokiLogSinkGetPushUrlAttributeType(&this.PushUrl, pushUrl) - setLokiLogSinkGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewLokiLogSinkWithDefaults instantiates a new LokiLogSink 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewLokiLogSinkWithDefaults() *LokiLogSink { - this := LokiLogSink{} - return &this -} - -// GetPushUrl returns the PushUrl field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSink) GetPushUrl() (ret LokiLogSinkGetPushUrlRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSink) GetPushUrlOk() (ret LokiLogSinkGetPushUrlRetType, ok bool) { - return getLokiLogSinkGetPushUrlAttributeTypeOk(o.PushUrl) -} - -// SetPushUrl sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSink) SetPushUrl(v LokiLogSinkGetPushUrlRetType) { - setLokiLogSinkGetPushUrlAttributeType(&o.PushUrl, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSink) GetType() (ret LokiLogSinkGetTypeRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSink) GetTypeOk() (ret LokiLogSinkGetTypeRetType, ok bool) { - return getLokiLogSinkGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSink) SetType(v LokiLogSinkGetTypeRetType) { - setLokiLogSinkGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o LokiLogSink) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getLokiLogSinkGetPushUrlAttributeTypeOk(o.PushUrl); ok { - toSerialize["PushUrl"] = val - } - if val, ok := getLokiLogSinkGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableLokiLogSink struct { - value *LokiLogSink - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLokiLogSink) Get() *LokiLogSink { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLokiLogSink) Set(val *LokiLogSink) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLokiLogSink) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLokiLogSink) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableLokiLogSink(val *LokiLogSink) *NullableLokiLogSink { - return &NullableLokiLogSink{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLokiLogSink) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLokiLogSink) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_loki_log_sink_create.go b/services/cdn/model_loki_log_sink_create.go deleted file mode 100644 index 79f755ecd1..0000000000 --- a/services/cdn/model_loki_log_sink_create.go +++ /dev/null @@ -1,375 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// checks if the LokiLogSinkCreate type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LokiLogSinkCreate{} - -/* - types and functions for credentials -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkCreateGetCredentialsAttributeType = *LokiLogSinkCredentials - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkCreateGetCredentialsArgType = LokiLogSinkCredentials - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkCreateGetCredentialsRetType = LokiLogSinkCredentials - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLokiLogSinkCreateGetCredentialsAttributeTypeOk(arg LokiLogSinkCreateGetCredentialsAttributeType) (ret LokiLogSinkCreateGetCredentialsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLokiLogSinkCreateGetCredentialsAttributeType(arg *LokiLogSinkCreateGetCredentialsAttributeType, val LokiLogSinkCreateGetCredentialsRetType) { - *arg = &val -} - -/* - types and functions for pushUrl -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkCreateGetPushUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLokiLogSinkCreateGetPushUrlAttributeTypeOk(arg LokiLogSinkCreateGetPushUrlAttributeType) (ret LokiLogSinkCreateGetPushUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLokiLogSinkCreateGetPushUrlAttributeType(arg *LokiLogSinkCreateGetPushUrlAttributeType, val LokiLogSinkCreateGetPushUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkCreateGetPushUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkCreateGetPushUrlRetType = string - -/* - types and functions for type -*/ - -// isEnum - -// LokiLogSinkCreateTypes Defines the type of the log sink. For Grafana Loki, this must be set to `loki`. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkCreateTypes string - -// List of Type -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LOKILOGSINKCREATETYPE_LOKI LokiLogSinkCreateTypes = "loki" -) - -// All allowed values of LokiLogSinkCreate enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedLokiLogSinkCreateTypesEnumValues = []LokiLogSinkCreateTypes{ - "loki", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *LokiLogSinkCreateTypes) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson LokiLogSinkCreateTypes - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := LokiLogSinkCreateTypes(value) - for _, existing := range AllowedLokiLogSinkCreateTypesEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid LokiLogSinkCreate", value) -} - -// NewLokiLogSinkCreateTypesFromValue returns a pointer to a valid LokiLogSinkCreateTypes -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewLokiLogSinkCreateTypesFromValue(v LokiLogSinkCreateTypes) (*LokiLogSinkCreateTypes, error) { - ev := LokiLogSinkCreateTypes(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for LokiLogSinkCreateTypes: valid values are %v", v, AllowedLokiLogSinkCreateTypesEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v LokiLogSinkCreateTypes) IsValid() bool { - for _, existing := range AllowedLokiLogSinkCreateTypesEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TypeTypes value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v LokiLogSinkCreateTypes) Ptr() *LokiLogSinkCreateTypes { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableLokiLogSinkCreateTypes struct { - value *LokiLogSinkCreateTypes - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLokiLogSinkCreateTypes) Get() *LokiLogSinkCreateTypes { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLokiLogSinkCreateTypes) Set(val *LokiLogSinkCreateTypes) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLokiLogSinkCreateTypes) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLokiLogSinkCreateTypes) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableLokiLogSinkCreateTypes(val *LokiLogSinkCreateTypes) *NullableLokiLogSinkCreateTypes { - return &NullableLokiLogSinkCreateTypes{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLokiLogSinkCreateTypes) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLokiLogSinkCreateTypes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkCreateGetTypeAttributeType = *LokiLogSinkCreateTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkCreateGetTypeArgType = LokiLogSinkCreateTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkCreateGetTypeRetType = LokiLogSinkCreateTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLokiLogSinkCreateGetTypeAttributeTypeOk(arg LokiLogSinkCreateGetTypeAttributeType) (ret LokiLogSinkCreateGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLokiLogSinkCreateGetTypeAttributeType(arg *LokiLogSinkCreateGetTypeAttributeType, val LokiLogSinkCreateGetTypeRetType) { - *arg = &val -} - -// LokiLogSinkCreate struct for LokiLogSinkCreate -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkCreate struct { - // REQUIRED - Credentials LokiLogSinkCreateGetCredentialsAttributeType `json:"credentials" required:"true"` - // The fully qualified URL where the CDN should push logs to your Loki instance (for example, `https://loki.example.com/loki/api/v1/push`). - // REQUIRED - PushUrl LokiLogSinkCreateGetPushUrlAttributeType `json:"pushUrl" required:"true"` - // Defines the type of the log sink. For Grafana Loki, this must be set to `loki`. - // REQUIRED - Type LokiLogSinkCreateGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewLokiLogSinkCreateWithDefaults() *LokiLogSinkCreate { - this := LokiLogSinkCreate{} - return &this -} - -// GetCredentials returns the Credentials field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSinkCreate) GetCredentialsOk() (ret LokiLogSinkCreateGetCredentialsRetType, ok bool) { - return getLokiLogSinkCreateGetCredentialsAttributeTypeOk(o.Credentials) -} - -// SetCredentials sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSinkCreate) SetCredentials(v LokiLogSinkCreateGetCredentialsRetType) { - setLokiLogSinkCreateGetCredentialsAttributeType(&o.Credentials, v) -} - -// GetPushUrl returns the PushUrl field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSinkCreate) GetPushUrlOk() (ret LokiLogSinkCreateGetPushUrlRetType, ok bool) { - return getLokiLogSinkCreateGetPushUrlAttributeTypeOk(o.PushUrl) -} - -// SetPushUrl sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSinkCreate) SetPushUrl(v LokiLogSinkCreateGetPushUrlRetType) { - setLokiLogSinkCreateGetPushUrlAttributeType(&o.PushUrl, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSinkCreate) GetTypeOk() (ret LokiLogSinkCreateGetTypeRetType, ok bool) { - return getLokiLogSinkCreateGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSinkCreate) SetType(v LokiLogSinkCreateGetTypeRetType) { - setLokiLogSinkCreateGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableLokiLogSinkCreate struct { - value *LokiLogSinkCreate - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLokiLogSinkCreate) Get() *LokiLogSinkCreate { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLokiLogSinkCreate) Set(val *LokiLogSinkCreate) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLokiLogSinkCreate) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLokiLogSinkCreate) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableLokiLogSinkCreate(val *LokiLogSinkCreate) *NullableLokiLogSinkCreate { - return &NullableLokiLogSinkCreate{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLokiLogSinkCreate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 deleted file mode 100644 index e286f9a85c..0000000000 --- a/services/cdn/model_loki_log_sink_create_test.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn - -import ( - "testing" -) - -// isEnum - -func TestLokiLogSinkCreateTypes_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"loki"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := LokiLogSinkCreateTypes("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/cdn/model_loki_log_sink_credentials.go b/services/cdn/model_loki_log_sink_credentials.go deleted file mode 100644 index 8fffce13e6..0000000000 --- a/services/cdn/model_loki_log_sink_credentials.go +++ /dev/null @@ -1,204 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkCredentialsGetPasswordAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLokiLogSinkCredentialsGetPasswordAttributeTypeOk(arg LokiLogSinkCredentialsGetPasswordAttributeType) (ret LokiLogSinkCredentialsGetPasswordRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLokiLogSinkCredentialsGetPasswordAttributeType(arg *LokiLogSinkCredentialsGetPasswordAttributeType, val LokiLogSinkCredentialsGetPasswordRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkCredentialsGetPasswordArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkCredentialsGetPasswordRetType = string - -/* - types and functions for username -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkCredentialsGetUsernameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLokiLogSinkCredentialsGetUsernameAttributeTypeOk(arg LokiLogSinkCredentialsGetUsernameAttributeType) (ret LokiLogSinkCredentialsGetUsernameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLokiLogSinkCredentialsGetUsernameAttributeType(arg *LokiLogSinkCredentialsGetUsernameAttributeType, val LokiLogSinkCredentialsGetUsernameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkCredentialsGetUsernameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkCredentialsGetUsernameRetType = string - -// LokiLogSinkCredentials The authentication credentials required for the CDN to push logs to your Loki instance. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkCredentials struct { - // The password corresponding to your username. - // REQUIRED - Password LokiLogSinkCredentialsGetPasswordAttributeType `json:"password" required:"true"` - // The username used to authenticate against your Loki instance. - // REQUIRED - Username LokiLogSinkCredentialsGetUsernameAttributeType `json:"username" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewLokiLogSinkCredentialsWithDefaults() *LokiLogSinkCredentials { - this := LokiLogSinkCredentials{} - return &this -} - -// GetPassword returns the Password field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSinkCredentials) GetPasswordOk() (ret LokiLogSinkCredentialsGetPasswordRetType, ok bool) { - return getLokiLogSinkCredentialsGetPasswordAttributeTypeOk(o.Password) -} - -// SetPassword sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSinkCredentials) SetPassword(v LokiLogSinkCredentialsGetPasswordRetType) { - setLokiLogSinkCredentialsGetPasswordAttributeType(&o.Password, v) -} - -// GetUsername returns the Username field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSinkCredentials) GetUsernameOk() (ret LokiLogSinkCredentialsGetUsernameRetType, ok bool) { - return getLokiLogSinkCredentialsGetUsernameAttributeTypeOk(o.Username) -} - -// SetUsername sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSinkCredentials) SetUsername(v LokiLogSinkCredentialsGetUsernameRetType) { - setLokiLogSinkCredentialsGetUsernameAttributeType(&o.Username, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableLokiLogSinkCredentials struct { - value *LokiLogSinkCredentials - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLokiLogSinkCredentials) Get() *LokiLogSinkCredentials { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLokiLogSinkCredentials) Set(val *LokiLogSinkCredentials) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLokiLogSinkCredentials) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLokiLogSinkCredentials) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableLokiLogSinkCredentials(val *LokiLogSinkCredentials) *NullableLokiLogSinkCredentials { - return &NullableLokiLogSinkCredentials{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLokiLogSinkCredentials) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_loki_log_sink_credentials_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_loki_log_sink_patch.go b/services/cdn/model_loki_log_sink_patch.go deleted file mode 100644 index 9366792e71..0000000000 --- a/services/cdn/model_loki_log_sink_patch.go +++ /dev/null @@ -1,385 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// checks if the LokiLogSinkPatch type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LokiLogSinkPatch{} - -/* - types and functions for credentials -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkPatchGetCredentialsAttributeType = *LokiLogSinkCredentials - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkPatchGetCredentialsArgType = LokiLogSinkCredentials - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkPatchGetCredentialsRetType = LokiLogSinkCredentials - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLokiLogSinkPatchGetCredentialsAttributeTypeOk(arg LokiLogSinkPatchGetCredentialsAttributeType) (ret LokiLogSinkPatchGetCredentialsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLokiLogSinkPatchGetCredentialsAttributeType(arg *LokiLogSinkPatchGetCredentialsAttributeType, val LokiLogSinkPatchGetCredentialsRetType) { - *arg = &val -} - -/* - types and functions for pushUrl -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkPatchGetPushUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLokiLogSinkPatchGetPushUrlAttributeTypeOk(arg LokiLogSinkPatchGetPushUrlAttributeType) (ret LokiLogSinkPatchGetPushUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLokiLogSinkPatchGetPushUrlAttributeType(arg *LokiLogSinkPatchGetPushUrlAttributeType, val LokiLogSinkPatchGetPushUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkPatchGetPushUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkPatchGetPushUrlRetType = string - -/* - types and functions for type -*/ - -// isEnum - -// LokiLogSinkPatchTypes Defines the type of the log sink. For Grafana Loki, this must be set to `loki`. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkPatchTypes string - -// List of Type -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - LOKILOGSINKPATCHTYPE_LOKI LokiLogSinkPatchTypes = "loki" -) - -// All allowed values of LokiLogSinkPatch enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedLokiLogSinkPatchTypesEnumValues = []LokiLogSinkPatchTypes{ - "loki", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *LokiLogSinkPatchTypes) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson LokiLogSinkPatchTypes - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := LokiLogSinkPatchTypes(value) - for _, existing := range AllowedLokiLogSinkPatchTypesEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid LokiLogSinkPatch", value) -} - -// NewLokiLogSinkPatchTypesFromValue returns a pointer to a valid LokiLogSinkPatchTypes -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewLokiLogSinkPatchTypesFromValue(v LokiLogSinkPatchTypes) (*LokiLogSinkPatchTypes, error) { - ev := LokiLogSinkPatchTypes(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for LokiLogSinkPatchTypes: valid values are %v", v, AllowedLokiLogSinkPatchTypesEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v LokiLogSinkPatchTypes) IsValid() bool { - for _, existing := range AllowedLokiLogSinkPatchTypesEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TypeTypes value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v LokiLogSinkPatchTypes) Ptr() *LokiLogSinkPatchTypes { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableLokiLogSinkPatchTypes struct { - value *LokiLogSinkPatchTypes - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLokiLogSinkPatchTypes) Get() *LokiLogSinkPatchTypes { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLokiLogSinkPatchTypes) Set(val *LokiLogSinkPatchTypes) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLokiLogSinkPatchTypes) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLokiLogSinkPatchTypes) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableLokiLogSinkPatchTypes(val *LokiLogSinkPatchTypes) *NullableLokiLogSinkPatchTypes { - return &NullableLokiLogSinkPatchTypes{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLokiLogSinkPatchTypes) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLokiLogSinkPatchTypes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkPatchGetTypeAttributeType = *LokiLogSinkPatchTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkPatchGetTypeArgType = LokiLogSinkPatchTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkPatchGetTypeRetType = LokiLogSinkPatchTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getLokiLogSinkPatchGetTypeAttributeTypeOk(arg LokiLogSinkPatchGetTypeAttributeType) (ret LokiLogSinkPatchGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setLokiLogSinkPatchGetTypeAttributeType(arg *LokiLogSinkPatchGetTypeAttributeType, val LokiLogSinkPatchGetTypeRetType) { - *arg = &val -} - -// LokiLogSinkPatch struct for LokiLogSinkPatch -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type LokiLogSinkPatch struct { - Credentials LokiLogSinkPatchGetCredentialsAttributeType `json:"credentials,omitempty"` - // The fully qualified URL where the CDN should push logs to your Loki instance (for example, `https://loki.example.com/loki/api/v1/push`). - PushUrl LokiLogSinkPatchGetPushUrlAttributeType `json:"pushUrl,omitempty"` - // Defines the type of the log sink. For Grafana Loki, this must be set to `loki`. - // REQUIRED - Type LokiLogSinkPatchGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewLokiLogSinkPatchWithDefaults() *LokiLogSinkPatch { - this := LokiLogSinkPatch{} - return &this -} - -// GetCredentials returns the Credentials field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSinkPatch) GetCredentialsOk() (ret LokiLogSinkPatchGetCredentialsRetType, ok bool) { - return getLokiLogSinkPatchGetCredentialsAttributeTypeOk(o.Credentials) -} - -// HasCredentials returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSinkPatch) SetCredentials(v LokiLogSinkPatchGetCredentialsRetType) { - setLokiLogSinkPatchGetCredentialsAttributeType(&o.Credentials, v) -} - -// GetPushUrl returns the PushUrl field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSinkPatch) GetPushUrlOk() (ret LokiLogSinkPatchGetPushUrlRetType, ok bool) { - return getLokiLogSinkPatchGetPushUrlAttributeTypeOk(o.PushUrl) -} - -// HasPushUrl returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSinkPatch) SetPushUrl(v LokiLogSinkPatchGetPushUrlRetType) { - setLokiLogSinkPatchGetPushUrlAttributeType(&o.PushUrl, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSinkPatch) GetTypeOk() (ret LokiLogSinkPatchGetTypeRetType, ok bool) { - return getLokiLogSinkPatchGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *LokiLogSinkPatch) SetType(v LokiLogSinkPatchGetTypeRetType) { - setLokiLogSinkPatchGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableLokiLogSinkPatch struct { - value *LokiLogSinkPatch - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLokiLogSinkPatch) Get() *LokiLogSinkPatch { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLokiLogSinkPatch) Set(val *LokiLogSinkPatch) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLokiLogSinkPatch) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableLokiLogSinkPatch) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableLokiLogSinkPatch(val *LokiLogSinkPatch) *NullableLokiLogSinkPatch { - return &NullableLokiLogSinkPatch{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableLokiLogSinkPatch) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 deleted file mode 100644 index e0c80e0dd2..0000000000 --- a/services/cdn/model_loki_log_sink_patch_test.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn - -import ( - "testing" -) - -// isEnum - -func TestLokiLogSinkPatchTypes_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"loki"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := LokiLogSinkPatchTypes("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/cdn/model_loki_log_sink_test.go b/services/cdn/model_loki_log_sink_test.go deleted file mode 100644 index 3c65f3e29a..0000000000 --- a/services/cdn/model_loki_log_sink_test.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn - -import ( - "testing" -) - -// isEnum - -func TestLokiLogSinkTypes_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"loki"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := LokiLogSinkTypes("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/cdn/model_match_condition.go b/services/cdn/model_match_condition.go deleted file mode 100644 index 951c78d011..0000000000 --- a/services/cdn/model_match_condition.go +++ /dev/null @@ -1,135 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// MatchCondition Defines how multiple matchers within this rule are combined (ALL, ANY, NONE). Defaults to ANY. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MatchCondition string - -// List of MatchCondition -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - MATCHCONDITION_ANY MatchCondition = "ANY" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - MATCHCONDITION_ALL MatchCondition = "ALL" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - MATCHCONDITION_NONE MatchCondition = "NONE" -) - -// All allowed values of MatchCondition enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedMatchConditionEnumValues = []MatchCondition{ - "ANY", - "ALL", - "NONE", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *MatchCondition) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue string - if value == zeroValue { - return nil - } - enumTypeValue := MatchCondition(value) - for _, existing := range AllowedMatchConditionEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid MatchCondition", value) -} - -// NewMatchConditionFromValue returns a pointer to a valid MatchCondition -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewMatchConditionFromValue(v string) (*MatchCondition, error) { - ev := MatchCondition(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for MatchCondition: valid values are %v", v, AllowedMatchConditionEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v MatchCondition) IsValid() bool { - for _, existing := range AllowedMatchConditionEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to MatchCondition value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v MatchCondition) Ptr() *MatchCondition { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableMatchCondition struct { - value *MatchCondition - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableMatchCondition) Get() *MatchCondition { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableMatchCondition) Set(val *MatchCondition) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableMatchCondition) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableMatchCondition) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableMatchCondition(val *MatchCondition) *NullableMatchCondition { - return &NullableMatchCondition{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableMatchCondition) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableMatchCondition) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_match_condition_test.go b/services/cdn/model_match_condition_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_match_condition_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_matcher.go b/services/cdn/model_matcher.go deleted file mode 100644 index 1bfec995f2..0000000000 --- a/services/cdn/model_matcher.go +++ /dev/null @@ -1,210 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the Matcher type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Matcher{} - -/* - types and functions for valueMatchCondition -*/ - -// isEnumRef -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MatcherGetValueMatchConditionAttributeType = *MatchCondition - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MatcherGetValueMatchConditionArgType = MatchCondition - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MatcherGetValueMatchConditionRetType = MatchCondition - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getMatcherGetValueMatchConditionAttributeTypeOk(arg MatcherGetValueMatchConditionAttributeType) (ret MatcherGetValueMatchConditionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setMatcherGetValueMatchConditionAttributeType(arg *MatcherGetValueMatchConditionAttributeType, val MatcherGetValueMatchConditionRetType) { - *arg = &val -} - -/* - types and functions for values -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MatcherGetValuesAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MatcherGetValuesArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MatcherGetValuesRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getMatcherGetValuesAttributeTypeOk(arg MatcherGetValuesAttributeType) (ret MatcherGetValuesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setMatcherGetValuesAttributeType(arg *MatcherGetValuesAttributeType, val MatcherGetValuesRetType) { - *arg = &val -} - -// Matcher A matcher containing a list of string values to compare against the request path. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Matcher struct { - ValueMatchCondition MatcherGetValueMatchConditionAttributeType `json:"valueMatchCondition,omitempty"` - // A list of glob patterns to match against the request path. At least one value is required. Examples: \"/shop/_*\" or \"*_/img/_*\" - // REQUIRED - Values MatcherGetValuesAttributeType `json:"values" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _Matcher Matcher - -// NewMatcher instantiates a new Matcher 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewMatcher(values MatcherGetValuesArgType) *Matcher { - this := Matcher{} - setMatcherGetValuesAttributeType(&this.Values, values) - return &this -} - -// NewMatcherWithDefaults instantiates a new Matcher 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewMatcherWithDefaults() *Matcher { - this := Matcher{} - var valueMatchCondition MatchCondition = MATCHCONDITION_ANY - this.ValueMatchCondition = &valueMatchCondition - return &this -} - -// GetValueMatchCondition returns the ValueMatchCondition field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Matcher) GetValueMatchCondition() (res MatcherGetValueMatchConditionRetType) { - res, _ = o.GetValueMatchConditionOk() - return -} - -// GetValueMatchConditionOk returns a tuple with the ValueMatchCondition field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Matcher) GetValueMatchConditionOk() (ret MatcherGetValueMatchConditionRetType, ok bool) { - return getMatcherGetValueMatchConditionAttributeTypeOk(o.ValueMatchCondition) -} - -// HasValueMatchCondition returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Matcher) HasValueMatchCondition() bool { - _, ok := o.GetValueMatchConditionOk() - return ok -} - -// SetValueMatchCondition gets a reference to the given MatchCondition and assigns it to the ValueMatchCondition field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Matcher) SetValueMatchCondition(v MatcherGetValueMatchConditionRetType) { - setMatcherGetValueMatchConditionAttributeType(&o.ValueMatchCondition, v) -} - -// GetValues returns the Values field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Matcher) GetValues() (ret MatcherGetValuesRetType) { - ret, _ = o.GetValuesOk() - return ret -} - -// GetValuesOk returns a tuple with the Values field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Matcher) GetValuesOk() (ret MatcherGetValuesRetType, ok bool) { - return getMatcherGetValuesAttributeTypeOk(o.Values) -} - -// SetValues sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Matcher) SetValues(v MatcherGetValuesRetType) { - setMatcherGetValuesAttributeType(&o.Values, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Matcher) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getMatcherGetValueMatchConditionAttributeTypeOk(o.ValueMatchCondition); ok { - toSerialize["ValueMatchCondition"] = val - } - if val, ok := getMatcherGetValuesAttributeTypeOk(o.Values); ok { - toSerialize["Values"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableMatcher struct { - value *Matcher - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableMatcher) Get() *Matcher { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableMatcher) Set(val *Matcher) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableMatcher) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableMatcher) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableMatcher(val *Matcher) *NullableMatcher { - return &NullableMatcher{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableMatcher) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableMatcher) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_matcher_test.go b/services/cdn/model_matcher_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_matcher_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_optimizer.go b/services/cdn/model_optimizer.go deleted file mode 100644 index f9bf0ec749..0000000000 --- a/services/cdn/model_optimizer.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the Optimizer type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Optimizer{} - -/* - types and functions for enabled -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OptimizergetEnabledAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OptimizergetEnabledArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OptimizergetEnabledRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getOptimizergetEnabledAttributeTypeOk(arg OptimizergetEnabledAttributeType) (ret OptimizergetEnabledRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setOptimizergetEnabledAttributeType(arg *OptimizergetEnabledAttributeType, val OptimizergetEnabledRetType) { - *arg = &val -} - -// Optimizer Optimizer is paid feature, a real-time on the fly image manipulation and optimization service that automatically optimizes your images for faster image delivery. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Optimizer struct { - // Determines if the optimizer should be enabled for this distribution and incurs a monthly fee - // REQUIRED - Enabled OptimizergetEnabledAttributeType `json:"enabled" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _Optimizer Optimizer - -// NewOptimizer instantiates a new Optimizer 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewOptimizer(enabled OptimizergetEnabledArgType) *Optimizer { - this := Optimizer{} - setOptimizergetEnabledAttributeType(&this.Enabled, enabled) - return &this -} - -// NewOptimizerWithDefaults instantiates a new Optimizer 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewOptimizerWithDefaults() *Optimizer { - this := Optimizer{} - return &this -} - -// GetEnabled returns the Enabled field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Optimizer) GetEnabled() (ret OptimizergetEnabledRetType) { - ret, _ = o.GetEnabledOk() - return ret -} - -// GetEnabledOk returns a tuple with the Enabled field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Optimizer) GetEnabledOk() (ret OptimizergetEnabledRetType, ok bool) { - return getOptimizergetEnabledAttributeTypeOk(o.Enabled) -} - -// SetEnabled sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Optimizer) SetEnabled(v OptimizergetEnabledRetType) { - setOptimizergetEnabledAttributeType(&o.Enabled, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Optimizer) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getOptimizergetEnabledAttributeTypeOk(o.Enabled); ok { - toSerialize["Enabled"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableOptimizer struct { - value *Optimizer - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOptimizer) Get() *Optimizer { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOptimizer) Set(val *Optimizer) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOptimizer) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOptimizer) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableOptimizer(val *Optimizer) *NullableOptimizer { - return &NullableOptimizer{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOptimizer) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOptimizer) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_optimizer_patch.go b/services/cdn/model_optimizer_patch.go deleted file mode 100644 index c15bdd4a56..0000000000 --- a/services/cdn/model_optimizer_patch.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the OptimizerPatch type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &OptimizerPatch{} - -/* - types and functions for enabled -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OptimizerPatchgetEnabledAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OptimizerPatchgetEnabledArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OptimizerPatchgetEnabledRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getOptimizerPatchgetEnabledAttributeTypeOk(arg OptimizerPatchgetEnabledAttributeType) (ret OptimizerPatchgetEnabledRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setOptimizerPatchgetEnabledAttributeType(arg *OptimizerPatchgetEnabledAttributeType, val OptimizerPatchgetEnabledRetType) { - *arg = &val -} - -// OptimizerPatch struct for OptimizerPatch -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OptimizerPatch struct { - Enabled OptimizerPatchgetEnabledAttributeType `json:"enabled,omitempty"` -} - -// NewOptimizerPatch instantiates a new OptimizerPatch 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewOptimizerPatch() *OptimizerPatch { - this := OptimizerPatch{} - return &this -} - -// NewOptimizerPatchWithDefaults instantiates a new OptimizerPatch 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewOptimizerPatchWithDefaults() *OptimizerPatch { - this := OptimizerPatch{} - return &this -} - -// GetEnabled returns the Enabled field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OptimizerPatch) GetEnabled() (res OptimizerPatchgetEnabledRetType) { - res, _ = o.GetEnabledOk() - return -} - -// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OptimizerPatch) GetEnabledOk() (ret OptimizerPatchgetEnabledRetType, ok bool) { - return getOptimizerPatchgetEnabledAttributeTypeOk(o.Enabled) -} - -// HasEnabled returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OptimizerPatch) HasEnabled() bool { - _, ok := o.GetEnabledOk() - return ok -} - -// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OptimizerPatch) SetEnabled(v OptimizerPatchgetEnabledRetType) { - setOptimizerPatchgetEnabledAttributeType(&o.Enabled, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o OptimizerPatch) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getOptimizerPatchgetEnabledAttributeTypeOk(o.Enabled); ok { - toSerialize["Enabled"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableOptimizerPatch struct { - value *OptimizerPatch - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOptimizerPatch) Get() *OptimizerPatch { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOptimizerPatch) Set(val *OptimizerPatch) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOptimizerPatch) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOptimizerPatch) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableOptimizerPatch(val *OptimizerPatch) *NullableOptimizerPatch { - return &NullableOptimizerPatch{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOptimizerPatch) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOptimizerPatch) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_optimizer_patch_test.go b/services/cdn/model_optimizer_patch_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_optimizer_patch_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_optimizer_test.go b/services/cdn/model_optimizer_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_optimizer_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_otlp_log_sink.go b/services/cdn/model_otlp_log_sink.go deleted file mode 100644 index eb2a9c256d..0000000000 --- a/services/cdn/model_otlp_log_sink.go +++ /dev/null @@ -1,322 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// checks if the OtlpLogSink type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &OtlpLogSink{} - -/* - types and functions for pushUrl -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkGetPushUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getOtlpLogSinkGetPushUrlAttributeTypeOk(arg OtlpLogSinkGetPushUrlAttributeType) (ret OtlpLogSinkGetPushUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setOtlpLogSinkGetPushUrlAttributeType(arg *OtlpLogSinkGetPushUrlAttributeType, val OtlpLogSinkGetPushUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkGetPushUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkGetPushUrlRetType = string - -/* - types and functions for type -*/ - -// isEnum - -// OtlpLogSinkTypes Defines the type of the log sink. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkTypes string - -// List of Type -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - OTLPLOGSINKTYPE_OTLP OtlpLogSinkTypes = "otlp" -) - -// All allowed values of OtlpLogSink enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedOtlpLogSinkTypesEnumValues = []OtlpLogSinkTypes{ - "otlp", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *OtlpLogSinkTypes) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson OtlpLogSinkTypes - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := OtlpLogSinkTypes(value) - for _, existing := range AllowedOtlpLogSinkTypesEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid OtlpLogSink", value) -} - -// NewOtlpLogSinkTypesFromValue returns a pointer to a valid OtlpLogSinkTypes -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewOtlpLogSinkTypesFromValue(v OtlpLogSinkTypes) (*OtlpLogSinkTypes, error) { - ev := OtlpLogSinkTypes(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for OtlpLogSinkTypes: valid values are %v", v, AllowedOtlpLogSinkTypesEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v OtlpLogSinkTypes) IsValid() bool { - for _, existing := range AllowedOtlpLogSinkTypesEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TypeTypes value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v OtlpLogSinkTypes) Ptr() *OtlpLogSinkTypes { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableOtlpLogSinkTypes struct { - value *OtlpLogSinkTypes - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkTypes) Get() *OtlpLogSinkTypes { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkTypes) Set(val *OtlpLogSinkTypes) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkTypes) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkTypes) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableOtlpLogSinkTypes(val *OtlpLogSinkTypes) *NullableOtlpLogSinkTypes { - return &NullableOtlpLogSinkTypes{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkTypes) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkTypes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkGetTypeAttributeType = *OtlpLogSinkTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkGetTypeArgType = OtlpLogSinkTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkGetTypeRetType = OtlpLogSinkTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getOtlpLogSinkGetTypeAttributeTypeOk(arg OtlpLogSinkGetTypeAttributeType) (ret OtlpLogSinkGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setOtlpLogSinkGetTypeAttributeType(arg *OtlpLogSinkGetTypeAttributeType, val OtlpLogSinkGetTypeRetType) { - *arg = &val -} - -// OtlpLogSink struct for OtlpLogSink -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSink struct { - // The fully qualified URL where the CDN should push logs to your OTLP endpoint (for example, `https://otlp.example.com/otlp/v1/logs`). - // REQUIRED - PushUrl OtlpLogSinkGetPushUrlAttributeType `json:"pushUrl" required:"true"` - // Defines the type of the log sink. - // REQUIRED - Type OtlpLogSinkGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _OtlpLogSink OtlpLogSink - -// NewOtlpLogSink instantiates a new OtlpLogSink 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewOtlpLogSink(pushUrl OtlpLogSinkGetPushUrlArgType, types OtlpLogSinkGetTypeArgType) *OtlpLogSink { - this := OtlpLogSink{} - setOtlpLogSinkGetPushUrlAttributeType(&this.PushUrl, pushUrl) - setOtlpLogSinkGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewOtlpLogSinkWithDefaults instantiates a new OtlpLogSink 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewOtlpLogSinkWithDefaults() *OtlpLogSink { - this := OtlpLogSink{} - return &this -} - -// GetPushUrl returns the PushUrl field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSink) GetPushUrl() (ret OtlpLogSinkGetPushUrlRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSink) GetPushUrlOk() (ret OtlpLogSinkGetPushUrlRetType, ok bool) { - return getOtlpLogSinkGetPushUrlAttributeTypeOk(o.PushUrl) -} - -// SetPushUrl sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSink) SetPushUrl(v OtlpLogSinkGetPushUrlRetType) { - setOtlpLogSinkGetPushUrlAttributeType(&o.PushUrl, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSink) GetType() (ret OtlpLogSinkGetTypeRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSink) GetTypeOk() (ret OtlpLogSinkGetTypeRetType, ok bool) { - return getOtlpLogSinkGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSink) SetType(v OtlpLogSinkGetTypeRetType) { - setOtlpLogSinkGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o OtlpLogSink) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getOtlpLogSinkGetPushUrlAttributeTypeOk(o.PushUrl); ok { - toSerialize["PushUrl"] = val - } - if val, ok := getOtlpLogSinkGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableOtlpLogSink struct { - value *OtlpLogSink - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSink) Get() *OtlpLogSink { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSink) Set(val *OtlpLogSink) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSink) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSink) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableOtlpLogSink(val *OtlpLogSink) *NullableOtlpLogSink { - return &NullableOtlpLogSink{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSink) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSink) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_otlp_log_sink_basic_credentials.go b/services/cdn/model_otlp_log_sink_basic_credentials.go deleted file mode 100644 index 372a0a0743..0000000000 --- a/services/cdn/model_otlp_log_sink_basic_credentials.go +++ /dev/null @@ -1,376 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// checks if the OtlpLogSinkBasicCredentials type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &OtlpLogSinkBasicCredentials{} - -/* - types and functions for password -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkBasicCredentialsGetPasswordAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getOtlpLogSinkBasicCredentialsGetPasswordAttributeTypeOk(arg OtlpLogSinkBasicCredentialsGetPasswordAttributeType) (ret OtlpLogSinkBasicCredentialsGetPasswordRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setOtlpLogSinkBasicCredentialsGetPasswordAttributeType(arg *OtlpLogSinkBasicCredentialsGetPasswordAttributeType, val OtlpLogSinkBasicCredentialsGetPasswordRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkBasicCredentialsGetPasswordArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkBasicCredentialsGetPasswordRetType = string - -/* - types and functions for type -*/ - -// isEnum - -// OtlpLogSinkBasicCredentialsTypes Defines basic authentication. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkBasicCredentialsTypes string - -// List of Type -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - OTLPLOGSINKBASICCREDENTIALSTYPE_BASIC OtlpLogSinkBasicCredentialsTypes = "basic" -) - -// All allowed values of OtlpLogSinkBasicCredentials enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedOtlpLogSinkBasicCredentialsTypesEnumValues = []OtlpLogSinkBasicCredentialsTypes{ - "basic", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *OtlpLogSinkBasicCredentialsTypes) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson OtlpLogSinkBasicCredentialsTypes - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := OtlpLogSinkBasicCredentialsTypes(value) - for _, existing := range AllowedOtlpLogSinkBasicCredentialsTypesEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid OtlpLogSinkBasicCredentials", value) -} - -// NewOtlpLogSinkBasicCredentialsTypesFromValue returns a pointer to a valid OtlpLogSinkBasicCredentialsTypes -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewOtlpLogSinkBasicCredentialsTypesFromValue(v OtlpLogSinkBasicCredentialsTypes) (*OtlpLogSinkBasicCredentialsTypes, error) { - ev := OtlpLogSinkBasicCredentialsTypes(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for OtlpLogSinkBasicCredentialsTypes: valid values are %v", v, AllowedOtlpLogSinkBasicCredentialsTypesEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v OtlpLogSinkBasicCredentialsTypes) IsValid() bool { - for _, existing := range AllowedOtlpLogSinkBasicCredentialsTypesEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TypeTypes value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v OtlpLogSinkBasicCredentialsTypes) Ptr() *OtlpLogSinkBasicCredentialsTypes { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableOtlpLogSinkBasicCredentialsTypes struct { - value *OtlpLogSinkBasicCredentialsTypes - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkBasicCredentialsTypes) Get() *OtlpLogSinkBasicCredentialsTypes { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkBasicCredentialsTypes) Set(val *OtlpLogSinkBasicCredentialsTypes) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkBasicCredentialsTypes) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkBasicCredentialsTypes) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableOtlpLogSinkBasicCredentialsTypes(val *OtlpLogSinkBasicCredentialsTypes) *NullableOtlpLogSinkBasicCredentialsTypes { - return &NullableOtlpLogSinkBasicCredentialsTypes{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkBasicCredentialsTypes) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkBasicCredentialsTypes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkBasicCredentialsGetTypeAttributeType = *OtlpLogSinkBasicCredentialsTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkBasicCredentialsGetTypeArgType = OtlpLogSinkBasicCredentialsTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkBasicCredentialsGetTypeRetType = OtlpLogSinkBasicCredentialsTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getOtlpLogSinkBasicCredentialsGetTypeAttributeTypeOk(arg OtlpLogSinkBasicCredentialsGetTypeAttributeType) (ret OtlpLogSinkBasicCredentialsGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setOtlpLogSinkBasicCredentialsGetTypeAttributeType(arg *OtlpLogSinkBasicCredentialsGetTypeAttributeType, val OtlpLogSinkBasicCredentialsGetTypeRetType) { - *arg = &val -} - -/* - types and functions for username -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkBasicCredentialsGetUsernameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getOtlpLogSinkBasicCredentialsGetUsernameAttributeTypeOk(arg OtlpLogSinkBasicCredentialsGetUsernameAttributeType) (ret OtlpLogSinkBasicCredentialsGetUsernameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setOtlpLogSinkBasicCredentialsGetUsernameAttributeType(arg *OtlpLogSinkBasicCredentialsGetUsernameAttributeType, val OtlpLogSinkBasicCredentialsGetUsernameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkBasicCredentialsGetUsernameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkBasicCredentialsGetUsernameRetType = string - -// OtlpLogSinkBasicCredentials Basic authentication credentials for OTLP. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkBasicCredentials struct { - // The password corresponding to your username. - // REQUIRED - Password OtlpLogSinkBasicCredentialsGetPasswordAttributeType `json:"password" required:"true"` - // Defines basic authentication. - // REQUIRED - Type OtlpLogSinkBasicCredentialsGetTypeAttributeType `json:"type" required:"true"` - // The username used to authenticate against your OTLP endpoint. - // REQUIRED - Username OtlpLogSinkBasicCredentialsGetUsernameAttributeType `json:"username" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _OtlpLogSinkBasicCredentials OtlpLogSinkBasicCredentials - -// NewOtlpLogSinkBasicCredentials instantiates a new OtlpLogSinkBasicCredentials 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewOtlpLogSinkBasicCredentials(password OtlpLogSinkBasicCredentialsGetPasswordArgType, types OtlpLogSinkBasicCredentialsGetTypeArgType, username OtlpLogSinkBasicCredentialsGetUsernameArgType) *OtlpLogSinkBasicCredentials { - this := OtlpLogSinkBasicCredentials{} - setOtlpLogSinkBasicCredentialsGetPasswordAttributeType(&this.Password, password) - setOtlpLogSinkBasicCredentialsGetTypeAttributeType(&this.Type, types) - setOtlpLogSinkBasicCredentialsGetUsernameAttributeType(&this.Username, username) - return &this -} - -// NewOtlpLogSinkBasicCredentialsWithDefaults instantiates a new OtlpLogSinkBasicCredentials 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewOtlpLogSinkBasicCredentialsWithDefaults() *OtlpLogSinkBasicCredentials { - this := OtlpLogSinkBasicCredentials{} - return &this -} - -// GetPassword returns the Password field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkBasicCredentials) GetPassword() (ret OtlpLogSinkBasicCredentialsGetPasswordRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkBasicCredentials) GetPasswordOk() (ret OtlpLogSinkBasicCredentialsGetPasswordRetType, ok bool) { - return getOtlpLogSinkBasicCredentialsGetPasswordAttributeTypeOk(o.Password) -} - -// SetPassword sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkBasicCredentials) SetPassword(v OtlpLogSinkBasicCredentialsGetPasswordRetType) { - setOtlpLogSinkBasicCredentialsGetPasswordAttributeType(&o.Password, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkBasicCredentials) GetType() (ret OtlpLogSinkBasicCredentialsGetTypeRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkBasicCredentials) GetTypeOk() (ret OtlpLogSinkBasicCredentialsGetTypeRetType, ok bool) { - return getOtlpLogSinkBasicCredentialsGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkBasicCredentials) SetType(v OtlpLogSinkBasicCredentialsGetTypeRetType) { - setOtlpLogSinkBasicCredentialsGetTypeAttributeType(&o.Type, v) -} - -// GetUsername returns the Username field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkBasicCredentials) GetUsername() (ret OtlpLogSinkBasicCredentialsGetUsernameRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkBasicCredentials) GetUsernameOk() (ret OtlpLogSinkBasicCredentialsGetUsernameRetType, ok bool) { - return getOtlpLogSinkBasicCredentialsGetUsernameAttributeTypeOk(o.Username) -} - -// SetUsername sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkBasicCredentials) SetUsername(v OtlpLogSinkBasicCredentialsGetUsernameRetType) { - setOtlpLogSinkBasicCredentialsGetUsernameAttributeType(&o.Username, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o OtlpLogSinkBasicCredentials) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getOtlpLogSinkBasicCredentialsGetPasswordAttributeTypeOk(o.Password); ok { - toSerialize["Password"] = val - } - if val, ok := getOtlpLogSinkBasicCredentialsGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - if val, ok := getOtlpLogSinkBasicCredentialsGetUsernameAttributeTypeOk(o.Username); ok { - toSerialize["Username"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableOtlpLogSinkBasicCredentials struct { - value *OtlpLogSinkBasicCredentials - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkBasicCredentials) Get() *OtlpLogSinkBasicCredentials { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkBasicCredentials) Set(val *OtlpLogSinkBasicCredentials) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkBasicCredentials) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkBasicCredentials) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableOtlpLogSinkBasicCredentials(val *OtlpLogSinkBasicCredentials) *NullableOtlpLogSinkBasicCredentials { - return &NullableOtlpLogSinkBasicCredentials{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkBasicCredentials) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkBasicCredentials) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_otlp_log_sink_basic_credentials_test.go b/services/cdn/model_otlp_log_sink_basic_credentials_test.go deleted file mode 100644 index 3400e3ee7b..0000000000 --- a/services/cdn/model_otlp_log_sink_basic_credentials_test.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn - -import ( - "testing" -) - -// isEnum - -func TestOtlpLogSinkBasicCredentialsTypes_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"basic"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := OtlpLogSinkBasicCredentialsTypes("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/cdn/model_otlp_log_sink_bearer_credentials.go b/services/cdn/model_otlp_log_sink_bearer_credentials.go deleted file mode 100644 index 700c633cf0..0000000000 --- a/services/cdn/model_otlp_log_sink_bearer_credentials.go +++ /dev/null @@ -1,322 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// checks if the OtlpLogSinkBearerCredentials type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &OtlpLogSinkBearerCredentials{} - -/* - types and functions for token -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkBearerCredentialsGetTokenAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getOtlpLogSinkBearerCredentialsGetTokenAttributeTypeOk(arg OtlpLogSinkBearerCredentialsGetTokenAttributeType) (ret OtlpLogSinkBearerCredentialsGetTokenRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setOtlpLogSinkBearerCredentialsGetTokenAttributeType(arg *OtlpLogSinkBearerCredentialsGetTokenAttributeType, val OtlpLogSinkBearerCredentialsGetTokenRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkBearerCredentialsGetTokenArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkBearerCredentialsGetTokenRetType = string - -/* - types and functions for type -*/ - -// isEnum - -// OtlpLogSinkBearerCredentialsTypes Defines bearer token authentication. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkBearerCredentialsTypes string - -// List of Type -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - OTLPLOGSINKBEARERCREDENTIALSTYPE_BEARER OtlpLogSinkBearerCredentialsTypes = "bearer" -) - -// All allowed values of OtlpLogSinkBearerCredentials enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedOtlpLogSinkBearerCredentialsTypesEnumValues = []OtlpLogSinkBearerCredentialsTypes{ - "bearer", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *OtlpLogSinkBearerCredentialsTypes) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson OtlpLogSinkBearerCredentialsTypes - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := OtlpLogSinkBearerCredentialsTypes(value) - for _, existing := range AllowedOtlpLogSinkBearerCredentialsTypesEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid OtlpLogSinkBearerCredentials", value) -} - -// NewOtlpLogSinkBearerCredentialsTypesFromValue returns a pointer to a valid OtlpLogSinkBearerCredentialsTypes -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewOtlpLogSinkBearerCredentialsTypesFromValue(v OtlpLogSinkBearerCredentialsTypes) (*OtlpLogSinkBearerCredentialsTypes, error) { - ev := OtlpLogSinkBearerCredentialsTypes(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for OtlpLogSinkBearerCredentialsTypes: valid values are %v", v, AllowedOtlpLogSinkBearerCredentialsTypesEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v OtlpLogSinkBearerCredentialsTypes) IsValid() bool { - for _, existing := range AllowedOtlpLogSinkBearerCredentialsTypesEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TypeTypes value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v OtlpLogSinkBearerCredentialsTypes) Ptr() *OtlpLogSinkBearerCredentialsTypes { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableOtlpLogSinkBearerCredentialsTypes struct { - value *OtlpLogSinkBearerCredentialsTypes - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkBearerCredentialsTypes) Get() *OtlpLogSinkBearerCredentialsTypes { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkBearerCredentialsTypes) Set(val *OtlpLogSinkBearerCredentialsTypes) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkBearerCredentialsTypes) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkBearerCredentialsTypes) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableOtlpLogSinkBearerCredentialsTypes(val *OtlpLogSinkBearerCredentialsTypes) *NullableOtlpLogSinkBearerCredentialsTypes { - return &NullableOtlpLogSinkBearerCredentialsTypes{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkBearerCredentialsTypes) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkBearerCredentialsTypes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkBearerCredentialsGetTypeAttributeType = *OtlpLogSinkBearerCredentialsTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkBearerCredentialsGetTypeArgType = OtlpLogSinkBearerCredentialsTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkBearerCredentialsGetTypeRetType = OtlpLogSinkBearerCredentialsTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getOtlpLogSinkBearerCredentialsGetTypeAttributeTypeOk(arg OtlpLogSinkBearerCredentialsGetTypeAttributeType) (ret OtlpLogSinkBearerCredentialsGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setOtlpLogSinkBearerCredentialsGetTypeAttributeType(arg *OtlpLogSinkBearerCredentialsGetTypeAttributeType, val OtlpLogSinkBearerCredentialsGetTypeRetType) { - *arg = &val -} - -// OtlpLogSinkBearerCredentials Bearer token authentication credentials for OTLP. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkBearerCredentials struct { - // The bearer token used to authenticate against your OTLP endpoint. - // REQUIRED - Token OtlpLogSinkBearerCredentialsGetTokenAttributeType `json:"token" required:"true"` - // Defines bearer token authentication. - // REQUIRED - Type OtlpLogSinkBearerCredentialsGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _OtlpLogSinkBearerCredentials OtlpLogSinkBearerCredentials - -// NewOtlpLogSinkBearerCredentials instantiates a new OtlpLogSinkBearerCredentials 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewOtlpLogSinkBearerCredentials(token OtlpLogSinkBearerCredentialsGetTokenArgType, types OtlpLogSinkBearerCredentialsGetTypeArgType) *OtlpLogSinkBearerCredentials { - this := OtlpLogSinkBearerCredentials{} - setOtlpLogSinkBearerCredentialsGetTokenAttributeType(&this.Token, token) - setOtlpLogSinkBearerCredentialsGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewOtlpLogSinkBearerCredentialsWithDefaults instantiates a new OtlpLogSinkBearerCredentials 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewOtlpLogSinkBearerCredentialsWithDefaults() *OtlpLogSinkBearerCredentials { - this := OtlpLogSinkBearerCredentials{} - return &this -} - -// GetToken returns the Token field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkBearerCredentials) GetToken() (ret OtlpLogSinkBearerCredentialsGetTokenRetType) { - ret, _ = o.GetTokenOk() - return ret -} - -// GetTokenOk returns a tuple with the Token field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkBearerCredentials) GetTokenOk() (ret OtlpLogSinkBearerCredentialsGetTokenRetType, ok bool) { - return getOtlpLogSinkBearerCredentialsGetTokenAttributeTypeOk(o.Token) -} - -// SetToken sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkBearerCredentials) SetToken(v OtlpLogSinkBearerCredentialsGetTokenRetType) { - setOtlpLogSinkBearerCredentialsGetTokenAttributeType(&o.Token, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkBearerCredentials) GetType() (ret OtlpLogSinkBearerCredentialsGetTypeRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkBearerCredentials) GetTypeOk() (ret OtlpLogSinkBearerCredentialsGetTypeRetType, ok bool) { - return getOtlpLogSinkBearerCredentialsGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkBearerCredentials) SetType(v OtlpLogSinkBearerCredentialsGetTypeRetType) { - setOtlpLogSinkBearerCredentialsGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o OtlpLogSinkBearerCredentials) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getOtlpLogSinkBearerCredentialsGetTokenAttributeTypeOk(o.Token); ok { - toSerialize["Token"] = val - } - if val, ok := getOtlpLogSinkBearerCredentialsGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableOtlpLogSinkBearerCredentials struct { - value *OtlpLogSinkBearerCredentials - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkBearerCredentials) Get() *OtlpLogSinkBearerCredentials { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkBearerCredentials) Set(val *OtlpLogSinkBearerCredentials) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkBearerCredentials) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkBearerCredentials) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableOtlpLogSinkBearerCredentials(val *OtlpLogSinkBearerCredentials) *NullableOtlpLogSinkBearerCredentials { - return &NullableOtlpLogSinkBearerCredentials{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkBearerCredentials) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkBearerCredentials) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_otlp_log_sink_bearer_credentials_test.go b/services/cdn/model_otlp_log_sink_bearer_credentials_test.go deleted file mode 100644 index 78ca2c67f0..0000000000 --- a/services/cdn/model_otlp_log_sink_bearer_credentials_test.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn - -import ( - "testing" -) - -// isEnum - -func TestOtlpLogSinkBearerCredentialsTypes_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"bearer"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := OtlpLogSinkBearerCredentialsTypes("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/cdn/model_otlp_log_sink_create.go b/services/cdn/model_otlp_log_sink_create.go deleted file mode 100644 index 5e96ecfcee..0000000000 --- a/services/cdn/model_otlp_log_sink_create.go +++ /dev/null @@ -1,375 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// checks if the OtlpLogSinkCreate type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &OtlpLogSinkCreate{} - -/* - types and functions for credentials -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkCreateGetCredentialsAttributeType = *OtlpLogSinkCreateCredentials - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkCreateGetCredentialsArgType = OtlpLogSinkCreateCredentials - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkCreateGetCredentialsRetType = OtlpLogSinkCreateCredentials - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getOtlpLogSinkCreateGetCredentialsAttributeTypeOk(arg OtlpLogSinkCreateGetCredentialsAttributeType) (ret OtlpLogSinkCreateGetCredentialsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setOtlpLogSinkCreateGetCredentialsAttributeType(arg *OtlpLogSinkCreateGetCredentialsAttributeType, val OtlpLogSinkCreateGetCredentialsRetType) { - *arg = &val -} - -/* - types and functions for pushUrl -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkCreateGetPushUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getOtlpLogSinkCreateGetPushUrlAttributeTypeOk(arg OtlpLogSinkCreateGetPushUrlAttributeType) (ret OtlpLogSinkCreateGetPushUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setOtlpLogSinkCreateGetPushUrlAttributeType(arg *OtlpLogSinkCreateGetPushUrlAttributeType, val OtlpLogSinkCreateGetPushUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkCreateGetPushUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkCreateGetPushUrlRetType = string - -/* - types and functions for type -*/ - -// isEnum - -// OtlpLogSinkCreateTypes Defines the type of the log sink. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkCreateTypes string - -// List of Type -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - OTLPLOGSINKCREATETYPE_OTLP OtlpLogSinkCreateTypes = "otlp" -) - -// All allowed values of OtlpLogSinkCreate enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedOtlpLogSinkCreateTypesEnumValues = []OtlpLogSinkCreateTypes{ - "otlp", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *OtlpLogSinkCreateTypes) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson OtlpLogSinkCreateTypes - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := OtlpLogSinkCreateTypes(value) - for _, existing := range AllowedOtlpLogSinkCreateTypesEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid OtlpLogSinkCreate", value) -} - -// NewOtlpLogSinkCreateTypesFromValue returns a pointer to a valid OtlpLogSinkCreateTypes -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewOtlpLogSinkCreateTypesFromValue(v OtlpLogSinkCreateTypes) (*OtlpLogSinkCreateTypes, error) { - ev := OtlpLogSinkCreateTypes(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for OtlpLogSinkCreateTypes: valid values are %v", v, AllowedOtlpLogSinkCreateTypesEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v OtlpLogSinkCreateTypes) IsValid() bool { - for _, existing := range AllowedOtlpLogSinkCreateTypesEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TypeTypes value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v OtlpLogSinkCreateTypes) Ptr() *OtlpLogSinkCreateTypes { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableOtlpLogSinkCreateTypes struct { - value *OtlpLogSinkCreateTypes - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkCreateTypes) Get() *OtlpLogSinkCreateTypes { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkCreateTypes) Set(val *OtlpLogSinkCreateTypes) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkCreateTypes) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkCreateTypes) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableOtlpLogSinkCreateTypes(val *OtlpLogSinkCreateTypes) *NullableOtlpLogSinkCreateTypes { - return &NullableOtlpLogSinkCreateTypes{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkCreateTypes) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkCreateTypes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkCreateGetTypeAttributeType = *OtlpLogSinkCreateTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkCreateGetTypeArgType = OtlpLogSinkCreateTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkCreateGetTypeRetType = OtlpLogSinkCreateTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getOtlpLogSinkCreateGetTypeAttributeTypeOk(arg OtlpLogSinkCreateGetTypeAttributeType) (ret OtlpLogSinkCreateGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setOtlpLogSinkCreateGetTypeAttributeType(arg *OtlpLogSinkCreateGetTypeAttributeType, val OtlpLogSinkCreateGetTypeRetType) { - *arg = &val -} - -// OtlpLogSinkCreate struct for OtlpLogSinkCreate -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkCreate struct { - // REQUIRED - Credentials OtlpLogSinkCreateGetCredentialsAttributeType `json:"credentials" required:"true"` - // The fully qualified URL where the CDN should push logs to your OTLP endpoint (for example, `https://otlp.example.com/otlp/v1/logs`). - // REQUIRED - PushUrl OtlpLogSinkCreateGetPushUrlAttributeType `json:"pushUrl" required:"true"` - // Defines the type of the log sink. - // REQUIRED - Type OtlpLogSinkCreateGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _OtlpLogSinkCreate OtlpLogSinkCreate - -// NewOtlpLogSinkCreate instantiates a new OtlpLogSinkCreate 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewOtlpLogSinkCreate(credentials OtlpLogSinkCreateGetCredentialsArgType, pushUrl OtlpLogSinkCreateGetPushUrlArgType, types OtlpLogSinkCreateGetTypeArgType) *OtlpLogSinkCreate { - this := OtlpLogSinkCreate{} - setOtlpLogSinkCreateGetCredentialsAttributeType(&this.Credentials, credentials) - setOtlpLogSinkCreateGetPushUrlAttributeType(&this.PushUrl, pushUrl) - setOtlpLogSinkCreateGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewOtlpLogSinkCreateWithDefaults instantiates a new OtlpLogSinkCreate 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewOtlpLogSinkCreateWithDefaults() *OtlpLogSinkCreate { - this := OtlpLogSinkCreate{} - return &this -} - -// GetCredentials returns the Credentials field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkCreate) GetCredentials() (ret OtlpLogSinkCreateGetCredentialsRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkCreate) GetCredentialsOk() (ret OtlpLogSinkCreateGetCredentialsRetType, ok bool) { - return getOtlpLogSinkCreateGetCredentialsAttributeTypeOk(o.Credentials) -} - -// SetCredentials sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkCreate) SetCredentials(v OtlpLogSinkCreateGetCredentialsRetType) { - setOtlpLogSinkCreateGetCredentialsAttributeType(&o.Credentials, v) -} - -// GetPushUrl returns the PushUrl field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkCreate) GetPushUrl() (ret OtlpLogSinkCreateGetPushUrlRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkCreate) GetPushUrlOk() (ret OtlpLogSinkCreateGetPushUrlRetType, ok bool) { - return getOtlpLogSinkCreateGetPushUrlAttributeTypeOk(o.PushUrl) -} - -// SetPushUrl sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkCreate) SetPushUrl(v OtlpLogSinkCreateGetPushUrlRetType) { - setOtlpLogSinkCreateGetPushUrlAttributeType(&o.PushUrl, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkCreate) GetType() (ret OtlpLogSinkCreateGetTypeRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkCreate) GetTypeOk() (ret OtlpLogSinkCreateGetTypeRetType, ok bool) { - return getOtlpLogSinkCreateGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkCreate) SetType(v OtlpLogSinkCreateGetTypeRetType) { - setOtlpLogSinkCreateGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o OtlpLogSinkCreate) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getOtlpLogSinkCreateGetCredentialsAttributeTypeOk(o.Credentials); ok { - toSerialize["Credentials"] = val - } - if val, ok := getOtlpLogSinkCreateGetPushUrlAttributeTypeOk(o.PushUrl); ok { - toSerialize["PushUrl"] = val - } - if val, ok := getOtlpLogSinkCreateGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableOtlpLogSinkCreate struct { - value *OtlpLogSinkCreate - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkCreate) Get() *OtlpLogSinkCreate { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkCreate) Set(val *OtlpLogSinkCreate) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkCreate) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkCreate) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableOtlpLogSinkCreate(val *OtlpLogSinkCreate) *NullableOtlpLogSinkCreate { - return &NullableOtlpLogSinkCreate{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkCreate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkCreate) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_otlp_log_sink_create_credentials.go b/services/cdn/model_otlp_log_sink_create_credentials.go deleted file mode 100644 index ab225b5ea0..0000000000 --- a/services/cdn/model_otlp_log_sink_create_credentials.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// OtlpLogSinkCreateCredentials - The authentication credentials required for the CDN to push logs to your OTLP endpoint. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkCreateCredentials struct { - OtlpLogSinkBasicCredentials *OtlpLogSinkBasicCredentials - OtlpLogSinkBearerCredentials *OtlpLogSinkBearerCredentials -} - -// OtlpLogSinkBasicCredentialsAsOtlpLogSinkCreateCredentials is a convenience function that returns OtlpLogSinkBasicCredentials wrapped in OtlpLogSinkCreateCredentials -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func OtlpLogSinkBasicCredentialsAsOtlpLogSinkCreateCredentials(v *OtlpLogSinkBasicCredentials) OtlpLogSinkCreateCredentials { - return OtlpLogSinkCreateCredentials{ - OtlpLogSinkBasicCredentials: v, - } -} - -// OtlpLogSinkBearerCredentialsAsOtlpLogSinkCreateCredentials is a convenience function that returns OtlpLogSinkBearerCredentials wrapped in OtlpLogSinkCreateCredentials -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func OtlpLogSinkBearerCredentialsAsOtlpLogSinkCreateCredentials(v *OtlpLogSinkBearerCredentials) OtlpLogSinkCreateCredentials { - return OtlpLogSinkCreateCredentials{ - OtlpLogSinkBearerCredentials: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (dst *OtlpLogSinkCreateCredentials) 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 'OtlpLogSinkBasicCredentials' - if jsonDict["type"] == "OtlpLogSinkBasicCredentials" { - // try to unmarshal JSON data into OtlpLogSinkBasicCredentials - err = json.Unmarshal(data, &dst.OtlpLogSinkBasicCredentials) - if err == nil { - return nil // data stored in dst.OtlpLogSinkBasicCredentials, return on the first match - } else { - dst.OtlpLogSinkBasicCredentials = nil - return fmt.Errorf("failed to unmarshal OtlpLogSinkCreateCredentials as OtlpLogSinkBasicCredentials: %s", err.Error()) - } - } - - // check if the discriminator value is 'OtlpLogSinkBearerCredentials' - if jsonDict["type"] == "OtlpLogSinkBearerCredentials" { - // try to unmarshal JSON data into OtlpLogSinkBearerCredentials - err = json.Unmarshal(data, &dst.OtlpLogSinkBearerCredentials) - if err == nil { - return nil // data stored in dst.OtlpLogSinkBearerCredentials, return on the first match - } else { - dst.OtlpLogSinkBearerCredentials = nil - return fmt.Errorf("failed to unmarshal OtlpLogSinkCreateCredentials as OtlpLogSinkBearerCredentials: %s", err.Error()) - } - } - - // check if the discriminator value is 'basic' - if jsonDict["type"] == "basic" { - // try to unmarshal JSON data into OtlpLogSinkBasicCredentials - err = json.Unmarshal(data, &dst.OtlpLogSinkBasicCredentials) - if err == nil { - return nil // data stored in dst.OtlpLogSinkBasicCredentials, return on the first match - } else { - dst.OtlpLogSinkBasicCredentials = nil - return fmt.Errorf("failed to unmarshal OtlpLogSinkCreateCredentials as OtlpLogSinkBasicCredentials: %s", err.Error()) - } - } - - // check if the discriminator value is 'bearer' - if jsonDict["type"] == "bearer" { - // try to unmarshal JSON data into OtlpLogSinkBearerCredentials - err = json.Unmarshal(data, &dst.OtlpLogSinkBearerCredentials) - if err == nil { - return nil // data stored in dst.OtlpLogSinkBearerCredentials, return on the first match - } else { - dst.OtlpLogSinkBearerCredentials = nil - return fmt.Errorf("failed to unmarshal OtlpLogSinkCreateCredentials as OtlpLogSinkBearerCredentials: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src OtlpLogSinkCreateCredentials) MarshalJSON() ([]byte, error) { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - if src.OtlpLogSinkBasicCredentials != nil { - return json.Marshal(&src.OtlpLogSinkBasicCredentials) - } - - if src.OtlpLogSinkBearerCredentials != nil { - return json.Marshal(&src.OtlpLogSinkBearerCredentials) - } - - return []byte("{}"), nil // no data in oneOf schemas => empty JSON object -} - -// Get the actual instance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (obj *OtlpLogSinkCreateCredentials) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.OtlpLogSinkBasicCredentials != nil { - return obj.OtlpLogSinkBasicCredentials - } - - if obj.OtlpLogSinkBearerCredentials != nil { - return obj.OtlpLogSinkBearerCredentials - } - - // all schemas are nil - return nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableOtlpLogSinkCreateCredentials struct { - value *OtlpLogSinkCreateCredentials - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkCreateCredentials) Get() *OtlpLogSinkCreateCredentials { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkCreateCredentials) Set(val *OtlpLogSinkCreateCredentials) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkCreateCredentials) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkCreateCredentials) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableOtlpLogSinkCreateCredentials(val *OtlpLogSinkCreateCredentials) *NullableOtlpLogSinkCreateCredentials { - return &NullableOtlpLogSinkCreateCredentials{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkCreateCredentials) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkCreateCredentials) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_otlp_log_sink_create_credentials_test.go b/services/cdn/model_otlp_log_sink_create_credentials_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_otlp_log_sink_create_credentials_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_otlp_log_sink_create_test.go b/services/cdn/model_otlp_log_sink_create_test.go deleted file mode 100644 index 91f531fbc4..0000000000 --- a/services/cdn/model_otlp_log_sink_create_test.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn - -import ( - "testing" -) - -// isEnum - -func TestOtlpLogSinkCreateTypes_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"otlp"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := OtlpLogSinkCreateTypes("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/cdn/model_otlp_log_sink_patch.go b/services/cdn/model_otlp_log_sink_patch.go deleted file mode 100644 index 2400642498..0000000000 --- a/services/cdn/model_otlp_log_sink_patch.go +++ /dev/null @@ -1,385 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// checks if the OtlpLogSinkPatch type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &OtlpLogSinkPatch{} - -/* - types and functions for credentials -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkPatchGetCredentialsAttributeType = *OtlpLogSinkPatchCredentials - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkPatchGetCredentialsArgType = OtlpLogSinkPatchCredentials - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkPatchGetCredentialsRetType = OtlpLogSinkPatchCredentials - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getOtlpLogSinkPatchGetCredentialsAttributeTypeOk(arg OtlpLogSinkPatchGetCredentialsAttributeType) (ret OtlpLogSinkPatchGetCredentialsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setOtlpLogSinkPatchGetCredentialsAttributeType(arg *OtlpLogSinkPatchGetCredentialsAttributeType, val OtlpLogSinkPatchGetCredentialsRetType) { - *arg = &val -} - -/* - types and functions for pushUrl -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkPatchGetPushUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getOtlpLogSinkPatchGetPushUrlAttributeTypeOk(arg OtlpLogSinkPatchGetPushUrlAttributeType) (ret OtlpLogSinkPatchGetPushUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setOtlpLogSinkPatchGetPushUrlAttributeType(arg *OtlpLogSinkPatchGetPushUrlAttributeType, val OtlpLogSinkPatchGetPushUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkPatchGetPushUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkPatchGetPushUrlRetType = string - -/* - types and functions for type -*/ - -// isEnum - -// OtlpLogSinkPatchTypes Defines the type of the log sink. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkPatchTypes string - -// List of Type -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - OTLPLOGSINKPATCHTYPE_OTLP OtlpLogSinkPatchTypes = "otlp" -) - -// All allowed values of OtlpLogSinkPatch enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedOtlpLogSinkPatchTypesEnumValues = []OtlpLogSinkPatchTypes{ - "otlp", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *OtlpLogSinkPatchTypes) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson OtlpLogSinkPatchTypes - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := OtlpLogSinkPatchTypes(value) - for _, existing := range AllowedOtlpLogSinkPatchTypesEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid OtlpLogSinkPatch", value) -} - -// NewOtlpLogSinkPatchTypesFromValue returns a pointer to a valid OtlpLogSinkPatchTypes -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewOtlpLogSinkPatchTypesFromValue(v OtlpLogSinkPatchTypes) (*OtlpLogSinkPatchTypes, error) { - ev := OtlpLogSinkPatchTypes(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for OtlpLogSinkPatchTypes: valid values are %v", v, AllowedOtlpLogSinkPatchTypesEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v OtlpLogSinkPatchTypes) IsValid() bool { - for _, existing := range AllowedOtlpLogSinkPatchTypesEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TypeTypes value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v OtlpLogSinkPatchTypes) Ptr() *OtlpLogSinkPatchTypes { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableOtlpLogSinkPatchTypes struct { - value *OtlpLogSinkPatchTypes - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkPatchTypes) Get() *OtlpLogSinkPatchTypes { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkPatchTypes) Set(val *OtlpLogSinkPatchTypes) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkPatchTypes) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkPatchTypes) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableOtlpLogSinkPatchTypes(val *OtlpLogSinkPatchTypes) *NullableOtlpLogSinkPatchTypes { - return &NullableOtlpLogSinkPatchTypes{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkPatchTypes) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkPatchTypes) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkPatchGetTypeAttributeType = *OtlpLogSinkPatchTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkPatchGetTypeArgType = OtlpLogSinkPatchTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkPatchGetTypeRetType = OtlpLogSinkPatchTypes - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getOtlpLogSinkPatchGetTypeAttributeTypeOk(arg OtlpLogSinkPatchGetTypeAttributeType) (ret OtlpLogSinkPatchGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setOtlpLogSinkPatchGetTypeAttributeType(arg *OtlpLogSinkPatchGetTypeAttributeType, val OtlpLogSinkPatchGetTypeRetType) { - *arg = &val -} - -// OtlpLogSinkPatch struct for OtlpLogSinkPatch -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkPatch struct { - Credentials OtlpLogSinkPatchGetCredentialsAttributeType `json:"credentials,omitempty"` - // The fully qualified URL where the CDN should push logs to your OTLP endpoint (for example, `https://otlp.example.com/otlp/v1/logs`). - PushUrl OtlpLogSinkPatchGetPushUrlAttributeType `json:"pushUrl,omitempty"` - // Defines the type of the log sink. - // REQUIRED - Type OtlpLogSinkPatchGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _OtlpLogSinkPatch OtlpLogSinkPatch - -// NewOtlpLogSinkPatch instantiates a new OtlpLogSinkPatch 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewOtlpLogSinkPatch(types OtlpLogSinkPatchGetTypeArgType) *OtlpLogSinkPatch { - this := OtlpLogSinkPatch{} - setOtlpLogSinkPatchGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewOtlpLogSinkPatchWithDefaults instantiates a new OtlpLogSinkPatch 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewOtlpLogSinkPatchWithDefaults() *OtlpLogSinkPatch { - this := OtlpLogSinkPatch{} - return &this -} - -// GetCredentials returns the Credentials field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkPatch) GetCredentials() (res OtlpLogSinkPatchGetCredentialsRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkPatch) GetCredentialsOk() (ret OtlpLogSinkPatchGetCredentialsRetType, ok bool) { - return getOtlpLogSinkPatchGetCredentialsAttributeTypeOk(o.Credentials) -} - -// HasCredentials returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkPatch) HasCredentials() bool { - _, ok := o.GetCredentialsOk() - return ok -} - -// SetCredentials gets a reference to the given OtlpLogSinkPatchCredentials and assigns it to the Credentials field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkPatch) SetCredentials(v OtlpLogSinkPatchGetCredentialsRetType) { - setOtlpLogSinkPatchGetCredentialsAttributeType(&o.Credentials, v) -} - -// GetPushUrl returns the PushUrl field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkPatch) GetPushUrl() (res OtlpLogSinkPatchGetPushUrlRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkPatch) GetPushUrlOk() (ret OtlpLogSinkPatchGetPushUrlRetType, ok bool) { - return getOtlpLogSinkPatchGetPushUrlAttributeTypeOk(o.PushUrl) -} - -// HasPushUrl returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkPatch) HasPushUrl() bool { - _, ok := o.GetPushUrlOk() - return ok -} - -// SetPushUrl gets a reference to the given string and assigns it to the PushUrl field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkPatch) SetPushUrl(v OtlpLogSinkPatchGetPushUrlRetType) { - setOtlpLogSinkPatchGetPushUrlAttributeType(&o.PushUrl, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkPatch) GetType() (ret OtlpLogSinkPatchGetTypeRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkPatch) GetTypeOk() (ret OtlpLogSinkPatchGetTypeRetType, ok bool) { - return getOtlpLogSinkPatchGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *OtlpLogSinkPatch) SetType(v OtlpLogSinkPatchGetTypeRetType) { - setOtlpLogSinkPatchGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o OtlpLogSinkPatch) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getOtlpLogSinkPatchGetCredentialsAttributeTypeOk(o.Credentials); ok { - toSerialize["Credentials"] = val - } - if val, ok := getOtlpLogSinkPatchGetPushUrlAttributeTypeOk(o.PushUrl); ok { - toSerialize["PushUrl"] = val - } - if val, ok := getOtlpLogSinkPatchGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableOtlpLogSinkPatch struct { - value *OtlpLogSinkPatch - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkPatch) Get() *OtlpLogSinkPatch { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkPatch) Set(val *OtlpLogSinkPatch) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkPatch) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkPatch) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableOtlpLogSinkPatch(val *OtlpLogSinkPatch) *NullableOtlpLogSinkPatch { - return &NullableOtlpLogSinkPatch{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkPatch) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkPatch) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_otlp_log_sink_patch_credentials.go b/services/cdn/model_otlp_log_sink_patch_credentials.go deleted file mode 100644 index 5466a57d08..0000000000 --- a/services/cdn/model_otlp_log_sink_patch_credentials.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// OtlpLogSinkPatchCredentials - The authentication credentials required for the CDN to push logs to your OTLP endpoint. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type OtlpLogSinkPatchCredentials struct { - OtlpLogSinkBasicCredentials *OtlpLogSinkBasicCredentials - OtlpLogSinkBearerCredentials *OtlpLogSinkBearerCredentials -} - -// OtlpLogSinkBasicCredentialsAsOtlpLogSinkPatchCredentials is a convenience function that returns OtlpLogSinkBasicCredentials wrapped in OtlpLogSinkPatchCredentials -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func OtlpLogSinkBasicCredentialsAsOtlpLogSinkPatchCredentials(v *OtlpLogSinkBasicCredentials) OtlpLogSinkPatchCredentials { - return OtlpLogSinkPatchCredentials{ - OtlpLogSinkBasicCredentials: v, - } -} - -// OtlpLogSinkBearerCredentialsAsOtlpLogSinkPatchCredentials is a convenience function that returns OtlpLogSinkBearerCredentials wrapped in OtlpLogSinkPatchCredentials -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func OtlpLogSinkBearerCredentialsAsOtlpLogSinkPatchCredentials(v *OtlpLogSinkBearerCredentials) OtlpLogSinkPatchCredentials { - return OtlpLogSinkPatchCredentials{ - OtlpLogSinkBearerCredentials: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (dst *OtlpLogSinkPatchCredentials) 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 'OtlpLogSinkBasicCredentials' - if jsonDict["type"] == "OtlpLogSinkBasicCredentials" { - // try to unmarshal JSON data into OtlpLogSinkBasicCredentials - err = json.Unmarshal(data, &dst.OtlpLogSinkBasicCredentials) - if err == nil { - return nil // data stored in dst.OtlpLogSinkBasicCredentials, return on the first match - } else { - dst.OtlpLogSinkBasicCredentials = nil - return fmt.Errorf("failed to unmarshal OtlpLogSinkPatchCredentials as OtlpLogSinkBasicCredentials: %s", err.Error()) - } - } - - // check if the discriminator value is 'OtlpLogSinkBearerCredentials' - if jsonDict["type"] == "OtlpLogSinkBearerCredentials" { - // try to unmarshal JSON data into OtlpLogSinkBearerCredentials - err = json.Unmarshal(data, &dst.OtlpLogSinkBearerCredentials) - if err == nil { - return nil // data stored in dst.OtlpLogSinkBearerCredentials, return on the first match - } else { - dst.OtlpLogSinkBearerCredentials = nil - return fmt.Errorf("failed to unmarshal OtlpLogSinkPatchCredentials as OtlpLogSinkBearerCredentials: %s", err.Error()) - } - } - - // check if the discriminator value is 'basic' - if jsonDict["type"] == "basic" { - // try to unmarshal JSON data into OtlpLogSinkBasicCredentials - err = json.Unmarshal(data, &dst.OtlpLogSinkBasicCredentials) - if err == nil { - return nil // data stored in dst.OtlpLogSinkBasicCredentials, return on the first match - } else { - dst.OtlpLogSinkBasicCredentials = nil - return fmt.Errorf("failed to unmarshal OtlpLogSinkPatchCredentials as OtlpLogSinkBasicCredentials: %s", err.Error()) - } - } - - // check if the discriminator value is 'bearer' - if jsonDict["type"] == "bearer" { - // try to unmarshal JSON data into OtlpLogSinkBearerCredentials - err = json.Unmarshal(data, &dst.OtlpLogSinkBearerCredentials) - if err == nil { - return nil // data stored in dst.OtlpLogSinkBearerCredentials, return on the first match - } else { - dst.OtlpLogSinkBearerCredentials = nil - return fmt.Errorf("failed to unmarshal OtlpLogSinkPatchCredentials as OtlpLogSinkBearerCredentials: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src OtlpLogSinkPatchCredentials) MarshalJSON() ([]byte, error) { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - if src.OtlpLogSinkBasicCredentials != nil { - return json.Marshal(&src.OtlpLogSinkBasicCredentials) - } - - if src.OtlpLogSinkBearerCredentials != nil { - return json.Marshal(&src.OtlpLogSinkBearerCredentials) - } - - return []byte("{}"), nil // no data in oneOf schemas => empty JSON object -} - -// Get the actual instance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (obj *OtlpLogSinkPatchCredentials) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.OtlpLogSinkBasicCredentials != nil { - return obj.OtlpLogSinkBasicCredentials - } - - if obj.OtlpLogSinkBearerCredentials != nil { - return obj.OtlpLogSinkBearerCredentials - } - - // all schemas are nil - return nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableOtlpLogSinkPatchCredentials struct { - value *OtlpLogSinkPatchCredentials - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkPatchCredentials) Get() *OtlpLogSinkPatchCredentials { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkPatchCredentials) Set(val *OtlpLogSinkPatchCredentials) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkPatchCredentials) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkPatchCredentials) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableOtlpLogSinkPatchCredentials(val *OtlpLogSinkPatchCredentials) *NullableOtlpLogSinkPatchCredentials { - return &NullableOtlpLogSinkPatchCredentials{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableOtlpLogSinkPatchCredentials) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableOtlpLogSinkPatchCredentials) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_otlp_log_sink_patch_credentials_test.go b/services/cdn/model_otlp_log_sink_patch_credentials_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_otlp_log_sink_patch_credentials_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_otlp_log_sink_patch_test.go b/services/cdn/model_otlp_log_sink_patch_test.go deleted file mode 100644 index e87564d750..0000000000 --- a/services/cdn/model_otlp_log_sink_patch_test.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn - -import ( - "testing" -) - -// isEnum - -func TestOtlpLogSinkPatchTypes_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"otlp"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := OtlpLogSinkPatchTypes("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/cdn/model_otlp_log_sink_test.go b/services/cdn/model_otlp_log_sink_test.go deleted file mode 100644 index 70b292dc90..0000000000 --- a/services/cdn/model_otlp_log_sink_test.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn - -import ( - "testing" -) - -// isEnum - -func TestOtlpLogSinkTypes_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"otlp"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := OtlpLogSinkTypes("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/cdn/model_patch_distribution_payload.go b/services/cdn/model_patch_distribution_payload.go deleted file mode 100644 index c3f6410453..0000000000 --- a/services/cdn/model_patch_distribution_payload.go +++ /dev/null @@ -1,210 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the PatchDistributionPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PatchDistributionPayload{} - -/* - types and functions for config -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchDistributionPayloadGetConfigAttributeType = *ConfigPatch - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchDistributionPayloadGetConfigArgType = ConfigPatch - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchDistributionPayloadGetConfigRetType = ConfigPatch - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPatchDistributionPayloadGetConfigAttributeTypeOk(arg PatchDistributionPayloadGetConfigAttributeType) (ret PatchDistributionPayloadGetConfigRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPatchDistributionPayloadGetConfigAttributeType(arg *PatchDistributionPayloadGetConfigAttributeType, val PatchDistributionPayloadGetConfigRetType) { - *arg = &val -} - -/* - types and functions for intentId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchDistributionPayloadGetIntentIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPatchDistributionPayloadGetIntentIdAttributeTypeOk(arg PatchDistributionPayloadGetIntentIdAttributeType) (ret PatchDistributionPayloadGetIntentIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPatchDistributionPayloadGetIntentIdAttributeType(arg *PatchDistributionPayloadGetIntentIdAttributeType, val PatchDistributionPayloadGetIntentIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchDistributionPayloadGetIntentIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchDistributionPayloadGetIntentIdRetType = string - -// PatchDistributionPayload Defines a partial distribution. Set values -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchDistributionPayload struct { - Config PatchDistributionPayloadGetConfigAttributeType `json:"config,omitempty"` - // While optional, it is greatly encouraged to provide an `intentId`. This is used to deduplicate requests. If multiple modifying requests with the same `intentId` for a given `projectId` are received, all but the first request are dropped. - IntentId PatchDistributionPayloadGetIntentIdAttributeType `json:"intentId,omitempty"` -} - -// NewPatchDistributionPayload instantiates a new PatchDistributionPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPatchDistributionPayload() *PatchDistributionPayload { - this := PatchDistributionPayload{} - return &this -} - -// NewPatchDistributionPayloadWithDefaults instantiates a new PatchDistributionPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPatchDistributionPayloadWithDefaults() *PatchDistributionPayload { - this := PatchDistributionPayload{} - return &this -} - -// GetConfig returns the Config field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchDistributionPayload) GetConfig() (res PatchDistributionPayloadGetConfigRetType) { - res, _ = o.GetConfigOk() - return -} - -// GetConfigOk returns a tuple with the Config field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchDistributionPayload) GetConfigOk() (ret PatchDistributionPayloadGetConfigRetType, ok bool) { - return getPatchDistributionPayloadGetConfigAttributeTypeOk(o.Config) -} - -// HasConfig returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchDistributionPayload) HasConfig() bool { - _, ok := o.GetConfigOk() - return ok -} - -// SetConfig gets a reference to the given ConfigPatch and assigns it to the Config field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchDistributionPayload) SetConfig(v PatchDistributionPayloadGetConfigRetType) { - setPatchDistributionPayloadGetConfigAttributeType(&o.Config, v) -} - -// GetIntentId returns the IntentId field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchDistributionPayload) GetIntentId() (res PatchDistributionPayloadGetIntentIdRetType) { - res, _ = o.GetIntentIdOk() - return -} - -// GetIntentIdOk returns a tuple with the IntentId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchDistributionPayload) GetIntentIdOk() (ret PatchDistributionPayloadGetIntentIdRetType, ok bool) { - return getPatchDistributionPayloadGetIntentIdAttributeTypeOk(o.IntentId) -} - -// HasIntentId returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchDistributionPayload) HasIntentId() bool { - _, ok := o.GetIntentIdOk() - return ok -} - -// SetIntentId gets a reference to the given string and assigns it to the IntentId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchDistributionPayload) SetIntentId(v PatchDistributionPayloadGetIntentIdRetType) { - setPatchDistributionPayloadGetIntentIdAttributeType(&o.IntentId, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o PatchDistributionPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getPatchDistributionPayloadGetConfigAttributeTypeOk(o.Config); ok { - toSerialize["Config"] = val - } - if val, ok := getPatchDistributionPayloadGetIntentIdAttributeTypeOk(o.IntentId); ok { - toSerialize["IntentId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullablePatchDistributionPayload struct { - value *PatchDistributionPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePatchDistributionPayload) Get() *PatchDistributionPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePatchDistributionPayload) Set(val *PatchDistributionPayload) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePatchDistributionPayload) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePatchDistributionPayload) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullablePatchDistributionPayload(val *PatchDistributionPayload) *NullablePatchDistributionPayload { - return &NullablePatchDistributionPayload{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePatchDistributionPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePatchDistributionPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_patch_distribution_payload_test.go b/services/cdn/model_patch_distribution_payload_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_patch_distribution_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_patch_distribution_response.go b/services/cdn/model_patch_distribution_response.go deleted file mode 100644 index 1ce74b770e..0000000000 --- a/services/cdn/model_patch_distribution_response.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the PatchDistributionResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PatchDistributionResponse{} - -/* - types and functions for distribution -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchDistributionResponseGetDistributionAttributeType = *Distribution - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchDistributionResponseGetDistributionArgType = Distribution - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchDistributionResponseGetDistributionRetType = Distribution - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPatchDistributionResponseGetDistributionAttributeTypeOk(arg PatchDistributionResponseGetDistributionAttributeType) (ret PatchDistributionResponseGetDistributionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPatchDistributionResponseGetDistributionAttributeType(arg *PatchDistributionResponseGetDistributionAttributeType, val PatchDistributionResponseGetDistributionRetType) { - *arg = &val -} - -// PatchDistributionResponse struct for PatchDistributionResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PatchDistributionResponse struct { - // REQUIRED - Distribution PatchDistributionResponseGetDistributionAttributeType `json:"distribution" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _PatchDistributionResponse PatchDistributionResponse - -// NewPatchDistributionResponse instantiates a new PatchDistributionResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPatchDistributionResponse(distribution PatchDistributionResponseGetDistributionArgType) *PatchDistributionResponse { - this := PatchDistributionResponse{} - setPatchDistributionResponseGetDistributionAttributeType(&this.Distribution, distribution) - return &this -} - -// NewPatchDistributionResponseWithDefaults instantiates a new PatchDistributionResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPatchDistributionResponseWithDefaults() *PatchDistributionResponse { - this := PatchDistributionResponse{} - return &this -} - -// GetDistribution returns the Distribution field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchDistributionResponse) GetDistribution() (ret PatchDistributionResponseGetDistributionRetType) { - ret, _ = o.GetDistributionOk() - return ret -} - -// GetDistributionOk returns a tuple with the Distribution field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchDistributionResponse) GetDistributionOk() (ret PatchDistributionResponseGetDistributionRetType, ok bool) { - return getPatchDistributionResponseGetDistributionAttributeTypeOk(o.Distribution) -} - -// SetDistribution sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PatchDistributionResponse) SetDistribution(v PatchDistributionResponseGetDistributionRetType) { - setPatchDistributionResponseGetDistributionAttributeType(&o.Distribution, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o PatchDistributionResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getPatchDistributionResponseGetDistributionAttributeTypeOk(o.Distribution); ok { - toSerialize["Distribution"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullablePatchDistributionResponse struct { - value *PatchDistributionResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePatchDistributionResponse) Get() *PatchDistributionResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePatchDistributionResponse) Set(val *PatchDistributionResponse) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePatchDistributionResponse) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePatchDistributionResponse) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullablePatchDistributionResponse(val *PatchDistributionResponse) *NullablePatchDistributionResponse { - return &NullablePatchDistributionResponse{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePatchDistributionResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePatchDistributionResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_patch_distribution_response_test.go b/services/cdn/model_patch_distribution_response_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_patch_distribution_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_purge_cache_payload.go b/services/cdn/model_purge_cache_payload.go deleted file mode 100644 index ba9f4aeb2f..0000000000 --- a/services/cdn/model_purge_cache_payload.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the PurgeCachePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PurgeCachePayload{} - -/* - types and functions for path -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PurgeCachePayloadGetPathAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPurgeCachePayloadGetPathAttributeTypeOk(arg PurgeCachePayloadGetPathAttributeType) (ret PurgeCachePayloadGetPathRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPurgeCachePayloadGetPathAttributeType(arg *PurgeCachePayloadGetPathAttributeType, val PurgeCachePayloadGetPathRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PurgeCachePayloadGetPathArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PurgeCachePayloadGetPathRetType = string - -// PurgeCachePayload struct for PurgeCachePayload -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PurgeCachePayload struct { - // Defines an optional path. If this is set, a granular purge is done. If missing, the entire cache is invalidated. During a granular cache purge, only the provided path is purged. Please do not that for example `/some/path` and `/some/path.txt` are considered different paths. - Path PurgeCachePayloadGetPathAttributeType `json:"path,omitempty"` -} - -// NewPurgeCachePayload instantiates a new PurgeCachePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPurgeCachePayload() *PurgeCachePayload { - this := PurgeCachePayload{} - return &this -} - -// NewPurgeCachePayloadWithDefaults instantiates a new PurgeCachePayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPurgeCachePayloadWithDefaults() *PurgeCachePayload { - this := PurgeCachePayload{} - return &this -} - -// GetPath returns the Path field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PurgeCachePayload) GetPath() (res PurgeCachePayloadGetPathRetType) { - res, _ = o.GetPathOk() - return -} - -// GetPathOk returns a tuple with the Path field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PurgeCachePayload) GetPathOk() (ret PurgeCachePayloadGetPathRetType, ok bool) { - return getPurgeCachePayloadGetPathAttributeTypeOk(o.Path) -} - -// HasPath returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PurgeCachePayload) HasPath() bool { - _, ok := o.GetPathOk() - return ok -} - -// SetPath gets a reference to the given string and assigns it to the Path field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PurgeCachePayload) SetPath(v PurgeCachePayloadGetPathRetType) { - setPurgeCachePayloadGetPathAttributeType(&o.Path, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o PurgeCachePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getPurgeCachePayloadGetPathAttributeTypeOk(o.Path); ok { - toSerialize["Path"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullablePurgeCachePayload struct { - value *PurgeCachePayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePurgeCachePayload) Get() *PurgeCachePayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePurgeCachePayload) Set(val *PurgeCachePayload) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePurgeCachePayload) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePurgeCachePayload) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullablePurgeCachePayload(val *PurgeCachePayload) *NullablePurgeCachePayload { - return &NullablePurgeCachePayload{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePurgeCachePayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePurgeCachePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_purge_cache_payload_test.go b/services/cdn/model_purge_cache_payload_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_purge_cache_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_put_custom_domain_custom_certificate.go b/services/cdn/model_put_custom_domain_custom_certificate.go deleted file mode 100644 index ea5dc1ee51..0000000000 --- a/services/cdn/model_put_custom_domain_custom_certificate.go +++ /dev/null @@ -1,316 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the PutCustomDomainCustomCertificate type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PutCustomDomainCustomCertificate{} - -/* - types and functions for certificate -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainCustomCertificateGetCertificateAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPutCustomDomainCustomCertificateGetCertificateAttributeTypeOk(arg PutCustomDomainCustomCertificateGetCertificateAttributeType) (ret PutCustomDomainCustomCertificateGetCertificateRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPutCustomDomainCustomCertificateGetCertificateAttributeType(arg *PutCustomDomainCustomCertificateGetCertificateAttributeType, val PutCustomDomainCustomCertificateGetCertificateRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainCustomCertificateGetCertificateArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainCustomCertificateGetCertificateRetType = string - -/* - types and functions for key -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainCustomCertificateGetKeyAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPutCustomDomainCustomCertificateGetKeyAttributeTypeOk(arg PutCustomDomainCustomCertificateGetKeyAttributeType) (ret PutCustomDomainCustomCertificateGetKeyRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPutCustomDomainCustomCertificateGetKeyAttributeType(arg *PutCustomDomainCustomCertificateGetKeyAttributeType, val PutCustomDomainCustomCertificateGetKeyRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainCustomCertificateGetKeyArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainCustomCertificateGetKeyRetType = string - -/* - types and functions for skipDnsCheck -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainCustomCertificategetSkipDnsCheckAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainCustomCertificategetSkipDnsCheckArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainCustomCertificategetSkipDnsCheckRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPutCustomDomainCustomCertificategetSkipDnsCheckAttributeTypeOk(arg PutCustomDomainCustomCertificategetSkipDnsCheckAttributeType) (ret PutCustomDomainCustomCertificategetSkipDnsCheckRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPutCustomDomainCustomCertificategetSkipDnsCheckAttributeType(arg *PutCustomDomainCustomCertificategetSkipDnsCheckAttributeType, val PutCustomDomainCustomCertificategetSkipDnsCheckRetType) { - *arg = &val -} - -/* - types and functions for type -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainCustomCertificateGetTypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPutCustomDomainCustomCertificateGetTypeAttributeTypeOk(arg PutCustomDomainCustomCertificateGetTypeAttributeType) (ret PutCustomDomainCustomCertificateGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPutCustomDomainCustomCertificateGetTypeAttributeType(arg *PutCustomDomainCustomCertificateGetTypeAttributeType, val PutCustomDomainCustomCertificateGetTypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainCustomCertificateGetTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainCustomCertificateGetTypeRetType = string - -// PutCustomDomainCustomCertificate Returned if a custom certificate is used. Response does not contain the certificate or key. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainCustomCertificate struct { - // base64-encoded PEM-encoded certificate - // REQUIRED - Certificate PutCustomDomainCustomCertificateGetCertificateAttributeType `json:"certificate" required:"true"` - // base64-encoded PEM encoded key - // REQUIRED - Key PutCustomDomainCustomCertificateGetKeyAttributeType `json:"key" required:"true"` - // When adding a new custom domain, we do a check to verify that your Domain points to the managed domain via a CNAME or ALIAS. If this is not the case, the call would usually reject. This additional property is an escape hatch to this functionality. It's useful for when you are migrating onto STACKIT CDN. It allows you to migrate without downtime. By providing a custom certificate with `skipDnsCheck` set to `true`, we will not check the Record for correctness. Then, once the CDN is set up, you can change the CNAME Record on your DNS and update the Custom Domain entry to disable this check, or switch to a managed certificate. This field is optional. If not set, the check is **not** skipped. - SkipDnsCheck PutCustomDomainCustomCertificategetSkipDnsCheckAttributeType `json:"skipDnsCheck,omitempty"` - // REQUIRED - Type PutCustomDomainCustomCertificateGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _PutCustomDomainCustomCertificate PutCustomDomainCustomCertificate - -// NewPutCustomDomainCustomCertificate instantiates a new PutCustomDomainCustomCertificate 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPutCustomDomainCustomCertificate(certificate PutCustomDomainCustomCertificateGetCertificateArgType, key PutCustomDomainCustomCertificateGetKeyArgType, types PutCustomDomainCustomCertificateGetTypeArgType) *PutCustomDomainCustomCertificate { - this := PutCustomDomainCustomCertificate{} - setPutCustomDomainCustomCertificateGetCertificateAttributeType(&this.Certificate, certificate) - setPutCustomDomainCustomCertificateGetKeyAttributeType(&this.Key, key) - setPutCustomDomainCustomCertificateGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewPutCustomDomainCustomCertificateWithDefaults instantiates a new PutCustomDomainCustomCertificate 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPutCustomDomainCustomCertificateWithDefaults() *PutCustomDomainCustomCertificate { - this := PutCustomDomainCustomCertificate{} - return &this -} - -// GetCertificate returns the Certificate field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainCustomCertificate) GetCertificate() (ret PutCustomDomainCustomCertificateGetCertificateRetType) { - ret, _ = o.GetCertificateOk() - return ret -} - -// GetCertificateOk returns a tuple with the Certificate field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainCustomCertificate) GetCertificateOk() (ret PutCustomDomainCustomCertificateGetCertificateRetType, ok bool) { - return getPutCustomDomainCustomCertificateGetCertificateAttributeTypeOk(o.Certificate) -} - -// SetCertificate sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainCustomCertificate) SetCertificate(v PutCustomDomainCustomCertificateGetCertificateRetType) { - setPutCustomDomainCustomCertificateGetCertificateAttributeType(&o.Certificate, v) -} - -// GetKey returns the Key field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainCustomCertificate) GetKey() (ret PutCustomDomainCustomCertificateGetKeyRetType) { - ret, _ = o.GetKeyOk() - return ret -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainCustomCertificate) GetKeyOk() (ret PutCustomDomainCustomCertificateGetKeyRetType, ok bool) { - return getPutCustomDomainCustomCertificateGetKeyAttributeTypeOk(o.Key) -} - -// SetKey sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainCustomCertificate) SetKey(v PutCustomDomainCustomCertificateGetKeyRetType) { - setPutCustomDomainCustomCertificateGetKeyAttributeType(&o.Key, v) -} - -// GetSkipDnsCheck returns the SkipDnsCheck field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainCustomCertificate) GetSkipDnsCheck() (res PutCustomDomainCustomCertificategetSkipDnsCheckRetType) { - res, _ = o.GetSkipDnsCheckOk() - return -} - -// GetSkipDnsCheckOk returns a tuple with the SkipDnsCheck field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainCustomCertificate) GetSkipDnsCheckOk() (ret PutCustomDomainCustomCertificategetSkipDnsCheckRetType, ok bool) { - return getPutCustomDomainCustomCertificategetSkipDnsCheckAttributeTypeOk(o.SkipDnsCheck) -} - -// HasSkipDnsCheck returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainCustomCertificate) HasSkipDnsCheck() bool { - _, ok := o.GetSkipDnsCheckOk() - return ok -} - -// SetSkipDnsCheck gets a reference to the given bool and assigns it to the SkipDnsCheck field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainCustomCertificate) SetSkipDnsCheck(v PutCustomDomainCustomCertificategetSkipDnsCheckRetType) { - setPutCustomDomainCustomCertificategetSkipDnsCheckAttributeType(&o.SkipDnsCheck, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainCustomCertificate) GetType() (ret PutCustomDomainCustomCertificateGetTypeRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainCustomCertificate) GetTypeOk() (ret PutCustomDomainCustomCertificateGetTypeRetType, ok bool) { - return getPutCustomDomainCustomCertificateGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainCustomCertificate) SetType(v PutCustomDomainCustomCertificateGetTypeRetType) { - setPutCustomDomainCustomCertificateGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o PutCustomDomainCustomCertificate) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getPutCustomDomainCustomCertificateGetCertificateAttributeTypeOk(o.Certificate); ok { - toSerialize["Certificate"] = val - } - if val, ok := getPutCustomDomainCustomCertificateGetKeyAttributeTypeOk(o.Key); ok { - toSerialize["Key"] = val - } - if val, ok := getPutCustomDomainCustomCertificategetSkipDnsCheckAttributeTypeOk(o.SkipDnsCheck); ok { - toSerialize["SkipDnsCheck"] = val - } - if val, ok := getPutCustomDomainCustomCertificateGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullablePutCustomDomainCustomCertificate struct { - value *PutCustomDomainCustomCertificate - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePutCustomDomainCustomCertificate) Get() *PutCustomDomainCustomCertificate { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePutCustomDomainCustomCertificate) Set(val *PutCustomDomainCustomCertificate) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePutCustomDomainCustomCertificate) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePutCustomDomainCustomCertificate) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullablePutCustomDomainCustomCertificate(val *PutCustomDomainCustomCertificate) *NullablePutCustomDomainCustomCertificate { - return &NullablePutCustomDomainCustomCertificate{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePutCustomDomainCustomCertificate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePutCustomDomainCustomCertificate) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_put_custom_domain_custom_certificate_test.go b/services/cdn/model_put_custom_domain_custom_certificate_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_put_custom_domain_custom_certificate_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_put_custom_domain_managed_certificate.go b/services/cdn/model_put_custom_domain_managed_certificate.go deleted file mode 100644 index 3efdd8e375..0000000000 --- a/services/cdn/model_put_custom_domain_managed_certificate.go +++ /dev/null @@ -1,149 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the PutCustomDomainManagedCertificate type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PutCustomDomainManagedCertificate{} - -/* - types and functions for type -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainManagedCertificateGetTypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPutCustomDomainManagedCertificateGetTypeAttributeTypeOk(arg PutCustomDomainManagedCertificateGetTypeAttributeType) (ret PutCustomDomainManagedCertificateGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPutCustomDomainManagedCertificateGetTypeAttributeType(arg *PutCustomDomainManagedCertificateGetTypeAttributeType, val PutCustomDomainManagedCertificateGetTypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainManagedCertificateGetTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainManagedCertificateGetTypeRetType = string - -// PutCustomDomainManagedCertificate This is returned when no custom certificate is used. We provision and manage a Let's Encrypt Certificate for you -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainManagedCertificate struct { - // REQUIRED - Type PutCustomDomainManagedCertificateGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _PutCustomDomainManagedCertificate PutCustomDomainManagedCertificate - -// NewPutCustomDomainManagedCertificate instantiates a new PutCustomDomainManagedCertificate 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPutCustomDomainManagedCertificate(types PutCustomDomainManagedCertificateGetTypeArgType) *PutCustomDomainManagedCertificate { - this := PutCustomDomainManagedCertificate{} - setPutCustomDomainManagedCertificateGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewPutCustomDomainManagedCertificateWithDefaults instantiates a new PutCustomDomainManagedCertificate 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPutCustomDomainManagedCertificateWithDefaults() *PutCustomDomainManagedCertificate { - this := PutCustomDomainManagedCertificate{} - return &this -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainManagedCertificate) GetType() (ret PutCustomDomainManagedCertificateGetTypeRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainManagedCertificate) GetTypeOk() (ret PutCustomDomainManagedCertificateGetTypeRetType, ok bool) { - return getPutCustomDomainManagedCertificateGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainManagedCertificate) SetType(v PutCustomDomainManagedCertificateGetTypeRetType) { - setPutCustomDomainManagedCertificateGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o PutCustomDomainManagedCertificate) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getPutCustomDomainManagedCertificateGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullablePutCustomDomainManagedCertificate struct { - value *PutCustomDomainManagedCertificate - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePutCustomDomainManagedCertificate) Get() *PutCustomDomainManagedCertificate { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePutCustomDomainManagedCertificate) Set(val *PutCustomDomainManagedCertificate) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePutCustomDomainManagedCertificate) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePutCustomDomainManagedCertificate) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullablePutCustomDomainManagedCertificate(val *PutCustomDomainManagedCertificate) *NullablePutCustomDomainManagedCertificate { - return &NullablePutCustomDomainManagedCertificate{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePutCustomDomainManagedCertificate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePutCustomDomainManagedCertificate) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_put_custom_domain_managed_certificate_test.go b/services/cdn/model_put_custom_domain_managed_certificate_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_put_custom_domain_managed_certificate_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_put_custom_domain_payload.go b/services/cdn/model_put_custom_domain_payload.go deleted file mode 100644 index 61a7c1920f..0000000000 --- a/services/cdn/model_put_custom_domain_payload.go +++ /dev/null @@ -1,210 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the PutCustomDomainPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PutCustomDomainPayload{} - -/* - types and functions for certificate -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainPayloadGetCertificateAttributeType = *PutCustomDomainPayloadCertificate - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainPayloadGetCertificateArgType = PutCustomDomainPayloadCertificate - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainPayloadGetCertificateRetType = PutCustomDomainPayloadCertificate - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPutCustomDomainPayloadGetCertificateAttributeTypeOk(arg PutCustomDomainPayloadGetCertificateAttributeType) (ret PutCustomDomainPayloadGetCertificateRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPutCustomDomainPayloadGetCertificateAttributeType(arg *PutCustomDomainPayloadGetCertificateAttributeType, val PutCustomDomainPayloadGetCertificateRetType) { - *arg = &val -} - -/* - types and functions for intentId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainPayloadGetIntentIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPutCustomDomainPayloadGetIntentIdAttributeTypeOk(arg PutCustomDomainPayloadGetIntentIdAttributeType) (ret PutCustomDomainPayloadGetIntentIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPutCustomDomainPayloadGetIntentIdAttributeType(arg *PutCustomDomainPayloadGetIntentIdAttributeType, val PutCustomDomainPayloadGetIntentIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainPayloadGetIntentIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainPayloadGetIntentIdRetType = string - -// PutCustomDomainPayload struct for PutCustomDomainPayload -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainPayload struct { - Certificate PutCustomDomainPayloadGetCertificateAttributeType `json:"certificate,omitempty"` - // While optional, it is greatly encouraged to provide an `intentId`. This is used to deduplicate requests. If multiple modifying Requests with the same `intentId` for a given `projectId` are received, all but the first request are dropped. - IntentId PutCustomDomainPayloadGetIntentIdAttributeType `json:"intentId,omitempty"` -} - -// NewPutCustomDomainPayload instantiates a new PutCustomDomainPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPutCustomDomainPayload() *PutCustomDomainPayload { - this := PutCustomDomainPayload{} - return &this -} - -// NewPutCustomDomainPayloadWithDefaults instantiates a new PutCustomDomainPayload 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPutCustomDomainPayloadWithDefaults() *PutCustomDomainPayload { - this := PutCustomDomainPayload{} - return &this -} - -// GetCertificate returns the Certificate field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainPayload) GetCertificate() (res PutCustomDomainPayloadGetCertificateRetType) { - res, _ = o.GetCertificateOk() - return -} - -// GetCertificateOk returns a tuple with the Certificate field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainPayload) GetCertificateOk() (ret PutCustomDomainPayloadGetCertificateRetType, ok bool) { - return getPutCustomDomainPayloadGetCertificateAttributeTypeOk(o.Certificate) -} - -// HasCertificate returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainPayload) HasCertificate() bool { - _, ok := o.GetCertificateOk() - return ok -} - -// SetCertificate gets a reference to the given PutCustomDomainPayloadCertificate and assigns it to the Certificate field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainPayload) SetCertificate(v PutCustomDomainPayloadGetCertificateRetType) { - setPutCustomDomainPayloadGetCertificateAttributeType(&o.Certificate, v) -} - -// GetIntentId returns the IntentId field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainPayload) GetIntentId() (res PutCustomDomainPayloadGetIntentIdRetType) { - res, _ = o.GetIntentIdOk() - return -} - -// GetIntentIdOk returns a tuple with the IntentId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainPayload) GetIntentIdOk() (ret PutCustomDomainPayloadGetIntentIdRetType, ok bool) { - return getPutCustomDomainPayloadGetIntentIdAttributeTypeOk(o.IntentId) -} - -// HasIntentId returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainPayload) HasIntentId() bool { - _, ok := o.GetIntentIdOk() - return ok -} - -// SetIntentId gets a reference to the given string and assigns it to the IntentId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainPayload) SetIntentId(v PutCustomDomainPayloadGetIntentIdRetType) { - setPutCustomDomainPayloadGetIntentIdAttributeType(&o.IntentId, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o PutCustomDomainPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getPutCustomDomainPayloadGetCertificateAttributeTypeOk(o.Certificate); ok { - toSerialize["Certificate"] = val - } - if val, ok := getPutCustomDomainPayloadGetIntentIdAttributeTypeOk(o.IntentId); ok { - toSerialize["IntentId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullablePutCustomDomainPayload struct { - value *PutCustomDomainPayload - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePutCustomDomainPayload) Get() *PutCustomDomainPayload { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePutCustomDomainPayload) Set(val *PutCustomDomainPayload) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePutCustomDomainPayload) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePutCustomDomainPayload) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullablePutCustomDomainPayload(val *PutCustomDomainPayload) *NullablePutCustomDomainPayload { - return &NullablePutCustomDomainPayload{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePutCustomDomainPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePutCustomDomainPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_put_custom_domain_payload_certificate.go b/services/cdn/model_put_custom_domain_payload_certificate.go deleted file mode 100644 index 810ec0aa79..0000000000 --- a/services/cdn/model_put_custom_domain_payload_certificate.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// PutCustomDomainPayloadCertificate - Pass a custom certificate to be served by the CDN when calling the custom domain. Will use a managed certificate when omitted -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainPayloadCertificate struct { - PutCustomDomainCustomCertificate *PutCustomDomainCustomCertificate - PutCustomDomainManagedCertificate *PutCustomDomainManagedCertificate -} - -// PutCustomDomainCustomCertificateAsPutCustomDomainPayloadCertificate is a convenience function that returns PutCustomDomainCustomCertificate wrapped in PutCustomDomainPayloadCertificate -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func PutCustomDomainCustomCertificateAsPutCustomDomainPayloadCertificate(v *PutCustomDomainCustomCertificate) PutCustomDomainPayloadCertificate { - return PutCustomDomainPayloadCertificate{ - PutCustomDomainCustomCertificate: v, - } -} - -// PutCustomDomainManagedCertificateAsPutCustomDomainPayloadCertificate is a convenience function that returns PutCustomDomainManagedCertificate wrapped in PutCustomDomainPayloadCertificate -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func PutCustomDomainManagedCertificateAsPutCustomDomainPayloadCertificate(v *PutCustomDomainManagedCertificate) PutCustomDomainPayloadCertificate { - return PutCustomDomainPayloadCertificate{ - PutCustomDomainManagedCertificate: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (dst *PutCustomDomainPayloadCertificate) 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 'PutCustomDomainCustomCertificate' - if jsonDict["type"] == "PutCustomDomainCustomCertificate" { - // try to unmarshal JSON data into PutCustomDomainCustomCertificate - err = json.Unmarshal(data, &dst.PutCustomDomainCustomCertificate) - if err == nil { - return nil // data stored in dst.PutCustomDomainCustomCertificate, return on the first match - } else { - dst.PutCustomDomainCustomCertificate = nil - return fmt.Errorf("failed to unmarshal PutCustomDomainPayloadCertificate as PutCustomDomainCustomCertificate: %s", err.Error()) - } - } - - // check if the discriminator value is 'PutCustomDomainManagedCertificate' - if jsonDict["type"] == "PutCustomDomainManagedCertificate" { - // try to unmarshal JSON data into PutCustomDomainManagedCertificate - err = json.Unmarshal(data, &dst.PutCustomDomainManagedCertificate) - if err == nil { - return nil // data stored in dst.PutCustomDomainManagedCertificate, return on the first match - } else { - dst.PutCustomDomainManagedCertificate = nil - return fmt.Errorf("failed to unmarshal PutCustomDomainPayloadCertificate as PutCustomDomainManagedCertificate: %s", err.Error()) - } - } - - // check if the discriminator value is 'custom' - if jsonDict["type"] == "custom" { - // try to unmarshal JSON data into PutCustomDomainCustomCertificate - err = json.Unmarshal(data, &dst.PutCustomDomainCustomCertificate) - if err == nil { - return nil // data stored in dst.PutCustomDomainCustomCertificate, return on the first match - } else { - dst.PutCustomDomainCustomCertificate = nil - return fmt.Errorf("failed to unmarshal PutCustomDomainPayloadCertificate as PutCustomDomainCustomCertificate: %s", err.Error()) - } - } - - // check if the discriminator value is 'managed' - if jsonDict["type"] == "managed" { - // try to unmarshal JSON data into PutCustomDomainManagedCertificate - err = json.Unmarshal(data, &dst.PutCustomDomainManagedCertificate) - if err == nil { - return nil // data stored in dst.PutCustomDomainManagedCertificate, return on the first match - } else { - dst.PutCustomDomainManagedCertificate = nil - return fmt.Errorf("failed to unmarshal PutCustomDomainPayloadCertificate as PutCustomDomainManagedCertificate: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src PutCustomDomainPayloadCertificate) MarshalJSON() ([]byte, error) { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - if src.PutCustomDomainCustomCertificate != nil { - return json.Marshal(&src.PutCustomDomainCustomCertificate) - } - - if src.PutCustomDomainManagedCertificate != nil { - return json.Marshal(&src.PutCustomDomainManagedCertificate) - } - - return []byte("{}"), nil // no data in oneOf schemas => empty JSON object -} - -// Get the actual instance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (obj *PutCustomDomainPayloadCertificate) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.PutCustomDomainCustomCertificate != nil { - return obj.PutCustomDomainCustomCertificate - } - - if obj.PutCustomDomainManagedCertificate != nil { - return obj.PutCustomDomainManagedCertificate - } - - // all schemas are nil - return nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullablePutCustomDomainPayloadCertificate struct { - value *PutCustomDomainPayloadCertificate - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePutCustomDomainPayloadCertificate) Get() *PutCustomDomainPayloadCertificate { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePutCustomDomainPayloadCertificate) Set(val *PutCustomDomainPayloadCertificate) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePutCustomDomainPayloadCertificate) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePutCustomDomainPayloadCertificate) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullablePutCustomDomainPayloadCertificate(val *PutCustomDomainPayloadCertificate) *NullablePutCustomDomainPayloadCertificate { - return &NullablePutCustomDomainPayloadCertificate{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePutCustomDomainPayloadCertificate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePutCustomDomainPayloadCertificate) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_put_custom_domain_payload_certificate_test.go b/services/cdn/model_put_custom_domain_payload_certificate_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_put_custom_domain_payload_certificate_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_put_custom_domain_payload_test.go b/services/cdn/model_put_custom_domain_payload_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_put_custom_domain_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_put_custom_domain_response.go b/services/cdn/model_put_custom_domain_response.go deleted file mode 100644 index 54efae3a63..0000000000 --- a/services/cdn/model_put_custom_domain_response.go +++ /dev/null @@ -1,207 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the PutCustomDomainResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PutCustomDomainResponse{} - -/* - types and functions for certificate -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainResponseGetCertificateAttributeType = *PutCustomDomainResponseCertificate - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainResponseGetCertificateArgType = PutCustomDomainResponseCertificate - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainResponseGetCertificateRetType = PutCustomDomainResponseCertificate - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPutCustomDomainResponseGetCertificateAttributeTypeOk(arg PutCustomDomainResponseGetCertificateAttributeType) (ret PutCustomDomainResponseGetCertificateRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPutCustomDomainResponseGetCertificateAttributeType(arg *PutCustomDomainResponseGetCertificateAttributeType, val PutCustomDomainResponseGetCertificateRetType) { - *arg = &val -} - -/* - types and functions for customDomain -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainResponseGetCustomDomainAttributeType = *CustomDomain - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainResponseGetCustomDomainArgType = CustomDomain - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainResponseGetCustomDomainRetType = CustomDomain - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPutCustomDomainResponseGetCustomDomainAttributeTypeOk(arg PutCustomDomainResponseGetCustomDomainAttributeType) (ret PutCustomDomainResponseGetCustomDomainRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPutCustomDomainResponseGetCustomDomainAttributeType(arg *PutCustomDomainResponseGetCustomDomainAttributeType, val PutCustomDomainResponseGetCustomDomainRetType) { - *arg = &val -} - -// PutCustomDomainResponse struct for PutCustomDomainResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainResponse struct { - Certificate PutCustomDomainResponseGetCertificateAttributeType `json:"certificate,omitempty"` - // REQUIRED - CustomDomain PutCustomDomainResponseGetCustomDomainAttributeType `json:"customDomain" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _PutCustomDomainResponse PutCustomDomainResponse - -// NewPutCustomDomainResponse instantiates a new PutCustomDomainResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPutCustomDomainResponse(customDomain PutCustomDomainResponseGetCustomDomainArgType) *PutCustomDomainResponse { - this := PutCustomDomainResponse{} - setPutCustomDomainResponseGetCustomDomainAttributeType(&this.CustomDomain, customDomain) - return &this -} - -// NewPutCustomDomainResponseWithDefaults instantiates a new PutCustomDomainResponse 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewPutCustomDomainResponseWithDefaults() *PutCustomDomainResponse { - this := PutCustomDomainResponse{} - return &this -} - -// GetCertificate returns the Certificate field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainResponse) GetCertificate() (res PutCustomDomainResponseGetCertificateRetType) { - res, _ = o.GetCertificateOk() - return -} - -// GetCertificateOk returns a tuple with the Certificate field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainResponse) GetCertificateOk() (ret PutCustomDomainResponseGetCertificateRetType, ok bool) { - return getPutCustomDomainResponseGetCertificateAttributeTypeOk(o.Certificate) -} - -// HasCertificate returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainResponse) HasCertificate() bool { - _, ok := o.GetCertificateOk() - return ok -} - -// SetCertificate gets a reference to the given PutCustomDomainResponseCertificate and assigns it to the Certificate field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainResponse) SetCertificate(v PutCustomDomainResponseGetCertificateRetType) { - setPutCustomDomainResponseGetCertificateAttributeType(&o.Certificate, v) -} - -// GetCustomDomain returns the CustomDomain field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainResponse) GetCustomDomain() (ret PutCustomDomainResponseGetCustomDomainRetType) { - ret, _ = o.GetCustomDomainOk() - return ret -} - -// GetCustomDomainOk returns a tuple with the CustomDomain field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainResponse) GetCustomDomainOk() (ret PutCustomDomainResponseGetCustomDomainRetType, ok bool) { - return getPutCustomDomainResponseGetCustomDomainAttributeTypeOk(o.CustomDomain) -} - -// SetCustomDomain sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PutCustomDomainResponse) SetCustomDomain(v PutCustomDomainResponseGetCustomDomainRetType) { - setPutCustomDomainResponseGetCustomDomainAttributeType(&o.CustomDomain, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o PutCustomDomainResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getPutCustomDomainResponseGetCertificateAttributeTypeOk(o.Certificate); ok { - toSerialize["Certificate"] = val - } - if val, ok := getPutCustomDomainResponseGetCustomDomainAttributeTypeOk(o.CustomDomain); ok { - toSerialize["CustomDomain"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullablePutCustomDomainResponse struct { - value *PutCustomDomainResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePutCustomDomainResponse) Get() *PutCustomDomainResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePutCustomDomainResponse) Set(val *PutCustomDomainResponse) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePutCustomDomainResponse) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePutCustomDomainResponse) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullablePutCustomDomainResponse(val *PutCustomDomainResponse) *NullablePutCustomDomainResponse { - return &NullablePutCustomDomainResponse{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePutCustomDomainResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePutCustomDomainResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_put_custom_domain_response_certificate.go b/services/cdn/model_put_custom_domain_response_certificate.go deleted file mode 100644 index b09c6fbc59..0000000000 --- a/services/cdn/model_put_custom_domain_response_certificate.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// PutCustomDomainResponseCertificate - Pass a custom certificate to be served by the CDN when calling the custom domain. Will use a managed certificate when omitted -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PutCustomDomainResponseCertificate struct { - GetCustomDomainCustomCertificate *GetCustomDomainCustomCertificate - GetCustomDomainManagedCertificate *GetCustomDomainManagedCertificate -} - -// GetCustomDomainCustomCertificateAsPutCustomDomainResponseCertificate is a convenience function that returns GetCustomDomainCustomCertificate wrapped in PutCustomDomainResponseCertificate -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func GetCustomDomainCustomCertificateAsPutCustomDomainResponseCertificate(v *GetCustomDomainCustomCertificate) PutCustomDomainResponseCertificate { - return PutCustomDomainResponseCertificate{ - GetCustomDomainCustomCertificate: v, - } -} - -// GetCustomDomainManagedCertificateAsPutCustomDomainResponseCertificate is a convenience function that returns GetCustomDomainManagedCertificate wrapped in PutCustomDomainResponseCertificate -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func GetCustomDomainManagedCertificateAsPutCustomDomainResponseCertificate(v *GetCustomDomainManagedCertificate) PutCustomDomainResponseCertificate { - return PutCustomDomainResponseCertificate{ - GetCustomDomainManagedCertificate: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (dst *PutCustomDomainResponseCertificate) 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 'GetCustomDomainCustomCertificate' - if jsonDict["type"] == "GetCustomDomainCustomCertificate" { - // try to unmarshal JSON data into GetCustomDomainCustomCertificate - err = json.Unmarshal(data, &dst.GetCustomDomainCustomCertificate) - if err == nil { - return nil // data stored in dst.GetCustomDomainCustomCertificate, return on the first match - } else { - dst.GetCustomDomainCustomCertificate = nil - return fmt.Errorf("failed to unmarshal PutCustomDomainResponseCertificate as GetCustomDomainCustomCertificate: %s", err.Error()) - } - } - - // check if the discriminator value is 'GetCustomDomainManagedCertificate' - if jsonDict["type"] == "GetCustomDomainManagedCertificate" { - // try to unmarshal JSON data into GetCustomDomainManagedCertificate - err = json.Unmarshal(data, &dst.GetCustomDomainManagedCertificate) - if err == nil { - return nil // data stored in dst.GetCustomDomainManagedCertificate, return on the first match - } else { - dst.GetCustomDomainManagedCertificate = nil - return fmt.Errorf("failed to unmarshal PutCustomDomainResponseCertificate as GetCustomDomainManagedCertificate: %s", err.Error()) - } - } - - // check if the discriminator value is 'custom' - if jsonDict["type"] == "custom" { - // try to unmarshal JSON data into GetCustomDomainCustomCertificate - err = json.Unmarshal(data, &dst.GetCustomDomainCustomCertificate) - if err == nil { - return nil // data stored in dst.GetCustomDomainCustomCertificate, return on the first match - } else { - dst.GetCustomDomainCustomCertificate = nil - return fmt.Errorf("failed to unmarshal PutCustomDomainResponseCertificate as GetCustomDomainCustomCertificate: %s", err.Error()) - } - } - - // check if the discriminator value is 'managed' - if jsonDict["type"] == "managed" { - // try to unmarshal JSON data into GetCustomDomainManagedCertificate - err = json.Unmarshal(data, &dst.GetCustomDomainManagedCertificate) - if err == nil { - return nil // data stored in dst.GetCustomDomainManagedCertificate, return on the first match - } else { - dst.GetCustomDomainManagedCertificate = nil - return fmt.Errorf("failed to unmarshal PutCustomDomainResponseCertificate as GetCustomDomainManagedCertificate: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src PutCustomDomainResponseCertificate) MarshalJSON() ([]byte, error) { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - if src.GetCustomDomainCustomCertificate != nil { - return json.Marshal(&src.GetCustomDomainCustomCertificate) - } - - if src.GetCustomDomainManagedCertificate != nil { - return json.Marshal(&src.GetCustomDomainManagedCertificate) - } - - return []byte("{}"), nil // no data in oneOf schemas => empty JSON object -} - -// Get the actual instance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (obj *PutCustomDomainResponseCertificate) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.GetCustomDomainCustomCertificate != nil { - return obj.GetCustomDomainCustomCertificate - } - - if obj.GetCustomDomainManagedCertificate != nil { - return obj.GetCustomDomainManagedCertificate - } - - // all schemas are nil - return nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullablePutCustomDomainResponseCertificate struct { - value *PutCustomDomainResponseCertificate - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePutCustomDomainResponseCertificate) Get() *PutCustomDomainResponseCertificate { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePutCustomDomainResponseCertificate) Set(val *PutCustomDomainResponseCertificate) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePutCustomDomainResponseCertificate) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePutCustomDomainResponseCertificate) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullablePutCustomDomainResponseCertificate(val *PutCustomDomainResponseCertificate) *NullablePutCustomDomainResponseCertificate { - return &NullablePutCustomDomainResponseCertificate{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullablePutCustomDomainResponseCertificate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullablePutCustomDomainResponseCertificate) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_put_custom_domain_response_certificate_test.go b/services/cdn/model_put_custom_domain_response_certificate_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_put_custom_domain_response_certificate_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_put_custom_domain_response_test.go b/services/cdn/model_put_custom_domain_response_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_put_custom_domain_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_redirect_config.go b/services/cdn/model_redirect_config.go deleted file mode 100644 index 01c0450d3d..0000000000 --- a/services/cdn/model_redirect_config.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the RedirectConfig type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RedirectConfig{} - -/* - types and functions for rules -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectConfigGetRulesAttributeType = *[]RedirectRule - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectConfigGetRulesArgType = []RedirectRule - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectConfigGetRulesRetType = []RedirectRule - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRedirectConfigGetRulesAttributeTypeOk(arg RedirectConfigGetRulesAttributeType) (ret RedirectConfigGetRulesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRedirectConfigGetRulesAttributeType(arg *RedirectConfigGetRulesAttributeType, val RedirectConfigGetRulesRetType) { - *arg = &val -} - -// RedirectConfig A wrapper for a list of redirect rules that allows for redirect settings on a distribution. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectConfig struct { - // A list of redirect rules. The order of rules matters for evaluation. - Rules RedirectConfigGetRulesAttributeType `json:"rules,omitempty"` -} - -// NewRedirectConfig instantiates a new RedirectConfig 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRedirectConfig() *RedirectConfig { - this := RedirectConfig{} - return &this -} - -// NewRedirectConfigWithDefaults instantiates a new RedirectConfig 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRedirectConfigWithDefaults() *RedirectConfig { - this := RedirectConfig{} - return &this -} - -// GetRules returns the Rules field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectConfig) GetRules() (res RedirectConfigGetRulesRetType) { - res, _ = o.GetRulesOk() - return -} - -// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectConfig) GetRulesOk() (ret RedirectConfigGetRulesRetType, ok bool) { - return getRedirectConfigGetRulesAttributeTypeOk(o.Rules) -} - -// HasRules returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectConfig) HasRules() bool { - _, ok := o.GetRulesOk() - return ok -} - -// SetRules gets a reference to the given []RedirectRule and assigns it to the Rules field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectConfig) SetRules(v RedirectConfigGetRulesRetType) { - setRedirectConfigGetRulesAttributeType(&o.Rules, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o RedirectConfig) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getRedirectConfigGetRulesAttributeTypeOk(o.Rules); ok { - toSerialize["Rules"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableRedirectConfig struct { - value *RedirectConfig - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRedirectConfig) Get() *RedirectConfig { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRedirectConfig) Set(val *RedirectConfig) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRedirectConfig) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRedirectConfig) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableRedirectConfig(val *RedirectConfig) *NullableRedirectConfig { - return &NullableRedirectConfig{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRedirectConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRedirectConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_redirect_config_test.go b/services/cdn/model_redirect_config_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_redirect_config_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_redirect_rule.go b/services/cdn/model_redirect_rule.go deleted file mode 100644 index a84f536217..0000000000 --- a/services/cdn/model_redirect_rule.go +++ /dev/null @@ -1,569 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// checks if the RedirectRule type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RedirectRule{} - -/* - types and functions for description -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectRuleGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRedirectRuleGetDescriptionAttributeTypeOk(arg RedirectRuleGetDescriptionAttributeType) (ret RedirectRuleGetDescriptionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRedirectRuleGetDescriptionAttributeType(arg *RedirectRuleGetDescriptionAttributeType, val RedirectRuleGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectRuleGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectRuleGetDescriptionRetType = string - -/* - types and functions for enabled -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectRulegetEnabledAttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectRulegetEnabledArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectRulegetEnabledRetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRedirectRulegetEnabledAttributeTypeOk(arg RedirectRulegetEnabledAttributeType) (ret RedirectRulegetEnabledRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRedirectRulegetEnabledAttributeType(arg *RedirectRulegetEnabledAttributeType, val RedirectRulegetEnabledRetType) { - *arg = &val -} - -/* - types and functions for matchers -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectRuleGetMatchersAttributeType = *[]Matcher - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectRuleGetMatchersArgType = []Matcher - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectRuleGetMatchersRetType = []Matcher - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRedirectRuleGetMatchersAttributeTypeOk(arg RedirectRuleGetMatchersAttributeType) (ret RedirectRuleGetMatchersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRedirectRuleGetMatchersAttributeType(arg *RedirectRuleGetMatchersAttributeType, val RedirectRuleGetMatchersRetType) { - *arg = &val -} - -/* - types and functions for ruleMatchCondition -*/ - -// isEnumRef -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectRuleGetRuleMatchConditionAttributeType = *MatchCondition - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectRuleGetRuleMatchConditionArgType = MatchCondition - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectRuleGetRuleMatchConditionRetType = MatchCondition - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRedirectRuleGetRuleMatchConditionAttributeTypeOk(arg RedirectRuleGetRuleMatchConditionAttributeType) (ret RedirectRuleGetRuleMatchConditionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRedirectRuleGetRuleMatchConditionAttributeType(arg *RedirectRuleGetRuleMatchConditionAttributeType, val RedirectRuleGetRuleMatchConditionRetType) { - *arg = &val -} - -/* - types and functions for statusCode -*/ - -// isEnum - -// RedirectRuleStatusCode The HTTP status code for the redirect. Must be one of 301, 302, 303, 307, or 308. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectRuleStatusCode int - -// List of StatusCode -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - REDIRECTRULESTATUS_CODE__301 RedirectRuleStatusCode = 301 - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - REDIRECTRULESTATUS_CODE__302 RedirectRuleStatusCode = 302 - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - REDIRECTRULESTATUS_CODE__303 RedirectRuleStatusCode = 303 - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - REDIRECTRULESTATUS_CODE__307 RedirectRuleStatusCode = 307 - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - REDIRECTRULESTATUS_CODE__308 RedirectRuleStatusCode = 308 -) - -// All allowed values of RedirectRule enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedRedirectRuleStatusCodeEnumValues = []RedirectRuleStatusCode{ - 301, - 302, - 303, - 307, - 308, -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *RedirectRuleStatusCode) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson RedirectRuleStatusCode - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := RedirectRuleStatusCode(value) - for _, existing := range AllowedRedirectRuleStatusCodeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid RedirectRule", value) -} - -// NewRedirectRuleStatusCodeFromValue returns a pointer to a valid RedirectRuleStatusCode -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRedirectRuleStatusCodeFromValue(v RedirectRuleStatusCode) (*RedirectRuleStatusCode, error) { - ev := RedirectRuleStatusCode(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for RedirectRuleStatusCode: valid values are %v", v, AllowedRedirectRuleStatusCodeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v RedirectRuleStatusCode) IsValid() bool { - for _, existing := range AllowedRedirectRuleStatusCodeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to StatusCodeStatusCode value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v RedirectRuleStatusCode) Ptr() *RedirectRuleStatusCode { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableRedirectRuleStatusCode struct { - value *RedirectRuleStatusCode - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRedirectRuleStatusCode) Get() *RedirectRuleStatusCode { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRedirectRuleStatusCode) Set(val *RedirectRuleStatusCode) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRedirectRuleStatusCode) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRedirectRuleStatusCode) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableRedirectRuleStatusCode(val *RedirectRuleStatusCode) *NullableRedirectRuleStatusCode { - return &NullableRedirectRuleStatusCode{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRedirectRuleStatusCode) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRedirectRuleStatusCode) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectRuleGetStatusCodeAttributeType = *RedirectRuleStatusCode - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectRuleGetStatusCodeArgType = RedirectRuleStatusCode - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectRuleGetStatusCodeRetType = RedirectRuleStatusCode - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRedirectRuleGetStatusCodeAttributeTypeOk(arg RedirectRuleGetStatusCodeAttributeType) (ret RedirectRuleGetStatusCodeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRedirectRuleGetStatusCodeAttributeType(arg *RedirectRuleGetStatusCodeAttributeType, val RedirectRuleGetStatusCodeRetType) { - *arg = &val -} - -/* - types and functions for targetUrl -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectRuleGetTargetUrlAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRedirectRuleGetTargetUrlAttributeTypeOk(arg RedirectRuleGetTargetUrlAttributeType) (ret RedirectRuleGetTargetUrlRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRedirectRuleGetTargetUrlAttributeType(arg *RedirectRuleGetTargetUrlAttributeType, val RedirectRuleGetTargetUrlRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectRuleGetTargetUrlArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectRuleGetTargetUrlRetType = string - -// RedirectRule A single redirect rule defining a source pattern and a target URL. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RedirectRule struct { - // An optional description for the redirect rule. - Description RedirectRuleGetDescriptionAttributeType `json:"description,omitempty"` - // A toggle to enable or disable the redirect rule. - Enabled RedirectRulegetEnabledAttributeType `json:"enabled,omitempty"` - // A list of matchers that define when this rule should apply. At least one matcher is required. - // REQUIRED - Matchers RedirectRuleGetMatchersAttributeType `json:"matchers" required:"true"` - RuleMatchCondition RedirectRuleGetRuleMatchConditionAttributeType `json:"ruleMatchCondition,omitempty"` - // The HTTP status code for the redirect. Must be one of 301, 302, 303, 307, or 308. - // Can be cast to int32 without loss of precision. - // REQUIRED - StatusCode RedirectRuleGetStatusCodeAttributeType `json:"statusCode" required:"true"` - // The target URL to redirect to. Must be a valid URI. - // REQUIRED - TargetUrl RedirectRuleGetTargetUrlAttributeType `json:"targetUrl" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _RedirectRule RedirectRule - -// NewRedirectRule instantiates a new RedirectRule 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRedirectRule(matchers RedirectRuleGetMatchersArgType, statusCode RedirectRuleGetStatusCodeArgType, targetUrl RedirectRuleGetTargetUrlArgType) *RedirectRule { - this := RedirectRule{} - setRedirectRuleGetMatchersAttributeType(&this.Matchers, matchers) - setRedirectRuleGetStatusCodeAttributeType(&this.StatusCode, statusCode) - setRedirectRuleGetTargetUrlAttributeType(&this.TargetUrl, targetUrl) - return &this -} - -// NewRedirectRuleWithDefaults instantiates a new RedirectRule 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRedirectRuleWithDefaults() *RedirectRule { - this := RedirectRule{} - var enabled bool = true - this.Enabled = &enabled - var ruleMatchCondition MatchCondition = MATCHCONDITION_ANY - this.RuleMatchCondition = &ruleMatchCondition - return &this -} - -// GetDescription returns the Description field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectRule) GetDescription() (res RedirectRuleGetDescriptionRetType) { - res, _ = o.GetDescriptionOk() - return -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectRule) GetDescriptionOk() (ret RedirectRuleGetDescriptionRetType, ok bool) { - return getRedirectRuleGetDescriptionAttributeTypeOk(o.Description) -} - -// HasDescription returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectRule) HasDescription() bool { - _, ok := o.GetDescriptionOk() - return ok -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectRule) SetDescription(v RedirectRuleGetDescriptionRetType) { - setRedirectRuleGetDescriptionAttributeType(&o.Description, v) -} - -// GetEnabled returns the Enabled field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectRule) GetEnabled() (res RedirectRulegetEnabledRetType) { - res, _ = o.GetEnabledOk() - return -} - -// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectRule) GetEnabledOk() (ret RedirectRulegetEnabledRetType, ok bool) { - return getRedirectRulegetEnabledAttributeTypeOk(o.Enabled) -} - -// HasEnabled returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectRule) HasEnabled() bool { - _, ok := o.GetEnabledOk() - return ok -} - -// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectRule) SetEnabled(v RedirectRulegetEnabledRetType) { - setRedirectRulegetEnabledAttributeType(&o.Enabled, v) -} - -// GetMatchers returns the Matchers field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectRule) GetMatchers() (ret RedirectRuleGetMatchersRetType) { - ret, _ = o.GetMatchersOk() - return ret -} - -// GetMatchersOk returns a tuple with the Matchers field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectRule) GetMatchersOk() (ret RedirectRuleGetMatchersRetType, ok bool) { - return getRedirectRuleGetMatchersAttributeTypeOk(o.Matchers) -} - -// SetMatchers sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectRule) SetMatchers(v RedirectRuleGetMatchersRetType) { - setRedirectRuleGetMatchersAttributeType(&o.Matchers, v) -} - -// GetRuleMatchCondition returns the RuleMatchCondition field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectRule) GetRuleMatchCondition() (res RedirectRuleGetRuleMatchConditionRetType) { - res, _ = o.GetRuleMatchConditionOk() - return -} - -// GetRuleMatchConditionOk returns a tuple with the RuleMatchCondition field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectRule) GetRuleMatchConditionOk() (ret RedirectRuleGetRuleMatchConditionRetType, ok bool) { - return getRedirectRuleGetRuleMatchConditionAttributeTypeOk(o.RuleMatchCondition) -} - -// HasRuleMatchCondition returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectRule) HasRuleMatchCondition() bool { - _, ok := o.GetRuleMatchConditionOk() - return ok -} - -// SetRuleMatchCondition gets a reference to the given MatchCondition and assigns it to the RuleMatchCondition field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectRule) SetRuleMatchCondition(v RedirectRuleGetRuleMatchConditionRetType) { - setRedirectRuleGetRuleMatchConditionAttributeType(&o.RuleMatchCondition, v) -} - -// GetStatusCode returns the StatusCode field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectRule) GetStatusCode() (ret RedirectRuleGetStatusCodeRetType) { - ret, _ = o.GetStatusCodeOk() - return ret -} - -// GetStatusCodeOk returns a tuple with the StatusCode field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectRule) GetStatusCodeOk() (ret RedirectRuleGetStatusCodeRetType, ok bool) { - return getRedirectRuleGetStatusCodeAttributeTypeOk(o.StatusCode) -} - -// SetStatusCode sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectRule) SetStatusCode(v RedirectRuleGetStatusCodeRetType) { - setRedirectRuleGetStatusCodeAttributeType(&o.StatusCode, v) -} - -// GetTargetUrl returns the TargetUrl field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectRule) GetTargetUrl() (ret RedirectRuleGetTargetUrlRetType) { - ret, _ = o.GetTargetUrlOk() - return ret -} - -// GetTargetUrlOk returns a tuple with the TargetUrl field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectRule) GetTargetUrlOk() (ret RedirectRuleGetTargetUrlRetType, ok bool) { - return getRedirectRuleGetTargetUrlAttributeTypeOk(o.TargetUrl) -} - -// SetTargetUrl sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RedirectRule) SetTargetUrl(v RedirectRuleGetTargetUrlRetType) { - setRedirectRuleGetTargetUrlAttributeType(&o.TargetUrl, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o RedirectRule) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getRedirectRuleGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getRedirectRulegetEnabledAttributeTypeOk(o.Enabled); ok { - toSerialize["Enabled"] = val - } - if val, ok := getRedirectRuleGetMatchersAttributeTypeOk(o.Matchers); ok { - toSerialize["Matchers"] = val - } - if val, ok := getRedirectRuleGetRuleMatchConditionAttributeTypeOk(o.RuleMatchCondition); ok { - toSerialize["RuleMatchCondition"] = val - } - if val, ok := getRedirectRuleGetStatusCodeAttributeTypeOk(o.StatusCode); ok { - toSerialize["StatusCode"] = val - } - if val, ok := getRedirectRuleGetTargetUrlAttributeTypeOk(o.TargetUrl); ok { - toSerialize["TargetUrl"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableRedirectRule struct { - value *RedirectRule - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRedirectRule) Get() *RedirectRule { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRedirectRule) Set(val *RedirectRule) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRedirectRule) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRedirectRule) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableRedirectRule(val *RedirectRule) *NullableRedirectRule { - return &NullableRedirectRule{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRedirectRule) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRedirectRule) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_redirect_rule_test.go b/services/cdn/model_redirect_rule_test.go deleted file mode 100644 index dab4b88d9e..0000000000 --- a/services/cdn/model_redirect_rule_test.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn - -import ( - "testing" -) - -// isEnum - -func TestRedirectRuleStatusCode_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`301`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`302`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`303`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 4`, - args: args{ - src: []byte(`307`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 5`, - args: args{ - src: []byte(`308`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := RedirectRuleStatusCode(-1) - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/cdn/model_region.go b/services/cdn/model_region.go deleted file mode 100644 index 20983254e1..0000000000 --- a/services/cdn/model_region.go +++ /dev/null @@ -1,141 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// Region The following regions exist: - `EU` - Europe - `US` - United States / North America - `AF` - Africa - `SA` - South America - `ASIA` - Asia and Oceania -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Region string - -// List of Region -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - REGION_EU Region = "EU" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - REGION_US Region = "US" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - REGION_AF Region = "AF" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - REGION_SA Region = "SA" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - REGION_ASIA Region = "ASIA" -) - -// All allowed values of Region enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedRegionEnumValues = []Region{ - "EU", - "US", - "AF", - "SA", - "ASIA", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *Region) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue string - if value == zeroValue { - return nil - } - enumTypeValue := Region(value) - for _, existing := range AllowedRegionEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid Region", value) -} - -// NewRegionFromValue returns a pointer to a valid Region -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewRegionFromValue(v string) (*Region, error) { - ev := Region(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for Region: valid values are %v", v, AllowedRegionEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v Region) IsValid() bool { - for _, existing := range AllowedRegionEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to Region value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v Region) Ptr() *Region { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableRegion struct { - value *Region - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRegion) Get() *Region { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRegion) Set(val *Region) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRegion) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRegion) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableRegion(val *Region) *NullableRegion { - return &NullableRegion{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRegion) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRegion) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_region_test.go b/services/cdn/model_region_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_region_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_status_error.go b/services/cdn/model_status_error.go deleted file mode 100644 index 6cf2ae6bd1..0000000000 --- a/services/cdn/model_status_error.go +++ /dev/null @@ -1,396 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// checks if the StatusError type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &StatusError{} - -/* - types and functions for de -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StatusErrorGetDeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getStatusErrorGetDeAttributeTypeOk(arg StatusErrorGetDeAttributeType) (ret StatusErrorGetDeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setStatusErrorGetDeAttributeType(arg *StatusErrorGetDeAttributeType, val StatusErrorGetDeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StatusErrorGetDeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StatusErrorGetDeRetType = string - -/* - types and functions for en -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StatusErrorGetEnAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getStatusErrorGetEnAttributeTypeOk(arg StatusErrorGetEnAttributeType) (ret StatusErrorGetEnRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setStatusErrorGetEnAttributeType(arg *StatusErrorGetEnAttributeType, val StatusErrorGetEnRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StatusErrorGetEnArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StatusErrorGetEnRetType = string - -/* - types and functions for key -*/ - -// isEnum - -// StatusErrorKey An enum value that describes a Status Error. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StatusErrorKey string - -// List of Key -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - STATUSERRORKEY_UNKNOWN StatusErrorKey = "UNKNOWN" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - STATUSERRORKEY_CUSTOM_DOMAIN_CNAME_MISSING StatusErrorKey = "CUSTOM_DOMAIN_CNAME_MISSING" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - STATUSERRORKEY_CUSTOM_DOMAIN_ALREADY_IN_USE StatusErrorKey = "CUSTOM_DOMAIN_ALREADY_IN_USE" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - STATUSERRORKEY_PUBLIC_BETA_QUOTA_REACHED StatusErrorKey = "PUBLIC_BETA_QUOTA_REACHED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - STATUSERRORKEY_LOG_SINK_INSTANCE_UNAVAILABLE StatusErrorKey = "LOG_SINK_INSTANCE_UNAVAILABLE" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - STATUSERRORKEY_EXTERNAL_QUOTA_REACHED StatusErrorKey = "EXTERNAL_QUOTA_REACHED" -) - -// All allowed values of StatusError enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedStatusErrorKeyEnumValues = []StatusErrorKey{ - "UNKNOWN", - "CUSTOM_DOMAIN_CNAME_MISSING", - "CUSTOM_DOMAIN_ALREADY_IN_USE", - "PUBLIC_BETA_QUOTA_REACHED", - "LOG_SINK_INSTANCE_UNAVAILABLE", - "EXTERNAL_QUOTA_REACHED", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *StatusErrorKey) UnmarshalJSON(src []byte) error { - // use a type alias to prevent infinite recursion during unmarshal, - // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers - type TmpJson StatusErrorKey - var value TmpJson - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue TmpJson - if value == zeroValue { - return nil - } - enumTypeValue := StatusErrorKey(value) - for _, existing := range AllowedStatusErrorKeyEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid StatusError", value) -} - -// NewStatusErrorKeyFromValue returns a pointer to a valid StatusErrorKey -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewStatusErrorKeyFromValue(v StatusErrorKey) (*StatusErrorKey, error) { - ev := StatusErrorKey(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for StatusErrorKey: valid values are %v", v, AllowedStatusErrorKeyEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v StatusErrorKey) IsValid() bool { - for _, existing := range AllowedStatusErrorKeyEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to KeyKey value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v StatusErrorKey) Ptr() *StatusErrorKey { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableStatusErrorKey struct { - value *StatusErrorKey - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableStatusErrorKey) Get() *StatusErrorKey { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableStatusErrorKey) Set(val *StatusErrorKey) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableStatusErrorKey) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableStatusErrorKey) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableStatusErrorKey(val *StatusErrorKey) *NullableStatusErrorKey { - return &NullableStatusErrorKey{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableStatusErrorKey) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableStatusErrorKey) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StatusErrorGetKeyAttributeType = *StatusErrorKey - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StatusErrorGetKeyArgType = StatusErrorKey - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StatusErrorGetKeyRetType = StatusErrorKey - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getStatusErrorGetKeyAttributeTypeOk(arg StatusErrorGetKeyAttributeType) (ret StatusErrorGetKeyRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setStatusErrorGetKeyAttributeType(arg *StatusErrorGetKeyAttributeType, val StatusErrorGetKeyRetType) { - *arg = &val -} - -// StatusError struct for StatusError -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StatusError struct { - // A german translation string corresponding to the error key. Note that we do not guarantee german translations are present. - De StatusErrorGetDeAttributeType `json:"de,omitempty"` - // An english translation string corresponding to the error key. An english translation key is always present. - // REQUIRED - En StatusErrorGetEnAttributeType `json:"en" required:"true"` - // An enum value that describes a Status Error. - // REQUIRED - Key StatusErrorGetKeyAttributeType `json:"key" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _StatusError StatusError - -// NewStatusError instantiates a new StatusError 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewStatusError(en StatusErrorGetEnArgType, key StatusErrorGetKeyArgType) *StatusError { - this := StatusError{} - setStatusErrorGetEnAttributeType(&this.En, en) - setStatusErrorGetKeyAttributeType(&this.Key, key) - return &this -} - -// NewStatusErrorWithDefaults instantiates a new StatusError 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewStatusErrorWithDefaults() *StatusError { - this := StatusError{} - return &this -} - -// GetDe returns the De field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *StatusError) GetDe() (res StatusErrorGetDeRetType) { - res, _ = o.GetDeOk() - return -} - -// GetDeOk returns a tuple with the De field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *StatusError) GetDeOk() (ret StatusErrorGetDeRetType, ok bool) { - return getStatusErrorGetDeAttributeTypeOk(o.De) -} - -// HasDe returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *StatusError) HasDe() bool { - _, ok := o.GetDeOk() - return ok -} - -// SetDe gets a reference to the given string and assigns it to the De field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *StatusError) SetDe(v StatusErrorGetDeRetType) { - setStatusErrorGetDeAttributeType(&o.De, v) -} - -// GetEn returns the En field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *StatusError) GetEn() (ret StatusErrorGetEnRetType) { - ret, _ = o.GetEnOk() - return ret -} - -// GetEnOk returns a tuple with the En field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *StatusError) GetEnOk() (ret StatusErrorGetEnRetType, ok bool) { - return getStatusErrorGetEnAttributeTypeOk(o.En) -} - -// SetEn sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *StatusError) SetEn(v StatusErrorGetEnRetType) { - setStatusErrorGetEnAttributeType(&o.En, v) -} - -// GetKey returns the Key field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *StatusError) GetKey() (ret StatusErrorGetKeyRetType) { - ret, _ = o.GetKeyOk() - return ret -} - -// GetKeyOk returns a tuple with the Key field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *StatusError) GetKeyOk() (ret StatusErrorGetKeyRetType, ok bool) { - return getStatusErrorGetKeyAttributeTypeOk(o.Key) -} - -// SetKey sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *StatusError) SetKey(v StatusErrorGetKeyRetType) { - setStatusErrorGetKeyAttributeType(&o.Key, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o StatusError) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getStatusErrorGetDeAttributeTypeOk(o.De); ok { - toSerialize["De"] = val - } - if val, ok := getStatusErrorGetEnAttributeTypeOk(o.En); ok { - toSerialize["En"] = val - } - if val, ok := getStatusErrorGetKeyAttributeTypeOk(o.Key); ok { - toSerialize["Key"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableStatusError struct { - value *StatusError - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableStatusError) Get() *StatusError { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableStatusError) Set(val *StatusError) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableStatusError) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableStatusError) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableStatusError(val *StatusError) *NullableStatusError { - return &NullableStatusError{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableStatusError) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableStatusError) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_status_error_test.go b/services/cdn/model_status_error_test.go deleted file mode 100644 index 7c2051f627..0000000000 --- a/services/cdn/model_status_error_test.go +++ /dev/null @@ -1,86 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn - -import ( - "testing" -) - -// isEnum - -func TestStatusErrorKey_UnmarshalJSON(t *testing.T) { - type args struct { - src []byte - } - tests := []struct { - name string - args args - wantErr bool - }{ - { - name: `success - possible enum value no. 1`, - args: args{ - src: []byte(`"UNKNOWN"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"CUSTOM_DOMAIN_CNAME_MISSING"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`"CUSTOM_DOMAIN_ALREADY_IN_USE"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 4`, - args: args{ - src: []byte(`"PUBLIC_BETA_QUOTA_REACHED"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 5`, - args: args{ - src: []byte(`"LOG_SINK_INSTANCE_UNAVAILABLE"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 6`, - args: args{ - src: []byte(`"EXTERNAL_QUOTA_REACHED"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := StatusErrorKey("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/services/cdn/model_tls_config.go b/services/cdn/model_tls_config.go deleted file mode 100644 index 0e2d7268e8..0000000000 --- a/services/cdn/model_tls_config.go +++ /dev/null @@ -1,204 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the TlsConfig type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TlsConfig{} - -/* - types and functions for enableTls10 -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfiggetEnableTls10AttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfiggetEnableTls10ArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfiggetEnableTls10RetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getTlsConfiggetEnableTls10AttributeTypeOk(arg TlsConfiggetEnableTls10AttributeType) (ret TlsConfiggetEnableTls10RetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setTlsConfiggetEnableTls10AttributeType(arg *TlsConfiggetEnableTls10AttributeType, val TlsConfiggetEnableTls10RetType) { - *arg = &val -} - -/* - types and functions for enableTls11 -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfiggetEnableTls11AttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfiggetEnableTls11ArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfiggetEnableTls11RetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getTlsConfiggetEnableTls11AttributeTypeOk(arg TlsConfiggetEnableTls11AttributeType) (ret TlsConfiggetEnableTls11RetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setTlsConfiggetEnableTls11AttributeType(arg *TlsConfiggetEnableTls11AttributeType, val TlsConfiggetEnableTls11RetType) { - *arg = &val -} - -// TlsConfig Configuration for TLS protocol versions. Note: Enabling older TLS versions (1.0, 1.1) is generally discouraged for security reasons. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfig struct { - // If set to true, the distribution will accept connections using TLS 1.0. - // REQUIRED - EnableTls10 TlsConfiggetEnableTls10AttributeType `json:"enableTls10" required:"true"` - // If set to true, the distribution will accept connections using TLS 1.1. - // REQUIRED - EnableTls11 TlsConfiggetEnableTls11AttributeType `json:"enableTls11" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _TlsConfig TlsConfig - -// NewTlsConfig instantiates a new TlsConfig 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewTlsConfig(enableTls10 TlsConfiggetEnableTls10ArgType, enableTls11 TlsConfiggetEnableTls11ArgType) *TlsConfig { - this := TlsConfig{} - setTlsConfiggetEnableTls10AttributeType(&this.EnableTls10, enableTls10) - setTlsConfiggetEnableTls11AttributeType(&this.EnableTls11, enableTls11) - return &this -} - -// NewTlsConfigWithDefaults instantiates a new TlsConfig 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewTlsConfigWithDefaults() *TlsConfig { - this := TlsConfig{} - return &this -} - -// GetEnableTls10 returns the EnableTls10 field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfig) GetEnableTls10() (ret TlsConfiggetEnableTls10RetType) { - ret, _ = o.GetEnableTls10Ok() - return ret -} - -// GetEnableTls10Ok returns a tuple with the EnableTls10 field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfig) GetEnableTls10Ok() (ret TlsConfiggetEnableTls10RetType, ok bool) { - return getTlsConfiggetEnableTls10AttributeTypeOk(o.EnableTls10) -} - -// SetEnableTls10 sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfig) SetEnableTls10(v TlsConfiggetEnableTls10RetType) { - setTlsConfiggetEnableTls10AttributeType(&o.EnableTls10, v) -} - -// GetEnableTls11 returns the EnableTls11 field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfig) GetEnableTls11() (ret TlsConfiggetEnableTls11RetType) { - ret, _ = o.GetEnableTls11Ok() - return ret -} - -// GetEnableTls11Ok returns a tuple with the EnableTls11 field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfig) GetEnableTls11Ok() (ret TlsConfiggetEnableTls11RetType, ok bool) { - return getTlsConfiggetEnableTls11AttributeTypeOk(o.EnableTls11) -} - -// SetEnableTls11 sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfig) SetEnableTls11(v TlsConfiggetEnableTls11RetType) { - setTlsConfiggetEnableTls11AttributeType(&o.EnableTls11, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o TlsConfig) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getTlsConfiggetEnableTls10AttributeTypeOk(o.EnableTls10); ok { - toSerialize["EnableTls10"] = val - } - if val, ok := getTlsConfiggetEnableTls11AttributeTypeOk(o.EnableTls11); ok { - toSerialize["EnableTls11"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableTlsConfig struct { - value *TlsConfig - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableTlsConfig) Get() *TlsConfig { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableTlsConfig) Set(val *TlsConfig) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableTlsConfig) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableTlsConfig) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableTlsConfig(val *TlsConfig) *NullableTlsConfig { - return &NullableTlsConfig{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableTlsConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableTlsConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_tls_config_patch.go b/services/cdn/model_tls_config_patch.go deleted file mode 100644 index 97ace59df8..0000000000 --- a/services/cdn/model_tls_config_patch.go +++ /dev/null @@ -1,211 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the TlsConfigPatch type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TlsConfigPatch{} - -/* - types and functions for enableTls10 -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfigPatchgetEnableTls10AttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfigPatchgetEnableTls10ArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfigPatchgetEnableTls10RetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getTlsConfigPatchgetEnableTls10AttributeTypeOk(arg TlsConfigPatchgetEnableTls10AttributeType) (ret TlsConfigPatchgetEnableTls10RetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setTlsConfigPatchgetEnableTls10AttributeType(arg *TlsConfigPatchgetEnableTls10AttributeType, val TlsConfigPatchgetEnableTls10RetType) { - *arg = &val -} - -/* - types and functions for enableTls11 -*/ - -// isBoolean -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfigPatchgetEnableTls11AttributeType = *bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfigPatchgetEnableTls11ArgType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfigPatchgetEnableTls11RetType = bool - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getTlsConfigPatchgetEnableTls11AttributeTypeOk(arg TlsConfigPatchgetEnableTls11AttributeType) (ret TlsConfigPatchgetEnableTls11RetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setTlsConfigPatchgetEnableTls11AttributeType(arg *TlsConfigPatchgetEnableTls11AttributeType, val TlsConfigPatchgetEnableTls11RetType) { - *arg = &val -} - -// TlsConfigPatch Configuration for TLS protocol versions. Note: Enabling older TLS versions (1.0, 1.1) is generally discouraged for security reasons. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TlsConfigPatch struct { - // If set to true, the distribution will accept connections using TLS 1.0. - EnableTls10 TlsConfigPatchgetEnableTls10AttributeType `json:"enableTls10,omitempty"` - // If set to true, the distribution will accept connections using TLS 1.1. - EnableTls11 TlsConfigPatchgetEnableTls11AttributeType `json:"enableTls11,omitempty"` -} - -// NewTlsConfigPatch instantiates a new TlsConfigPatch 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewTlsConfigPatch() *TlsConfigPatch { - this := TlsConfigPatch{} - return &this -} - -// NewTlsConfigPatchWithDefaults instantiates a new TlsConfigPatch 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewTlsConfigPatchWithDefaults() *TlsConfigPatch { - this := TlsConfigPatch{} - return &this -} - -// GetEnableTls10 returns the EnableTls10 field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfigPatch) GetEnableTls10() (res TlsConfigPatchgetEnableTls10RetType) { - res, _ = o.GetEnableTls10Ok() - return -} - -// GetEnableTls10Ok returns a tuple with the EnableTls10 field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfigPatch) GetEnableTls10Ok() (ret TlsConfigPatchgetEnableTls10RetType, ok bool) { - return getTlsConfigPatchgetEnableTls10AttributeTypeOk(o.EnableTls10) -} - -// HasEnableTls10 returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfigPatch) HasEnableTls10() bool { - _, ok := o.GetEnableTls10Ok() - return ok -} - -// SetEnableTls10 gets a reference to the given bool and assigns it to the EnableTls10 field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfigPatch) SetEnableTls10(v TlsConfigPatchgetEnableTls10RetType) { - setTlsConfigPatchgetEnableTls10AttributeType(&o.EnableTls10, v) -} - -// GetEnableTls11 returns the EnableTls11 field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfigPatch) GetEnableTls11() (res TlsConfigPatchgetEnableTls11RetType) { - res, _ = o.GetEnableTls11Ok() - return -} - -// GetEnableTls11Ok returns a tuple with the EnableTls11 field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfigPatch) GetEnableTls11Ok() (ret TlsConfigPatchgetEnableTls11RetType, ok bool) { - return getTlsConfigPatchgetEnableTls11AttributeTypeOk(o.EnableTls11) -} - -// HasEnableTls11 returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfigPatch) HasEnableTls11() bool { - _, ok := o.GetEnableTls11Ok() - return ok -} - -// SetEnableTls11 gets a reference to the given bool and assigns it to the EnableTls11 field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TlsConfigPatch) SetEnableTls11(v TlsConfigPatchgetEnableTls11RetType) { - setTlsConfigPatchgetEnableTls11AttributeType(&o.EnableTls11, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o TlsConfigPatch) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getTlsConfigPatchgetEnableTls10AttributeTypeOk(o.EnableTls10); ok { - toSerialize["EnableTls10"] = val - } - if val, ok := getTlsConfigPatchgetEnableTls11AttributeTypeOk(o.EnableTls11); ok { - toSerialize["EnableTls11"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableTlsConfigPatch struct { - value *TlsConfigPatch - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableTlsConfigPatch) Get() *TlsConfigPatch { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableTlsConfigPatch) Set(val *TlsConfigPatch) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableTlsConfigPatch) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableTlsConfigPatch) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableTlsConfigPatch(val *TlsConfigPatch) *NullableTlsConfigPatch { - return &NullableTlsConfigPatch{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableTlsConfigPatch) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableTlsConfigPatch) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_tls_config_patch_test.go b/services/cdn/model_tls_config_patch_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_tls_config_patch_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_tls_config_test.go b/services/cdn/model_tls_config_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_tls_config_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_waf_config.go b/services/cdn/model_waf_config.go deleted file mode 100644 index cf5adf5fbc..0000000000 --- a/services/cdn/model_waf_config.go +++ /dev/null @@ -1,962 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the WafConfig type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WafConfig{} - -/* - types and functions for allowedHttpMethods -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetAllowedHttpMethodsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetAllowedHttpMethodsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetAllowedHttpMethodsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigGetAllowedHttpMethodsAttributeTypeOk(arg WafConfigGetAllowedHttpMethodsAttributeType) (ret WafConfigGetAllowedHttpMethodsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigGetAllowedHttpMethodsAttributeType(arg *WafConfigGetAllowedHttpMethodsAttributeType, val WafConfigGetAllowedHttpMethodsRetType) { - *arg = &val -} - -/* - types and functions for allowedHttpVersions -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetAllowedHttpVersionsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetAllowedHttpVersionsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetAllowedHttpVersionsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigGetAllowedHttpVersionsAttributeTypeOk(arg WafConfigGetAllowedHttpVersionsAttributeType) (ret WafConfigGetAllowedHttpVersionsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigGetAllowedHttpVersionsAttributeType(arg *WafConfigGetAllowedHttpVersionsAttributeType, val WafConfigGetAllowedHttpVersionsRetType) { - *arg = &val -} - -/* - types and functions for allowedRequestContentTypes -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetAllowedRequestContentTypesAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetAllowedRequestContentTypesArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetAllowedRequestContentTypesRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigGetAllowedRequestContentTypesAttributeTypeOk(arg WafConfigGetAllowedRequestContentTypesAttributeType) (ret WafConfigGetAllowedRequestContentTypesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigGetAllowedRequestContentTypesAttributeType(arg *WafConfigGetAllowedRequestContentTypesAttributeType, val WafConfigGetAllowedRequestContentTypesRetType) { - *arg = &val -} - -/* - types and functions for disabledRuleCollectionIds -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetDisabledRuleCollectionIdsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetDisabledRuleCollectionIdsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetDisabledRuleCollectionIdsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigGetDisabledRuleCollectionIdsAttributeTypeOk(arg WafConfigGetDisabledRuleCollectionIdsAttributeType) (ret WafConfigGetDisabledRuleCollectionIdsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigGetDisabledRuleCollectionIdsAttributeType(arg *WafConfigGetDisabledRuleCollectionIdsAttributeType, val WafConfigGetDisabledRuleCollectionIdsRetType) { - *arg = &val -} - -/* - types and functions for disabledRuleGroupIds -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetDisabledRuleGroupIdsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetDisabledRuleGroupIdsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetDisabledRuleGroupIdsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigGetDisabledRuleGroupIdsAttributeTypeOk(arg WafConfigGetDisabledRuleGroupIdsAttributeType) (ret WafConfigGetDisabledRuleGroupIdsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigGetDisabledRuleGroupIdsAttributeType(arg *WafConfigGetDisabledRuleGroupIdsAttributeType, val WafConfigGetDisabledRuleGroupIdsRetType) { - *arg = &val -} - -/* - types and functions for disabledRuleIds -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetDisabledRuleIdsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetDisabledRuleIdsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetDisabledRuleIdsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigGetDisabledRuleIdsAttributeTypeOk(arg WafConfigGetDisabledRuleIdsAttributeType) (ret WafConfigGetDisabledRuleIdsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigGetDisabledRuleIdsAttributeType(arg *WafConfigGetDisabledRuleIdsAttributeType, val WafConfigGetDisabledRuleIdsRetType) { - *arg = &val -} - -/* - types and functions for enabledRuleCollectionIds -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetEnabledRuleCollectionIdsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetEnabledRuleCollectionIdsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetEnabledRuleCollectionIdsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigGetEnabledRuleCollectionIdsAttributeTypeOk(arg WafConfigGetEnabledRuleCollectionIdsAttributeType) (ret WafConfigGetEnabledRuleCollectionIdsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigGetEnabledRuleCollectionIdsAttributeType(arg *WafConfigGetEnabledRuleCollectionIdsAttributeType, val WafConfigGetEnabledRuleCollectionIdsRetType) { - *arg = &val -} - -/* - types and functions for enabledRuleGroupIds -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetEnabledRuleGroupIdsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetEnabledRuleGroupIdsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetEnabledRuleGroupIdsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigGetEnabledRuleGroupIdsAttributeTypeOk(arg WafConfigGetEnabledRuleGroupIdsAttributeType) (ret WafConfigGetEnabledRuleGroupIdsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigGetEnabledRuleGroupIdsAttributeType(arg *WafConfigGetEnabledRuleGroupIdsAttributeType, val WafConfigGetEnabledRuleGroupIdsRetType) { - *arg = &val -} - -/* - types and functions for enabledRuleIds -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetEnabledRuleIdsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetEnabledRuleIdsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetEnabledRuleIdsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigGetEnabledRuleIdsAttributeTypeOk(arg WafConfigGetEnabledRuleIdsAttributeType) (ret WafConfigGetEnabledRuleIdsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigGetEnabledRuleIdsAttributeType(arg *WafConfigGetEnabledRuleIdsAttributeType, val WafConfigGetEnabledRuleIdsRetType) { - *arg = &val -} - -/* - types and functions for logOnlyRuleCollectionIds -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetLogOnlyRuleCollectionIdsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetLogOnlyRuleCollectionIdsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetLogOnlyRuleCollectionIdsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigGetLogOnlyRuleCollectionIdsAttributeTypeOk(arg WafConfigGetLogOnlyRuleCollectionIdsAttributeType) (ret WafConfigGetLogOnlyRuleCollectionIdsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigGetLogOnlyRuleCollectionIdsAttributeType(arg *WafConfigGetLogOnlyRuleCollectionIdsAttributeType, val WafConfigGetLogOnlyRuleCollectionIdsRetType) { - *arg = &val -} - -/* - types and functions for logOnlyRuleGroupIds -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetLogOnlyRuleGroupIdsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetLogOnlyRuleGroupIdsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetLogOnlyRuleGroupIdsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigGetLogOnlyRuleGroupIdsAttributeTypeOk(arg WafConfigGetLogOnlyRuleGroupIdsAttributeType) (ret WafConfigGetLogOnlyRuleGroupIdsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigGetLogOnlyRuleGroupIdsAttributeType(arg *WafConfigGetLogOnlyRuleGroupIdsAttributeType, val WafConfigGetLogOnlyRuleGroupIdsRetType) { - *arg = &val -} - -/* - types and functions for logOnlyRuleIds -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetLogOnlyRuleIdsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetLogOnlyRuleIdsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetLogOnlyRuleIdsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigGetLogOnlyRuleIdsAttributeTypeOk(arg WafConfigGetLogOnlyRuleIdsAttributeType) (ret WafConfigGetLogOnlyRuleIdsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigGetLogOnlyRuleIdsAttributeType(arg *WafConfigGetLogOnlyRuleIdsAttributeType, val WafConfigGetLogOnlyRuleIdsRetType) { - *arg = &val -} - -/* - types and functions for mode -*/ - -// isEnumRef -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetModeAttributeType = *WafMode - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetModeArgType = WafMode - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetModeRetType = WafMode - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigGetModeAttributeTypeOk(arg WafConfigGetModeAttributeType) (ret WafConfigGetModeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigGetModeAttributeType(arg *WafConfigGetModeAttributeType, val WafConfigGetModeRetType) { - *arg = &val -} - -/* - types and functions for paranoiaLevel -*/ - -// isEnumRef -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetParanoiaLevelAttributeType = *WafParanoiaLevel - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetParanoiaLevelArgType = WafParanoiaLevel - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetParanoiaLevelRetType = WafParanoiaLevel - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigGetParanoiaLevelAttributeTypeOk(arg WafConfigGetParanoiaLevelAttributeType) (ret WafConfigGetParanoiaLevelRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigGetParanoiaLevelAttributeType(arg *WafConfigGetParanoiaLevelAttributeType, val WafConfigGetParanoiaLevelRetType) { - *arg = &val -} - -/* - types and functions for type -*/ - -// isEnumRef -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetTypeAttributeType = *WafType - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetTypeArgType = WafType - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigGetTypeRetType = WafType - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigGetTypeAttributeTypeOk(arg WafConfigGetTypeAttributeType) (ret WafConfigGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigGetTypeAttributeType(arg *WafConfigGetTypeAttributeType, val WafConfigGetTypeRetType) { - *arg = &val -} - -// WafConfig Configuration of the WAF of a distribution A WAF Config always contains a WAF Mode and Type. If a WAF was never enabled, most of the properties are not present. To **enable** the WAF for your Distribution, you must set the `mode` to `ENABLED` or `LOG_ONLY`. This causes the other properties to be populated. ## Rules There are 9 properties used to control which Rules are enabled, disabled or set to Log-Only. These properties can be grouped in 3 groups of 3. Each of these groups varies in specificity: Rules are more specific than Rule Groups, which in turn are more specific than Collections. More specific definitions override more generic definitions. ### Collections - `enabledRuleCollectionIds` - `disabledRuleCollectionIds` - `logOnlyRuleCollectionIds` These are the least specific selectors. As of 2025, only two collections exist: - `@builtin/crs/response`, containing all Rules regarding Responses - `@builtin/crs/request`, containing all Rules regarding Requests More collections may be added in the future ### Rule Groups - `enabledRuleGroupIds` - `disabledRuleGroupIds` - `logOnlyRuleGroupIds` These are more specific than Collections and will override their selector. You can find all available Rule Groups by calling the `ListWafCollections` Operation. ### Rules - `enabledRuleIds` - `disabledRuleIds` - `logOnlyRuleGds` Being the most specific selectors, these will override both Collection and Rule Group selectors. You can find all available Rule Groups by calling the `ListWafCollections` Operation. ### TIP: Review resolved config If you call `GetDistribution` with `?withWafStatus=true`, you get back a resolved WAF Rules Config which contains a `waf` property which you can inspect to see why a Rule is either enabled, disabled or logOnly. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfig struct { - // This whitelist restricts which HTTP methods the distribution accepts. Requests using non-whitelisted methods are blocked by the WAF before reaching the origin. Common methods: `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS`, `CONNECT`, `TRACE` Validation ensures: 1. At least one method is allowed 2. No duplicate methods (e.g., `GET` appearing twice) 3. Each method is valid per HTTP standards - AllowedHttpMethods WafConfigGetAllowedHttpMethodsAttributeType `json:"allowedHttpMethods,omitempty"` - AllowedHttpVersions WafConfigGetAllowedHttpVersionsAttributeType `json:"allowedHttpVersions,omitempty"` - // This allow list restricts which Content-Type headers are accepted in request bodies. Format: Must be `type/subtype` with no spaces. Common content types: - `application/json` - `application/x-www-form-urlencoded` - `multipart/form-data` - `text/html` - `text/plain` - `application/xml` - AllowedRequestContentTypes WafConfigGetAllowedRequestContentTypesAttributeType `json:"allowedRequestContentTypes,omitempty"` - // Ids of WAF Collections to mark as disabled - DisabledRuleCollectionIds WafConfigGetDisabledRuleCollectionIdsAttributeType `json:"disabledRuleCollectionIds,omitempty"` - // Ids of WAF Rule Groups to mark as disabled - DisabledRuleGroupIds WafConfigGetDisabledRuleGroupIdsAttributeType `json:"disabledRuleGroupIds,omitempty"` - // Ids of WAF Rules that are **explicitly** disabled for this distribution. - DisabledRuleIds WafConfigGetDisabledRuleIdsAttributeType `json:"disabledRuleIds,omitempty"` - // Ids of WAF Collections to mark as enabled - EnabledRuleCollectionIds WafConfigGetEnabledRuleCollectionIdsAttributeType `json:"enabledRuleCollectionIds,omitempty"` - // Ids of WAF Rule Groups to mark as enabled - EnabledRuleGroupIds WafConfigGetEnabledRuleGroupIdsAttributeType `json:"enabledRuleGroupIds,omitempty"` - // Ids of the WAF rules that are **explicitly** enabled for this distribution. If this rule is in a disabled / log Only RuleGroup or Collection, it will be enabled regardless as `enabledRuleIds` overrides those in specificity. Do note that rules can also be enabled because a Rulegroup or Collection is enabled. **DO NOT** use this property to find all active rules. Instead, pass `?withWafStatus=true` as a query parameter to `GetDistribution` or `ListDistributions`. This will expose the `waf` Property on distribution Level. From there you can `$.waf.enabledRules.map(e => e.id)` to get a list of all enabled rules. - // REQUIRED - EnabledRuleIds WafConfigGetEnabledRuleIdsAttributeType `json:"enabledRuleIds" required:"true"` - // Ids of WAF Collections to mark as log Only. - LogOnlyRuleCollectionIds WafConfigGetLogOnlyRuleCollectionIdsAttributeType `json:"logOnlyRuleCollectionIds,omitempty"` - // Ids of WAF Rule Groups to mark as log Only. - LogOnlyRuleGroupIds WafConfigGetLogOnlyRuleGroupIdsAttributeType `json:"logOnlyRuleGroupIds,omitempty"` - // Ids of WAF Rules that are **explicitly** marked as Log Only for this distribution. - LogOnlyRuleIds WafConfigGetLogOnlyRuleIdsAttributeType `json:"logOnlyRuleIds,omitempty"` - // REQUIRED - Mode WafConfigGetModeAttributeType `json:"mode" required:"true"` - ParanoiaLevel WafConfigGetParanoiaLevelAttributeType `json:"paranoiaLevel,omitempty"` - // REQUIRED - Type WafConfigGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _WafConfig WafConfig - -// NewWafConfig instantiates a new WafConfig 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafConfig(enabledRuleIds WafConfigGetEnabledRuleIdsArgType, mode WafConfigGetModeArgType, types WafConfigGetTypeArgType) *WafConfig { - this := WafConfig{} - setWafConfigGetEnabledRuleIdsAttributeType(&this.EnabledRuleIds, enabledRuleIds) - setWafConfigGetModeAttributeType(&this.Mode, mode) - setWafConfigGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewWafConfigWithDefaults instantiates a new WafConfig 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafConfigWithDefaults() *WafConfig { - this := WafConfig{} - return &this -} - -// GetAllowedHttpMethods returns the AllowedHttpMethods field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetAllowedHttpMethods() (res WafConfigGetAllowedHttpMethodsRetType) { - res, _ = o.GetAllowedHttpMethodsOk() - return -} - -// GetAllowedHttpMethodsOk returns a tuple with the AllowedHttpMethods field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetAllowedHttpMethodsOk() (ret WafConfigGetAllowedHttpMethodsRetType, ok bool) { - return getWafConfigGetAllowedHttpMethodsAttributeTypeOk(o.AllowedHttpMethods) -} - -// HasAllowedHttpMethods returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) HasAllowedHttpMethods() bool { - _, ok := o.GetAllowedHttpMethodsOk() - return ok -} - -// SetAllowedHttpMethods gets a reference to the given []string and assigns it to the AllowedHttpMethods field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) SetAllowedHttpMethods(v WafConfigGetAllowedHttpMethodsRetType) { - setWafConfigGetAllowedHttpMethodsAttributeType(&o.AllowedHttpMethods, v) -} - -// GetAllowedHttpVersions returns the AllowedHttpVersions field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetAllowedHttpVersions() (res WafConfigGetAllowedHttpVersionsRetType) { - res, _ = o.GetAllowedHttpVersionsOk() - return -} - -// GetAllowedHttpVersionsOk returns a tuple with the AllowedHttpVersions field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetAllowedHttpVersionsOk() (ret WafConfigGetAllowedHttpVersionsRetType, ok bool) { - return getWafConfigGetAllowedHttpVersionsAttributeTypeOk(o.AllowedHttpVersions) -} - -// HasAllowedHttpVersions returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) HasAllowedHttpVersions() bool { - _, ok := o.GetAllowedHttpVersionsOk() - return ok -} - -// SetAllowedHttpVersions gets a reference to the given []string and assigns it to the AllowedHttpVersions field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) SetAllowedHttpVersions(v WafConfigGetAllowedHttpVersionsRetType) { - setWafConfigGetAllowedHttpVersionsAttributeType(&o.AllowedHttpVersions, v) -} - -// GetAllowedRequestContentTypes returns the AllowedRequestContentTypes field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetAllowedRequestContentTypes() (res WafConfigGetAllowedRequestContentTypesRetType) { - res, _ = o.GetAllowedRequestContentTypesOk() - return -} - -// GetAllowedRequestContentTypesOk returns a tuple with the AllowedRequestContentTypes field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetAllowedRequestContentTypesOk() (ret WafConfigGetAllowedRequestContentTypesRetType, ok bool) { - return getWafConfigGetAllowedRequestContentTypesAttributeTypeOk(o.AllowedRequestContentTypes) -} - -// HasAllowedRequestContentTypes returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) HasAllowedRequestContentTypes() bool { - _, ok := o.GetAllowedRequestContentTypesOk() - return ok -} - -// SetAllowedRequestContentTypes gets a reference to the given []string and assigns it to the AllowedRequestContentTypes field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) SetAllowedRequestContentTypes(v WafConfigGetAllowedRequestContentTypesRetType) { - setWafConfigGetAllowedRequestContentTypesAttributeType(&o.AllowedRequestContentTypes, v) -} - -// GetDisabledRuleCollectionIds returns the DisabledRuleCollectionIds field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetDisabledRuleCollectionIds() (res WafConfigGetDisabledRuleCollectionIdsRetType) { - res, _ = o.GetDisabledRuleCollectionIdsOk() - return -} - -// GetDisabledRuleCollectionIdsOk returns a tuple with the DisabledRuleCollectionIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetDisabledRuleCollectionIdsOk() (ret WafConfigGetDisabledRuleCollectionIdsRetType, ok bool) { - return getWafConfigGetDisabledRuleCollectionIdsAttributeTypeOk(o.DisabledRuleCollectionIds) -} - -// HasDisabledRuleCollectionIds returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) HasDisabledRuleCollectionIds() bool { - _, ok := o.GetDisabledRuleCollectionIdsOk() - return ok -} - -// SetDisabledRuleCollectionIds gets a reference to the given []string and assigns it to the DisabledRuleCollectionIds field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) SetDisabledRuleCollectionIds(v WafConfigGetDisabledRuleCollectionIdsRetType) { - setWafConfigGetDisabledRuleCollectionIdsAttributeType(&o.DisabledRuleCollectionIds, v) -} - -// GetDisabledRuleGroupIds returns the DisabledRuleGroupIds field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetDisabledRuleGroupIds() (res WafConfigGetDisabledRuleGroupIdsRetType) { - res, _ = o.GetDisabledRuleGroupIdsOk() - return -} - -// GetDisabledRuleGroupIdsOk returns a tuple with the DisabledRuleGroupIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetDisabledRuleGroupIdsOk() (ret WafConfigGetDisabledRuleGroupIdsRetType, ok bool) { - return getWafConfigGetDisabledRuleGroupIdsAttributeTypeOk(o.DisabledRuleGroupIds) -} - -// HasDisabledRuleGroupIds returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) HasDisabledRuleGroupIds() bool { - _, ok := o.GetDisabledRuleGroupIdsOk() - return ok -} - -// SetDisabledRuleGroupIds gets a reference to the given []string and assigns it to the DisabledRuleGroupIds field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) SetDisabledRuleGroupIds(v WafConfigGetDisabledRuleGroupIdsRetType) { - setWafConfigGetDisabledRuleGroupIdsAttributeType(&o.DisabledRuleGroupIds, v) -} - -// GetDisabledRuleIds returns the DisabledRuleIds field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetDisabledRuleIds() (res WafConfigGetDisabledRuleIdsRetType) { - res, _ = o.GetDisabledRuleIdsOk() - return -} - -// GetDisabledRuleIdsOk returns a tuple with the DisabledRuleIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetDisabledRuleIdsOk() (ret WafConfigGetDisabledRuleIdsRetType, ok bool) { - return getWafConfigGetDisabledRuleIdsAttributeTypeOk(o.DisabledRuleIds) -} - -// HasDisabledRuleIds returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) HasDisabledRuleIds() bool { - _, ok := o.GetDisabledRuleIdsOk() - return ok -} - -// SetDisabledRuleIds gets a reference to the given []string and assigns it to the DisabledRuleIds field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) SetDisabledRuleIds(v WafConfigGetDisabledRuleIdsRetType) { - setWafConfigGetDisabledRuleIdsAttributeType(&o.DisabledRuleIds, v) -} - -// GetEnabledRuleCollectionIds returns the EnabledRuleCollectionIds field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetEnabledRuleCollectionIds() (res WafConfigGetEnabledRuleCollectionIdsRetType) { - res, _ = o.GetEnabledRuleCollectionIdsOk() - return -} - -// GetEnabledRuleCollectionIdsOk returns a tuple with the EnabledRuleCollectionIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetEnabledRuleCollectionIdsOk() (ret WafConfigGetEnabledRuleCollectionIdsRetType, ok bool) { - return getWafConfigGetEnabledRuleCollectionIdsAttributeTypeOk(o.EnabledRuleCollectionIds) -} - -// HasEnabledRuleCollectionIds returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) HasEnabledRuleCollectionIds() bool { - _, ok := o.GetEnabledRuleCollectionIdsOk() - return ok -} - -// SetEnabledRuleCollectionIds gets a reference to the given []string and assigns it to the EnabledRuleCollectionIds field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) SetEnabledRuleCollectionIds(v WafConfigGetEnabledRuleCollectionIdsRetType) { - setWafConfigGetEnabledRuleCollectionIdsAttributeType(&o.EnabledRuleCollectionIds, v) -} - -// GetEnabledRuleGroupIds returns the EnabledRuleGroupIds field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetEnabledRuleGroupIds() (res WafConfigGetEnabledRuleGroupIdsRetType) { - res, _ = o.GetEnabledRuleGroupIdsOk() - return -} - -// GetEnabledRuleGroupIdsOk returns a tuple with the EnabledRuleGroupIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetEnabledRuleGroupIdsOk() (ret WafConfigGetEnabledRuleGroupIdsRetType, ok bool) { - return getWafConfigGetEnabledRuleGroupIdsAttributeTypeOk(o.EnabledRuleGroupIds) -} - -// HasEnabledRuleGroupIds returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) HasEnabledRuleGroupIds() bool { - _, ok := o.GetEnabledRuleGroupIdsOk() - return ok -} - -// SetEnabledRuleGroupIds gets a reference to the given []string and assigns it to the EnabledRuleGroupIds field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) SetEnabledRuleGroupIds(v WafConfigGetEnabledRuleGroupIdsRetType) { - setWafConfigGetEnabledRuleGroupIdsAttributeType(&o.EnabledRuleGroupIds, v) -} - -// GetEnabledRuleIds returns the EnabledRuleIds field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetEnabledRuleIds() (ret WafConfigGetEnabledRuleIdsRetType) { - ret, _ = o.GetEnabledRuleIdsOk() - return ret -} - -// GetEnabledRuleIdsOk returns a tuple with the EnabledRuleIds field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetEnabledRuleIdsOk() (ret WafConfigGetEnabledRuleIdsRetType, ok bool) { - return getWafConfigGetEnabledRuleIdsAttributeTypeOk(o.EnabledRuleIds) -} - -// SetEnabledRuleIds sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) SetEnabledRuleIds(v WafConfigGetEnabledRuleIdsRetType) { - setWafConfigGetEnabledRuleIdsAttributeType(&o.EnabledRuleIds, v) -} - -// GetLogOnlyRuleCollectionIds returns the LogOnlyRuleCollectionIds field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetLogOnlyRuleCollectionIds() (res WafConfigGetLogOnlyRuleCollectionIdsRetType) { - res, _ = o.GetLogOnlyRuleCollectionIdsOk() - return -} - -// GetLogOnlyRuleCollectionIdsOk returns a tuple with the LogOnlyRuleCollectionIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetLogOnlyRuleCollectionIdsOk() (ret WafConfigGetLogOnlyRuleCollectionIdsRetType, ok bool) { - return getWafConfigGetLogOnlyRuleCollectionIdsAttributeTypeOk(o.LogOnlyRuleCollectionIds) -} - -// HasLogOnlyRuleCollectionIds returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) HasLogOnlyRuleCollectionIds() bool { - _, ok := o.GetLogOnlyRuleCollectionIdsOk() - return ok -} - -// SetLogOnlyRuleCollectionIds gets a reference to the given []string and assigns it to the LogOnlyRuleCollectionIds field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) SetLogOnlyRuleCollectionIds(v WafConfigGetLogOnlyRuleCollectionIdsRetType) { - setWafConfigGetLogOnlyRuleCollectionIdsAttributeType(&o.LogOnlyRuleCollectionIds, v) -} - -// GetLogOnlyRuleGroupIds returns the LogOnlyRuleGroupIds field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetLogOnlyRuleGroupIds() (res WafConfigGetLogOnlyRuleGroupIdsRetType) { - res, _ = o.GetLogOnlyRuleGroupIdsOk() - return -} - -// GetLogOnlyRuleGroupIdsOk returns a tuple with the LogOnlyRuleGroupIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetLogOnlyRuleGroupIdsOk() (ret WafConfigGetLogOnlyRuleGroupIdsRetType, ok bool) { - return getWafConfigGetLogOnlyRuleGroupIdsAttributeTypeOk(o.LogOnlyRuleGroupIds) -} - -// HasLogOnlyRuleGroupIds returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) HasLogOnlyRuleGroupIds() bool { - _, ok := o.GetLogOnlyRuleGroupIdsOk() - return ok -} - -// SetLogOnlyRuleGroupIds gets a reference to the given []string and assigns it to the LogOnlyRuleGroupIds field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) SetLogOnlyRuleGroupIds(v WafConfigGetLogOnlyRuleGroupIdsRetType) { - setWafConfigGetLogOnlyRuleGroupIdsAttributeType(&o.LogOnlyRuleGroupIds, v) -} - -// GetLogOnlyRuleIds returns the LogOnlyRuleIds field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetLogOnlyRuleIds() (res WafConfigGetLogOnlyRuleIdsRetType) { - res, _ = o.GetLogOnlyRuleIdsOk() - return -} - -// GetLogOnlyRuleIdsOk returns a tuple with the LogOnlyRuleIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetLogOnlyRuleIdsOk() (ret WafConfigGetLogOnlyRuleIdsRetType, ok bool) { - return getWafConfigGetLogOnlyRuleIdsAttributeTypeOk(o.LogOnlyRuleIds) -} - -// HasLogOnlyRuleIds returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) HasLogOnlyRuleIds() bool { - _, ok := o.GetLogOnlyRuleIdsOk() - return ok -} - -// SetLogOnlyRuleIds gets a reference to the given []string and assigns it to the LogOnlyRuleIds field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) SetLogOnlyRuleIds(v WafConfigGetLogOnlyRuleIdsRetType) { - setWafConfigGetLogOnlyRuleIdsAttributeType(&o.LogOnlyRuleIds, v) -} - -// GetMode returns the Mode field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetMode() (ret WafConfigGetModeRetType) { - ret, _ = o.GetModeOk() - return ret -} - -// GetModeOk returns a tuple with the Mode field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetModeOk() (ret WafConfigGetModeRetType, ok bool) { - return getWafConfigGetModeAttributeTypeOk(o.Mode) -} - -// SetMode sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) SetMode(v WafConfigGetModeRetType) { - setWafConfigGetModeAttributeType(&o.Mode, v) -} - -// GetParanoiaLevel returns the ParanoiaLevel field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetParanoiaLevel() (res WafConfigGetParanoiaLevelRetType) { - res, _ = o.GetParanoiaLevelOk() - return -} - -// GetParanoiaLevelOk returns a tuple with the ParanoiaLevel field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetParanoiaLevelOk() (ret WafConfigGetParanoiaLevelRetType, ok bool) { - return getWafConfigGetParanoiaLevelAttributeTypeOk(o.ParanoiaLevel) -} - -// HasParanoiaLevel returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) HasParanoiaLevel() bool { - _, ok := o.GetParanoiaLevelOk() - return ok -} - -// SetParanoiaLevel gets a reference to the given WafParanoiaLevel and assigns it to the ParanoiaLevel field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) SetParanoiaLevel(v WafConfigGetParanoiaLevelRetType) { - setWafConfigGetParanoiaLevelAttributeType(&o.ParanoiaLevel, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetType() (ret WafConfigGetTypeRetType) { - 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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) GetTypeOk() (ret WafConfigGetTypeRetType, ok bool) { - return getWafConfigGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfig) SetType(v WafConfigGetTypeRetType) { - setWafConfigGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o WafConfig) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getWafConfigGetAllowedHttpMethodsAttributeTypeOk(o.AllowedHttpMethods); ok { - toSerialize["AllowedHttpMethods"] = val - } - if val, ok := getWafConfigGetAllowedHttpVersionsAttributeTypeOk(o.AllowedHttpVersions); ok { - toSerialize["AllowedHttpVersions"] = val - } - if val, ok := getWafConfigGetAllowedRequestContentTypesAttributeTypeOk(o.AllowedRequestContentTypes); ok { - toSerialize["AllowedRequestContentTypes"] = val - } - if val, ok := getWafConfigGetDisabledRuleCollectionIdsAttributeTypeOk(o.DisabledRuleCollectionIds); ok { - toSerialize["DisabledRuleCollectionIds"] = val - } - if val, ok := getWafConfigGetDisabledRuleGroupIdsAttributeTypeOk(o.DisabledRuleGroupIds); ok { - toSerialize["DisabledRuleGroupIds"] = val - } - if val, ok := getWafConfigGetDisabledRuleIdsAttributeTypeOk(o.DisabledRuleIds); ok { - toSerialize["DisabledRuleIds"] = val - } - if val, ok := getWafConfigGetEnabledRuleCollectionIdsAttributeTypeOk(o.EnabledRuleCollectionIds); ok { - toSerialize["EnabledRuleCollectionIds"] = val - } - if val, ok := getWafConfigGetEnabledRuleGroupIdsAttributeTypeOk(o.EnabledRuleGroupIds); ok { - toSerialize["EnabledRuleGroupIds"] = val - } - if val, ok := getWafConfigGetEnabledRuleIdsAttributeTypeOk(o.EnabledRuleIds); ok { - toSerialize["EnabledRuleIds"] = val - } - if val, ok := getWafConfigGetLogOnlyRuleCollectionIdsAttributeTypeOk(o.LogOnlyRuleCollectionIds); ok { - toSerialize["LogOnlyRuleCollectionIds"] = val - } - if val, ok := getWafConfigGetLogOnlyRuleGroupIdsAttributeTypeOk(o.LogOnlyRuleGroupIds); ok { - toSerialize["LogOnlyRuleGroupIds"] = val - } - if val, ok := getWafConfigGetLogOnlyRuleIdsAttributeTypeOk(o.LogOnlyRuleIds); ok { - toSerialize["LogOnlyRuleIds"] = val - } - if val, ok := getWafConfigGetModeAttributeTypeOk(o.Mode); ok { - toSerialize["Mode"] = val - } - if val, ok := getWafConfigGetParanoiaLevelAttributeTypeOk(o.ParanoiaLevel); ok { - toSerialize["ParanoiaLevel"] = val - } - if val, ok := getWafConfigGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableWafConfig struct { - value *WafConfig - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafConfig) Get() *WafConfig { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafConfig) Set(val *WafConfig) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafConfig) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafConfig) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableWafConfig(val *WafConfig) *NullableWafConfig { - return &NullableWafConfig{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_waf_config_patch.go b/services/cdn/model_waf_config_patch.go deleted file mode 100644 index a72d6adde6..0000000000 --- a/services/cdn/model_waf_config_patch.go +++ /dev/null @@ -1,972 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the WafConfigPatch type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WafConfigPatch{} - -/* - types and functions for allowedHttpMethods -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetAllowedHttpMethodsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetAllowedHttpMethodsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetAllowedHttpMethodsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigPatchGetAllowedHttpMethodsAttributeTypeOk(arg WafConfigPatchGetAllowedHttpMethodsAttributeType) (ret WafConfigPatchGetAllowedHttpMethodsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigPatchGetAllowedHttpMethodsAttributeType(arg *WafConfigPatchGetAllowedHttpMethodsAttributeType, val WafConfigPatchGetAllowedHttpMethodsRetType) { - *arg = &val -} - -/* - types and functions for allowedHttpVersions -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetAllowedHttpVersionsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetAllowedHttpVersionsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetAllowedHttpVersionsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigPatchGetAllowedHttpVersionsAttributeTypeOk(arg WafConfigPatchGetAllowedHttpVersionsAttributeType) (ret WafConfigPatchGetAllowedHttpVersionsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigPatchGetAllowedHttpVersionsAttributeType(arg *WafConfigPatchGetAllowedHttpVersionsAttributeType, val WafConfigPatchGetAllowedHttpVersionsRetType) { - *arg = &val -} - -/* - types and functions for allowedRequestContentTypes -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetAllowedRequestContentTypesAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetAllowedRequestContentTypesArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetAllowedRequestContentTypesRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigPatchGetAllowedRequestContentTypesAttributeTypeOk(arg WafConfigPatchGetAllowedRequestContentTypesAttributeType) (ret WafConfigPatchGetAllowedRequestContentTypesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigPatchGetAllowedRequestContentTypesAttributeType(arg *WafConfigPatchGetAllowedRequestContentTypesAttributeType, val WafConfigPatchGetAllowedRequestContentTypesRetType) { - *arg = &val -} - -/* - types and functions for disabledRuleCollectionIds -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetDisabledRuleCollectionIdsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetDisabledRuleCollectionIdsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetDisabledRuleCollectionIdsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigPatchGetDisabledRuleCollectionIdsAttributeTypeOk(arg WafConfigPatchGetDisabledRuleCollectionIdsAttributeType) (ret WafConfigPatchGetDisabledRuleCollectionIdsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigPatchGetDisabledRuleCollectionIdsAttributeType(arg *WafConfigPatchGetDisabledRuleCollectionIdsAttributeType, val WafConfigPatchGetDisabledRuleCollectionIdsRetType) { - *arg = &val -} - -/* - types and functions for disabledRuleGroupIds -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetDisabledRuleGroupIdsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetDisabledRuleGroupIdsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetDisabledRuleGroupIdsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigPatchGetDisabledRuleGroupIdsAttributeTypeOk(arg WafConfigPatchGetDisabledRuleGroupIdsAttributeType) (ret WafConfigPatchGetDisabledRuleGroupIdsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigPatchGetDisabledRuleGroupIdsAttributeType(arg *WafConfigPatchGetDisabledRuleGroupIdsAttributeType, val WafConfigPatchGetDisabledRuleGroupIdsRetType) { - *arg = &val -} - -/* - types and functions for disabledRuleIds -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetDisabledRuleIdsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetDisabledRuleIdsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetDisabledRuleIdsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigPatchGetDisabledRuleIdsAttributeTypeOk(arg WafConfigPatchGetDisabledRuleIdsAttributeType) (ret WafConfigPatchGetDisabledRuleIdsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigPatchGetDisabledRuleIdsAttributeType(arg *WafConfigPatchGetDisabledRuleIdsAttributeType, val WafConfigPatchGetDisabledRuleIdsRetType) { - *arg = &val -} - -/* - types and functions for enabledRuleCollectionIds -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetEnabledRuleCollectionIdsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetEnabledRuleCollectionIdsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetEnabledRuleCollectionIdsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigPatchGetEnabledRuleCollectionIdsAttributeTypeOk(arg WafConfigPatchGetEnabledRuleCollectionIdsAttributeType) (ret WafConfigPatchGetEnabledRuleCollectionIdsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigPatchGetEnabledRuleCollectionIdsAttributeType(arg *WafConfigPatchGetEnabledRuleCollectionIdsAttributeType, val WafConfigPatchGetEnabledRuleCollectionIdsRetType) { - *arg = &val -} - -/* - types and functions for enabledRuleGroupIds -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetEnabledRuleGroupIdsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetEnabledRuleGroupIdsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetEnabledRuleGroupIdsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigPatchGetEnabledRuleGroupIdsAttributeTypeOk(arg WafConfigPatchGetEnabledRuleGroupIdsAttributeType) (ret WafConfigPatchGetEnabledRuleGroupIdsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigPatchGetEnabledRuleGroupIdsAttributeType(arg *WafConfigPatchGetEnabledRuleGroupIdsAttributeType, val WafConfigPatchGetEnabledRuleGroupIdsRetType) { - *arg = &val -} - -/* - types and functions for enabledRuleIds -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetEnabledRuleIdsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetEnabledRuleIdsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetEnabledRuleIdsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigPatchGetEnabledRuleIdsAttributeTypeOk(arg WafConfigPatchGetEnabledRuleIdsAttributeType) (ret WafConfigPatchGetEnabledRuleIdsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigPatchGetEnabledRuleIdsAttributeType(arg *WafConfigPatchGetEnabledRuleIdsAttributeType, val WafConfigPatchGetEnabledRuleIdsRetType) { - *arg = &val -} - -/* - types and functions for logOnlyRuleCollectionIds -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetLogOnlyRuleCollectionIdsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetLogOnlyRuleCollectionIdsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetLogOnlyRuleCollectionIdsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigPatchGetLogOnlyRuleCollectionIdsAttributeTypeOk(arg WafConfigPatchGetLogOnlyRuleCollectionIdsAttributeType) (ret WafConfigPatchGetLogOnlyRuleCollectionIdsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigPatchGetLogOnlyRuleCollectionIdsAttributeType(arg *WafConfigPatchGetLogOnlyRuleCollectionIdsAttributeType, val WafConfigPatchGetLogOnlyRuleCollectionIdsRetType) { - *arg = &val -} - -/* - types and functions for logOnlyRuleGroupIds -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetLogOnlyRuleGroupIdsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetLogOnlyRuleGroupIdsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetLogOnlyRuleGroupIdsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigPatchGetLogOnlyRuleGroupIdsAttributeTypeOk(arg WafConfigPatchGetLogOnlyRuleGroupIdsAttributeType) (ret WafConfigPatchGetLogOnlyRuleGroupIdsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigPatchGetLogOnlyRuleGroupIdsAttributeType(arg *WafConfigPatchGetLogOnlyRuleGroupIdsAttributeType, val WafConfigPatchGetLogOnlyRuleGroupIdsRetType) { - *arg = &val -} - -/* - types and functions for logOnlyRuleIds -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetLogOnlyRuleIdsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetLogOnlyRuleIdsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetLogOnlyRuleIdsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigPatchGetLogOnlyRuleIdsAttributeTypeOk(arg WafConfigPatchGetLogOnlyRuleIdsAttributeType) (ret WafConfigPatchGetLogOnlyRuleIdsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigPatchGetLogOnlyRuleIdsAttributeType(arg *WafConfigPatchGetLogOnlyRuleIdsAttributeType, val WafConfigPatchGetLogOnlyRuleIdsRetType) { - *arg = &val -} - -/* - types and functions for mode -*/ - -// isEnumRef -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetModeAttributeType = *WafMode - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetModeArgType = WafMode - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetModeRetType = WafMode - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigPatchGetModeAttributeTypeOk(arg WafConfigPatchGetModeAttributeType) (ret WafConfigPatchGetModeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigPatchGetModeAttributeType(arg *WafConfigPatchGetModeAttributeType, val WafConfigPatchGetModeRetType) { - *arg = &val -} - -/* - types and functions for paranoiaLevel -*/ - -// isEnumRef -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetParanoiaLevelAttributeType = *WafParanoiaLevel - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetParanoiaLevelArgType = WafParanoiaLevel - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetParanoiaLevelRetType = WafParanoiaLevel - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigPatchGetParanoiaLevelAttributeTypeOk(arg WafConfigPatchGetParanoiaLevelAttributeType) (ret WafConfigPatchGetParanoiaLevelRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigPatchGetParanoiaLevelAttributeType(arg *WafConfigPatchGetParanoiaLevelAttributeType, val WafConfigPatchGetParanoiaLevelRetType) { - *arg = &val -} - -/* - types and functions for type -*/ - -// isEnumRef -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetTypeAttributeType = *WafType - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetTypeArgType = WafType - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatchGetTypeRetType = WafType - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafConfigPatchGetTypeAttributeTypeOk(arg WafConfigPatchGetTypeAttributeType) (ret WafConfigPatchGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafConfigPatchGetTypeAttributeType(arg *WafConfigPatchGetTypeAttributeType, val WafConfigPatchGetTypeRetType) { - *arg = &val -} - -// WafConfigPatch Modify the WAF Configuration ## WAF Rules You can modify the set of enabled, disabled and log-only Rules by modifying these 9 properties: - enabledRuleIds - disabledRuleIds - logOnlyRuleIds - enabledRuleGroupIds - disabledRuleGroupIds - logOnlyRuleGroupIds - enabledRuleCollectionIds - disabledRuleCollectionIds - logOnlyRuleCollectionIds Please inquire the `WafConfig` Description on how the effective configuration is determined. For patching, if an ID is already used in one of the properties, it will be removed (and effectively moved) to the new property. If patching multiple properties with the same ID (e.g. writing `@builtin/crs/response` to `logOnlyRuleCollectionIds` and `enabledRuleCollectionIds`), the request will be rejected with a 400. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafConfigPatch struct { - AllowedHttpMethods WafConfigPatchGetAllowedHttpMethodsAttributeType `json:"allowedHttpMethods,omitempty"` - AllowedHttpVersions WafConfigPatchGetAllowedHttpVersionsAttributeType `json:"allowedHttpVersions,omitempty"` - AllowedRequestContentTypes WafConfigPatchGetAllowedRequestContentTypesAttributeType `json:"allowedRequestContentTypes,omitempty"` - // Ids of WAF Collections to mark as disabled - DisabledRuleCollectionIds WafConfigPatchGetDisabledRuleCollectionIdsAttributeType `json:"disabledRuleCollectionIds,omitempty"` - // Ids of WAF Rule Groups to mark as disabled - DisabledRuleGroupIds WafConfigPatchGetDisabledRuleGroupIdsAttributeType `json:"disabledRuleGroupIds,omitempty"` - // Ids of WAF Rules that are **explicitly** disabled for this distribution. - DisabledRuleIds WafConfigPatchGetDisabledRuleIdsAttributeType `json:"disabledRuleIds,omitempty"` - // Ids of WAF Collections to mark as enabled - EnabledRuleCollectionIds WafConfigPatchGetEnabledRuleCollectionIdsAttributeType `json:"enabledRuleCollectionIds,omitempty"` - // Ids of WAF Rule Groups to mark as enabled - EnabledRuleGroupIds WafConfigPatchGetEnabledRuleGroupIdsAttributeType `json:"enabledRuleGroupIds,omitempty"` - // Ids of WAF Rules that are **explicitly** enabled for this distribution. - EnabledRuleIds WafConfigPatchGetEnabledRuleIdsAttributeType `json:"enabledRuleIds,omitempty"` - // Ids of WAF Collections to mark as log Only. - LogOnlyRuleCollectionIds WafConfigPatchGetLogOnlyRuleCollectionIdsAttributeType `json:"logOnlyRuleCollectionIds,omitempty"` - // Ids of WAF Rule Groups to mark as log Only. - LogOnlyRuleGroupIds WafConfigPatchGetLogOnlyRuleGroupIdsAttributeType `json:"logOnlyRuleGroupIds,omitempty"` - // Ids of WAF Rules that are **explicitly** marked as Log Only for this distribution. - LogOnlyRuleIds WafConfigPatchGetLogOnlyRuleIdsAttributeType `json:"logOnlyRuleIds,omitempty"` - Mode WafConfigPatchGetModeAttributeType `json:"mode,omitempty"` - ParanoiaLevel WafConfigPatchGetParanoiaLevelAttributeType `json:"paranoiaLevel,omitempty"` - Type WafConfigPatchGetTypeAttributeType `json:"type,omitempty"` -} - -// NewWafConfigPatch instantiates a new WafConfigPatch object -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafConfigPatch() *WafConfigPatch { - this := WafConfigPatch{} - return &this -} - -// NewWafConfigPatchWithDefaults instantiates a new WafConfigPatch 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafConfigPatchWithDefaults() *WafConfigPatch { - this := WafConfigPatch{} - return &this -} - -// GetAllowedHttpMethods returns the AllowedHttpMethods field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetAllowedHttpMethods() (res WafConfigPatchGetAllowedHttpMethodsRetType) { - res, _ = o.GetAllowedHttpMethodsOk() - return -} - -// GetAllowedHttpMethodsOk returns a tuple with the AllowedHttpMethods field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetAllowedHttpMethodsOk() (ret WafConfigPatchGetAllowedHttpMethodsRetType, ok bool) { - return getWafConfigPatchGetAllowedHttpMethodsAttributeTypeOk(o.AllowedHttpMethods) -} - -// HasAllowedHttpMethods returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) HasAllowedHttpMethods() bool { - _, ok := o.GetAllowedHttpMethodsOk() - return ok -} - -// SetAllowedHttpMethods gets a reference to the given []string and assigns it to the AllowedHttpMethods field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) SetAllowedHttpMethods(v WafConfigPatchGetAllowedHttpMethodsRetType) { - setWafConfigPatchGetAllowedHttpMethodsAttributeType(&o.AllowedHttpMethods, v) -} - -// GetAllowedHttpVersions returns the AllowedHttpVersions field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetAllowedHttpVersions() (res WafConfigPatchGetAllowedHttpVersionsRetType) { - res, _ = o.GetAllowedHttpVersionsOk() - return -} - -// GetAllowedHttpVersionsOk returns a tuple with the AllowedHttpVersions field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetAllowedHttpVersionsOk() (ret WafConfigPatchGetAllowedHttpVersionsRetType, ok bool) { - return getWafConfigPatchGetAllowedHttpVersionsAttributeTypeOk(o.AllowedHttpVersions) -} - -// HasAllowedHttpVersions returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) HasAllowedHttpVersions() bool { - _, ok := o.GetAllowedHttpVersionsOk() - return ok -} - -// SetAllowedHttpVersions gets a reference to the given []string and assigns it to the AllowedHttpVersions field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) SetAllowedHttpVersions(v WafConfigPatchGetAllowedHttpVersionsRetType) { - setWafConfigPatchGetAllowedHttpVersionsAttributeType(&o.AllowedHttpVersions, v) -} - -// GetAllowedRequestContentTypes returns the AllowedRequestContentTypes field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetAllowedRequestContentTypes() (res WafConfigPatchGetAllowedRequestContentTypesRetType) { - res, _ = o.GetAllowedRequestContentTypesOk() - return -} - -// GetAllowedRequestContentTypesOk returns a tuple with the AllowedRequestContentTypes field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetAllowedRequestContentTypesOk() (ret WafConfigPatchGetAllowedRequestContentTypesRetType, ok bool) { - return getWafConfigPatchGetAllowedRequestContentTypesAttributeTypeOk(o.AllowedRequestContentTypes) -} - -// HasAllowedRequestContentTypes returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) HasAllowedRequestContentTypes() bool { - _, ok := o.GetAllowedRequestContentTypesOk() - return ok -} - -// SetAllowedRequestContentTypes gets a reference to the given []string and assigns it to the AllowedRequestContentTypes field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) SetAllowedRequestContentTypes(v WafConfigPatchGetAllowedRequestContentTypesRetType) { - setWafConfigPatchGetAllowedRequestContentTypesAttributeType(&o.AllowedRequestContentTypes, v) -} - -// GetDisabledRuleCollectionIds returns the DisabledRuleCollectionIds field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetDisabledRuleCollectionIds() (res WafConfigPatchGetDisabledRuleCollectionIdsRetType) { - res, _ = o.GetDisabledRuleCollectionIdsOk() - return -} - -// GetDisabledRuleCollectionIdsOk returns a tuple with the DisabledRuleCollectionIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetDisabledRuleCollectionIdsOk() (ret WafConfigPatchGetDisabledRuleCollectionIdsRetType, ok bool) { - return getWafConfigPatchGetDisabledRuleCollectionIdsAttributeTypeOk(o.DisabledRuleCollectionIds) -} - -// HasDisabledRuleCollectionIds returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) HasDisabledRuleCollectionIds() bool { - _, ok := o.GetDisabledRuleCollectionIdsOk() - return ok -} - -// SetDisabledRuleCollectionIds gets a reference to the given []string and assigns it to the DisabledRuleCollectionIds field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) SetDisabledRuleCollectionIds(v WafConfigPatchGetDisabledRuleCollectionIdsRetType) { - setWafConfigPatchGetDisabledRuleCollectionIdsAttributeType(&o.DisabledRuleCollectionIds, v) -} - -// GetDisabledRuleGroupIds returns the DisabledRuleGroupIds field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetDisabledRuleGroupIds() (res WafConfigPatchGetDisabledRuleGroupIdsRetType) { - res, _ = o.GetDisabledRuleGroupIdsOk() - return -} - -// GetDisabledRuleGroupIdsOk returns a tuple with the DisabledRuleGroupIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetDisabledRuleGroupIdsOk() (ret WafConfigPatchGetDisabledRuleGroupIdsRetType, ok bool) { - return getWafConfigPatchGetDisabledRuleGroupIdsAttributeTypeOk(o.DisabledRuleGroupIds) -} - -// HasDisabledRuleGroupIds returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) HasDisabledRuleGroupIds() bool { - _, ok := o.GetDisabledRuleGroupIdsOk() - return ok -} - -// SetDisabledRuleGroupIds gets a reference to the given []string and assigns it to the DisabledRuleGroupIds field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) SetDisabledRuleGroupIds(v WafConfigPatchGetDisabledRuleGroupIdsRetType) { - setWafConfigPatchGetDisabledRuleGroupIdsAttributeType(&o.DisabledRuleGroupIds, v) -} - -// GetDisabledRuleIds returns the DisabledRuleIds field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetDisabledRuleIds() (res WafConfigPatchGetDisabledRuleIdsRetType) { - res, _ = o.GetDisabledRuleIdsOk() - return -} - -// GetDisabledRuleIdsOk returns a tuple with the DisabledRuleIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetDisabledRuleIdsOk() (ret WafConfigPatchGetDisabledRuleIdsRetType, ok bool) { - return getWafConfigPatchGetDisabledRuleIdsAttributeTypeOk(o.DisabledRuleIds) -} - -// HasDisabledRuleIds returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) HasDisabledRuleIds() bool { - _, ok := o.GetDisabledRuleIdsOk() - return ok -} - -// SetDisabledRuleIds gets a reference to the given []string and assigns it to the DisabledRuleIds field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) SetDisabledRuleIds(v WafConfigPatchGetDisabledRuleIdsRetType) { - setWafConfigPatchGetDisabledRuleIdsAttributeType(&o.DisabledRuleIds, v) -} - -// GetEnabledRuleCollectionIds returns the EnabledRuleCollectionIds field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetEnabledRuleCollectionIds() (res WafConfigPatchGetEnabledRuleCollectionIdsRetType) { - res, _ = o.GetEnabledRuleCollectionIdsOk() - return -} - -// GetEnabledRuleCollectionIdsOk returns a tuple with the EnabledRuleCollectionIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetEnabledRuleCollectionIdsOk() (ret WafConfigPatchGetEnabledRuleCollectionIdsRetType, ok bool) { - return getWafConfigPatchGetEnabledRuleCollectionIdsAttributeTypeOk(o.EnabledRuleCollectionIds) -} - -// HasEnabledRuleCollectionIds returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) HasEnabledRuleCollectionIds() bool { - _, ok := o.GetEnabledRuleCollectionIdsOk() - return ok -} - -// SetEnabledRuleCollectionIds gets a reference to the given []string and assigns it to the EnabledRuleCollectionIds field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) SetEnabledRuleCollectionIds(v WafConfigPatchGetEnabledRuleCollectionIdsRetType) { - setWafConfigPatchGetEnabledRuleCollectionIdsAttributeType(&o.EnabledRuleCollectionIds, v) -} - -// GetEnabledRuleGroupIds returns the EnabledRuleGroupIds field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetEnabledRuleGroupIds() (res WafConfigPatchGetEnabledRuleGroupIdsRetType) { - res, _ = o.GetEnabledRuleGroupIdsOk() - return -} - -// GetEnabledRuleGroupIdsOk returns a tuple with the EnabledRuleGroupIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetEnabledRuleGroupIdsOk() (ret WafConfigPatchGetEnabledRuleGroupIdsRetType, ok bool) { - return getWafConfigPatchGetEnabledRuleGroupIdsAttributeTypeOk(o.EnabledRuleGroupIds) -} - -// HasEnabledRuleGroupIds returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) HasEnabledRuleGroupIds() bool { - _, ok := o.GetEnabledRuleGroupIdsOk() - return ok -} - -// SetEnabledRuleGroupIds gets a reference to the given []string and assigns it to the EnabledRuleGroupIds field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) SetEnabledRuleGroupIds(v WafConfigPatchGetEnabledRuleGroupIdsRetType) { - setWafConfigPatchGetEnabledRuleGroupIdsAttributeType(&o.EnabledRuleGroupIds, v) -} - -// GetEnabledRuleIds returns the EnabledRuleIds field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetEnabledRuleIds() (res WafConfigPatchGetEnabledRuleIdsRetType) { - res, _ = o.GetEnabledRuleIdsOk() - return -} - -// GetEnabledRuleIdsOk returns a tuple with the EnabledRuleIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetEnabledRuleIdsOk() (ret WafConfigPatchGetEnabledRuleIdsRetType, ok bool) { - return getWafConfigPatchGetEnabledRuleIdsAttributeTypeOk(o.EnabledRuleIds) -} - -// HasEnabledRuleIds returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) HasEnabledRuleIds() bool { - _, ok := o.GetEnabledRuleIdsOk() - return ok -} - -// SetEnabledRuleIds gets a reference to the given []string and assigns it to the EnabledRuleIds field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) SetEnabledRuleIds(v WafConfigPatchGetEnabledRuleIdsRetType) { - setWafConfigPatchGetEnabledRuleIdsAttributeType(&o.EnabledRuleIds, v) -} - -// GetLogOnlyRuleCollectionIds returns the LogOnlyRuleCollectionIds field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetLogOnlyRuleCollectionIds() (res WafConfigPatchGetLogOnlyRuleCollectionIdsRetType) { - res, _ = o.GetLogOnlyRuleCollectionIdsOk() - return -} - -// GetLogOnlyRuleCollectionIdsOk returns a tuple with the LogOnlyRuleCollectionIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetLogOnlyRuleCollectionIdsOk() (ret WafConfigPatchGetLogOnlyRuleCollectionIdsRetType, ok bool) { - return getWafConfigPatchGetLogOnlyRuleCollectionIdsAttributeTypeOk(o.LogOnlyRuleCollectionIds) -} - -// HasLogOnlyRuleCollectionIds returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) HasLogOnlyRuleCollectionIds() bool { - _, ok := o.GetLogOnlyRuleCollectionIdsOk() - return ok -} - -// SetLogOnlyRuleCollectionIds gets a reference to the given []string and assigns it to the LogOnlyRuleCollectionIds field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) SetLogOnlyRuleCollectionIds(v WafConfigPatchGetLogOnlyRuleCollectionIdsRetType) { - setWafConfigPatchGetLogOnlyRuleCollectionIdsAttributeType(&o.LogOnlyRuleCollectionIds, v) -} - -// GetLogOnlyRuleGroupIds returns the LogOnlyRuleGroupIds field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetLogOnlyRuleGroupIds() (res WafConfigPatchGetLogOnlyRuleGroupIdsRetType) { - res, _ = o.GetLogOnlyRuleGroupIdsOk() - return -} - -// GetLogOnlyRuleGroupIdsOk returns a tuple with the LogOnlyRuleGroupIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetLogOnlyRuleGroupIdsOk() (ret WafConfigPatchGetLogOnlyRuleGroupIdsRetType, ok bool) { - return getWafConfigPatchGetLogOnlyRuleGroupIdsAttributeTypeOk(o.LogOnlyRuleGroupIds) -} - -// HasLogOnlyRuleGroupIds returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) HasLogOnlyRuleGroupIds() bool { - _, ok := o.GetLogOnlyRuleGroupIdsOk() - return ok -} - -// SetLogOnlyRuleGroupIds gets a reference to the given []string and assigns it to the LogOnlyRuleGroupIds field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) SetLogOnlyRuleGroupIds(v WafConfigPatchGetLogOnlyRuleGroupIdsRetType) { - setWafConfigPatchGetLogOnlyRuleGroupIdsAttributeType(&o.LogOnlyRuleGroupIds, v) -} - -// GetLogOnlyRuleIds returns the LogOnlyRuleIds field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetLogOnlyRuleIds() (res WafConfigPatchGetLogOnlyRuleIdsRetType) { - res, _ = o.GetLogOnlyRuleIdsOk() - return -} - -// GetLogOnlyRuleIdsOk returns a tuple with the LogOnlyRuleIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetLogOnlyRuleIdsOk() (ret WafConfigPatchGetLogOnlyRuleIdsRetType, ok bool) { - return getWafConfigPatchGetLogOnlyRuleIdsAttributeTypeOk(o.LogOnlyRuleIds) -} - -// HasLogOnlyRuleIds returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) HasLogOnlyRuleIds() bool { - _, ok := o.GetLogOnlyRuleIdsOk() - return ok -} - -// SetLogOnlyRuleIds gets a reference to the given []string and assigns it to the LogOnlyRuleIds field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) SetLogOnlyRuleIds(v WafConfigPatchGetLogOnlyRuleIdsRetType) { - setWafConfigPatchGetLogOnlyRuleIdsAttributeType(&o.LogOnlyRuleIds, v) -} - -// GetMode returns the Mode field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetMode() (res WafConfigPatchGetModeRetType) { - res, _ = o.GetModeOk() - return -} - -// GetModeOk returns a tuple with the Mode field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetModeOk() (ret WafConfigPatchGetModeRetType, ok bool) { - return getWafConfigPatchGetModeAttributeTypeOk(o.Mode) -} - -// HasMode returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) HasMode() bool { - _, ok := o.GetModeOk() - return ok -} - -// SetMode gets a reference to the given WafMode and assigns it to the Mode field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) SetMode(v WafConfigPatchGetModeRetType) { - setWafConfigPatchGetModeAttributeType(&o.Mode, v) -} - -// GetParanoiaLevel returns the ParanoiaLevel field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetParanoiaLevel() (res WafConfigPatchGetParanoiaLevelRetType) { - res, _ = o.GetParanoiaLevelOk() - return -} - -// GetParanoiaLevelOk returns a tuple with the ParanoiaLevel field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetParanoiaLevelOk() (ret WafConfigPatchGetParanoiaLevelRetType, ok bool) { - return getWafConfigPatchGetParanoiaLevelAttributeTypeOk(o.ParanoiaLevel) -} - -// HasParanoiaLevel returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) HasParanoiaLevel() bool { - _, ok := o.GetParanoiaLevelOk() - return ok -} - -// SetParanoiaLevel gets a reference to the given WafParanoiaLevel and assigns it to the ParanoiaLevel field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) SetParanoiaLevel(v WafConfigPatchGetParanoiaLevelRetType) { - setWafConfigPatchGetParanoiaLevelAttributeType(&o.ParanoiaLevel, v) -} - -// GetType returns the Type field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetType() (res WafConfigPatchGetTypeRetType) { - res, _ = o.GetTypeOk() - return -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) GetTypeOk() (ret WafConfigPatchGetTypeRetType, ok bool) { - return getWafConfigPatchGetTypeAttributeTypeOk(o.Type) -} - -// HasType returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) HasType() bool { - _, ok := o.GetTypeOk() - return ok -} - -// SetType gets a reference to the given WafType and assigns it to the Type field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafConfigPatch) SetType(v WafConfigPatchGetTypeRetType) { - setWafConfigPatchGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o WafConfigPatch) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getWafConfigPatchGetAllowedHttpMethodsAttributeTypeOk(o.AllowedHttpMethods); ok { - toSerialize["AllowedHttpMethods"] = val - } - if val, ok := getWafConfigPatchGetAllowedHttpVersionsAttributeTypeOk(o.AllowedHttpVersions); ok { - toSerialize["AllowedHttpVersions"] = val - } - if val, ok := getWafConfigPatchGetAllowedRequestContentTypesAttributeTypeOk(o.AllowedRequestContentTypes); ok { - toSerialize["AllowedRequestContentTypes"] = val - } - if val, ok := getWafConfigPatchGetDisabledRuleCollectionIdsAttributeTypeOk(o.DisabledRuleCollectionIds); ok { - toSerialize["DisabledRuleCollectionIds"] = val - } - if val, ok := getWafConfigPatchGetDisabledRuleGroupIdsAttributeTypeOk(o.DisabledRuleGroupIds); ok { - toSerialize["DisabledRuleGroupIds"] = val - } - if val, ok := getWafConfigPatchGetDisabledRuleIdsAttributeTypeOk(o.DisabledRuleIds); ok { - toSerialize["DisabledRuleIds"] = val - } - if val, ok := getWafConfigPatchGetEnabledRuleCollectionIdsAttributeTypeOk(o.EnabledRuleCollectionIds); ok { - toSerialize["EnabledRuleCollectionIds"] = val - } - if val, ok := getWafConfigPatchGetEnabledRuleGroupIdsAttributeTypeOk(o.EnabledRuleGroupIds); ok { - toSerialize["EnabledRuleGroupIds"] = val - } - if val, ok := getWafConfigPatchGetEnabledRuleIdsAttributeTypeOk(o.EnabledRuleIds); ok { - toSerialize["EnabledRuleIds"] = val - } - if val, ok := getWafConfigPatchGetLogOnlyRuleCollectionIdsAttributeTypeOk(o.LogOnlyRuleCollectionIds); ok { - toSerialize["LogOnlyRuleCollectionIds"] = val - } - if val, ok := getWafConfigPatchGetLogOnlyRuleGroupIdsAttributeTypeOk(o.LogOnlyRuleGroupIds); ok { - toSerialize["LogOnlyRuleGroupIds"] = val - } - if val, ok := getWafConfigPatchGetLogOnlyRuleIdsAttributeTypeOk(o.LogOnlyRuleIds); ok { - toSerialize["LogOnlyRuleIds"] = val - } - if val, ok := getWafConfigPatchGetModeAttributeTypeOk(o.Mode); ok { - toSerialize["Mode"] = val - } - if val, ok := getWafConfigPatchGetParanoiaLevelAttributeTypeOk(o.ParanoiaLevel); ok { - toSerialize["ParanoiaLevel"] = val - } - if val, ok := getWafConfigPatchGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableWafConfigPatch struct { - value *WafConfigPatch - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafConfigPatch) Get() *WafConfigPatch { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafConfigPatch) Set(val *WafConfigPatch) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafConfigPatch) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafConfigPatch) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableWafConfigPatch(val *WafConfigPatch) *NullableWafConfigPatch { - return &NullableWafConfigPatch{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafConfigPatch) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafConfigPatch) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_waf_config_patch_test.go b/services/cdn/model_waf_config_patch_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_waf_config_patch_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_waf_config_test.go b/services/cdn/model_waf_config_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_waf_config_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_waf_mode.go b/services/cdn/model_waf_mode.go deleted file mode 100644 index 03afa404dc..0000000000 --- a/services/cdn/model_waf_mode.go +++ /dev/null @@ -1,135 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// WafMode - `ENABLED`: The WAF actively inspects and blocks malicious requests. - `DISABLED`: The WAF is completely off. No inspection occurs. - `LOG_ONLY`: The WAF inspects requests and logs matches but never blocks. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafMode string - -// List of WafMode -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - WAFMODE_DISABLED WafMode = "DISABLED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - WAFMODE_ENABLED WafMode = "ENABLED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - WAFMODE_LOG_ONLY WafMode = "LOG_ONLY" -) - -// All allowed values of WafMode enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedWafModeEnumValues = []WafMode{ - "DISABLED", - "ENABLED", - "LOG_ONLY", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *WafMode) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue string - if value == zeroValue { - return nil - } - enumTypeValue := WafMode(value) - for _, existing := range AllowedWafModeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid WafMode", value) -} - -// NewWafModeFromValue returns a pointer to a valid WafMode -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafModeFromValue(v string) (*WafMode, error) { - ev := WafMode(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for WafMode: valid values are %v", v, AllowedWafModeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v WafMode) IsValid() bool { - for _, existing := range AllowedWafModeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to WafMode value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v WafMode) Ptr() *WafMode { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableWafMode struct { - value *WafMode - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafMode) Get() *WafMode { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafMode) Set(val *WafMode) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafMode) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafMode) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableWafMode(val *WafMode) *NullableWafMode { - return &NullableWafMode{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafMode) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafMode) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_waf_mode_test.go b/services/cdn/model_waf_mode_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_waf_mode_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_waf_paranoia_level.go b/services/cdn/model_waf_paranoia_level.go deleted file mode 100644 index 50d77c6765..0000000000 --- a/services/cdn/model_waf_paranoia_level.go +++ /dev/null @@ -1,138 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// WafParanoiaLevel The paranoia level defines how aggressively the WAF should action on requests. It ranges from `L1` (least strict, lowest chance of false positives) to `L4` (most strict, highest chance of false positives). A higher paranoia level is more effective at catching attacks but can also block legitimate traffic. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafParanoiaLevel string - -// List of WafParanoiaLevel -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - WAFPARANOIALEVEL_L1 WafParanoiaLevel = "L1" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - WAFPARANOIALEVEL_L2 WafParanoiaLevel = "L2" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - WAFPARANOIALEVEL_L3 WafParanoiaLevel = "L3" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - WAFPARANOIALEVEL_L4 WafParanoiaLevel = "L4" -) - -// All allowed values of WafParanoiaLevel enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedWafParanoiaLevelEnumValues = []WafParanoiaLevel{ - "L1", - "L2", - "L3", - "L4", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *WafParanoiaLevel) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue string - if value == zeroValue { - return nil - } - enumTypeValue := WafParanoiaLevel(value) - for _, existing := range AllowedWafParanoiaLevelEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid WafParanoiaLevel", value) -} - -// NewWafParanoiaLevelFromValue returns a pointer to a valid WafParanoiaLevel -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafParanoiaLevelFromValue(v string) (*WafParanoiaLevel, error) { - ev := WafParanoiaLevel(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for WafParanoiaLevel: valid values are %v", v, AllowedWafParanoiaLevelEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v WafParanoiaLevel) IsValid() bool { - for _, existing := range AllowedWafParanoiaLevelEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to WafParanoiaLevel value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v WafParanoiaLevel) Ptr() *WafParanoiaLevel { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableWafParanoiaLevel struct { - value *WafParanoiaLevel - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafParanoiaLevel) Get() *WafParanoiaLevel { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafParanoiaLevel) Set(val *WafParanoiaLevel) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafParanoiaLevel) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafParanoiaLevel) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableWafParanoiaLevel(val *WafParanoiaLevel) *NullableWafParanoiaLevel { - return &NullableWafParanoiaLevel{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafParanoiaLevel) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafParanoiaLevel) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_waf_paranoia_level_test.go b/services/cdn/model_waf_paranoia_level_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_waf_paranoia_level_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_waf_rule.go b/services/cdn/model_waf_rule.go deleted file mode 100644 index d464377837..0000000000 --- a/services/cdn/model_waf_rule.go +++ /dev/null @@ -1,262 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the WafRule type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WafRule{} - -/* - types and functions for code -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleGetCodeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafRuleGetCodeAttributeTypeOk(arg WafRuleGetCodeAttributeType) (ret WafRuleGetCodeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafRuleGetCodeAttributeType(arg *WafRuleGetCodeAttributeType, val WafRuleGetCodeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleGetCodeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleGetCodeRetType = string - -/* - types and functions for description -*/ - -// isContainer -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleGetDescriptionAttributeType = *map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleGetDescriptionArgType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleGetDescriptionRetType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafRuleGetDescriptionAttributeTypeOk(arg WafRuleGetDescriptionAttributeType) (ret WafRuleGetDescriptionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafRuleGetDescriptionAttributeType(arg *WafRuleGetDescriptionAttributeType, val WafRuleGetDescriptionRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafRuleGetIdAttributeTypeOk(arg WafRuleGetIdAttributeType) (ret WafRuleGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafRuleGetIdAttributeType(arg *WafRuleGetIdAttributeType, val WafRuleGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleGetIdRetType = string - -// WafRule struct for WafRule -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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"` - // REQUIRED - Id WafRuleGetIdAttributeType `json:"id" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _WafRule WafRule - -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafRuleWithDefaults() *WafRule { - this := WafRule{} - return &this -} - -// GetCode returns the Code field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafRule) GetCodeOk() (ret WafRuleGetCodeRetType, ok bool) { - return getWafRuleGetCodeAttributeTypeOk(o.Code) -} - -// HasCode returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafRule) SetCode(v WafRuleGetCodeRetType) { - setWafRuleGetCodeAttributeType(&o.Code, v) -} - -// GetDescription returns the Description field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafRule) GetDescriptionOk() (ret WafRuleGetDescriptionRetType, ok bool) { - return getWafRuleGetDescriptionAttributeTypeOk(o.Description) -} - -// SetDescription sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafRule) SetDescription(v WafRuleGetDescriptionRetType) { - setWafRuleGetDescriptionAttributeType(&o.Description, v) -} - -// GetId returns the Id field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafRule) GetIdOk() (ret WafRuleGetIdRetType, ok bool) { - return getWafRuleGetIdAttributeTypeOk(o.Id) -} - -// SetId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafRule) SetId(v WafRuleGetIdRetType) { - setWafRuleGetIdAttributeType(&o.Id, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o WafRule) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getWafRuleGetCodeAttributeTypeOk(o.Code); ok { - toSerialize["Code"] = val - } - if val, ok := getWafRuleGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getWafRuleGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableWafRule struct { - value *WafRule - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafRule) Get() *WafRule { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafRule) Set(val *WafRule) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafRule) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafRule) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableWafRule(val *WafRule) *NullableWafRule { - return &NullableWafRule{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafRule) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafRule) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_waf_rule_action.go b/services/cdn/model_waf_rule_action.go deleted file mode 100644 index 4553ff5378..0000000000 --- a/services/cdn/model_waf_rule_action.go +++ /dev/null @@ -1,135 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// WAFRuleAction The action a WAF rule can take based on a request -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WAFRuleAction string - -// List of WAFRuleAction -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - WAFRULEACTION_BLOCKED WAFRuleAction = "BLOCKED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - WAFRULEACTION_LOGGED WAFRuleAction = "LOGGED" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - WAFRULEACTION_ALLOWED WAFRuleAction = "ALLOWED" -) - -// All allowed values of WAFRuleAction enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedWAFRuleActionEnumValues = []WAFRuleAction{ - "BLOCKED", - "LOGGED", - "ALLOWED", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *WAFRuleAction) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue string - if value == zeroValue { - return nil - } - enumTypeValue := WAFRuleAction(value) - for _, existing := range AllowedWAFRuleActionEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid WAFRuleAction", value) -} - -// NewWAFRuleActionFromValue returns a pointer to a valid WAFRuleAction -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWAFRuleActionFromValue(v string) (*WAFRuleAction, error) { - ev := WAFRuleAction(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for WAFRuleAction: valid values are %v", v, AllowedWAFRuleActionEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v WAFRuleAction) IsValid() bool { - for _, existing := range AllowedWAFRuleActionEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to WAFRuleAction value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v WAFRuleAction) Ptr() *WAFRuleAction { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableWAFRuleAction struct { - value *WAFRuleAction - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWAFRuleAction) Get() *WAFRuleAction { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWAFRuleAction) Set(val *WAFRuleAction) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWAFRuleAction) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWAFRuleAction) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableWAFRuleAction(val *WAFRuleAction) *NullableWAFRuleAction { - return &NullableWAFRuleAction{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWAFRuleAction) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWAFRuleAction) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_waf_rule_action_test.go b/services/cdn/model_waf_rule_action_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_waf_rule_action_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_waf_rule_collection.go b/services/cdn/model_waf_rule_collection.go deleted file mode 100644 index b1bb08896a..0000000000 --- a/services/cdn/model_waf_rule_collection.go +++ /dev/null @@ -1,256 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the WafRuleCollection type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WafRuleCollection{} - -/* - types and functions for groups -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleCollectionGetGroupsAttributeType = *[]WafRuleGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleCollectionGetGroupsArgType = []WafRuleGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleCollectionGetGroupsRetType = []WafRuleGroup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafRuleCollectionGetGroupsAttributeTypeOk(arg WafRuleCollectionGetGroupsAttributeType) (ret WafRuleCollectionGetGroupsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafRuleCollectionGetGroupsAttributeType(arg *WafRuleCollectionGetGroupsAttributeType, val WafRuleCollectionGetGroupsRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleCollectionGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafRuleCollectionGetIdAttributeTypeOk(arg WafRuleCollectionGetIdAttributeType) (ret WafRuleCollectionGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafRuleCollectionGetIdAttributeType(arg *WafRuleCollectionGetIdAttributeType, val WafRuleCollectionGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleCollectionGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleCollectionGetIdRetType = string - -/* - types and functions for name -*/ - -// isContainer -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleCollectionGetNameAttributeType = *map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleCollectionGetNameArgType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleCollectionGetNameRetType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafRuleCollectionGetNameAttributeTypeOk(arg WafRuleCollectionGetNameAttributeType) (ret WafRuleCollectionGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafRuleCollectionGetNameAttributeType(arg *WafRuleCollectionGetNameAttributeType, val WafRuleCollectionGetNameRetType) { - *arg = &val -} - -// WafRuleCollection struct for WafRuleCollection -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleCollection struct { - // REQUIRED - Groups WafRuleCollectionGetGroupsAttributeType `json:"groups" required:"true"` - // REQUIRED - Id WafRuleCollectionGetIdAttributeType `json:"id" required:"true"` - // LocalizedString is a map from language to string value - // REQUIRED - Name WafRuleCollectionGetNameAttributeType `json:"name" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _WafRuleCollection WafRuleCollection - -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafRuleCollectionWithDefaults() *WafRuleCollection { - this := WafRuleCollection{} - return &this -} - -// GetGroups returns the Groups field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafRuleCollection) GetGroupsOk() (ret WafRuleCollectionGetGroupsRetType, ok bool) { - return getWafRuleCollectionGetGroupsAttributeTypeOk(o.Groups) -} - -// SetGroups sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafRuleCollection) SetGroups(v WafRuleCollectionGetGroupsRetType) { - setWafRuleCollectionGetGroupsAttributeType(&o.Groups, v) -} - -// GetId returns the Id field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafRuleCollection) GetIdOk() (ret WafRuleCollectionGetIdRetType, ok bool) { - return getWafRuleCollectionGetIdAttributeTypeOk(o.Id) -} - -// SetId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafRuleCollection) SetId(v WafRuleCollectionGetIdRetType) { - setWafRuleCollectionGetIdAttributeType(&o.Id, v) -} - -// GetName returns the Name field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafRuleCollection) GetNameOk() (ret WafRuleCollectionGetNameRetType, ok bool) { - return getWafRuleCollectionGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafRuleCollection) SetName(v WafRuleCollectionGetNameRetType) { - setWafRuleCollectionGetNameAttributeType(&o.Name, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o WafRuleCollection) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getWafRuleCollectionGetGroupsAttributeTypeOk(o.Groups); ok { - toSerialize["Groups"] = val - } - if val, ok := getWafRuleCollectionGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getWafRuleCollectionGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableWafRuleCollection struct { - value *WafRuleCollection - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafRuleCollection) Get() *WafRuleCollection { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafRuleCollection) Set(val *WafRuleCollection) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafRuleCollection) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafRuleCollection) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableWafRuleCollection(val *WafRuleCollection) *NullableWafRuleCollection { - return &NullableWafRuleCollection{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafRuleCollection) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_waf_rule_collection_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_waf_rule_group.go b/services/cdn/model_waf_rule_group.go deleted file mode 100644 index ef9956c18f..0000000000 --- a/services/cdn/model_waf_rule_group.go +++ /dev/null @@ -1,257 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the WafRuleGroup type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WafRuleGroup{} - -/* - types and functions for description -*/ - -// isContainer -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleGroupGetDescriptionAttributeType = *map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleGroupGetDescriptionArgType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleGroupGetDescriptionRetType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafRuleGroupGetDescriptionAttributeTypeOk(arg WafRuleGroupGetDescriptionAttributeType) (ret WafRuleGroupGetDescriptionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafRuleGroupGetDescriptionAttributeType(arg *WafRuleGroupGetDescriptionAttributeType, val WafRuleGroupGetDescriptionRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isContainer -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleGroupGetNameAttributeType = *map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleGroupGetNameArgType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleGroupGetNameRetType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafRuleGroupGetNameAttributeTypeOk(arg WafRuleGroupGetNameAttributeType) (ret WafRuleGroupGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafRuleGroupGetNameAttributeType(arg *WafRuleGroupGetNameAttributeType, val WafRuleGroupGetNameRetType) { - *arg = &val -} - -/* - types and functions for rules -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleGroupGetRulesAttributeType = *[]WafRule - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleGroupGetRulesArgType = []WafRule - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleGroupGetRulesRetType = []WafRule - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafRuleGroupGetRulesAttributeTypeOk(arg WafRuleGroupGetRulesAttributeType) (ret WafRuleGroupGetRulesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafRuleGroupGetRulesAttributeType(arg *WafRuleGroupGetRulesAttributeType, val WafRuleGroupGetRulesRetType) { - *arg = &val -} - -// WafRuleGroup struct for WafRuleGroup -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafRuleGroup struct { - // LocalizedString is a map from language to string value - // REQUIRED - Description WafRuleGroupGetDescriptionAttributeType `json:"description" required:"true"` - // LocalizedString is a map from language to string value - // REQUIRED - Name WafRuleGroupGetNameAttributeType `json:"name" required:"true"` - // REQUIRED - Rules WafRuleGroupGetRulesAttributeType `json:"rules" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _WafRuleGroup WafRuleGroup - -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafRuleGroupWithDefaults() *WafRuleGroup { - this := WafRuleGroup{} - return &this -} - -// GetDescription returns the Description field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafRuleGroup) GetDescriptionOk() (ret WafRuleGroupGetDescriptionRetType, ok bool) { - return getWafRuleGroupGetDescriptionAttributeTypeOk(o.Description) -} - -// SetDescription sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafRuleGroup) SetDescription(v WafRuleGroupGetDescriptionRetType) { - setWafRuleGroupGetDescriptionAttributeType(&o.Description, v) -} - -// GetName returns the Name field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafRuleGroup) GetNameOk() (ret WafRuleGroupGetNameRetType, ok bool) { - return getWafRuleGroupGetNameAttributeTypeOk(o.Name) -} - -// SetName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafRuleGroup) SetName(v WafRuleGroupGetNameRetType) { - setWafRuleGroupGetNameAttributeType(&o.Name, v) -} - -// GetRules returns the Rules field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafRuleGroup) GetRulesOk() (ret WafRuleGroupGetRulesRetType, ok bool) { - return getWafRuleGroupGetRulesAttributeTypeOk(o.Rules) -} - -// SetRules sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafRuleGroup) SetRules(v WafRuleGroupGetRulesRetType) { - setWafRuleGroupGetRulesAttributeType(&o.Rules, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o WafRuleGroup) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getWafRuleGroupGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getWafRuleGroupGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getWafRuleGroupGetRulesAttributeTypeOk(o.Rules); ok { - toSerialize["Rules"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableWafRuleGroup struct { - value *WafRuleGroup - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafRuleGroup) Get() *WafRuleGroup { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafRuleGroup) Set(val *WafRuleGroup) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafRuleGroup) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafRuleGroup) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableWafRuleGroup(val *WafRuleGroup) *NullableWafRuleGroup { - return &NullableWafRuleGroup{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafRuleGroup) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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 deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_waf_rule_group_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_waf_rule_test.go b/services/cdn/model_waf_rule_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_waf_rule_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_waf_status_rule_block.go b/services/cdn/model_waf_status_rule_block.go deleted file mode 100644 index 019634cee4..0000000000 --- a/services/cdn/model_waf_status_rule_block.go +++ /dev/null @@ -1,203 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the WafStatusRuleBlock type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WafStatusRuleBlock{} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafStatusRuleBlockGetIdAttributeTypeOk(arg WafStatusRuleBlockGetIdAttributeType) (ret WafStatusRuleBlockGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafStatusRuleBlockGetIdAttributeType(arg *WafStatusRuleBlockGetIdAttributeType, val WafStatusRuleBlockGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockGetIdRetType = string - -/* - types and functions for reason -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockGetReasonAttributeType = *WafStatusRuleBlockReason - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockGetReasonArgType = WafStatusRuleBlockReason - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockGetReasonRetType = WafStatusRuleBlockReason - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafStatusRuleBlockGetReasonAttributeTypeOk(arg WafStatusRuleBlockGetReasonAttributeType) (ret WafStatusRuleBlockGetReasonRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafStatusRuleBlockGetReasonAttributeType(arg *WafStatusRuleBlockGetReasonAttributeType, val WafStatusRuleBlockGetReasonRetType) { - *arg = &val -} - -// WafStatusRuleBlock struct for WafStatusRuleBlock -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlock struct { - // Specifies the Id of the Rule. - // REQUIRED - Id WafStatusRuleBlockGetIdAttributeType `json:"id" required:"true"` - // REQUIRED - Reason WafStatusRuleBlockGetReasonAttributeType `json:"reason" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _WafStatusRuleBlock WafStatusRuleBlock - -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafStatusRuleBlock(id WafStatusRuleBlockGetIdArgType, reason WafStatusRuleBlockGetReasonArgType) *WafStatusRuleBlock { - this := WafStatusRuleBlock{} - setWafStatusRuleBlockGetIdAttributeType(&this.Id, id) - setWafStatusRuleBlockGetReasonAttributeType(&this.Reason, reason) - return &this -} - -// 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 -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafStatusRuleBlockWithDefaults() *WafStatusRuleBlock { - this := WafStatusRuleBlock{} - return &this -} - -// GetId returns the Id field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlock) GetIdOk() (ret WafStatusRuleBlockGetIdRetType, ok bool) { - return getWafStatusRuleBlockGetIdAttributeTypeOk(o.Id) -} - -// SetId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlock) SetId(v WafStatusRuleBlockGetIdRetType) { - setWafStatusRuleBlockGetIdAttributeType(&o.Id, v) -} - -// GetReason returns the Reason field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlock) GetReason() (ret WafStatusRuleBlockGetReasonRetType) { - ret, _ = o.GetReasonOk() - return ret -} - -// GetReasonOk returns a tuple with the Reason field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlock) GetReasonOk() (ret WafStatusRuleBlockGetReasonRetType, ok bool) { - return getWafStatusRuleBlockGetReasonAttributeTypeOk(o.Reason) -} - -// SetReason sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlock) SetReason(v WafStatusRuleBlockGetReasonRetType) { - setWafStatusRuleBlockGetReasonAttributeType(&o.Reason, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o WafStatusRuleBlock) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getWafStatusRuleBlockGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getWafStatusRuleBlockGetReasonAttributeTypeOk(o.Reason); ok { - toSerialize["Reason"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableWafStatusRuleBlock struct { - value *WafStatusRuleBlock - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafStatusRuleBlock) Get() *WafStatusRuleBlock { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafStatusRuleBlock) Set(val *WafStatusRuleBlock) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafStatusRuleBlock) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafStatusRuleBlock) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableWafStatusRuleBlock(val *WafStatusRuleBlock) *NullableWafStatusRuleBlock { - return &NullableWafStatusRuleBlock{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafStatusRuleBlock) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -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_reason.go b/services/cdn/model_waf_status_rule_block_reason.go deleted file mode 100644 index 0291d5f178..0000000000 --- a/services/cdn/model_waf_status_rule_block_reason.go +++ /dev/null @@ -1,301 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// WafStatusRuleBlockReason - Defines the Reason why a Rule is in the specified state (set to be enabled, disabled or logOnly). -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReason struct { - WafStatusRuleBlockReasonDirectlyDefined *WafStatusRuleBlockReasonDirectlyDefined - WafStatusRuleBlockReasonInheritedFromCollection *WafStatusRuleBlockReasonInheritedFromCollection - WafStatusRuleBlockReasonInheritedFromGroup *WafStatusRuleBlockReasonInheritedFromGroup - WafStatusRuleBlockReasonInvalidWafType *WafStatusRuleBlockReasonInvalidWafType - WafStatusRuleBlockReasonNeverDefined *WafStatusRuleBlockReasonNeverDefined -} - -// WafStatusRuleBlockReasonDirectlyDefinedAsWafStatusRuleBlockReason is a convenience function that returns WafStatusRuleBlockReasonDirectlyDefined wrapped in WafStatusRuleBlockReason -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func WafStatusRuleBlockReasonDirectlyDefinedAsWafStatusRuleBlockReason(v *WafStatusRuleBlockReasonDirectlyDefined) WafStatusRuleBlockReason { - return WafStatusRuleBlockReason{ - WafStatusRuleBlockReasonDirectlyDefined: v, - } -} - -// WafStatusRuleBlockReasonInheritedFromCollectionAsWafStatusRuleBlockReason is a convenience function that returns WafStatusRuleBlockReasonInheritedFromCollection wrapped in WafStatusRuleBlockReason -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func WafStatusRuleBlockReasonInheritedFromCollectionAsWafStatusRuleBlockReason(v *WafStatusRuleBlockReasonInheritedFromCollection) WafStatusRuleBlockReason { - return WafStatusRuleBlockReason{ - WafStatusRuleBlockReasonInheritedFromCollection: v, - } -} - -// WafStatusRuleBlockReasonInheritedFromGroupAsWafStatusRuleBlockReason is a convenience function that returns WafStatusRuleBlockReasonInheritedFromGroup wrapped in WafStatusRuleBlockReason -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func WafStatusRuleBlockReasonInheritedFromGroupAsWafStatusRuleBlockReason(v *WafStatusRuleBlockReasonInheritedFromGroup) WafStatusRuleBlockReason { - return WafStatusRuleBlockReason{ - WafStatusRuleBlockReasonInheritedFromGroup: v, - } -} - -// WafStatusRuleBlockReasonInvalidWafTypeAsWafStatusRuleBlockReason is a convenience function that returns WafStatusRuleBlockReasonInvalidWafType wrapped in WafStatusRuleBlockReason -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func WafStatusRuleBlockReasonInvalidWafTypeAsWafStatusRuleBlockReason(v *WafStatusRuleBlockReasonInvalidWafType) WafStatusRuleBlockReason { - return WafStatusRuleBlockReason{ - WafStatusRuleBlockReasonInvalidWafType: v, - } -} - -// WafStatusRuleBlockReasonNeverDefinedAsWafStatusRuleBlockReason is a convenience function that returns WafStatusRuleBlockReasonNeverDefined wrapped in WafStatusRuleBlockReason -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func WafStatusRuleBlockReasonNeverDefinedAsWafStatusRuleBlockReason(v *WafStatusRuleBlockReasonNeverDefined) WafStatusRuleBlockReason { - return WafStatusRuleBlockReason{ - WafStatusRuleBlockReasonNeverDefined: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (dst *WafStatusRuleBlockReason) UnmarshalJSON(data []byte) error { - var err error - // use discriminator value to speed up the lookup - var jsonDict map[string]interface{} - err = newStrictDecoder(data).Decode(&jsonDict) - if err != nil { - return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") - } - - // check if the discriminator value is 'WafStatusRuleBlockReasonDirectlyDefined' - if jsonDict["type"] == "WafStatusRuleBlockReasonDirectlyDefined" { - // try to unmarshal JSON data into WafStatusRuleBlockReasonDirectlyDefined - err = json.Unmarshal(data, &dst.WafStatusRuleBlockReasonDirectlyDefined) - if err == nil { - return nil // data stored in dst.WafStatusRuleBlockReasonDirectlyDefined, return on the first match - } else { - dst.WafStatusRuleBlockReasonDirectlyDefined = nil - return fmt.Errorf("failed to unmarshal WafStatusRuleBlockReason as WafStatusRuleBlockReasonDirectlyDefined: %s", err.Error()) - } - } - - // check if the discriminator value is 'WafStatusRuleBlockReasonInheritedFromCollection' - if jsonDict["type"] == "WafStatusRuleBlockReasonInheritedFromCollection" { - // try to unmarshal JSON data into WafStatusRuleBlockReasonInheritedFromCollection - err = json.Unmarshal(data, &dst.WafStatusRuleBlockReasonInheritedFromCollection) - if err == nil { - return nil // data stored in dst.WafStatusRuleBlockReasonInheritedFromCollection, return on the first match - } else { - dst.WafStatusRuleBlockReasonInheritedFromCollection = nil - return fmt.Errorf("failed to unmarshal WafStatusRuleBlockReason as WafStatusRuleBlockReasonInheritedFromCollection: %s", err.Error()) - } - } - - // check if the discriminator value is 'WafStatusRuleBlockReasonInheritedFromGroup' - if jsonDict["type"] == "WafStatusRuleBlockReasonInheritedFromGroup" { - // try to unmarshal JSON data into WafStatusRuleBlockReasonInheritedFromGroup - err = json.Unmarshal(data, &dst.WafStatusRuleBlockReasonInheritedFromGroup) - if err == nil { - return nil // data stored in dst.WafStatusRuleBlockReasonInheritedFromGroup, return on the first match - } else { - dst.WafStatusRuleBlockReasonInheritedFromGroup = nil - return fmt.Errorf("failed to unmarshal WafStatusRuleBlockReason as WafStatusRuleBlockReasonInheritedFromGroup: %s", err.Error()) - } - } - - // check if the discriminator value is 'WafStatusRuleBlockReasonInvalidWafType' - if jsonDict["type"] == "WafStatusRuleBlockReasonInvalidWafType" { - // try to unmarshal JSON data into WafStatusRuleBlockReasonInvalidWafType - err = json.Unmarshal(data, &dst.WafStatusRuleBlockReasonInvalidWafType) - if err == nil { - return nil // data stored in dst.WafStatusRuleBlockReasonInvalidWafType, return on the first match - } else { - dst.WafStatusRuleBlockReasonInvalidWafType = nil - return fmt.Errorf("failed to unmarshal WafStatusRuleBlockReason as WafStatusRuleBlockReasonInvalidWafType: %s", err.Error()) - } - } - - // check if the discriminator value is 'WafStatusRuleBlockReasonNeverDefined' - if jsonDict["type"] == "WafStatusRuleBlockReasonNeverDefined" { - // try to unmarshal JSON data into WafStatusRuleBlockReasonNeverDefined - err = json.Unmarshal(data, &dst.WafStatusRuleBlockReasonNeverDefined) - if err == nil { - return nil // data stored in dst.WafStatusRuleBlockReasonNeverDefined, return on the first match - } else { - dst.WafStatusRuleBlockReasonNeverDefined = nil - return fmt.Errorf("failed to unmarshal WafStatusRuleBlockReason as WafStatusRuleBlockReasonNeverDefined: %s", err.Error()) - } - } - - // check if the discriminator value is 'directlyDefined' - if jsonDict["type"] == "directlyDefined" { - // try to unmarshal JSON data into WafStatusRuleBlockReasonDirectlyDefined - err = json.Unmarshal(data, &dst.WafStatusRuleBlockReasonDirectlyDefined) - if err == nil { - return nil // data stored in dst.WafStatusRuleBlockReasonDirectlyDefined, return on the first match - } else { - dst.WafStatusRuleBlockReasonDirectlyDefined = nil - return fmt.Errorf("failed to unmarshal WafStatusRuleBlockReason as WafStatusRuleBlockReasonDirectlyDefined: %s", err.Error()) - } - } - - // check if the discriminator value is 'inheritedFromCollection' - if jsonDict["type"] == "inheritedFromCollection" { - // try to unmarshal JSON data into WafStatusRuleBlockReasonInheritedFromCollection - err = json.Unmarshal(data, &dst.WafStatusRuleBlockReasonInheritedFromCollection) - if err == nil { - return nil // data stored in dst.WafStatusRuleBlockReasonInheritedFromCollection, return on the first match - } else { - dst.WafStatusRuleBlockReasonInheritedFromCollection = nil - return fmt.Errorf("failed to unmarshal WafStatusRuleBlockReason as WafStatusRuleBlockReasonInheritedFromCollection: %s", err.Error()) - } - } - - // check if the discriminator value is 'inheritedFromGroup' - if jsonDict["type"] == "inheritedFromGroup" { - // try to unmarshal JSON data into WafStatusRuleBlockReasonInheritedFromGroup - err = json.Unmarshal(data, &dst.WafStatusRuleBlockReasonInheritedFromGroup) - if err == nil { - return nil // data stored in dst.WafStatusRuleBlockReasonInheritedFromGroup, return on the first match - } else { - dst.WafStatusRuleBlockReasonInheritedFromGroup = nil - return fmt.Errorf("failed to unmarshal WafStatusRuleBlockReason as WafStatusRuleBlockReasonInheritedFromGroup: %s", err.Error()) - } - } - - // check if the discriminator value is 'invalidWafType' - if jsonDict["type"] == "invalidWafType" { - // try to unmarshal JSON data into WafStatusRuleBlockReasonInvalidWafType - err = json.Unmarshal(data, &dst.WafStatusRuleBlockReasonInvalidWafType) - if err == nil { - return nil // data stored in dst.WafStatusRuleBlockReasonInvalidWafType, return on the first match - } else { - dst.WafStatusRuleBlockReasonInvalidWafType = nil - return fmt.Errorf("failed to unmarshal WafStatusRuleBlockReason as WafStatusRuleBlockReasonInvalidWafType: %s", err.Error()) - } - } - - // check if the discriminator value is 'neverDefined' - if jsonDict["type"] == "neverDefined" { - // try to unmarshal JSON data into WafStatusRuleBlockReasonNeverDefined - err = json.Unmarshal(data, &dst.WafStatusRuleBlockReasonNeverDefined) - if err == nil { - return nil // data stored in dst.WafStatusRuleBlockReasonNeverDefined, return on the first match - } else { - dst.WafStatusRuleBlockReasonNeverDefined = nil - return fmt.Errorf("failed to unmarshal WafStatusRuleBlockReason as WafStatusRuleBlockReasonNeverDefined: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src WafStatusRuleBlockReason) MarshalJSON() ([]byte, error) { - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - if src.WafStatusRuleBlockReasonDirectlyDefined != nil { - return json.Marshal(&src.WafStatusRuleBlockReasonDirectlyDefined) - } - - if src.WafStatusRuleBlockReasonInheritedFromCollection != nil { - return json.Marshal(&src.WafStatusRuleBlockReasonInheritedFromCollection) - } - - if src.WafStatusRuleBlockReasonInheritedFromGroup != nil { - return json.Marshal(&src.WafStatusRuleBlockReasonInheritedFromGroup) - } - - if src.WafStatusRuleBlockReasonInvalidWafType != nil { - return json.Marshal(&src.WafStatusRuleBlockReasonInvalidWafType) - } - - if src.WafStatusRuleBlockReasonNeverDefined != nil { - return json.Marshal(&src.WafStatusRuleBlockReasonNeverDefined) - } - - return []byte("{}"), nil // no data in oneOf schemas => empty JSON object -} - -// Get the actual instance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (obj *WafStatusRuleBlockReason) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.WafStatusRuleBlockReasonDirectlyDefined != nil { - return obj.WafStatusRuleBlockReasonDirectlyDefined - } - - if obj.WafStatusRuleBlockReasonInheritedFromCollection != nil { - return obj.WafStatusRuleBlockReasonInheritedFromCollection - } - - if obj.WafStatusRuleBlockReasonInheritedFromGroup != nil { - return obj.WafStatusRuleBlockReasonInheritedFromGroup - } - - if obj.WafStatusRuleBlockReasonInvalidWafType != nil { - return obj.WafStatusRuleBlockReasonInvalidWafType - } - - if obj.WafStatusRuleBlockReasonNeverDefined != nil { - return obj.WafStatusRuleBlockReasonNeverDefined - } - - // all schemas are nil - return nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableWafStatusRuleBlockReason struct { - value *WafStatusRuleBlockReason - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafStatusRuleBlockReason) Get() *WafStatusRuleBlockReason { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafStatusRuleBlockReason) Set(val *WafStatusRuleBlockReason) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafStatusRuleBlockReason) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafStatusRuleBlockReason) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableWafStatusRuleBlockReason(val *WafStatusRuleBlockReason) *NullableWafStatusRuleBlockReason { - return &NullableWafStatusRuleBlockReason{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafStatusRuleBlockReason) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafStatusRuleBlockReason) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_waf_status_rule_block_reason_directly_defined.go b/services/cdn/model_waf_status_rule_block_reason_directly_defined.go deleted file mode 100644 index 4b90ead08e..0000000000 --- a/services/cdn/model_waf_status_rule_block_reason_directly_defined.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the WafStatusRuleBlockReasonDirectlyDefined type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WafStatusRuleBlockReasonDirectlyDefined{} - -/* - types and functions for type -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonDirectlyDefinedGetTypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafStatusRuleBlockReasonDirectlyDefinedGetTypeAttributeTypeOk(arg WafStatusRuleBlockReasonDirectlyDefinedGetTypeAttributeType) (ret WafStatusRuleBlockReasonDirectlyDefinedGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafStatusRuleBlockReasonDirectlyDefinedGetTypeAttributeType(arg *WafStatusRuleBlockReasonDirectlyDefinedGetTypeAttributeType, val WafStatusRuleBlockReasonDirectlyDefinedGetTypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonDirectlyDefinedGetTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonDirectlyDefinedGetTypeRetType = string - -// WafStatusRuleBlockReasonDirectlyDefined struct for WafStatusRuleBlockReasonDirectlyDefined -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonDirectlyDefined struct { - // This is always `directlyDefined` - // REQUIRED - Type WafStatusRuleBlockReasonDirectlyDefinedGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _WafStatusRuleBlockReasonDirectlyDefined WafStatusRuleBlockReasonDirectlyDefined - -// NewWafStatusRuleBlockReasonDirectlyDefined instantiates a new WafStatusRuleBlockReasonDirectlyDefined object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafStatusRuleBlockReasonDirectlyDefined(types WafStatusRuleBlockReasonDirectlyDefinedGetTypeArgType) *WafStatusRuleBlockReasonDirectlyDefined { - this := WafStatusRuleBlockReasonDirectlyDefined{} - setWafStatusRuleBlockReasonDirectlyDefinedGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewWafStatusRuleBlockReasonDirectlyDefinedWithDefaults instantiates a new WafStatusRuleBlockReasonDirectlyDefined object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafStatusRuleBlockReasonDirectlyDefinedWithDefaults() *WafStatusRuleBlockReasonDirectlyDefined { - this := WafStatusRuleBlockReasonDirectlyDefined{} - return &this -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonDirectlyDefined) GetType() (ret WafStatusRuleBlockReasonDirectlyDefinedGetTypeRetType) { - ret, _ = o.GetTypeOk() - return ret -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonDirectlyDefined) GetTypeOk() (ret WafStatusRuleBlockReasonDirectlyDefinedGetTypeRetType, ok bool) { - return getWafStatusRuleBlockReasonDirectlyDefinedGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonDirectlyDefined) SetType(v WafStatusRuleBlockReasonDirectlyDefinedGetTypeRetType) { - setWafStatusRuleBlockReasonDirectlyDefinedGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o WafStatusRuleBlockReasonDirectlyDefined) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getWafStatusRuleBlockReasonDirectlyDefinedGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableWafStatusRuleBlockReasonDirectlyDefined struct { - value *WafStatusRuleBlockReasonDirectlyDefined - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafStatusRuleBlockReasonDirectlyDefined) Get() *WafStatusRuleBlockReasonDirectlyDefined { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafStatusRuleBlockReasonDirectlyDefined) Set(val *WafStatusRuleBlockReasonDirectlyDefined) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafStatusRuleBlockReasonDirectlyDefined) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafStatusRuleBlockReasonDirectlyDefined) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableWafStatusRuleBlockReasonDirectlyDefined(val *WafStatusRuleBlockReasonDirectlyDefined) *NullableWafStatusRuleBlockReasonDirectlyDefined { - return &NullableWafStatusRuleBlockReasonDirectlyDefined{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafStatusRuleBlockReasonDirectlyDefined) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafStatusRuleBlockReasonDirectlyDefined) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_waf_status_rule_block_reason_directly_defined_test.go b/services/cdn/model_waf_status_rule_block_reason_directly_defined_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_waf_status_rule_block_reason_directly_defined_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_waf_status_rule_block_reason_inherited_from_collection.go b/services/cdn/model_waf_status_rule_block_reason_inherited_from_collection.go deleted file mode 100644 index 45cb074780..0000000000 --- a/services/cdn/model_waf_status_rule_block_reason_inherited_from_collection.go +++ /dev/null @@ -1,204 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the WafStatusRuleBlockReasonInheritedFromCollection type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WafStatusRuleBlockReasonInheritedFromCollection{} - -/* - types and functions for collectionId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdAttributeTypeOk(arg WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdAttributeType) (ret WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdAttributeType(arg *WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdAttributeType, val WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdRetType = string - -/* - types and functions for type -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonInheritedFromCollectionGetTypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafStatusRuleBlockReasonInheritedFromCollectionGetTypeAttributeTypeOk(arg WafStatusRuleBlockReasonInheritedFromCollectionGetTypeAttributeType) (ret WafStatusRuleBlockReasonInheritedFromCollectionGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafStatusRuleBlockReasonInheritedFromCollectionGetTypeAttributeType(arg *WafStatusRuleBlockReasonInheritedFromCollectionGetTypeAttributeType, val WafStatusRuleBlockReasonInheritedFromCollectionGetTypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonInheritedFromCollectionGetTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonInheritedFromCollectionGetTypeRetType = string - -// WafStatusRuleBlockReasonInheritedFromCollection struct for WafStatusRuleBlockReasonInheritedFromCollection -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonInheritedFromCollection struct { - // The Collection that caused this rule to be in its current state. - // REQUIRED - CollectionId WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdAttributeType `json:"collectionId" required:"true"` - // This is always `inheritedFromCollection` - // REQUIRED - Type WafStatusRuleBlockReasonInheritedFromCollectionGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _WafStatusRuleBlockReasonInheritedFromCollection WafStatusRuleBlockReasonInheritedFromCollection - -// NewWafStatusRuleBlockReasonInheritedFromCollection instantiates a new WafStatusRuleBlockReasonInheritedFromCollection object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafStatusRuleBlockReasonInheritedFromCollection(collectionId WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdArgType, types WafStatusRuleBlockReasonInheritedFromCollectionGetTypeArgType) *WafStatusRuleBlockReasonInheritedFromCollection { - this := WafStatusRuleBlockReasonInheritedFromCollection{} - setWafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdAttributeType(&this.CollectionId, collectionId) - setWafStatusRuleBlockReasonInheritedFromCollectionGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewWafStatusRuleBlockReasonInheritedFromCollectionWithDefaults instantiates a new WafStatusRuleBlockReasonInheritedFromCollection object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafStatusRuleBlockReasonInheritedFromCollectionWithDefaults() *WafStatusRuleBlockReasonInheritedFromCollection { - this := WafStatusRuleBlockReasonInheritedFromCollection{} - return &this -} - -// GetCollectionId returns the CollectionId field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonInheritedFromCollection) GetCollectionId() (ret WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdRetType) { - ret, _ = o.GetCollectionIdOk() - return ret -} - -// GetCollectionIdOk returns a tuple with the CollectionId field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonInheritedFromCollection) GetCollectionIdOk() (ret WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdRetType, ok bool) { - return getWafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdAttributeTypeOk(o.CollectionId) -} - -// SetCollectionId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonInheritedFromCollection) SetCollectionId(v WafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdRetType) { - setWafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdAttributeType(&o.CollectionId, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonInheritedFromCollection) GetType() (ret WafStatusRuleBlockReasonInheritedFromCollectionGetTypeRetType) { - ret, _ = o.GetTypeOk() - return ret -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonInheritedFromCollection) GetTypeOk() (ret WafStatusRuleBlockReasonInheritedFromCollectionGetTypeRetType, ok bool) { - return getWafStatusRuleBlockReasonInheritedFromCollectionGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonInheritedFromCollection) SetType(v WafStatusRuleBlockReasonInheritedFromCollectionGetTypeRetType) { - setWafStatusRuleBlockReasonInheritedFromCollectionGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o WafStatusRuleBlockReasonInheritedFromCollection) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getWafStatusRuleBlockReasonInheritedFromCollectionGetCollectionIdAttributeTypeOk(o.CollectionId); ok { - toSerialize["CollectionId"] = val - } - if val, ok := getWafStatusRuleBlockReasonInheritedFromCollectionGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableWafStatusRuleBlockReasonInheritedFromCollection struct { - value *WafStatusRuleBlockReasonInheritedFromCollection - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafStatusRuleBlockReasonInheritedFromCollection) Get() *WafStatusRuleBlockReasonInheritedFromCollection { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafStatusRuleBlockReasonInheritedFromCollection) Set(val *WafStatusRuleBlockReasonInheritedFromCollection) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafStatusRuleBlockReasonInheritedFromCollection) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafStatusRuleBlockReasonInheritedFromCollection) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableWafStatusRuleBlockReasonInheritedFromCollection(val *WafStatusRuleBlockReasonInheritedFromCollection) *NullableWafStatusRuleBlockReasonInheritedFromCollection { - return &NullableWafStatusRuleBlockReasonInheritedFromCollection{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafStatusRuleBlockReasonInheritedFromCollection) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafStatusRuleBlockReasonInheritedFromCollection) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_waf_status_rule_block_reason_inherited_from_collection_test.go b/services/cdn/model_waf_status_rule_block_reason_inherited_from_collection_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_waf_status_rule_block_reason_inherited_from_collection_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_waf_status_rule_block_reason_inherited_from_group.go b/services/cdn/model_waf_status_rule_block_reason_inherited_from_group.go deleted file mode 100644 index 87680253b3..0000000000 --- a/services/cdn/model_waf_status_rule_block_reason_inherited_from_group.go +++ /dev/null @@ -1,204 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the WafStatusRuleBlockReasonInheritedFromGroup type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WafStatusRuleBlockReasonInheritedFromGroup{} - -/* - types and functions for groupId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafStatusRuleBlockReasonInheritedFromGroupGetGroupIdAttributeTypeOk(arg WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdAttributeType) (ret WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafStatusRuleBlockReasonInheritedFromGroupGetGroupIdAttributeType(arg *WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdAttributeType, val WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdRetType = string - -/* - types and functions for type -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonInheritedFromGroupGetTypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafStatusRuleBlockReasonInheritedFromGroupGetTypeAttributeTypeOk(arg WafStatusRuleBlockReasonInheritedFromGroupGetTypeAttributeType) (ret WafStatusRuleBlockReasonInheritedFromGroupGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafStatusRuleBlockReasonInheritedFromGroupGetTypeAttributeType(arg *WafStatusRuleBlockReasonInheritedFromGroupGetTypeAttributeType, val WafStatusRuleBlockReasonInheritedFromGroupGetTypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonInheritedFromGroupGetTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonInheritedFromGroupGetTypeRetType = string - -// WafStatusRuleBlockReasonInheritedFromGroup struct for WafStatusRuleBlockReasonInheritedFromGroup -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonInheritedFromGroup struct { - // The Group that caused this rule to be in its current state. - // REQUIRED - GroupId WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdAttributeType `json:"groupId" required:"true"` - // This is always `inheritedFromGroup` - // REQUIRED - Type WafStatusRuleBlockReasonInheritedFromGroupGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _WafStatusRuleBlockReasonInheritedFromGroup WafStatusRuleBlockReasonInheritedFromGroup - -// NewWafStatusRuleBlockReasonInheritedFromGroup instantiates a new WafStatusRuleBlockReasonInheritedFromGroup object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafStatusRuleBlockReasonInheritedFromGroup(groupId WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdArgType, types WafStatusRuleBlockReasonInheritedFromGroupGetTypeArgType) *WafStatusRuleBlockReasonInheritedFromGroup { - this := WafStatusRuleBlockReasonInheritedFromGroup{} - setWafStatusRuleBlockReasonInheritedFromGroupGetGroupIdAttributeType(&this.GroupId, groupId) - setWafStatusRuleBlockReasonInheritedFromGroupGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewWafStatusRuleBlockReasonInheritedFromGroupWithDefaults instantiates a new WafStatusRuleBlockReasonInheritedFromGroup object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafStatusRuleBlockReasonInheritedFromGroupWithDefaults() *WafStatusRuleBlockReasonInheritedFromGroup { - this := WafStatusRuleBlockReasonInheritedFromGroup{} - return &this -} - -// GetGroupId returns the GroupId field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonInheritedFromGroup) GetGroupId() (ret WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdRetType) { - ret, _ = o.GetGroupIdOk() - return ret -} - -// GetGroupIdOk returns a tuple with the GroupId field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonInheritedFromGroup) GetGroupIdOk() (ret WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdRetType, ok bool) { - return getWafStatusRuleBlockReasonInheritedFromGroupGetGroupIdAttributeTypeOk(o.GroupId) -} - -// SetGroupId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonInheritedFromGroup) SetGroupId(v WafStatusRuleBlockReasonInheritedFromGroupGetGroupIdRetType) { - setWafStatusRuleBlockReasonInheritedFromGroupGetGroupIdAttributeType(&o.GroupId, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonInheritedFromGroup) GetType() (ret WafStatusRuleBlockReasonInheritedFromGroupGetTypeRetType) { - ret, _ = o.GetTypeOk() - return ret -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonInheritedFromGroup) GetTypeOk() (ret WafStatusRuleBlockReasonInheritedFromGroupGetTypeRetType, ok bool) { - return getWafStatusRuleBlockReasonInheritedFromGroupGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonInheritedFromGroup) SetType(v WafStatusRuleBlockReasonInheritedFromGroupGetTypeRetType) { - setWafStatusRuleBlockReasonInheritedFromGroupGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o WafStatusRuleBlockReasonInheritedFromGroup) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getWafStatusRuleBlockReasonInheritedFromGroupGetGroupIdAttributeTypeOk(o.GroupId); ok { - toSerialize["GroupId"] = val - } - if val, ok := getWafStatusRuleBlockReasonInheritedFromGroupGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableWafStatusRuleBlockReasonInheritedFromGroup struct { - value *WafStatusRuleBlockReasonInheritedFromGroup - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafStatusRuleBlockReasonInheritedFromGroup) Get() *WafStatusRuleBlockReasonInheritedFromGroup { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafStatusRuleBlockReasonInheritedFromGroup) Set(val *WafStatusRuleBlockReasonInheritedFromGroup) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafStatusRuleBlockReasonInheritedFromGroup) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafStatusRuleBlockReasonInheritedFromGroup) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableWafStatusRuleBlockReasonInheritedFromGroup(val *WafStatusRuleBlockReasonInheritedFromGroup) *NullableWafStatusRuleBlockReasonInheritedFromGroup { - return &NullableWafStatusRuleBlockReasonInheritedFromGroup{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafStatusRuleBlockReasonInheritedFromGroup) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafStatusRuleBlockReasonInheritedFromGroup) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_waf_status_rule_block_reason_inherited_from_group_test.go b/services/cdn/model_waf_status_rule_block_reason_inherited_from_group_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_waf_status_rule_block_reason_inherited_from_group_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_waf_status_rule_block_reason_invalid_waf_type.go b/services/cdn/model_waf_status_rule_block_reason_invalid_waf_type.go deleted file mode 100644 index e8736b5b39..0000000000 --- a/services/cdn/model_waf_status_rule_block_reason_invalid_waf_type.go +++ /dev/null @@ -1,204 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the WafStatusRuleBlockReasonInvalidWafType type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WafStatusRuleBlockReasonInvalidWafType{} - -/* - types and functions for allowedWafTypes -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesAttributeType = *[]WafType - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesArgType = []WafType - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesRetType = []WafType - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesAttributeTypeOk(arg WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesAttributeType) (ret WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesAttributeType(arg *WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesAttributeType, val WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesRetType) { - *arg = &val -} - -/* - types and functions for type -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonInvalidWafTypeGetTypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafStatusRuleBlockReasonInvalidWafTypeGetTypeAttributeTypeOk(arg WafStatusRuleBlockReasonInvalidWafTypeGetTypeAttributeType) (ret WafStatusRuleBlockReasonInvalidWafTypeGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafStatusRuleBlockReasonInvalidWafTypeGetTypeAttributeType(arg *WafStatusRuleBlockReasonInvalidWafTypeGetTypeAttributeType, val WafStatusRuleBlockReasonInvalidWafTypeGetTypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonInvalidWafTypeGetTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonInvalidWafTypeGetTypeRetType = string - -// WafStatusRuleBlockReasonInvalidWafType struct for WafStatusRuleBlockReasonInvalidWafType -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonInvalidWafType struct { - // A list containing all WAF Types which can use this Rule. You must patch you WAF to one of these WAF Types to make use of this rule. Rules show up with this state if they would have been enabled or logOnly otherwise. - // REQUIRED - AllowedWafTypes WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesAttributeType `json:"allowedWafTypes" required:"true"` - // This is always `invalidWafType` - // REQUIRED - Type WafStatusRuleBlockReasonInvalidWafTypeGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _WafStatusRuleBlockReasonInvalidWafType WafStatusRuleBlockReasonInvalidWafType - -// NewWafStatusRuleBlockReasonInvalidWafType instantiates a new WafStatusRuleBlockReasonInvalidWafType object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafStatusRuleBlockReasonInvalidWafType(allowedWafTypes WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesArgType, types WafStatusRuleBlockReasonInvalidWafTypeGetTypeArgType) *WafStatusRuleBlockReasonInvalidWafType { - this := WafStatusRuleBlockReasonInvalidWafType{} - setWafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesAttributeType(&this.AllowedWafTypes, allowedWafTypes) - setWafStatusRuleBlockReasonInvalidWafTypeGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewWafStatusRuleBlockReasonInvalidWafTypeWithDefaults instantiates a new WafStatusRuleBlockReasonInvalidWafType object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafStatusRuleBlockReasonInvalidWafTypeWithDefaults() *WafStatusRuleBlockReasonInvalidWafType { - this := WafStatusRuleBlockReasonInvalidWafType{} - return &this -} - -// GetAllowedWafTypes returns the AllowedWafTypes field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonInvalidWafType) GetAllowedWafTypes() (ret WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesRetType) { - ret, _ = o.GetAllowedWafTypesOk() - return ret -} - -// GetAllowedWafTypesOk returns a tuple with the AllowedWafTypes field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonInvalidWafType) GetAllowedWafTypesOk() (ret WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesRetType, ok bool) { - return getWafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesAttributeTypeOk(o.AllowedWafTypes) -} - -// SetAllowedWafTypes sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonInvalidWafType) SetAllowedWafTypes(v WafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesRetType) { - setWafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesAttributeType(&o.AllowedWafTypes, v) -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonInvalidWafType) GetType() (ret WafStatusRuleBlockReasonInvalidWafTypeGetTypeRetType) { - ret, _ = o.GetTypeOk() - return ret -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonInvalidWafType) GetTypeOk() (ret WafStatusRuleBlockReasonInvalidWafTypeGetTypeRetType, ok bool) { - return getWafStatusRuleBlockReasonInvalidWafTypeGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonInvalidWafType) SetType(v WafStatusRuleBlockReasonInvalidWafTypeGetTypeRetType) { - setWafStatusRuleBlockReasonInvalidWafTypeGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o WafStatusRuleBlockReasonInvalidWafType) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getWafStatusRuleBlockReasonInvalidWafTypeGetAllowedWafTypesAttributeTypeOk(o.AllowedWafTypes); ok { - toSerialize["AllowedWafTypes"] = val - } - if val, ok := getWafStatusRuleBlockReasonInvalidWafTypeGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableWafStatusRuleBlockReasonInvalidWafType struct { - value *WafStatusRuleBlockReasonInvalidWafType - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafStatusRuleBlockReasonInvalidWafType) Get() *WafStatusRuleBlockReasonInvalidWafType { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafStatusRuleBlockReasonInvalidWafType) Set(val *WafStatusRuleBlockReasonInvalidWafType) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafStatusRuleBlockReasonInvalidWafType) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafStatusRuleBlockReasonInvalidWafType) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableWafStatusRuleBlockReasonInvalidWafType(val *WafStatusRuleBlockReasonInvalidWafType) *NullableWafStatusRuleBlockReasonInvalidWafType { - return &NullableWafStatusRuleBlockReasonInvalidWafType{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafStatusRuleBlockReasonInvalidWafType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafStatusRuleBlockReasonInvalidWafType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_waf_status_rule_block_reason_invalid_waf_type_test.go b/services/cdn/model_waf_status_rule_block_reason_invalid_waf_type_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_waf_status_rule_block_reason_invalid_waf_type_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_waf_status_rule_block_reason_never_defined.go b/services/cdn/model_waf_status_rule_block_reason_never_defined.go deleted file mode 100644 index a951b72347..0000000000 --- a/services/cdn/model_waf_status_rule_block_reason_never_defined.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the WafStatusRuleBlockReasonNeverDefined type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WafStatusRuleBlockReasonNeverDefined{} - -/* - types and functions for type -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonNeverDefinedGetTypeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWafStatusRuleBlockReasonNeverDefinedGetTypeAttributeTypeOk(arg WafStatusRuleBlockReasonNeverDefinedGetTypeAttributeType) (ret WafStatusRuleBlockReasonNeverDefinedGetTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWafStatusRuleBlockReasonNeverDefinedGetTypeAttributeType(arg *WafStatusRuleBlockReasonNeverDefinedGetTypeAttributeType, val WafStatusRuleBlockReasonNeverDefinedGetTypeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonNeverDefinedGetTypeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonNeverDefinedGetTypeRetType = string - -// WafStatusRuleBlockReasonNeverDefined This object only ever shows up in the disabled rules section. If rules are never defined (e.g. no collection, rule group, or the rule itself is ever mentioned), they are implicitly disabled -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafStatusRuleBlockReasonNeverDefined struct { - // This is always `neverDefined` - // REQUIRED - Type WafStatusRuleBlockReasonNeverDefinedGetTypeAttributeType `json:"type" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _WafStatusRuleBlockReasonNeverDefined WafStatusRuleBlockReasonNeverDefined - -// NewWafStatusRuleBlockReasonNeverDefined instantiates a new WafStatusRuleBlockReasonNeverDefined object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafStatusRuleBlockReasonNeverDefined(types WafStatusRuleBlockReasonNeverDefinedGetTypeArgType) *WafStatusRuleBlockReasonNeverDefined { - this := WafStatusRuleBlockReasonNeverDefined{} - setWafStatusRuleBlockReasonNeverDefinedGetTypeAttributeType(&this.Type, types) - return &this -} - -// NewWafStatusRuleBlockReasonNeverDefinedWithDefaults instantiates a new WafStatusRuleBlockReasonNeverDefined object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafStatusRuleBlockReasonNeverDefinedWithDefaults() *WafStatusRuleBlockReasonNeverDefined { - this := WafStatusRuleBlockReasonNeverDefined{} - return &this -} - -// GetType returns the Type field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonNeverDefined) GetType() (ret WafStatusRuleBlockReasonNeverDefinedGetTypeRetType) { - ret, _ = o.GetTypeOk() - return ret -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonNeverDefined) GetTypeOk() (ret WafStatusRuleBlockReasonNeverDefinedGetTypeRetType, ok bool) { - return getWafStatusRuleBlockReasonNeverDefinedGetTypeAttributeTypeOk(o.Type) -} - -// SetType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WafStatusRuleBlockReasonNeverDefined) SetType(v WafStatusRuleBlockReasonNeverDefinedGetTypeRetType) { - setWafStatusRuleBlockReasonNeverDefinedGetTypeAttributeType(&o.Type, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o WafStatusRuleBlockReasonNeverDefined) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getWafStatusRuleBlockReasonNeverDefinedGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableWafStatusRuleBlockReasonNeverDefined struct { - value *WafStatusRuleBlockReasonNeverDefined - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafStatusRuleBlockReasonNeverDefined) Get() *WafStatusRuleBlockReasonNeverDefined { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafStatusRuleBlockReasonNeverDefined) Set(val *WafStatusRuleBlockReasonNeverDefined) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafStatusRuleBlockReasonNeverDefined) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafStatusRuleBlockReasonNeverDefined) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableWafStatusRuleBlockReasonNeverDefined(val *WafStatusRuleBlockReasonNeverDefined) *NullableWafStatusRuleBlockReasonNeverDefined { - return &NullableWafStatusRuleBlockReasonNeverDefined{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafStatusRuleBlockReasonNeverDefined) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafStatusRuleBlockReasonNeverDefined) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_waf_status_rule_block_reason_never_defined_test.go b/services/cdn/model_waf_status_rule_block_reason_never_defined_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_waf_status_rule_block_reason_never_defined_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_waf_status_rule_block_reason_test.go b/services/cdn/model_waf_status_rule_block_reason_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_waf_status_rule_block_reason_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_waf_status_rule_block_test.go b/services/cdn/model_waf_status_rule_block_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_waf_status_rule_block_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_waf_type.go b/services/cdn/model_waf_type.go deleted file mode 100644 index 9c52aa0b62..0000000000 --- a/services/cdn/model_waf_type.go +++ /dev/null @@ -1,132 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" - "fmt" -) - -// WafType Enable or disable the Premium WAF. Do note that enabling the Premium WAF will cause additional fees. Some features are gated behind the Premium WAF, like additional, **premium-only rules** and the ability to create **custom rules** (not yet implemented) -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WafType string - -// List of WafType -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - WAFTYPE_FREE WafType = "FREE" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - WAFTYPE_PREMIUM WafType = "PREMIUM" -) - -// All allowed values of WafType enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedWafTypeEnumValues = []WafType{ - "FREE", - "PREMIUM", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *WafType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - // Allow unmarshalling zero value for testing purposes - var zeroValue string - if value == zeroValue { - return nil - } - enumTypeValue := WafType(value) - for _, existing := range AllowedWafTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid WafType", value) -} - -// NewWafTypeFromValue returns a pointer to a valid WafType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWafTypeFromValue(v string) (*WafType, error) { - ev := WafType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for WafType: valid values are %v", v, AllowedWafTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v WafType) IsValid() bool { - for _, existing := range AllowedWafTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to WafType value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v WafType) Ptr() *WafType { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableWafType struct { - value *WafType - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafType) Get() *WafType { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafType) Set(val *WafType) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafType) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafType) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableWafType(val *WafType) *NullableWafType { - return &NullableWafType{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWafType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWafType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_waf_type_test.go b/services/cdn/model_waf_type_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_waf_type_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/model_waf_violation.go b/services/cdn/model_waf_violation.go deleted file mode 100644 index fec006ee03..0000000000 --- a/services/cdn/model_waf_violation.go +++ /dev/null @@ -1,418 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package cdn - -import ( - "encoding/json" -) - -// checks if the WAFViolation type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WAFViolation{} - -/* - types and functions for action -*/ - -// isEnumRef -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WAFViolationGetActionAttributeType = *WAFRuleAction - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WAFViolationGetActionArgType = WAFRuleAction - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WAFViolationGetActionRetType = WAFRuleAction - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWAFViolationGetActionAttributeTypeOk(arg WAFViolationGetActionAttributeType) (ret WAFViolationGetActionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWAFViolationGetActionAttributeType(arg *WAFViolationGetActionAttributeType, val WAFViolationGetActionRetType) { - *arg = &val -} - -/* - types and functions for asn -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WAFViolationGetAsnAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWAFViolationGetAsnAttributeTypeOk(arg WAFViolationGetAsnAttributeType) (ret WAFViolationGetAsnRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWAFViolationGetAsnAttributeType(arg *WAFViolationGetAsnAttributeType, val WAFViolationGetAsnRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WAFViolationGetAsnArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WAFViolationGetAsnRetType = string - -/* - types and functions for message -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WAFViolationGetMessageAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWAFViolationGetMessageAttributeTypeOk(arg WAFViolationGetMessageAttributeType) (ret WAFViolationGetMessageRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWAFViolationGetMessageAttributeType(arg *WAFViolationGetMessageAttributeType, val WAFViolationGetMessageRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WAFViolationGetMessageArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WAFViolationGetMessageRetType = string - -/* - types and functions for method -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WAFViolationGetMethodAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWAFViolationGetMethodAttributeTypeOk(arg WAFViolationGetMethodAttributeType) (ret WAFViolationGetMethodRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWAFViolationGetMethodAttributeType(arg *WAFViolationGetMethodAttributeType, val WAFViolationGetMethodRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WAFViolationGetMethodArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WAFViolationGetMethodRetType = string - -/* - types and functions for requestHeaders -*/ - -// isContainer -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WAFViolationGetRequestHeadersAttributeType = *map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WAFViolationGetRequestHeadersArgType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WAFViolationGetRequestHeadersRetType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWAFViolationGetRequestHeadersAttributeTypeOk(arg WAFViolationGetRequestHeadersAttributeType) (ret WAFViolationGetRequestHeadersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWAFViolationGetRequestHeadersAttributeType(arg *WAFViolationGetRequestHeadersAttributeType, val WAFViolationGetRequestHeadersRetType) { - *arg = &val -} - -/* - types and functions for ruleId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WAFViolationGetRuleIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getWAFViolationGetRuleIdAttributeTypeOk(arg WAFViolationGetRuleIdAttributeType) (ret WAFViolationGetRuleIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setWAFViolationGetRuleIdAttributeType(arg *WAFViolationGetRuleIdAttributeType, val WAFViolationGetRuleIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WAFViolationGetRuleIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WAFViolationGetRuleIdRetType = string - -// WAFViolation Information about a violated WAF rule in case the WAF is enabled and a rule was triggered (either in BLOCK or LOG_ONLY mode) -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type WAFViolation struct { - // REQUIRED - Action WAFViolationGetActionAttributeType `json:"action" required:"true"` - // ASN for the request - // REQUIRED - Asn WAFViolationGetAsnAttributeType `json:"asn" required:"true"` - // Rule specific message explaining the violation - // REQUIRED - Message WAFViolationGetMessageAttributeType `json:"message" required:"true"` - // HTTP Method of the request that triggered the violation - // REQUIRED - Method WAFViolationGetMethodAttributeType `json:"method" required:"true"` - // REQUIRED - RequestHeaders WAFViolationGetRequestHeadersAttributeType `json:"requestHeaders" required:"true"` - // ID of the WAF rule that was triggered - // REQUIRED - RuleId WAFViolationGetRuleIdAttributeType `json:"ruleId" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _WAFViolation WAFViolation - -// NewWAFViolation instantiates a new WAFViolation object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWAFViolation(action WAFViolationGetActionArgType, asn WAFViolationGetAsnArgType, message WAFViolationGetMessageArgType, method WAFViolationGetMethodArgType, requestHeaders WAFViolationGetRequestHeadersArgType, ruleId WAFViolationGetRuleIdArgType) *WAFViolation { - this := WAFViolation{} - setWAFViolationGetActionAttributeType(&this.Action, action) - setWAFViolationGetAsnAttributeType(&this.Asn, asn) - setWAFViolationGetMessageAttributeType(&this.Message, message) - setWAFViolationGetMethodAttributeType(&this.Method, method) - setWAFViolationGetRequestHeadersAttributeType(&this.RequestHeaders, requestHeaders) - setWAFViolationGetRuleIdAttributeType(&this.RuleId, ruleId) - return &this -} - -// NewWAFViolationWithDefaults instantiates a new WAFViolation object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewWAFViolationWithDefaults() *WAFViolation { - this := WAFViolation{} - return &this -} - -// GetAction returns the Action field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WAFViolation) GetAction() (ret WAFViolationGetActionRetType) { - ret, _ = o.GetActionOk() - return ret -} - -// GetActionOk returns a tuple with the Action field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WAFViolation) GetActionOk() (ret WAFViolationGetActionRetType, ok bool) { - return getWAFViolationGetActionAttributeTypeOk(o.Action) -} - -// SetAction sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WAFViolation) SetAction(v WAFViolationGetActionRetType) { - setWAFViolationGetActionAttributeType(&o.Action, v) -} - -// GetAsn returns the Asn field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WAFViolation) GetAsn() (ret WAFViolationGetAsnRetType) { - ret, _ = o.GetAsnOk() - return ret -} - -// GetAsnOk returns a tuple with the Asn field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WAFViolation) GetAsnOk() (ret WAFViolationGetAsnRetType, ok bool) { - return getWAFViolationGetAsnAttributeTypeOk(o.Asn) -} - -// SetAsn sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WAFViolation) SetAsn(v WAFViolationGetAsnRetType) { - setWAFViolationGetAsnAttributeType(&o.Asn, v) -} - -// GetMessage returns the Message field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WAFViolation) GetMessage() (ret WAFViolationGetMessageRetType) { - ret, _ = o.GetMessageOk() - return ret -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WAFViolation) GetMessageOk() (ret WAFViolationGetMessageRetType, ok bool) { - return getWAFViolationGetMessageAttributeTypeOk(o.Message) -} - -// SetMessage sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WAFViolation) SetMessage(v WAFViolationGetMessageRetType) { - setWAFViolationGetMessageAttributeType(&o.Message, v) -} - -// GetMethod returns the Method field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WAFViolation) GetMethod() (ret WAFViolationGetMethodRetType) { - ret, _ = o.GetMethodOk() - return ret -} - -// GetMethodOk returns a tuple with the Method field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WAFViolation) GetMethodOk() (ret WAFViolationGetMethodRetType, ok bool) { - return getWAFViolationGetMethodAttributeTypeOk(o.Method) -} - -// SetMethod sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WAFViolation) SetMethod(v WAFViolationGetMethodRetType) { - setWAFViolationGetMethodAttributeType(&o.Method, v) -} - -// GetRequestHeaders returns the RequestHeaders field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WAFViolation) GetRequestHeaders() (ret WAFViolationGetRequestHeadersRetType) { - ret, _ = o.GetRequestHeadersOk() - return ret -} - -// GetRequestHeadersOk returns a tuple with the RequestHeaders field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WAFViolation) GetRequestHeadersOk() (ret WAFViolationGetRequestHeadersRetType, ok bool) { - return getWAFViolationGetRequestHeadersAttributeTypeOk(o.RequestHeaders) -} - -// SetRequestHeaders sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WAFViolation) SetRequestHeaders(v WAFViolationGetRequestHeadersRetType) { - setWAFViolationGetRequestHeadersAttributeType(&o.RequestHeaders, v) -} - -// GetRuleId returns the RuleId field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WAFViolation) GetRuleId() (ret WAFViolationGetRuleIdRetType) { - ret, _ = o.GetRuleIdOk() - return ret -} - -// GetRuleIdOk returns a tuple with the RuleId field value -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WAFViolation) GetRuleIdOk() (ret WAFViolationGetRuleIdRetType, ok bool) { - return getWAFViolationGetRuleIdAttributeTypeOk(o.RuleId) -} - -// SetRuleId sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *WAFViolation) SetRuleId(v WAFViolationGetRuleIdRetType) { - setWAFViolationGetRuleIdAttributeType(&o.RuleId, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o WAFViolation) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getWAFViolationGetActionAttributeTypeOk(o.Action); ok { - toSerialize["Action"] = val - } - if val, ok := getWAFViolationGetAsnAttributeTypeOk(o.Asn); ok { - toSerialize["Asn"] = val - } - if val, ok := getWAFViolationGetMessageAttributeTypeOk(o.Message); ok { - toSerialize["Message"] = val - } - if val, ok := getWAFViolationGetMethodAttributeTypeOk(o.Method); ok { - toSerialize["Method"] = val - } - if val, ok := getWAFViolationGetRequestHeadersAttributeTypeOk(o.RequestHeaders); ok { - toSerialize["RequestHeaders"] = val - } - if val, ok := getWAFViolationGetRuleIdAttributeTypeOk(o.RuleId); ok { - toSerialize["RuleId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableWAFViolation struct { - value *WAFViolation - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWAFViolation) Get() *WAFViolation { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWAFViolation) Set(val *WAFViolation) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWAFViolation) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWAFViolation) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableWAFViolation(val *WAFViolation) *NullableWAFViolation { - return &NullableWAFViolation{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableWAFViolation) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableWAFViolation) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/cdn/model_waf_violation_test.go b/services/cdn/model_waf_violation_test.go deleted file mode 100644 index 4248231395..0000000000 --- a/services/cdn/model_waf_violation_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn diff --git a/services/cdn/oas_commit b/services/cdn/oas_commit index 84fb2776fd..71a76821d4 100644 --- a/services/cdn/oas_commit +++ b/services/cdn/oas_commit @@ -1 +1 @@ -3fc1363ce4ead752c576a30ee9cf0e1b5836ae35 +0afa5e4924e6bf230fdade5cb294ecfd97dd63e5 diff --git a/services/cdn/package.go b/services/cdn/package.go new file mode 100644 index 0000000000..467a5c2bec --- /dev/null +++ b/services/cdn/package.go @@ -0,0 +1 @@ +package cdn diff --git a/services/cdn/utils.go b/services/cdn/utils.go deleted file mode 100644 index 316591f628..0000000000 --- a/services/cdn/utils.go +++ /dev/null @@ -1,466 +0,0 @@ -/* -STACKIT CDN API - -API used to create and manage your CDN distributions. - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package cdn - -import ( - "encoding/json" - "math/rand" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func PtrTime(v time.Time) *time.Time { return &v } - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableValue[T any] struct { - value *T - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableValue[T]) Get() *T { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableValue[T]) Set(val *T) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableValue[T]) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableValue[T]) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableBool struct { - value *bool - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBool) Get() *bool { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBool) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableInt struct { - value *int - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInt) Get() *int { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInt) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableInt32 struct { - value *int32 - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInt32) Get() *int32 { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableInt64 struct { - value *int64 - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInt64) Get() *int64 { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableFloat32 struct { - value *float32 - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableFloat32) Get() *float32 { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableFloat64 struct { - value *float64 - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableFloat64) Get() *float64 { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableString struct { - value *string - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableString) Get() *string { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableString) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableTime struct { - value *time.Time - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableTime) Get() *time.Time { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableTime) IsSet() bool { - return v.isSet -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func IsNil(i interface{}) bool { - if i == nil { - return true - } - if t, ok := i.(interface{ IsSet() bool }); ok { - return !t.IsSet() - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -const letterRunes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" - -// randString returns a random string with a specified length. It panics if n <= 0. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func randString(n int) string { - b := make([]byte, n) - for i := range b { - b[i] = letterRunes[rand.Intn(len(letterRunes))] - } - return string(b) -} diff --git a/services/cdn/wait/deprecation.go b/services/cdn/wait/deprecation.go deleted file mode 100644 index 58f184c093..0000000000 --- a/services/cdn/wait/deprecation.go +++ /dev/null @@ -1,2 +0,0 @@ -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package wait diff --git a/services/cdn/wait/wait.go b/services/cdn/wait/wait.go deleted file mode 100644 index 65e681e45e..0000000000 --- a/services/cdn/wait/wait.go +++ /dev/null @@ -1,151 +0,0 @@ -package wait - -import ( - "context" - "errors" - "time" - - "github.com/stackitcloud/stackit-sdk-go/core/wait" - "github.com/stackitcloud/stackit-sdk-go/services/cdn" -) - -// Interfaces needed for tests -// -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type APIClientInterface interface { - GetDistributionExecute(ctx context.Context, projectId string, distributionId string) (*cdn.GetDistributionResponse, error) - GetCustomDomainExecute(ctx context.Context, projectId string, distributionId string, domain string) (*cdn.GetCustomDomainResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func CreateDistributionPoolWaitHandler(ctx context.Context, api APIClientInterface, projectId, distributionId string) *wait.AsyncActionHandler[cdn.GetDistributionResponse] { - waitConfig := wait.WaiterHelper[cdn.GetDistributionResponse, cdn.DistributionStatus]{ - FetchInstance: func() (*cdn.GetDistributionResponse, error) { - return api.GetDistributionExecute(ctx, projectId, distributionId) - }, - GetState: func(response *cdn.GetDistributionResponse) (cdn.DistributionStatus, error) { - if response == nil { - return "", errors.New("empty response") - } - if response.Distribution == nil { - return "", errors.New("empty distribution") - } - if response.Distribution.Status == nil { - return "", errors.New("empty status") - } - return *response.Distribution.Status, nil - }, - ActiveState: []cdn.DistributionStatus{cdn.DISTRIBUTIONSTATUS_ACTIVE}, - ErrorState: []cdn.DistributionStatus{cdn.DISTRIBUTIONSTATUS_ERROR, cdn.DISTRIBUTIONSTATUS_DELETING}, - } - handler := wait.New(waitConfig.Wait()) - handler.SetTimeout(10 * time.Minute) - return handler -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func UpdateDistributionWaitHandler(ctx context.Context, api APIClientInterface, projectId, distributionId string) *wait.AsyncActionHandler[cdn.GetDistributionResponse] { - waitConfig := wait.WaiterHelper[cdn.GetDistributionResponse, cdn.DistributionStatus]{ - FetchInstance: func() (*cdn.GetDistributionResponse, error) { - return api.GetDistributionExecute(ctx, projectId, distributionId) - }, - GetState: func(response *cdn.GetDistributionResponse) (cdn.DistributionStatus, error) { - if response == nil { - return "", errors.New("empty response") - } - if response.Distribution == nil { - return "", errors.New("empty distribution") - } - if response.Distribution.Status == nil { - return "", errors.New("empty status") - } - return *response.Distribution.Status, nil - }, - ActiveState: []cdn.DistributionStatus{cdn.DISTRIBUTIONSTATUS_ACTIVE}, - ErrorState: []cdn.DistributionStatus{cdn.DISTRIBUTIONSTATUS_ERROR, cdn.DISTRIBUTIONSTATUS_DELETING, cdn.DISTRIBUTIONSTATUS_CREATING}, - } - handler := wait.New(waitConfig.Wait()) - - handler.SetTimeout(10 * time.Minute) - return handler -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func DeleteDistributionWaitHandler(ctx context.Context, api APIClientInterface, projectId, distributionId string) *wait.AsyncActionHandler[cdn.GetDistributionResponse] { - waitConfig := wait.WaiterHelper[cdn.GetDistributionResponse, cdn.DistributionStatus]{ - FetchInstance: func() (*cdn.GetDistributionResponse, error) { - return api.GetDistributionExecute(ctx, projectId, distributionId) - }, - GetState: func(response *cdn.GetDistributionResponse) (cdn.DistributionStatus, error) { - if response == nil { - return "", errors.New("empty response") - } - if response.Distribution == nil { - return "", errors.New("empty distribution") - } - if response.Distribution.Status == nil { - return "", errors.New("empty status") - } - return *response.Distribution.Status, nil - }, - ActiveState: []cdn.DistributionStatus{}, - ErrorState: []cdn.DistributionStatus{}, - } - handler := wait.New(waitConfig.Wait()) - handler.SetTimeout(10 * time.Minute) - return handler -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func CreateCDNCustomDomainWaitHandler(ctx context.Context, a APIClientInterface, projectId, distributionId, domain string) *wait.AsyncActionHandler[cdn.CustomDomain] { - waitConfig := wait.WaiterHelper[cdn.CustomDomain, cdn.DomainStatus]{ - FetchInstance: func() (*cdn.CustomDomain, error) { - resp, err := a.GetCustomDomainExecute(ctx, projectId, distributionId, domain) - if err != nil || resp == nil || resp.CustomDomain == nil { - return nil, err - } - return resp.CustomDomain, nil - }, - GetState: func(response *cdn.CustomDomain) (cdn.DomainStatus, error) { - if response == nil { - return "", errors.New("empty response") - } - if response.Status == nil { - return "", errors.New("empty status") - } - return *response.Status, nil - }, - ActiveState: []cdn.DomainStatus{cdn.DOMAINSTATUS_ACTIVE}, - ErrorState: []cdn.DomainStatus{cdn.DOMAINSTATUS_ERROR, cdn.DOMAINSTATUS_DELETING}, - } - handler := wait.New(waitConfig.Wait()) - handler.SetTimeout(10 * time.Minute) - return handler -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func DeleteCDNCustomDomainWaitHandler(ctx context.Context, a APIClientInterface, projectId, distributionId, domain string) *wait.AsyncActionHandler[cdn.CustomDomain] { - waitConfig := wait.WaiterHelper[cdn.CustomDomain, cdn.DomainStatus]{ - FetchInstance: func() (*cdn.CustomDomain, error) { - resp, err := a.GetCustomDomainExecute(ctx, projectId, distributionId, domain) - if err != nil || resp == nil || resp.CustomDomain == nil { - return nil, err - } - return resp.CustomDomain, nil - }, - GetState: func(response *cdn.CustomDomain) (cdn.DomainStatus, error) { - if response == nil { - return "", errors.New("empty response") - } - if response.Status == nil { - return "", errors.New("empty status") - } - return *response.Status, nil - }, - ActiveState: []cdn.DomainStatus{}, - ErrorState: []cdn.DomainStatus{}, - } - handler := wait.New(waitConfig.Wait()) - handler.SetTimeout(10 * time.Minute) - return handler -} diff --git a/services/cdn/wait/wait_test.go b/services/cdn/wait/wait_test.go deleted file mode 100644 index c5dd18c263..0000000000 --- a/services/cdn/wait/wait_test.go +++ /dev/null @@ -1,718 +0,0 @@ -package wait - -import ( - "context" - "errors" - "net/http" - "strings" - "testing" - "testing/synctest" - "time" - - "github.com/google/go-cmp/cmp" - - "github.com/stackitcloud/stackit-sdk-go/core/oapierror" - "github.com/stackitcloud/stackit-sdk-go/services/cdn" -) - -type mockApiClient struct { - distributions []*cdn.Distribution - getDistributionError *oapierror.GenericOpenAPIError - customDomains []*cdn.CustomDomain - customDomainProjectId string - customDomainDistributionId string - getCustomDomainError *oapierror.GenericOpenAPIError -} - -func isNil(t *testing.T, err error) { - t.Helper() - if err != nil { - t.Fatalf("expected to get no error: %v", err) - } -} - -func (m *mockApiClient) GetDistributionExecute(_ context.Context, projectId, distributionId string) (*cdn.GetDistributionResponse, error) { - if m.getDistributionError != nil { - return nil, m.getDistributionError - } - for _, d := range m.distributions { - if *d.ProjectId == projectId && *d.Id == distributionId { - return &cdn.GetDistributionResponse{ - Distribution: d, - }, nil - } - } - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: http.StatusNotFound, - } -} - -func (m *mockApiClient) GetCustomDomainExecute(_ context.Context, projectId, distributionId, domain string) (*cdn.GetCustomDomainResponse, error) { - if m.getCustomDomainError != nil { - return nil, m.getCustomDomainError - } - if projectId == m.customDomainProjectId && distributionId == m.customDomainDistributionId { - for _, d := range m.customDomains { - if *d.Name == domain { - return &cdn.GetCustomDomainResponse{ - CustomDomain: d, - }, nil - } - } - } - return nil, &oapierror.GenericOpenAPIError{ - StatusCode: http.StatusNotFound, - } -} - -func TestCreateDistributionWaitHandler(t *testing.T) { - projectId := "test-project-id" - distributionId := "test-distribution-id" - statusActive := cdn.DISTRIBUTIONSTATUS_ACTIVE - statusUpdating := cdn.DISTRIBUTIONSTATUS_UPDATING - statusCreating := cdn.DISTRIBUTIONSTATUS_CREATING - statusError := cdn.DISTRIBUTIONSTATUS_ERROR - statusDeleting := cdn.DISTRIBUTIONSTATUS_DELETING - - mockClientFixture := func(patches ...func(tc *mockApiClient)) *mockApiClient { - client := &mockApiClient{ - distributions: []*cdn.Distribution{ - { - Id: &distributionId, - ProjectId: &projectId, - Status: &statusActive, - }, - }, - getDistributionError: nil, - } - for _, p := range patches { - p(client) - } - return client - } - tests := map[string]struct { - apiClient *mockApiClient - projectId string - distributionId string - expectedDistribution *cdn.GetDistributionResponse - errCheck func(*testing.T, error) - }{ - "happyPath": { - apiClient: mockClientFixture(), - projectId: projectId, - distributionId: distributionId, - expectedDistribution: &cdn.GetDistributionResponse{ - Distribution: &cdn.Distribution{ - Id: &distributionId, - ProjectId: &projectId, - Status: &statusActive, - }, - }, - errCheck: isNil, - }, - "statusUpdating": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.distributions[0].Status = &statusUpdating - }), - projectId: projectId, - distributionId: distributionId, - expectedDistribution: nil, - errCheck: func(t *testing.T, err error) { - if errors.Is(err, context.DeadlineExceeded) { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - "statusCreating": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.distributions[0].Status = &statusCreating - }), - projectId: projectId, - distributionId: distributionId, - expectedDistribution: nil, - errCheck: func(t *testing.T, err error) { - if errors.Is(err, context.DeadlineExceeded) { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - "statusDeleting": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.distributions[0].Status = &statusDeleting - }), - projectId: projectId, - distributionId: distributionId, - expectedDistribution: &cdn.GetDistributionResponse{ - Distribution: &cdn.Distribution{ - Id: &distributionId, - ProjectId: &projectId, - Status: &statusDeleting, - }, - }, - errCheck: func(t *testing.T, err error) { - if strings.Contains(err.Error(), "state is DELETING") { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - "statusError": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.distributions[0].Status = &statusError - }), - projectId: projectId, - distributionId: distributionId, - expectedDistribution: &cdn.GetDistributionResponse{ - Distribution: &cdn.Distribution{ - Id: &distributionId, - ProjectId: &projectId, - Status: &statusError, - }, - }, - errCheck: func(t *testing.T, err error) { - if strings.Contains(err.Error(), "state is ERROR") { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - } - - for name, tc := range tests { - t.Run(name, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - handler := CreateDistributionPoolWaitHandler(context.Background(), tc.apiClient, tc.projectId, tc.distributionId) - dist, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - tc.errCheck(t, err) - if diff := cmp.Diff(tc.expectedDistribution, dist); diff != "" { - t.Fatalf("Unexpected response (-want, +got):\n%s", diff) - } - }) - }) - } -} - -func TestDeleteDistributionWaitHandler(t *testing.T) { - projectId := "test-project-id" - distributionId := "test-distribution-id" - statusActive := cdn.DISTRIBUTIONSTATUS_ACTIVE - statusUpdating := cdn.DISTRIBUTIONSTATUS_UPDATING - statusCreating := cdn.DISTRIBUTIONSTATUS_CREATING - statusError := cdn.DISTRIBUTIONSTATUS_ERROR - statusDeleting := cdn.DISTRIBUTIONSTATUS_DELETING - - mockClientFixture := func(patches ...func(tc *mockApiClient)) *mockApiClient { - client := &mockApiClient{ - distributions: []*cdn.Distribution{}, - getDistributionError: nil, - } - for _, p := range patches { - p(client) - } - return client - } - tests := map[string]struct { - apiClient *mockApiClient - projectId string - distributionId string - errCheck func(*testing.T, error) - }{ - "happyPath": { - apiClient: mockClientFixture(), - projectId: projectId, - distributionId: distributionId, - errCheck: isNil, - }, - "statusActive": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.distributions = append(tc.distributions, &cdn.Distribution{ - Id: &distributionId, - ProjectId: &projectId, - Status: &statusActive, - }) - }), - projectId: projectId, - distributionId: distributionId, - errCheck: func(t *testing.T, err error) { - if errors.Is(err, context.DeadlineExceeded) { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - "statusUpdating": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.distributions = append(tc.distributions, &cdn.Distribution{ - Id: &distributionId, - ProjectId: &projectId, - Status: &statusUpdating, - }) - }), - projectId: projectId, - distributionId: distributionId, - errCheck: func(t *testing.T, err error) { - if errors.Is(err, context.DeadlineExceeded) { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - "statusCreating": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.distributions = append(tc.distributions, &cdn.Distribution{ - Id: &distributionId, - ProjectId: &projectId, - Status: &statusCreating, - }) - }), - projectId: projectId, - distributionId: distributionId, - errCheck: func(t *testing.T, err error) { - if errors.Is(err, context.DeadlineExceeded) { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - "statusError": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.distributions = append(tc.distributions, &cdn.Distribution{ - Id: &distributionId, - ProjectId: &projectId, - Status: &statusError, - }) - }), - projectId: projectId, - distributionId: distributionId, - errCheck: func(t *testing.T, err error) { - if errors.Is(err, context.DeadlineExceeded) { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - "statusDeleting": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.distributions = append(tc.distributions, &cdn.Distribution{ - Id: &distributionId, - ProjectId: &projectId, - Status: &statusDeleting, - }) - }), - projectId: projectId, - distributionId: distributionId, - errCheck: func(t *testing.T, err error) { - if errors.Is(err, context.DeadlineExceeded) { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - } - - for name, tc := range tests { - t.Run(name, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - handler := DeleteDistributionWaitHandler(context.Background(), tc.apiClient, tc.projectId, tc.distributionId) - dist, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - tc.errCheck(t, err) - if dist != nil { - t.Fatalf("Distribution not deleted") - } - }) - }) - } -} - -func TestUpdateDistributionWaitHandler(t *testing.T) { - projectId := "test-project-id" - distributionId := "test-distribution-id" - statusActive := cdn.DISTRIBUTIONSTATUS_ACTIVE - statusUpdating := cdn.DISTRIBUTIONSTATUS_UPDATING - statusCreating := cdn.DISTRIBUTIONSTATUS_CREATING - statusError := cdn.DISTRIBUTIONSTATUS_ERROR - statusDeleting := cdn.DISTRIBUTIONSTATUS_DELETING - - mockClientFixture := func(patches ...func(tc *mockApiClient)) *mockApiClient { - client := &mockApiClient{ - distributions: []*cdn.Distribution{ - { - Id: &distributionId, - ProjectId: &projectId, - Status: &statusActive, - }, - }, - getDistributionError: nil, - } - for _, p := range patches { - p(client) - } - return client - } - tests := map[string]struct { - apiClient *mockApiClient - projectId string - distributionId string - expectedDistribution *cdn.GetDistributionResponse - errCheck func(*testing.T, error) - }{ - "happyPath": { - apiClient: mockClientFixture(), - projectId: projectId, - distributionId: distributionId, - expectedDistribution: &cdn.GetDistributionResponse{ - Distribution: &cdn.Distribution{ - Id: &distributionId, - ProjectId: &projectId, - Status: &statusActive, - }, - }, - errCheck: isNil, - }, - "statusUpdating": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.distributions[0].Status = &statusUpdating - }), - projectId: projectId, - distributionId: distributionId, - expectedDistribution: nil, - errCheck: func(t *testing.T, err error) { - if errors.Is(err, context.DeadlineExceeded) { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - "statusCreating": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.distributions[0].Status = &statusCreating - }), - projectId: projectId, - distributionId: distributionId, - expectedDistribution: &cdn.GetDistributionResponse{ - Distribution: &cdn.Distribution{ - Id: &distributionId, - ProjectId: &projectId, - Status: &statusCreating, - }, - }, - errCheck: func(t *testing.T, err error) { - if strings.Contains(err.Error(), "state is CREATING") { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - "statusDeleting": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.distributions[0].Status = &statusDeleting - }), - projectId: projectId, - distributionId: distributionId, - expectedDistribution: &cdn.GetDistributionResponse{ - Distribution: &cdn.Distribution{ - Id: &distributionId, - ProjectId: &projectId, - Status: &statusDeleting, - }, - }, - errCheck: func(t *testing.T, err error) { - if strings.Contains(err.Error(), "state is DELETING") { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - "statusError": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.distributions[0].Status = &statusError - }), - projectId: projectId, - distributionId: distributionId, - expectedDistribution: &cdn.GetDistributionResponse{ - Distribution: &cdn.Distribution{ - Id: &distributionId, - ProjectId: &projectId, - Status: &statusError, - }, - }, - errCheck: func(t *testing.T, err error) { - if strings.Contains(err.Error(), "state is ERROR") { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - } - - for name, tc := range tests { - t.Run(name, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - handler := UpdateDistributionWaitHandler(context.Background(), tc.apiClient, tc.projectId, tc.distributionId) - dist, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - tc.errCheck(t, err) - if diff := cmp.Diff(tc.expectedDistribution, dist); diff != "" { - t.Fatalf("Unexpected response (-want, +got):\n%s", diff) - } - }) - }) - } -} - -func TestCreateCustomDomainWaitHandler(t *testing.T) { - projectId := "test-project-id" - distributionId := "test-distribution-id" - customDomain := "myCustomDomain.com" - - mockClientFixture := func(patches ...func(tc *mockApiClient)) *mockApiClient { - client := &mockApiClient{ - customDomains: []*cdn.CustomDomain{ - { - Name: &customDomain, - Status: cdn.DOMAINSTATUS_ACTIVE.Ptr(), - }, - }, - customDomainProjectId: projectId, - customDomainDistributionId: distributionId, - getCustomDomainError: nil, - } - for _, p := range patches { - p(client) - } - return client - } - tests := map[string]struct { - apiClient *mockApiClient - projectId string - distributionId string - customDomain string - expectedCustomDomain *cdn.CustomDomain - errCheck func(*testing.T, error) - }{ - "happyPath": { - apiClient: mockClientFixture(), - projectId: projectId, - distributionId: distributionId, - customDomain: customDomain, - expectedCustomDomain: &cdn.CustomDomain{ - Name: &customDomain, - Status: cdn.DOMAINSTATUS_ACTIVE.Ptr(), - }, - errCheck: isNil, - }, - "statusCreating": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.customDomains[0].Status = cdn.DOMAINSTATUS_CREATING.Ptr() - }), - projectId: projectId, - distributionId: distributionId, - customDomain: customDomain, - expectedCustomDomain: nil, - errCheck: func(t *testing.T, err error) { - if err != nil && errors.Is(err, context.DeadlineExceeded) { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - "statusDeleting": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.customDomains[0].Status = cdn.DOMAINSTATUS_DELETING.Ptr() - }), - projectId: projectId, - distributionId: distributionId, - customDomain: customDomain, - expectedCustomDomain: &cdn.CustomDomain{ - Name: &customDomain, - Status: cdn.DOMAINSTATUS_DELETING.Ptr(), - }, - errCheck: func(t *testing.T, err error) { - if strings.Contains(err.Error(), "state is DELETING") { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - "statusError": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.customDomains[0].Status = cdn.DOMAINSTATUS_ERROR.Ptr() - }), - projectId: projectId, - distributionId: distributionId, - customDomain: customDomain, - expectedCustomDomain: &cdn.CustomDomain{ - Name: &customDomain, - Status: cdn.DOMAINSTATUS_ERROR.Ptr(), - }, - errCheck: func(t *testing.T, err error) { - if strings.Contains(err.Error(), "state is ERROR") { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - "CustomDomainMissing": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.customDomains = []*cdn.CustomDomain{} - }), - projectId: projectId, - distributionId: distributionId, - customDomain: customDomain, - expectedCustomDomain: nil, - errCheck: func(t *testing.T, err error) { - oapiErr, ok := err.(*oapierror.GenericOpenAPIError) //nolint:errorlint //complaining that error.As should be used to catch wrapped errors, but this error should not be wrapped - if ok && oapiErr.StatusCode == http.StatusNotFound { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - } - - for name, tc := range tests { - t.Run(name, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - handler := CreateCDNCustomDomainWaitHandler(context.Background(), tc.apiClient, tc.projectId, tc.distributionId, tc.customDomain) - customDomain, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - tc.errCheck(t, err) - if diff := cmp.Diff(tc.expectedCustomDomain, customDomain); diff != "" { - t.Fatalf("Unexpected response (-want, +got):\n%s", diff) - } - }) - }) - } -} - -func TestDeleteCustomDomainHandler(t *testing.T) { - projectId := "test-project-id" - distributionId := "test-distribution-id" - customDomain := "myCustomDomain.com" - - mockClientFixture := func(patches ...func(tc *mockApiClient)) *mockApiClient { - client := &mockApiClient{ - customDomains: []*cdn.CustomDomain{}, - customDomainProjectId: projectId, - customDomainDistributionId: distributionId, - getCustomDomainError: nil, - } - for _, p := range patches { - p(client) - } - return client - } - tests := map[string]struct { - apiClient *mockApiClient - projectId string - distributionId string - customDomain string - errCheck func(*testing.T, error) - }{ - "happyPath": { - apiClient: mockClientFixture(), - projectId: projectId, - customDomain: customDomain, - distributionId: distributionId, - errCheck: isNil, - }, - "statusActive": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.customDomains = append(tc.customDomains, &cdn.CustomDomain{ - Name: &customDomain, - Status: cdn.DOMAINSTATUS_ACTIVE.Ptr(), - }) - }), - projectId: projectId, - distributionId: distributionId, - customDomain: customDomain, - errCheck: func(t *testing.T, err error) { - if err != nil && errors.Is(err, context.DeadlineExceeded) { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - "statusUpdating": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.customDomains = append(tc.customDomains, &cdn.CustomDomain{ - Name: &customDomain, - Status: cdn.DOMAINSTATUS_UPDATING.Ptr(), - }) - }), - projectId: projectId, - distributionId: distributionId, - customDomain: customDomain, - errCheck: func(t *testing.T, err error) { - if err != nil && errors.Is(err, context.DeadlineExceeded) { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - "statusCreating": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.customDomains = append(tc.customDomains, &cdn.CustomDomain{ - Name: &customDomain, - Status: cdn.DOMAINSTATUS_CREATING.Ptr(), - }) - }), - projectId: projectId, - distributionId: distributionId, - customDomain: customDomain, - errCheck: func(t *testing.T, err error) { - if err != nil && errors.Is(err, context.DeadlineExceeded) { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - "statusError": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.customDomains = append(tc.customDomains, &cdn.CustomDomain{ - Name: &customDomain, - Status: cdn.DOMAINSTATUS_ERROR.Ptr(), - }) - }), - projectId: projectId, - distributionId: distributionId, - customDomain: customDomain, - errCheck: func(t *testing.T, err error) { - if err != nil && errors.Is(err, context.DeadlineExceeded) { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - "statusDeleting": { - apiClient: mockClientFixture(func(tc *mockApiClient) { - tc.customDomains = append(tc.customDomains, &cdn.CustomDomain{ - Name: &customDomain, - Status: cdn.DOMAINSTATUS_DELETING.Ptr(), - }) - }), - projectId: projectId, - distributionId: distributionId, - customDomain: customDomain, - errCheck: func(t *testing.T, err error) { - if err != nil && errors.Is(err, context.DeadlineExceeded) { - return - } - t.Fatalf("Unexpected error: %v", err) - }, - }, - } - - for name, tc := range tests { - t.Run(name, func(t *testing.T) { - synctest.Test(t, func(t *testing.T) { - handler := DeleteCDNCustomDomainWaitHandler(context.Background(), tc.apiClient, tc.projectId, tc.distributionId, tc.customDomain) - customDomain, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - tc.errCheck(t, err) - if customDomain != nil { - t.Fatalf("Custom domain not deleted") - } - }) - }) - } -}