From 62825be177688f1a8bad03fc35326f711261cd0a Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Wed, 26 Aug 2026 11:06:20 +0000 Subject: [PATCH] Remove auditlog: removed from API specifications --- examples/auditlog/auditlog.go | 76 - examples/auditlog/go.mod | 13 - examples/auditlog/go.sum | 10 - go.work | 2 - services/auditlog/.openapi-generator/VERSION | 1 - services/auditlog/CHANGELOG.md | 56 - services/auditlog/LICENSE.md | 201 -- services/auditlog/NOTICE.txt | 2 - services/auditlog/VERSION | 1 - services/auditlog/api_default.go | 796 -------- services/auditlog/client.go | 635 ------- services/auditlog/configuration.go | 40 - services/auditlog/go.mod | 10 - services/auditlog/go.sum | 8 - .../model_audit_log_entry_context_response.go | 270 --- ...l_audit_log_entry_context_response_test.go | 11 - ...odel_audit_log_entry_initiator_response.go | 209 --- ...audit_log_entry_initiator_response_test.go | 11 - .../model_audit_log_entry_request_response.go | 327 ---- ...l_audit_log_entry_request_response_test.go | 11 - .../model_audit_log_entry_response.go | 1626 ----------------- .../model_audit_log_entry_response_test.go | 151 -- ...ervice_account_delegation_info_response.go | 150 -- ...e_account_delegation_info_response_test.go | 11 - services/auditlog/model_error_response.go | 330 ---- .../auditlog/model_error_response_test.go | 11 - .../auditlog/model_gateway_error_response.go | 211 --- .../model_gateway_error_response_test.go | 11 - .../model_list_audit_log_entries_response.go | 271 --- ...el_list_audit_log_entries_response_test.go | 11 - ...ount_delegation_info_principal_response.go | 209 --- ...delegation_info_principal_response_test.go | 11 - services/auditlog/oas_commit | 1 - services/auditlog/utils.go | 466 ----- services/auditlog/v2api/api_default.go | 716 -------- services/auditlog/v2api/api_default_mock.go | 86 - services/auditlog/v2api/client.go | 667 ------- services/auditlog/v2api/configuration.go | 37 - .../model_audit_log_entry_context_response.go | 230 --- ...odel_audit_log_entry_initiator_response.go | 205 --- .../model_audit_log_entry_request_response.go | 281 --- .../v2api/model_audit_log_entry_response.go | 817 --------- ...del_audit_log_entry_response_event_type.go | 115 -- ...model_audit_log_entry_response_severity.go | 113 -- ...del_audit_log_entry_response_visibility.go | 113 -- ...ervice_account_delegation_info_response.go | 167 -- .../auditlog/v2api/model_error_response.go | 269 --- .../v2api/model_gateway_error_response.go | 192 -- .../model_list_audit_log_entries_response.go | 233 --- ...ount_delegation_info_principal_response.go | 205 --- services/auditlog/v2api/response.go | 47 - services/auditlog/v2api/utils.go | 361 ---- 52 files changed, 11014 deletions(-) delete mode 100644 examples/auditlog/auditlog.go delete mode 100644 examples/auditlog/go.mod delete mode 100644 examples/auditlog/go.sum delete mode 100644 services/auditlog/.openapi-generator/VERSION delete mode 100644 services/auditlog/CHANGELOG.md delete mode 100644 services/auditlog/LICENSE.md delete mode 100644 services/auditlog/NOTICE.txt delete mode 100644 services/auditlog/VERSION delete mode 100644 services/auditlog/api_default.go delete mode 100644 services/auditlog/client.go delete mode 100644 services/auditlog/configuration.go delete mode 100644 services/auditlog/go.mod delete mode 100644 services/auditlog/go.sum delete mode 100644 services/auditlog/model_audit_log_entry_context_response.go delete mode 100644 services/auditlog/model_audit_log_entry_context_response_test.go delete mode 100644 services/auditlog/model_audit_log_entry_initiator_response.go delete mode 100644 services/auditlog/model_audit_log_entry_initiator_response_test.go delete mode 100644 services/auditlog/model_audit_log_entry_request_response.go delete mode 100644 services/auditlog/model_audit_log_entry_request_response_test.go delete mode 100644 services/auditlog/model_audit_log_entry_response.go delete mode 100644 services/auditlog/model_audit_log_entry_response_test.go delete mode 100644 services/auditlog/model_audit_log_entry_service_account_delegation_info_response.go delete mode 100644 services/auditlog/model_audit_log_entry_service_account_delegation_info_response_test.go delete mode 100644 services/auditlog/model_error_response.go delete mode 100644 services/auditlog/model_error_response_test.go delete mode 100644 services/auditlog/model_gateway_error_response.go delete mode 100644 services/auditlog/model_gateway_error_response_test.go delete mode 100644 services/auditlog/model_list_audit_log_entries_response.go delete mode 100644 services/auditlog/model_list_audit_log_entries_response_test.go delete mode 100644 services/auditlog/model_service_account_delegation_info_principal_response.go delete mode 100644 services/auditlog/model_service_account_delegation_info_principal_response_test.go delete mode 100644 services/auditlog/oas_commit delete mode 100644 services/auditlog/utils.go delete mode 100644 services/auditlog/v2api/api_default.go delete mode 100644 services/auditlog/v2api/api_default_mock.go delete mode 100644 services/auditlog/v2api/client.go delete mode 100644 services/auditlog/v2api/configuration.go delete mode 100644 services/auditlog/v2api/model_audit_log_entry_context_response.go delete mode 100644 services/auditlog/v2api/model_audit_log_entry_initiator_response.go delete mode 100644 services/auditlog/v2api/model_audit_log_entry_request_response.go delete mode 100644 services/auditlog/v2api/model_audit_log_entry_response.go delete mode 100644 services/auditlog/v2api/model_audit_log_entry_response_event_type.go delete mode 100644 services/auditlog/v2api/model_audit_log_entry_response_severity.go delete mode 100644 services/auditlog/v2api/model_audit_log_entry_response_visibility.go delete mode 100644 services/auditlog/v2api/model_audit_log_entry_service_account_delegation_info_response.go delete mode 100644 services/auditlog/v2api/model_error_response.go delete mode 100644 services/auditlog/v2api/model_gateway_error_response.go delete mode 100644 services/auditlog/v2api/model_list_audit_log_entries_response.go delete mode 100644 services/auditlog/v2api/model_service_account_delegation_info_principal_response.go delete mode 100644 services/auditlog/v2api/response.go delete mode 100644 services/auditlog/v2api/utils.go diff --git a/examples/auditlog/auditlog.go b/examples/auditlog/auditlog.go deleted file mode 100644 index 36e99f948..000000000 --- a/examples/auditlog/auditlog.go +++ /dev/null @@ -1,76 +0,0 @@ -package main - -import ( - "context" - "errors" - "fmt" - "net/http" - "os" - "time" - - "github.com/stackitcloud/stackit-sdk-go/core/oapierror" - auditlog "github.com/stackitcloud/stackit-sdk-go/services/auditlog/v2api" -) - -func main() { - projectId := "PROJECT_ID" // the uuid of your STACKIT project - startTime := time.Now().Add(-time.Hour * 24) // your start time - endTime := time.Now() // your end time - limit := float32(100) // set pagination limit to avoid rate limit - - // Create a new API client, that uses default authentication and configuration - auditlogClient, err := auditlog.NewAPIClient() - if err != nil { - fmt.Fprintf(os.Stderr, "[Auditlog API] Creating API client: %v\n", err) - os.Exit(1) - } - - // List all audit logs of a project - listProjectLogsReq := auditlogClient.DefaultAPI.ListProjectAuditLogEntries(context.Background(), projectId). - StartTimeRange(startTime). - EndTimeRange(endTime). - Limit(limit) - result, err := listProjectLogsReq.Execute() - - // To fetch all audit log items within a specified time range, we must implement pagination, because the api returns only - // up to 100 elements per request. We store the result of each request in `allItems`. The response includes a cursor, - // if more elements are available. This cursor must be used to get the next set of elements. - // The api has a rate limit, which can be reached when all elements will be fetched with pagination or if you do multiple request. - // The rate limit should be taken care in this case. - var allItems []auditlog.AuditLogEntryResponse - for { - if err != nil { - var oapiErr *oapierror.GenericOpenAPIError - if errors.As(err, &oapiErr) { - // Check if rate limit is reached - if oapiErr.StatusCode == http.StatusTooManyRequests { - // In case you want to fetch all items, you may want to wait some time and retry the request. - // In this example we just stop here the pagination. - fmt.Fprintf(os.Stderr, "[Auditlog API] Too Many Requests: %v\n", string(oapiErr.Body)) - break - } - } - fmt.Fprintf(os.Stderr, "[Auditlog API] List project audit log entries: %v\n", err) - os.Exit(1) - } - // Break loop when response has no items - if result == nil || result.Items == nil || len(result.Items) == 0 { - break - } - - // Append items to allItems - allItems = append(allItems, result.Items...) - - // If cursor is not set, end of logs is reached - if result.Cursor == nil { - fmt.Printf("[Auditlog API] Successfully fetched all items.\n") - break - } - - // Paginate to the next set of items - listProjectLogsReq = listProjectLogsReq.Cursor(*result.Cursor) - result, err = listProjectLogsReq.Execute() - } - - fmt.Printf("[Auditlog API] Number of project audit log entries: %v\n", len(allItems)) -} diff --git a/examples/auditlog/go.mod b/examples/auditlog/go.mod deleted file mode 100644 index e95981ce7..000000000 --- a/examples/auditlog/go.mod +++ /dev/null @@ -1,13 +0,0 @@ -module auditlog - -go 1.25 - -require ( - github.com/stackitcloud/stackit-sdk-go/core v0.26.0 - github.com/stackitcloud/stackit-sdk-go/services/auditlog v0.6.1 -) - -require ( - github.com/golang-jwt/jwt/v5 v5.3.1 // indirect - github.com/google/uuid v1.6.0 // indirect -) diff --git a/examples/auditlog/go.sum b/examples/auditlog/go.sum deleted file mode 100644 index bb215a4e9..000000000 --- a/examples/auditlog/go.sum +++ /dev/null @@ -1,10 +0,0 @@ -github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63YCY= -github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= -github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= -github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/stackitcloud/stackit-sdk-go/core v0.26.0 h1:jQEb9gkehfp6VCP6TcYk7BI10cz4l0KM2L6hqYBH2QA= -github.com/stackitcloud/stackit-sdk-go/core v0.26.0/go.mod h1:WU1hhxnjXw2EV7CYa1nlEvNpMiRY6CvmIOaHuL3pOaA= -github.com/stackitcloud/stackit-sdk-go/services/auditlog v0.6.1 h1:JIXq0qG59Yca/GFx3wcUJZqVBGfUqxUPWL2oY0ccZQs= -github.com/stackitcloud/stackit-sdk-go/services/auditlog v0.6.1/go.mod h1:g7j7jLGJ16j0CPIHrpt+brXLl+JckETubF9/Jnw+O6Y= diff --git a/go.work b/go.work index 9f64cb482..3688c30aa 100644 --- a/go.work +++ b/go.work @@ -2,7 +2,6 @@ go 1.25.9 use ( ./core - ./examples/auditlog ./examples/authentication ./examples/authorization ./examples/backgroundrefresh @@ -43,7 +42,6 @@ use ( ./examples/waiter ./services/alb ./services/albwaf - ./services/auditlog ./services/authorization ./services/cdn ./services/certificates diff --git a/services/auditlog/.openapi-generator/VERSION b/services/auditlog/.openapi-generator/VERSION deleted file mode 100644 index cd802a1ec..000000000 --- a/services/auditlog/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 \ No newline at end of file diff --git a/services/auditlog/CHANGELOG.md b/services/auditlog/CHANGELOG.md deleted file mode 100644 index 40a186790..000000000 --- a/services/auditlog/CHANGELOG.md +++ /dev/null @@ -1,56 +0,0 @@ -## v0.6.1 -- `v2api`: - - **Fix:** Response decoding now supports `*io.Reader` and `*[]byte` target types (previously only `string`, `*os.File`, and JSON were supported) - -## v0.6.0 -- **Deprecation:** The `auditlog` SDK module and the underlying API is deprecated and will be removed in the future. Use the `telemetryrouter` SDK module and API instead. - -## v0.5.0 -- **Feature:** Introduce enums for various attributes - -## v0.4.2 -- **Dependencies:** Bump STACKIT SDK core module to `v0.26.0` - -## v0.4.1 -- **Dependencies:** Bump STACKIT SDK core module from `v0.24.1` to `v0.25.0` - -## v0.4.0 -- Minimal go version is now Go 1.25 - -## v0.3.3 -- **Dependencies:** Bump STACKIT SDK core module from `v0.24.0` to `v0.24.1` - -## v0.3.2 -- **Dependencies:** Bump STACKIT SDK core module from `v0.23.0` to `v0.24.0` - -## v0.3.1 -- **Dependencies:** Bump STACKIT SDK core module from `v0.22.0` to `v0.23.0` - -## v0.3.0 -- **Bugfix:** Disable strict decoding of API responses -- **Feature:** Add `AdditionalProperties` fields to model structs - -## v0.2.0 -- **Feature:** Introduction of multi API version support for the auditlog SDK module. For more details please see the announcement on GitHub: https://github.com/stackitcloud/stackit-sdk-go/discussions/5062 -- `v2api`: New package which should be used for communication with the STACKIT auditlog API in the future -- **Deprecation:** The contents in the root of this SDK module including the `wait` package are marked as deprecated and will be removed after 2026-09-30. Switch to the new `v2api` package instead. -- **Dependencies:** Bump STACKIT SDK core module from `v0.21.1` to `v0.22.0` - -## v0.1.5 -- Bump STACKIT SDK core module from `v0.21.0` to `v0.21.1` - -## v0.1.4 -- **Dependencies**: Bump `github.com/golang-jwt/jwt/v5` from `v5.3.0` to `v5.3.1` - -## v0.1.3 -- **Bugfix:** Correctly handle file closing for file uploads -- Bump STACKIT SDK core module from `v0.20.1` to `v0.21.0` - -## v0.1.2 -- Bump STACKIT SDK core module from `v0.20.0` to `v0.20.1` - -## v0.1.1 -- Bump STACKIT SDK core module from `v0.19.0` to `v0.20.0` - -## v0.1.0 -- **New**: STACKIT Audit Log module for retrieving recorded actions and system changes. Download audit log entries for folders, organizations, and projects with time range filtering, pagination, and configurable result limits. diff --git a/services/auditlog/LICENSE.md b/services/auditlog/LICENSE.md deleted file mode 100644 index 86b6e18ef..000000000 --- a/services/auditlog/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright 2025 - 2026 Schwarz IT KG - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file diff --git a/services/auditlog/NOTICE.txt b/services/auditlog/NOTICE.txt deleted file mode 100644 index 62f8ce7f7..000000000 --- a/services/auditlog/NOTICE.txt +++ /dev/null @@ -1,2 +0,0 @@ -STACKIT Audit Log SDK for Go -Copyright 2025 - 2026 Schwarz IT KG \ No newline at end of file diff --git a/services/auditlog/VERSION b/services/auditlog/VERSION deleted file mode 100644 index 14909610e..000000000 --- a/services/auditlog/VERSION +++ /dev/null @@ -1 +0,0 @@ -v0.6.1 diff --git a/services/auditlog/api_default.go b/services/auditlog/api_default.go deleted file mode 100644 index 5fb632f54..000000000 --- a/services/auditlog/api_default.go +++ /dev/null @@ -1,796 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.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 auditlog - -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 { - /* - ListFolderAuditLogEntries Folder - Download audit log entries - Deprecated: Returns all audit log entries of the folder for the specified period. \ - Period must not be longer than 24 hours within the last 90 days. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param folderId ID of the folder for which entries should be returned. - @return ApiListFolderAuditLogEntriesRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListFolderAuditLogEntries(ctx context.Context, folderId string) ApiListFolderAuditLogEntriesRequest - /* - ListFolderAuditLogEntriesExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param folderId ID of the folder for which entries should be returned. - @return ListAuditLogEntriesResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListFolderAuditLogEntriesExecute(ctx context.Context, folderId string) (*ListAuditLogEntriesResponse, error) - /* - ListOrganizationAuditLogEntries Organization - Download audit log entries - Deprecated: Returns all audit log entries of the organization for the specified period. \ - Period must not be longer than 24 hours within the last 90 days. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId ID of the organization for which entries should be returned. - @return ApiListOrganizationAuditLogEntriesRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListOrganizationAuditLogEntries(ctx context.Context, organizationId string) ApiListOrganizationAuditLogEntriesRequest - /* - ListOrganizationAuditLogEntriesExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId ID of the organization for which entries should be returned. - @return ListAuditLogEntriesResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListOrganizationAuditLogEntriesExecute(ctx context.Context, organizationId string) (*ListAuditLogEntriesResponse, error) - /* - ListProjectAuditLogEntries Project - Download audit log entries - Deprecated: Returns all audit log entries of the project for the specified period. \ - Period must not be longer than 24 hours within the last 90 days. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId ID of the project for which entries should be returned. - @return ApiListProjectAuditLogEntriesRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListProjectAuditLogEntries(ctx context.Context, projectId string) ApiListProjectAuditLogEntriesRequest - /* - ListProjectAuditLogEntriesExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId ID of the project for which entries should be returned. - @return ListAuditLogEntriesResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListProjectAuditLogEntriesExecute(ctx context.Context, projectId string) (*ListAuditLogEntriesResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListFolderAuditLogEntriesRequest interface { - // An ISO timestamp to specify the beginning of the time range from which entries should be returned, based on the eventTimeStamp. If not given, defaults to the beginning of time. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - StartTimeRange(startTimeRange time.Time) ApiListFolderAuditLogEntriesRequest - // An ISO timestamp to specify the end of the time range up until which entries should be returned, based on the eventTimeStamp. If not given, defaults to the time this request was received. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - EndTimeRange(endTimeRange time.Time) ApiListFolderAuditLogEntriesRequest - // The maximum number of entries to return. If the value exceeds the allowed maximum, the maximum value will be used instead. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Limit(limit float32) ApiListFolderAuditLogEntriesRequest - // A pagination cursor to load further audit log entries for. May be included in the response of previous calls of the API. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Cursor(cursor string) ApiListFolderAuditLogEntriesRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ListAuditLogEntriesResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListOrganizationAuditLogEntriesRequest interface { - // An ISO timestamp to specify the beginning of the time range from which entries should be returned, based on the eventTimeStamp. If not given, defaults to the beginning of time. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - StartTimeRange(startTimeRange time.Time) ApiListOrganizationAuditLogEntriesRequest - // An ISO timestamp to specify the end of the time range up until which entries should be returned, based on the eventTimeStamp. If not given, defaults to the time this request was received. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - EndTimeRange(endTimeRange time.Time) ApiListOrganizationAuditLogEntriesRequest - // The maximum number of entries to return. If the value exceeds the allowed maximum, the maximum value will be used instead. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Limit(limit float32) ApiListOrganizationAuditLogEntriesRequest - // A pagination cursor to load further audit log entries for. May be included in the response of previous calls of the API. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Cursor(cursor string) ApiListOrganizationAuditLogEntriesRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ListAuditLogEntriesResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListProjectAuditLogEntriesRequest interface { - // An ISO timestamp to specify the beginning of the time range from which entries should be returned, based on the eventTimeStamp. If not given, defaults to the beginning of time. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - StartTimeRange(startTimeRange time.Time) ApiListProjectAuditLogEntriesRequest - // An ISO timestamp to specify the end of the time range up until which entries should be returned, based on the eventTimeStamp. If not given, defaults to the time this request was received. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - EndTimeRange(endTimeRange time.Time) ApiListProjectAuditLogEntriesRequest - // The maximum number of entries to return. If the value exceeds the allowed maximum, the maximum value will be used instead. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Limit(limit float32) ApiListProjectAuditLogEntriesRequest - // A pagination cursor to load further audit log entries for. May be included in the response of previous calls of the API. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Cursor(cursor string) ApiListProjectAuditLogEntriesRequest - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ListAuditLogEntriesResponse, 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 ListFolderAuditLogEntriesRequest struct { - ctx context.Context - apiService *DefaultApiService - folderId string - startTimeRange *time.Time - endTimeRange *time.Time - limit *float32 - cursor *string -} - -// An ISO timestamp to specify the beginning of the time range from which entries should be returned, based on the eventTimeStamp. If not given, defaults to the beginning of time. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListFolderAuditLogEntriesRequest) StartTimeRange(startTimeRange time.Time) ApiListFolderAuditLogEntriesRequest { - r.startTimeRange = &startTimeRange - return r -} - -// An ISO timestamp to specify the end of the time range up until which entries should be returned, based on the eventTimeStamp. If not given, defaults to the time this request was received. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListFolderAuditLogEntriesRequest) EndTimeRange(endTimeRange time.Time) ApiListFolderAuditLogEntriesRequest { - r.endTimeRange = &endTimeRange - return r -} - -// The maximum number of entries to return. If the value exceeds the allowed maximum, the maximum value will be used instead. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListFolderAuditLogEntriesRequest) Limit(limit float32) ApiListFolderAuditLogEntriesRequest { - r.limit = &limit - return r -} - -// A pagination cursor to load further audit log entries for. May be included in the response of previous calls of the API. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListFolderAuditLogEntriesRequest) Cursor(cursor string) ApiListFolderAuditLogEntriesRequest { - r.cursor = &cursor - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListFolderAuditLogEntriesRequest) Execute() (*ListAuditLogEntriesResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListAuditLogEntriesResponse - ) - 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.ListFolderAuditLogEntries") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/folders/{folderId}" - localVarPath = strings.Replace(localVarPath, "{"+"folderId"+"}", url.PathEscape(ParameterValueToString(r.folderId, "folderId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.startTimeRange == nil { - return localVarReturnValue, fmt.Errorf("startTimeRange is required and must be specified") - } - if r.endTimeRange == nil { - return localVarReturnValue, fmt.Errorf("endTimeRange is required and must be specified") - } - - parameterAddToHeaderOrQuery(localVarQueryParams, "start-time-range", r.startTimeRange, "") - parameterAddToHeaderOrQuery(localVarQueryParams, "end-time-range", r.endTimeRange, "") - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") - } - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v GatewayErrorResponse - 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 -} - -/* -ListFolderAuditLogEntries: Folder - Download audit log entries - -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 folderId ID of the folder for which entries should be returned. - @return ApiListFolderAuditLogEntriesRequest -*/ -func (a *APIClient) ListFolderAuditLogEntries(ctx context.Context, folderId string) ApiListFolderAuditLogEntriesRequest { - return ListFolderAuditLogEntriesRequest{ - apiService: a.defaultApi, - ctx: ctx, - folderId: folderId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListFolderAuditLogEntriesExecute(ctx context.Context, folderId string) (*ListAuditLogEntriesResponse, error) { - r := ListFolderAuditLogEntriesRequest{ - apiService: a.defaultApi, - ctx: ctx, - folderId: folderId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListOrganizationAuditLogEntriesRequest struct { - ctx context.Context - apiService *DefaultApiService - organizationId string - startTimeRange *time.Time - endTimeRange *time.Time - limit *float32 - cursor *string -} - -// An ISO timestamp to specify the beginning of the time range from which entries should be returned, based on the eventTimeStamp. If not given, defaults to the beginning of time. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListOrganizationAuditLogEntriesRequest) StartTimeRange(startTimeRange time.Time) ApiListOrganizationAuditLogEntriesRequest { - r.startTimeRange = &startTimeRange - return r -} - -// An ISO timestamp to specify the end of the time range up until which entries should be returned, based on the eventTimeStamp. If not given, defaults to the time this request was received. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListOrganizationAuditLogEntriesRequest) EndTimeRange(endTimeRange time.Time) ApiListOrganizationAuditLogEntriesRequest { - r.endTimeRange = &endTimeRange - return r -} - -// The maximum number of entries to return. If the value exceeds the allowed maximum, the maximum value will be used instead. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListOrganizationAuditLogEntriesRequest) Limit(limit float32) ApiListOrganizationAuditLogEntriesRequest { - r.limit = &limit - return r -} - -// A pagination cursor to load further audit log entries for. May be included in the response of previous calls of the API. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListOrganizationAuditLogEntriesRequest) Cursor(cursor string) ApiListOrganizationAuditLogEntriesRequest { - r.cursor = &cursor - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListOrganizationAuditLogEntriesRequest) Execute() (*ListAuditLogEntriesResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListAuditLogEntriesResponse - ) - 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.ListOrganizationAuditLogEntries") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}" - localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(ParameterValueToString(r.organizationId, "organizationId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.startTimeRange == nil { - return localVarReturnValue, fmt.Errorf("startTimeRange is required and must be specified") - } - if r.endTimeRange == nil { - return localVarReturnValue, fmt.Errorf("endTimeRange is required and must be specified") - } - - parameterAddToHeaderOrQuery(localVarQueryParams, "start-time-range", r.startTimeRange, "") - parameterAddToHeaderOrQuery(localVarQueryParams, "end-time-range", r.endTimeRange, "") - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") - } - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v GatewayErrorResponse - 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 -} - -/* -ListOrganizationAuditLogEntries: Organization - Download audit log entries - -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 organizationId ID of the organization for which entries should be returned. - @return ApiListOrganizationAuditLogEntriesRequest -*/ -func (a *APIClient) ListOrganizationAuditLogEntries(ctx context.Context, organizationId string) ApiListOrganizationAuditLogEntriesRequest { - return ListOrganizationAuditLogEntriesRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - } -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListOrganizationAuditLogEntriesExecute(ctx context.Context, organizationId string) (*ListAuditLogEntriesResponse, error) { - r := ListOrganizationAuditLogEntriesRequest{ - apiService: a.defaultApi, - ctx: ctx, - organizationId: organizationId, - } - return r.Execute() -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListProjectAuditLogEntriesRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - startTimeRange *time.Time - endTimeRange *time.Time - limit *float32 - cursor *string -} - -// An ISO timestamp to specify the beginning of the time range from which entries should be returned, based on the eventTimeStamp. If not given, defaults to the beginning of time. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListProjectAuditLogEntriesRequest) StartTimeRange(startTimeRange time.Time) ApiListProjectAuditLogEntriesRequest { - r.startTimeRange = &startTimeRange - return r -} - -// An ISO timestamp to specify the end of the time range up until which entries should be returned, based on the eventTimeStamp. If not given, defaults to the time this request was received. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListProjectAuditLogEntriesRequest) EndTimeRange(endTimeRange time.Time) ApiListProjectAuditLogEntriesRequest { - r.endTimeRange = &endTimeRange - return r -} - -// The maximum number of entries to return. If the value exceeds the allowed maximum, the maximum value will be used instead. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListProjectAuditLogEntriesRequest) Limit(limit float32) ApiListProjectAuditLogEntriesRequest { - r.limit = &limit - return r -} - -// A pagination cursor to load further audit log entries for. May be included in the response of previous calls of the API. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListProjectAuditLogEntriesRequest) Cursor(cursor string) ApiListProjectAuditLogEntriesRequest { - r.cursor = &cursor - return r -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListProjectAuditLogEntriesRequest) Execute() (*ListAuditLogEntriesResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListAuditLogEntriesResponse - ) - 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.ListProjectAuditLogEntries") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}" - 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.startTimeRange == nil { - return localVarReturnValue, fmt.Errorf("startTimeRange is required and must be specified") - } - if r.endTimeRange == nil { - return localVarReturnValue, fmt.Errorf("endTimeRange is required and must be specified") - } - - parameterAddToHeaderOrQuery(localVarQueryParams, "start-time-range", r.startTimeRange, "") - parameterAddToHeaderOrQuery(localVarQueryParams, "end-time-range", r.endTimeRange, "") - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") - } - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v GatewayErrorResponse - 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 -} - -/* -ListProjectAuditLogEntries: Project - Download audit log entries - -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 ID of the project for which entries should be returned. - @return ApiListProjectAuditLogEntriesRequest -*/ -func (a *APIClient) ListProjectAuditLogEntries(ctx context.Context, projectId string) ApiListProjectAuditLogEntriesRequest { - return ListProjectAuditLogEntriesRequest{ - 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) ListProjectAuditLogEntriesExecute(ctx context.Context, projectId string) (*ListAuditLogEntriesResponse, error) { - r := ListProjectAuditLogEntriesRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - } - return r.Execute() -} diff --git a/services/auditlog/client.go b/services/auditlog/client.go deleted file mode 100644 index fcfccf37e..000000000 --- a/services/auditlog/client.go +++ /dev/null @@ -1,635 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.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 auditlog - -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 Audit Log API API v2.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) - } - } - - err := config.ConfigureRegion(cfg) - if err != nil { - return nil, fmt.Errorf("configuring region: %w", err) - } - - if cfg.HTTPClient == nil { - cfg.HTTPClient = &http.Client{} - } - - authRoundTripper, err := auth.SetupAuth(cfg) - if err != nil { - return nil, fmt.Errorf("setting up authentication: %w", err) - } - - roundTripper := authRoundTripper - if cfg.Middleware != nil { - roundTripper = config.ChainMiddleware(roundTripper, cfg.Middleware...) - } - - cfg.HTTPClient.Transport = roundTripper - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - c.defaultApi = (*DefaultApiService)(&c.common) - - return c, nil -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -// 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/auditlog/configuration.go b/services/auditlog/configuration.go deleted file mode 100644 index 71f106de4..000000000 --- a/services/auditlog/configuration.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.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 auditlog - -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/auditlog", - Debug: false, - Servers: config.ServerConfigurations{ - { - URL: "https://auditlog.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/auditlog/go.mod b/services/auditlog/go.mod deleted file mode 100644 index dc274753d..000000000 --- a/services/auditlog/go.mod +++ /dev/null @@ -1,10 +0,0 @@ -module github.com/stackitcloud/stackit-sdk-go/services/auditlog - -go 1.25 - -require github.com/stackitcloud/stackit-sdk-go/core v0.26.0 - -require ( - github.com/golang-jwt/jwt/v5 v5.3.1 // indirect - github.com/google/uuid v1.6.0 // indirect -) diff --git a/services/auditlog/go.sum b/services/auditlog/go.sum deleted file mode 100644 index 3712a0c87..000000000 --- a/services/auditlog/go.sum +++ /dev/null @@ -1,8 +0,0 @@ -github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63YCY= -github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= -github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= -github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/stackitcloud/stackit-sdk-go/core v0.26.0 h1:jQEb9gkehfp6VCP6TcYk7BI10cz4l0KM2L6hqYBH2QA= -github.com/stackitcloud/stackit-sdk-go/core v0.26.0/go.mod h1:WU1hhxnjXw2EV7CYa1nlEvNpMiRY6CvmIOaHuL3pOaA= diff --git a/services/auditlog/model_audit_log_entry_context_response.go b/services/auditlog/model_audit_log_entry_context_response.go deleted file mode 100644 index 2ad468c43..000000000 --- a/services/auditlog/model_audit_log_entry_context_response.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.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 auditlog - -import ( - "encoding/json" -) - -// checks if the AuditLogEntryContextResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AuditLogEntryContextResponse{} - -/* - types and functions for folderId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryContextResponseGetFolderIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryContextResponseGetFolderIdAttributeTypeOk(arg AuditLogEntryContextResponseGetFolderIdAttributeType) (ret AuditLogEntryContextResponseGetFolderIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryContextResponseGetFolderIdAttributeType(arg *AuditLogEntryContextResponseGetFolderIdAttributeType, val AuditLogEntryContextResponseGetFolderIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryContextResponseGetFolderIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryContextResponseGetFolderIdRetType = string - -/* - types and functions for organizationId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryContextResponseGetOrganizationIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryContextResponseGetOrganizationIdAttributeTypeOk(arg AuditLogEntryContextResponseGetOrganizationIdAttributeType) (ret AuditLogEntryContextResponseGetOrganizationIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryContextResponseGetOrganizationIdAttributeType(arg *AuditLogEntryContextResponseGetOrganizationIdAttributeType, val AuditLogEntryContextResponseGetOrganizationIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryContextResponseGetOrganizationIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryContextResponseGetOrganizationIdRetType = 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 AuditLogEntryContextResponseGetProjectIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryContextResponseGetProjectIdAttributeTypeOk(arg AuditLogEntryContextResponseGetProjectIdAttributeType) (ret AuditLogEntryContextResponseGetProjectIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryContextResponseGetProjectIdAttributeType(arg *AuditLogEntryContextResponseGetProjectIdAttributeType, val AuditLogEntryContextResponseGetProjectIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryContextResponseGetProjectIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryContextResponseGetProjectIdRetType = string - -// AuditLogEntryContextResponse Request context -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryContextResponse struct { - // Folder id - FolderId AuditLogEntryContextResponseGetFolderIdAttributeType `json:"folderId,omitempty"` - // Organization id - OrganizationId AuditLogEntryContextResponseGetOrganizationIdAttributeType `json:"organizationId,omitempty"` - // Project id - ProjectId AuditLogEntryContextResponseGetProjectIdAttributeType `json:"projectId,omitempty"` -} - -// NewAuditLogEntryContextResponse instantiates a new AuditLogEntryContextResponse 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 NewAuditLogEntryContextResponse() *AuditLogEntryContextResponse { - this := AuditLogEntryContextResponse{} - return &this -} - -// NewAuditLogEntryContextResponseWithDefaults instantiates a new AuditLogEntryContextResponse 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 NewAuditLogEntryContextResponseWithDefaults() *AuditLogEntryContextResponse { - this := AuditLogEntryContextResponse{} - return &this -} - -// GetFolderId returns the FolderId 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 *AuditLogEntryContextResponse) GetFolderId() (res AuditLogEntryContextResponseGetFolderIdRetType) { - res, _ = o.GetFolderIdOk() - return -} - -// GetFolderIdOk returns a tuple with the FolderId 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 *AuditLogEntryContextResponse) GetFolderIdOk() (ret AuditLogEntryContextResponseGetFolderIdRetType, ok bool) { - return getAuditLogEntryContextResponseGetFolderIdAttributeTypeOk(o.FolderId) -} - -// HasFolderId 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 *AuditLogEntryContextResponse) HasFolderId() bool { - _, ok := o.GetFolderIdOk() - return ok -} - -// SetFolderId gets a reference to the given string and assigns it to the FolderId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryContextResponse) SetFolderId(v AuditLogEntryContextResponseGetFolderIdRetType) { - setAuditLogEntryContextResponseGetFolderIdAttributeType(&o.FolderId, v) -} - -// GetOrganizationId returns the OrganizationId 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 *AuditLogEntryContextResponse) GetOrganizationId() (res AuditLogEntryContextResponseGetOrganizationIdRetType) { - res, _ = o.GetOrganizationIdOk() - return -} - -// GetOrganizationIdOk returns a tuple with the OrganizationId 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 *AuditLogEntryContextResponse) GetOrganizationIdOk() (ret AuditLogEntryContextResponseGetOrganizationIdRetType, ok bool) { - return getAuditLogEntryContextResponseGetOrganizationIdAttributeTypeOk(o.OrganizationId) -} - -// HasOrganizationId 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 *AuditLogEntryContextResponse) HasOrganizationId() bool { - _, ok := o.GetOrganizationIdOk() - return ok -} - -// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryContextResponse) SetOrganizationId(v AuditLogEntryContextResponseGetOrganizationIdRetType) { - setAuditLogEntryContextResponseGetOrganizationIdAttributeType(&o.OrganizationId, v) -} - -// GetProjectId returns the ProjectId 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 *AuditLogEntryContextResponse) GetProjectId() (res AuditLogEntryContextResponseGetProjectIdRetType) { - res, _ = o.GetProjectIdOk() - return -} - -// GetProjectIdOk returns a tuple with the ProjectId 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 *AuditLogEntryContextResponse) GetProjectIdOk() (ret AuditLogEntryContextResponseGetProjectIdRetType, ok bool) { - return getAuditLogEntryContextResponseGetProjectIdAttributeTypeOk(o.ProjectId) -} - -// HasProjectId 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 *AuditLogEntryContextResponse) HasProjectId() bool { - _, ok := o.GetProjectIdOk() - return ok -} - -// SetProjectId gets a reference to the given string and assigns it to the ProjectId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryContextResponse) SetProjectId(v AuditLogEntryContextResponseGetProjectIdRetType) { - setAuditLogEntryContextResponseGetProjectIdAttributeType(&o.ProjectId, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o AuditLogEntryContextResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getAuditLogEntryContextResponseGetFolderIdAttributeTypeOk(o.FolderId); ok { - toSerialize["FolderId"] = val - } - if val, ok := getAuditLogEntryContextResponseGetOrganizationIdAttributeTypeOk(o.OrganizationId); ok { - toSerialize["OrganizationId"] = val - } - if val, ok := getAuditLogEntryContextResponseGetProjectIdAttributeTypeOk(o.ProjectId); ok { - toSerialize["ProjectId"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableAuditLogEntryContextResponse struct { - value *AuditLogEntryContextResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableAuditLogEntryContextResponse) Get() *AuditLogEntryContextResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableAuditLogEntryContextResponse) Set(val *AuditLogEntryContextResponse) { - 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 NullableAuditLogEntryContextResponse) 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 *NullableAuditLogEntryContextResponse) 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 NewNullableAuditLogEntryContextResponse(val *AuditLogEntryContextResponse) *NullableAuditLogEntryContextResponse { - return &NullableAuditLogEntryContextResponse{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 NullableAuditLogEntryContextResponse) 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 *NullableAuditLogEntryContextResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/auditlog/model_audit_log_entry_context_response_test.go b/services/auditlog/model_audit_log_entry_context_response_test.go deleted file mode 100644 index 5e2e7a711..000000000 --- a/services/auditlog/model_audit_log_entry_context_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package auditlog diff --git a/services/auditlog/model_audit_log_entry_initiator_response.go b/services/auditlog/model_audit_log_entry_initiator_response.go deleted file mode 100644 index 4b9ec7eec..000000000 --- a/services/auditlog/model_audit_log_entry_initiator_response.go +++ /dev/null @@ -1,209 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.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 auditlog - -import ( - "encoding/json" -) - -// checks if the AuditLogEntryInitiatorResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AuditLogEntryInitiatorResponse{} - -/* - types and functions for email -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryInitiatorResponseGetEmailAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryInitiatorResponseGetEmailAttributeTypeOk(arg AuditLogEntryInitiatorResponseGetEmailAttributeType) (ret AuditLogEntryInitiatorResponseGetEmailRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryInitiatorResponseGetEmailAttributeType(arg *AuditLogEntryInitiatorResponseGetEmailAttributeType, val AuditLogEntryInitiatorResponseGetEmailRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryInitiatorResponseGetEmailArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryInitiatorResponseGetEmailRetType = 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 AuditLogEntryInitiatorResponseGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryInitiatorResponseGetIdAttributeTypeOk(arg AuditLogEntryInitiatorResponseGetIdAttributeType) (ret AuditLogEntryInitiatorResponseGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryInitiatorResponseGetIdAttributeType(arg *AuditLogEntryInitiatorResponseGetIdAttributeType, val AuditLogEntryInitiatorResponseGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryInitiatorResponseGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryInitiatorResponseGetIdRetType = string - -// AuditLogEntryInitiatorResponse Information about who made the request. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryInitiatorResponse struct { - // E-Mail of the user or service account who triggered the request - Email AuditLogEntryInitiatorResponseGetEmailAttributeType `json:"email,omitempty"` - // Unique identifier of the user - // REQUIRED - Id AuditLogEntryInitiatorResponseGetIdAttributeType `json:"id" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _AuditLogEntryInitiatorResponse AuditLogEntryInitiatorResponse - -// NewAuditLogEntryInitiatorResponse instantiates a new AuditLogEntryInitiatorResponse 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 NewAuditLogEntryInitiatorResponse(id AuditLogEntryInitiatorResponseGetIdArgType) *AuditLogEntryInitiatorResponse { - this := AuditLogEntryInitiatorResponse{} - setAuditLogEntryInitiatorResponseGetIdAttributeType(&this.Id, id) - return &this -} - -// NewAuditLogEntryInitiatorResponseWithDefaults instantiates a new AuditLogEntryInitiatorResponse 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 NewAuditLogEntryInitiatorResponseWithDefaults() *AuditLogEntryInitiatorResponse { - this := AuditLogEntryInitiatorResponse{} - return &this -} - -// GetEmail returns the Email 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 *AuditLogEntryInitiatorResponse) GetEmail() (res AuditLogEntryInitiatorResponseGetEmailRetType) { - res, _ = o.GetEmailOk() - return -} - -// GetEmailOk returns a tuple with the Email field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryInitiatorResponse) GetEmailOk() (ret AuditLogEntryInitiatorResponseGetEmailRetType, ok bool) { - return getAuditLogEntryInitiatorResponseGetEmailAttributeTypeOk(o.Email) -} - -// HasEmail 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 *AuditLogEntryInitiatorResponse) HasEmail() bool { - _, ok := o.GetEmailOk() - return ok -} - -// SetEmail gets a reference to the given string and assigns it to the Email field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryInitiatorResponse) SetEmail(v AuditLogEntryInitiatorResponseGetEmailRetType) { - setAuditLogEntryInitiatorResponseGetEmailAttributeType(&o.Email, 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 *AuditLogEntryInitiatorResponse) GetId() (ret AuditLogEntryInitiatorResponseGetIdRetType) { - 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 *AuditLogEntryInitiatorResponse) GetIdOk() (ret AuditLogEntryInitiatorResponseGetIdRetType, ok bool) { - return getAuditLogEntryInitiatorResponseGetIdAttributeTypeOk(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 *AuditLogEntryInitiatorResponse) SetId(v AuditLogEntryInitiatorResponseGetIdRetType) { - setAuditLogEntryInitiatorResponseGetIdAttributeType(&o.Id, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o AuditLogEntryInitiatorResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getAuditLogEntryInitiatorResponseGetEmailAttributeTypeOk(o.Email); ok { - toSerialize["Email"] = val - } - if val, ok := getAuditLogEntryInitiatorResponseGetIdAttributeTypeOk(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 NullableAuditLogEntryInitiatorResponse struct { - value *AuditLogEntryInitiatorResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableAuditLogEntryInitiatorResponse) Get() *AuditLogEntryInitiatorResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableAuditLogEntryInitiatorResponse) Set(val *AuditLogEntryInitiatorResponse) { - 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 NullableAuditLogEntryInitiatorResponse) 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 *NullableAuditLogEntryInitiatorResponse) 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 NewNullableAuditLogEntryInitiatorResponse(val *AuditLogEntryInitiatorResponse) *NullableAuditLogEntryInitiatorResponse { - return &NullableAuditLogEntryInitiatorResponse{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 NullableAuditLogEntryInitiatorResponse) 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 *NullableAuditLogEntryInitiatorResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/auditlog/model_audit_log_entry_initiator_response_test.go b/services/auditlog/model_audit_log_entry_initiator_response_test.go deleted file mode 100644 index 5e2e7a711..000000000 --- a/services/auditlog/model_audit_log_entry_initiator_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package auditlog diff --git a/services/auditlog/model_audit_log_entry_request_response.go b/services/auditlog/model_audit_log_entry_request_response.go deleted file mode 100644 index 7e8a044e2..000000000 --- a/services/auditlog/model_audit_log_entry_request_response.go +++ /dev/null @@ -1,327 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.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 auditlog - -import ( - "encoding/json" -) - -// checks if the AuditLogEntryRequestResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AuditLogEntryRequestResponse{} - -/* - types and functions for body -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryRequestResponseGetBodyAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryRequestResponseGetBodyArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryRequestResponseGetBodyRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryRequestResponseGetBodyAttributeTypeOk(arg AuditLogEntryRequestResponseGetBodyAttributeType) (ret AuditLogEntryRequestResponseGetBodyRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryRequestResponseGetBodyAttributeType(arg *AuditLogEntryRequestResponseGetBodyAttributeType, val AuditLogEntryRequestResponseGetBodyRetType) { - *arg = &val -} - -/* - types and functions for endpoint -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryRequestResponseGetEndpointAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryRequestResponseGetEndpointAttributeTypeOk(arg AuditLogEntryRequestResponseGetEndpointAttributeType) (ret AuditLogEntryRequestResponseGetEndpointRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryRequestResponseGetEndpointAttributeType(arg *AuditLogEntryRequestResponseGetEndpointAttributeType, val AuditLogEntryRequestResponseGetEndpointRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryRequestResponseGetEndpointArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryRequestResponseGetEndpointRetType = string - -/* - types and functions for headers -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryRequestResponseGetHeadersAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryRequestResponseGetHeadersArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryRequestResponseGetHeadersRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryRequestResponseGetHeadersAttributeTypeOk(arg AuditLogEntryRequestResponseGetHeadersAttributeType) (ret AuditLogEntryRequestResponseGetHeadersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryRequestResponseGetHeadersAttributeType(arg *AuditLogEntryRequestResponseGetHeadersAttributeType, val AuditLogEntryRequestResponseGetHeadersRetType) { - *arg = &val -} - -/* - types and functions for parameters -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryRequestResponseGetParametersAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryRequestResponseGetParametersArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryRequestResponseGetParametersRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryRequestResponseGetParametersAttributeTypeOk(arg AuditLogEntryRequestResponseGetParametersAttributeType) (ret AuditLogEntryRequestResponseGetParametersRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryRequestResponseGetParametersAttributeType(arg *AuditLogEntryRequestResponseGetParametersAttributeType, val AuditLogEntryRequestResponseGetParametersRetType) { - *arg = &val -} - -// AuditLogEntryRequestResponse Request, which mirrors the action of the user and the resulting changes within the system -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryRequestResponse struct { - // Body used to make the request. - Body AuditLogEntryRequestResponseGetBodyAttributeType `json:"body,omitempty"` - // Endpoint which received the request. - // REQUIRED - Endpoint AuditLogEntryRequestResponseGetEndpointAttributeType `json:"endpoint" required:"true"` - // Headers used to make the request. May only contain (string -> string) key-value pairs. - Headers AuditLogEntryRequestResponseGetHeadersAttributeType `json:"headers,omitempty"` - // Parameters used to make the request. - Parameters AuditLogEntryRequestResponseGetParametersAttributeType `json:"parameters,omitempty"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _AuditLogEntryRequestResponse AuditLogEntryRequestResponse - -// NewAuditLogEntryRequestResponse instantiates a new AuditLogEntryRequestResponse 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 NewAuditLogEntryRequestResponse(endpoint AuditLogEntryRequestResponseGetEndpointArgType) *AuditLogEntryRequestResponse { - this := AuditLogEntryRequestResponse{} - setAuditLogEntryRequestResponseGetEndpointAttributeType(&this.Endpoint, endpoint) - return &this -} - -// NewAuditLogEntryRequestResponseWithDefaults instantiates a new AuditLogEntryRequestResponse 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 NewAuditLogEntryRequestResponseWithDefaults() *AuditLogEntryRequestResponse { - this := AuditLogEntryRequestResponse{} - return &this -} - -// GetBody returns the Body 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 *AuditLogEntryRequestResponse) GetBody() (res AuditLogEntryRequestResponseGetBodyRetType) { - res, _ = o.GetBodyOk() - return -} - -// GetBodyOk returns a tuple with the Body 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 *AuditLogEntryRequestResponse) GetBodyOk() (ret AuditLogEntryRequestResponseGetBodyRetType, ok bool) { - return getAuditLogEntryRequestResponseGetBodyAttributeTypeOk(o.Body) -} - -// HasBody 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 *AuditLogEntryRequestResponse) HasBody() bool { - _, ok := o.GetBodyOk() - return ok -} - -// SetBody gets a reference to the given map[string]interface{} and assigns it to the Body field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryRequestResponse) SetBody(v AuditLogEntryRequestResponseGetBodyRetType) { - setAuditLogEntryRequestResponseGetBodyAttributeType(&o.Body, v) -} - -// GetEndpoint returns the Endpoint field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryRequestResponse) GetEndpoint() (ret AuditLogEntryRequestResponseGetEndpointRetType) { - ret, _ = o.GetEndpointOk() - return ret -} - -// GetEndpointOk returns a tuple with the Endpoint 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 *AuditLogEntryRequestResponse) GetEndpointOk() (ret AuditLogEntryRequestResponseGetEndpointRetType, ok bool) { - return getAuditLogEntryRequestResponseGetEndpointAttributeTypeOk(o.Endpoint) -} - -// SetEndpoint sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryRequestResponse) SetEndpoint(v AuditLogEntryRequestResponseGetEndpointRetType) { - setAuditLogEntryRequestResponseGetEndpointAttributeType(&o.Endpoint, v) -} - -// GetHeaders returns the Headers 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 *AuditLogEntryRequestResponse) GetHeaders() (res AuditLogEntryRequestResponseGetHeadersRetType) { - res, _ = o.GetHeadersOk() - return -} - -// GetHeadersOk returns a tuple with the Headers 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 *AuditLogEntryRequestResponse) GetHeadersOk() (ret AuditLogEntryRequestResponseGetHeadersRetType, ok bool) { - return getAuditLogEntryRequestResponseGetHeadersAttributeTypeOk(o.Headers) -} - -// HasHeaders 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 *AuditLogEntryRequestResponse) HasHeaders() bool { - _, ok := o.GetHeadersOk() - return ok -} - -// SetHeaders gets a reference to the given map[string]interface{} and assigns it to the Headers field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryRequestResponse) SetHeaders(v AuditLogEntryRequestResponseGetHeadersRetType) { - setAuditLogEntryRequestResponseGetHeadersAttributeType(&o.Headers, v) -} - -// GetParameters returns the Parameters 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 *AuditLogEntryRequestResponse) GetParameters() (res AuditLogEntryRequestResponseGetParametersRetType) { - res, _ = o.GetParametersOk() - return -} - -// GetParametersOk returns a tuple with the Parameters 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 *AuditLogEntryRequestResponse) GetParametersOk() (ret AuditLogEntryRequestResponseGetParametersRetType, ok bool) { - return getAuditLogEntryRequestResponseGetParametersAttributeTypeOk(o.Parameters) -} - -// HasParameters 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 *AuditLogEntryRequestResponse) HasParameters() bool { - _, ok := o.GetParametersOk() - return ok -} - -// SetParameters gets a reference to the given map[string]interface{} and assigns it to the Parameters field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryRequestResponse) SetParameters(v AuditLogEntryRequestResponseGetParametersRetType) { - setAuditLogEntryRequestResponseGetParametersAttributeType(&o.Parameters, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o AuditLogEntryRequestResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getAuditLogEntryRequestResponseGetBodyAttributeTypeOk(o.Body); ok { - toSerialize["Body"] = val - } - if val, ok := getAuditLogEntryRequestResponseGetEndpointAttributeTypeOk(o.Endpoint); ok { - toSerialize["Endpoint"] = val - } - if val, ok := getAuditLogEntryRequestResponseGetHeadersAttributeTypeOk(o.Headers); ok { - toSerialize["Headers"] = val - } - if val, ok := getAuditLogEntryRequestResponseGetParametersAttributeTypeOk(o.Parameters); ok { - toSerialize["Parameters"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableAuditLogEntryRequestResponse struct { - value *AuditLogEntryRequestResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableAuditLogEntryRequestResponse) Get() *AuditLogEntryRequestResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableAuditLogEntryRequestResponse) Set(val *AuditLogEntryRequestResponse) { - 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 NullableAuditLogEntryRequestResponse) 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 *NullableAuditLogEntryRequestResponse) 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 NewNullableAuditLogEntryRequestResponse(val *AuditLogEntryRequestResponse) *NullableAuditLogEntryRequestResponse { - return &NullableAuditLogEntryRequestResponse{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 NullableAuditLogEntryRequestResponse) 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 *NullableAuditLogEntryRequestResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/auditlog/model_audit_log_entry_request_response_test.go b/services/auditlog/model_audit_log_entry_request_response_test.go deleted file mode 100644 index 5e2e7a711..000000000 --- a/services/auditlog/model_audit_log_entry_request_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package auditlog diff --git a/services/auditlog/model_audit_log_entry_response.go b/services/auditlog/model_audit_log_entry_response.go deleted file mode 100644 index 5f236bd9c..000000000 --- a/services/auditlog/model_audit_log_entry_response.go +++ /dev/null @@ -1,1626 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.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 auditlog - -import ( - "encoding/json" - "fmt" - "time" -) - -// checks if the AuditLogEntryResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AuditLogEntryResponse{} - -/* - types and functions for context -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetContextAttributeType = *AuditLogEntryContextResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetContextArgType = AuditLogEntryContextResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetContextRetType = AuditLogEntryContextResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryResponseGetContextAttributeTypeOk(arg AuditLogEntryResponseGetContextAttributeType) (ret AuditLogEntryResponseGetContextRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryResponseGetContextAttributeType(arg *AuditLogEntryResponseGetContextAttributeType, val AuditLogEntryResponseGetContextRetType) { - *arg = &val -} - -/* - types and functions for correlationId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetCorrelationIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryResponseGetCorrelationIdAttributeTypeOk(arg AuditLogEntryResponseGetCorrelationIdAttributeType) (ret AuditLogEntryResponseGetCorrelationIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryResponseGetCorrelationIdAttributeType(arg *AuditLogEntryResponseGetCorrelationIdAttributeType, val AuditLogEntryResponseGetCorrelationIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetCorrelationIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetCorrelationIdRetType = string - -/* - types and functions for details -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetDetailsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetDetailsArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetDetailsRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryResponseGetDetailsAttributeTypeOk(arg AuditLogEntryResponseGetDetailsAttributeType) (ret AuditLogEntryResponseGetDetailsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryResponseGetDetailsAttributeType(arg *AuditLogEntryResponseGetDetailsAttributeType, val AuditLogEntryResponseGetDetailsRetType) { - *arg = &val -} - -/* - types and functions for eventName -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetEventNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryResponseGetEventNameAttributeTypeOk(arg AuditLogEntryResponseGetEventNameAttributeType) (ret AuditLogEntryResponseGetEventNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryResponseGetEventNameAttributeType(arg *AuditLogEntryResponseGetEventNameAttributeType, val AuditLogEntryResponseGetEventNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetEventNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetEventNameRetType = string - -/* - types and functions for eventSource -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetEventSourceAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryResponseGetEventSourceAttributeTypeOk(arg AuditLogEntryResponseGetEventSourceAttributeType) (ret AuditLogEntryResponseGetEventSourceRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryResponseGetEventSourceAttributeType(arg *AuditLogEntryResponseGetEventSourceAttributeType, val AuditLogEntryResponseGetEventSourceRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetEventSourceArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetEventSourceRetType = string - -/* - types and functions for eventTimeStamp -*/ - -// isDateTime -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetEventTimeStampAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetEventTimeStampArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetEventTimeStampRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryResponseGetEventTimeStampAttributeTypeOk(arg AuditLogEntryResponseGetEventTimeStampAttributeType) (ret AuditLogEntryResponseGetEventTimeStampRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryResponseGetEventTimeStampAttributeType(arg *AuditLogEntryResponseGetEventTimeStampAttributeType, val AuditLogEntryResponseGetEventTimeStampRetType) { - *arg = &val -} - -/* - types and functions for eventType -*/ - -// isEnum - -// AuditLogEntryResponseEventType Type that can be assigned to the event. For example, an event \"Organization created\" can be assigned to the type ADMIN_EVENT -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseEventType string - -// List of EventType -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - AUDITLOGENTRYRESPONSEEVENT_TYPE_ADMIN_ACTIVITY AuditLogEntryResponseEventType = "ADMIN_ACTIVITY" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - AUDITLOGENTRYRESPONSEEVENT_TYPE_SYSTEM_EVENT AuditLogEntryResponseEventType = "SYSTEM_EVENT" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - AUDITLOGENTRYRESPONSEEVENT_TYPE_POLICY_DENIED AuditLogEntryResponseEventType = "POLICY_DENIED" -) - -// All allowed values of AuditLogEntryResponse enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedAuditLogEntryResponseEventTypeEnumValues = []AuditLogEntryResponseEventType{ - "ADMIN_ACTIVITY", - "SYSTEM_EVENT", - "POLICY_DENIED", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *AuditLogEntryResponseEventType) 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 AuditLogEntryResponseEventType - 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 := AuditLogEntryResponseEventType(value) - for _, existing := range AllowedAuditLogEntryResponseEventTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid AuditLogEntryResponse", value) -} - -// NewAuditLogEntryResponseEventTypeFromValue returns a pointer to a valid AuditLogEntryResponseEventType -// 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 NewAuditLogEntryResponseEventTypeFromValue(v AuditLogEntryResponseEventType) (*AuditLogEntryResponseEventType, error) { - ev := AuditLogEntryResponseEventType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for AuditLogEntryResponseEventType: valid values are %v", v, AllowedAuditLogEntryResponseEventTypeEnumValues) - } -} - -// 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 AuditLogEntryResponseEventType) IsValid() bool { - for _, existing := range AllowedAuditLogEntryResponseEventTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to EventTypeEventType value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v AuditLogEntryResponseEventType) Ptr() *AuditLogEntryResponseEventType { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableAuditLogEntryResponseEventType struct { - value *AuditLogEntryResponseEventType - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableAuditLogEntryResponseEventType) Get() *AuditLogEntryResponseEventType { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableAuditLogEntryResponseEventType) Set(val *AuditLogEntryResponseEventType) { - 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 NullableAuditLogEntryResponseEventType) 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 *NullableAuditLogEntryResponseEventType) 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 NewNullableAuditLogEntryResponseEventType(val *AuditLogEntryResponseEventType) *NullableAuditLogEntryResponseEventType { - return &NullableAuditLogEntryResponseEventType{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 NullableAuditLogEntryResponseEventType) 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 *NullableAuditLogEntryResponseEventType) 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 AuditLogEntryResponseGetEventTypeAttributeType = *AuditLogEntryResponseEventType - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetEventTypeArgType = AuditLogEntryResponseEventType - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetEventTypeRetType = AuditLogEntryResponseEventType - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryResponseGetEventTypeAttributeTypeOk(arg AuditLogEntryResponseGetEventTypeAttributeType) (ret AuditLogEntryResponseGetEventTypeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryResponseGetEventTypeAttributeType(arg *AuditLogEntryResponseGetEventTypeAttributeType, val AuditLogEntryResponseGetEventTypeRetType) { - *arg = &val -} - -/* - types and functions for eventVersion -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetEventVersionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryResponseGetEventVersionAttributeTypeOk(arg AuditLogEntryResponseGetEventVersionAttributeType) (ret AuditLogEntryResponseGetEventVersionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryResponseGetEventVersionAttributeType(arg *AuditLogEntryResponseGetEventVersionAttributeType, val AuditLogEntryResponseGetEventVersionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetEventVersionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetEventVersionRetType = 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 AuditLogEntryResponseGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryResponseGetIdAttributeTypeOk(arg AuditLogEntryResponseGetIdAttributeType) (ret AuditLogEntryResponseGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryResponseGetIdAttributeType(arg *AuditLogEntryResponseGetIdAttributeType, val AuditLogEntryResponseGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetIdRetType = string - -/* - types and functions for initiator -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetInitiatorAttributeType = *AuditLogEntryInitiatorResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetInitiatorArgType = AuditLogEntryInitiatorResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetInitiatorRetType = AuditLogEntryInitiatorResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryResponseGetInitiatorAttributeTypeOk(arg AuditLogEntryResponseGetInitiatorAttributeType) (ret AuditLogEntryResponseGetInitiatorRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryResponseGetInitiatorAttributeType(arg *AuditLogEntryResponseGetInitiatorAttributeType, val AuditLogEntryResponseGetInitiatorRetType) { - *arg = &val -} - -/* - types and functions for receivedTimeStamp -*/ - -// isDateTime -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetReceivedTimeStampAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetReceivedTimeStampArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetReceivedTimeStampRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryResponseGetReceivedTimeStampAttributeTypeOk(arg AuditLogEntryResponseGetReceivedTimeStampAttributeType) (ret AuditLogEntryResponseGetReceivedTimeStampRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryResponseGetReceivedTimeStampAttributeType(arg *AuditLogEntryResponseGetReceivedTimeStampAttributeType, val AuditLogEntryResponseGetReceivedTimeStampRetType) { - *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 AuditLogEntryResponseGetRegionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryResponseGetRegionAttributeTypeOk(arg AuditLogEntryResponseGetRegionAttributeType) (ret AuditLogEntryResponseGetRegionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryResponseGetRegionAttributeType(arg *AuditLogEntryResponseGetRegionAttributeType, val AuditLogEntryResponseGetRegionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetRegionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetRegionRetType = string - -/* - types and functions for request -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetRequestAttributeType = *AuditLogEntryRequestResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetRequestArgType = AuditLogEntryRequestResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetRequestRetType = AuditLogEntryRequestResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryResponseGetRequestAttributeTypeOk(arg AuditLogEntryResponseGetRequestAttributeType) (ret AuditLogEntryResponseGetRequestRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryResponseGetRequestAttributeType(arg *AuditLogEntryResponseGetRequestAttributeType, val AuditLogEntryResponseGetRequestRetType) { - *arg = &val -} - -/* - types and functions for resourceId -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetResourceIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryResponseGetResourceIdAttributeTypeOk(arg AuditLogEntryResponseGetResourceIdAttributeType) (ret AuditLogEntryResponseGetResourceIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryResponseGetResourceIdAttributeType(arg *AuditLogEntryResponseGetResourceIdAttributeType, val AuditLogEntryResponseGetResourceIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetResourceIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetResourceIdRetType = string - -/* - types and functions for resourceName -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetResourceNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryResponseGetResourceNameAttributeTypeOk(arg AuditLogEntryResponseGetResourceNameAttributeType) (ret AuditLogEntryResponseGetResourceNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryResponseGetResourceNameAttributeType(arg *AuditLogEntryResponseGetResourceNameAttributeType, val AuditLogEntryResponseGetResourceNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetResourceNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetResourceNameRetType = string - -/* - types and functions for result -*/ - -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetResultAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetResultArgType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetResultRetType = map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryResponseGetResultAttributeTypeOk(arg AuditLogEntryResponseGetResultAttributeType) (ret AuditLogEntryResponseGetResultRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryResponseGetResultAttributeType(arg *AuditLogEntryResponseGetResultAttributeType, val AuditLogEntryResponseGetResultRetType) { - *arg = &val -} - -/* - types and functions for serviceAccountDelegationInfo -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetServiceAccountDelegationInfoAttributeType = *AuditLogEntryServiceAccountDelegationInfoResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetServiceAccountDelegationInfoArgType = AuditLogEntryServiceAccountDelegationInfoResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetServiceAccountDelegationInfoRetType = AuditLogEntryServiceAccountDelegationInfoResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryResponseGetServiceAccountDelegationInfoAttributeTypeOk(arg AuditLogEntryResponseGetServiceAccountDelegationInfoAttributeType) (ret AuditLogEntryResponseGetServiceAccountDelegationInfoRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryResponseGetServiceAccountDelegationInfoAttributeType(arg *AuditLogEntryResponseGetServiceAccountDelegationInfoAttributeType, val AuditLogEntryResponseGetServiceAccountDelegationInfoRetType) { - *arg = &val -} - -/* - types and functions for severity -*/ - -// isEnum - -// AuditLogEntryResponseSeverity The severity of this request. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseSeverity string - -// List of Severity -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - AUDITLOGENTRYRESPONSESEVERITY_INFO AuditLogEntryResponseSeverity = "INFO" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - AUDITLOGENTRYRESPONSESEVERITY_ERROR AuditLogEntryResponseSeverity = "ERROR" -) - -// All allowed values of AuditLogEntryResponse enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedAuditLogEntryResponseSeverityEnumValues = []AuditLogEntryResponseSeverity{ - "INFO", - "ERROR", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *AuditLogEntryResponseSeverity) 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 AuditLogEntryResponseSeverity - 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 := AuditLogEntryResponseSeverity(value) - for _, existing := range AllowedAuditLogEntryResponseSeverityEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid AuditLogEntryResponse", value) -} - -// NewAuditLogEntryResponseSeverityFromValue returns a pointer to a valid AuditLogEntryResponseSeverity -// 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 NewAuditLogEntryResponseSeverityFromValue(v AuditLogEntryResponseSeverity) (*AuditLogEntryResponseSeverity, error) { - ev := AuditLogEntryResponseSeverity(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for AuditLogEntryResponseSeverity: valid values are %v", v, AllowedAuditLogEntryResponseSeverityEnumValues) - } -} - -// 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 AuditLogEntryResponseSeverity) IsValid() bool { - for _, existing := range AllowedAuditLogEntryResponseSeverityEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to SeveritySeverity value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v AuditLogEntryResponseSeverity) Ptr() *AuditLogEntryResponseSeverity { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableAuditLogEntryResponseSeverity struct { - value *AuditLogEntryResponseSeverity - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableAuditLogEntryResponseSeverity) Get() *AuditLogEntryResponseSeverity { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableAuditLogEntryResponseSeverity) Set(val *AuditLogEntryResponseSeverity) { - 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 NullableAuditLogEntryResponseSeverity) 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 *NullableAuditLogEntryResponseSeverity) 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 NewNullableAuditLogEntryResponseSeverity(val *AuditLogEntryResponseSeverity) *NullableAuditLogEntryResponseSeverity { - return &NullableAuditLogEntryResponseSeverity{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 NullableAuditLogEntryResponseSeverity) 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 *NullableAuditLogEntryResponseSeverity) 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 AuditLogEntryResponseGetSeverityAttributeType = *AuditLogEntryResponseSeverity - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetSeverityArgType = AuditLogEntryResponseSeverity - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetSeverityRetType = AuditLogEntryResponseSeverity - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryResponseGetSeverityAttributeTypeOk(arg AuditLogEntryResponseGetSeverityAttributeType) (ret AuditLogEntryResponseGetSeverityRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryResponseGetSeverityAttributeType(arg *AuditLogEntryResponseGetSeverityAttributeType, val AuditLogEntryResponseGetSeverityRetType) { - *arg = &val -} - -/* - types and functions for sourceIpAddress -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetSourceIpAddressAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryResponseGetSourceIpAddressAttributeTypeOk(arg AuditLogEntryResponseGetSourceIpAddressAttributeType) (ret AuditLogEntryResponseGetSourceIpAddressRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryResponseGetSourceIpAddressAttributeType(arg *AuditLogEntryResponseGetSourceIpAddressAttributeType, val AuditLogEntryResponseGetSourceIpAddressRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetSourceIpAddressArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetSourceIpAddressRetType = string - -/* - types and functions for userAgent -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetUserAgentAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryResponseGetUserAgentAttributeTypeOk(arg AuditLogEntryResponseGetUserAgentAttributeType) (ret AuditLogEntryResponseGetUserAgentRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryResponseGetUserAgentAttributeType(arg *AuditLogEntryResponseGetUserAgentAttributeType, val AuditLogEntryResponseGetUserAgentRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetUserAgentArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetUserAgentRetType = string - -/* - types and functions for visibility -*/ - -// isEnum - -// AuditLogEntryResponseVisibility PUBLIC for entries that are intended for end users, while PRIVATE entries can only be viewed with system privileges. -// value type for enums -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseVisibility string - -// List of Visibility -const ( - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - AUDITLOGENTRYRESPONSEVISIBILITY_PUBLIC AuditLogEntryResponseVisibility = "PUBLIC" - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - AUDITLOGENTRYRESPONSEVISIBILITY_PRIVATE AuditLogEntryResponseVisibility = "PRIVATE" -) - -// All allowed values of AuditLogEntryResponse enum -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedAuditLogEntryResponseVisibilityEnumValues = []AuditLogEntryResponseVisibility{ - "PUBLIC", - "PRIVATE", -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *AuditLogEntryResponseVisibility) 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 AuditLogEntryResponseVisibility - 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 := AuditLogEntryResponseVisibility(value) - for _, existing := range AllowedAuditLogEntryResponseVisibilityEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid AuditLogEntryResponse", value) -} - -// NewAuditLogEntryResponseVisibilityFromValue returns a pointer to a valid AuditLogEntryResponseVisibility -// 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 NewAuditLogEntryResponseVisibilityFromValue(v AuditLogEntryResponseVisibility) (*AuditLogEntryResponseVisibility, error) { - ev := AuditLogEntryResponseVisibility(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for AuditLogEntryResponseVisibility: valid values are %v", v, AllowedAuditLogEntryResponseVisibilityEnumValues) - } -} - -// 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 AuditLogEntryResponseVisibility) IsValid() bool { - for _, existing := range AllowedAuditLogEntryResponseVisibilityEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to VisibilityVisibility value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v AuditLogEntryResponseVisibility) Ptr() *AuditLogEntryResponseVisibility { - return &v -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableAuditLogEntryResponseVisibility struct { - value *AuditLogEntryResponseVisibility - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableAuditLogEntryResponseVisibility) Get() *AuditLogEntryResponseVisibility { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableAuditLogEntryResponseVisibility) Set(val *AuditLogEntryResponseVisibility) { - 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 NullableAuditLogEntryResponseVisibility) 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 *NullableAuditLogEntryResponseVisibility) 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 NewNullableAuditLogEntryResponseVisibility(val *AuditLogEntryResponseVisibility) *NullableAuditLogEntryResponseVisibility { - return &NullableAuditLogEntryResponseVisibility{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 NullableAuditLogEntryResponseVisibility) 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 *NullableAuditLogEntryResponseVisibility) 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 AuditLogEntryResponseGetVisibilityAttributeType = *AuditLogEntryResponseVisibility - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetVisibilityArgType = AuditLogEntryResponseVisibility - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponseGetVisibilityRetType = AuditLogEntryResponseVisibility - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryResponseGetVisibilityAttributeTypeOk(arg AuditLogEntryResponseGetVisibilityAttributeType) (ret AuditLogEntryResponseGetVisibilityRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryResponseGetVisibilityAttributeType(arg *AuditLogEntryResponseGetVisibilityAttributeType, val AuditLogEntryResponseGetVisibilityRetType) { - *arg = &val -} - -// AuditLogEntryResponse struct for AuditLogEntryResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryResponse struct { - Context AuditLogEntryResponseGetContextAttributeType `json:"context,omitempty"` - // Unique ID which identifies the request from the sender point of view. - CorrelationId AuditLogEntryResponseGetCorrelationIdAttributeType `json:"correlationId,omitempty"` - // Additional information about the event that is not part of the request or response. May contain arbitrary data. - Details AuditLogEntryResponseGetDetailsAttributeType `json:"details,omitempty"` - // Name of the operation this event represents. - // REQUIRED - EventName AuditLogEntryResponseGetEventNameAttributeType `json:"eventName" required:"true"` - // The service in which the causing event was handled. - // REQUIRED - EventSource AuditLogEntryResponseGetEventSourceAttributeType `json:"eventSource" required:"true"` - // Timestamp at which the event was triggered. - // REQUIRED - EventTimeStamp AuditLogEntryResponseGetEventTimeStampAttributeType `json:"eventTimeStamp" required:"true"` - // Type that can be assigned to the event. For example, an event \"Organization created\" can be assigned to the type ADMIN_EVENT - // REQUIRED - EventType AuditLogEntryResponseGetEventTypeAttributeType `json:"eventType" required:"true"` - // Version of the log event format. - // REQUIRED - EventVersion AuditLogEntryResponseGetEventVersionAttributeType `json:"eventVersion" required:"true"` - // Unique ID generated by the audit log. - // REQUIRED - Id AuditLogEntryResponseGetIdAttributeType `json:"id" required:"true"` - // REQUIRED - Initiator AuditLogEntryResponseGetInitiatorAttributeType `json:"initiator" required:"true"` - // Timestamp at which the event was received by the audit log. - // REQUIRED - ReceivedTimeStamp AuditLogEntryResponseGetReceivedTimeStampAttributeType `json:"receivedTimeStamp" required:"true"` - // Region from which the event has been emitted. - // REQUIRED - Region AuditLogEntryResponseGetRegionAttributeType `json:"region" required:"true"` - // REQUIRED - Request AuditLogEntryResponseGetRequestAttributeType `json:"request" required:"true"` - // Unique id of the resource that is target of the operation - ResourceId AuditLogEntryResponseGetResourceIdAttributeType `json:"resourceId,omitempty"` - // Name of the resource that is target of the operation - ResourceName AuditLogEntryResponseGetResourceNameAttributeType `json:"resourceName,omitempty"` - // Object representing the change resulting from this event. May be omitted if no change has been applied. May contain arbitrary data. - Result AuditLogEntryResponseGetResultAttributeType `json:"result,omitempty"` - ServiceAccountDelegationInfo AuditLogEntryResponseGetServiceAccountDelegationInfoAttributeType `json:"serviceAccountDelegationInfo,omitempty"` - // The severity of this request. - // REQUIRED - Severity AuditLogEntryResponseGetSeverityAttributeType `json:"severity" required:"true"` - // IP address that the request was made from - // REQUIRED - SourceIpAddress AuditLogEntryResponseGetSourceIpAddressAttributeType `json:"sourceIpAddress" required:"true"` - // Agent through which the request was made from (e.g. Portal, CLI, SDK, ...) - // REQUIRED - UserAgent AuditLogEntryResponseGetUserAgentAttributeType `json:"userAgent" required:"true"` - // PUBLIC for entries that are intended for end users, while PRIVATE entries can only be viewed with system privileges. - // REQUIRED - Visibility AuditLogEntryResponseGetVisibilityAttributeType `json:"visibility" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _AuditLogEntryResponse AuditLogEntryResponse - -// NewAuditLogEntryResponse instantiates a new AuditLogEntryResponse 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 NewAuditLogEntryResponse(eventName AuditLogEntryResponseGetEventNameArgType, eventSource AuditLogEntryResponseGetEventSourceArgType, eventTimeStamp AuditLogEntryResponseGetEventTimeStampArgType, eventType AuditLogEntryResponseGetEventTypeArgType, eventVersion AuditLogEntryResponseGetEventVersionArgType, id AuditLogEntryResponseGetIdArgType, initiator AuditLogEntryResponseGetInitiatorArgType, receivedTimeStamp AuditLogEntryResponseGetReceivedTimeStampArgType, region AuditLogEntryResponseGetRegionArgType, request AuditLogEntryResponseGetRequestArgType, severity AuditLogEntryResponseGetSeverityArgType, sourceIpAddress AuditLogEntryResponseGetSourceIpAddressArgType, userAgent AuditLogEntryResponseGetUserAgentArgType, visibility AuditLogEntryResponseGetVisibilityArgType) *AuditLogEntryResponse { - this := AuditLogEntryResponse{} - setAuditLogEntryResponseGetEventNameAttributeType(&this.EventName, eventName) - setAuditLogEntryResponseGetEventSourceAttributeType(&this.EventSource, eventSource) - setAuditLogEntryResponseGetEventTimeStampAttributeType(&this.EventTimeStamp, eventTimeStamp) - setAuditLogEntryResponseGetEventTypeAttributeType(&this.EventType, eventType) - setAuditLogEntryResponseGetEventVersionAttributeType(&this.EventVersion, eventVersion) - setAuditLogEntryResponseGetIdAttributeType(&this.Id, id) - setAuditLogEntryResponseGetInitiatorAttributeType(&this.Initiator, initiator) - setAuditLogEntryResponseGetReceivedTimeStampAttributeType(&this.ReceivedTimeStamp, receivedTimeStamp) - setAuditLogEntryResponseGetRegionAttributeType(&this.Region, region) - setAuditLogEntryResponseGetRequestAttributeType(&this.Request, request) - setAuditLogEntryResponseGetSeverityAttributeType(&this.Severity, severity) - setAuditLogEntryResponseGetSourceIpAddressAttributeType(&this.SourceIpAddress, sourceIpAddress) - setAuditLogEntryResponseGetUserAgentAttributeType(&this.UserAgent, userAgent) - setAuditLogEntryResponseGetVisibilityAttributeType(&this.Visibility, visibility) - return &this -} - -// NewAuditLogEntryResponseWithDefaults instantiates a new AuditLogEntryResponse 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 NewAuditLogEntryResponseWithDefaults() *AuditLogEntryResponse { - this := AuditLogEntryResponse{} - return &this -} - -// GetContext returns the Context 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 *AuditLogEntryResponse) GetContext() (res AuditLogEntryResponseGetContextRetType) { - res, _ = o.GetContextOk() - return -} - -// GetContextOk returns a tuple with the Context 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 *AuditLogEntryResponse) GetContextOk() (ret AuditLogEntryResponseGetContextRetType, ok bool) { - return getAuditLogEntryResponseGetContextAttributeTypeOk(o.Context) -} - -// HasContext 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 *AuditLogEntryResponse) HasContext() bool { - _, ok := o.GetContextOk() - return ok -} - -// SetContext gets a reference to the given AuditLogEntryContextResponse and assigns it to the Context field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) SetContext(v AuditLogEntryResponseGetContextRetType) { - setAuditLogEntryResponseGetContextAttributeType(&o.Context, v) -} - -// GetCorrelationId returns the CorrelationId 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 *AuditLogEntryResponse) GetCorrelationId() (res AuditLogEntryResponseGetCorrelationIdRetType) { - res, _ = o.GetCorrelationIdOk() - return -} - -// GetCorrelationIdOk returns a tuple with the CorrelationId 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 *AuditLogEntryResponse) GetCorrelationIdOk() (ret AuditLogEntryResponseGetCorrelationIdRetType, ok bool) { - return getAuditLogEntryResponseGetCorrelationIdAttributeTypeOk(o.CorrelationId) -} - -// HasCorrelationId 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 *AuditLogEntryResponse) HasCorrelationId() bool { - _, ok := o.GetCorrelationIdOk() - return ok -} - -// SetCorrelationId gets a reference to the given string and assigns it to the CorrelationId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) SetCorrelationId(v AuditLogEntryResponseGetCorrelationIdRetType) { - setAuditLogEntryResponseGetCorrelationIdAttributeType(&o.CorrelationId, v) -} - -// 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 *AuditLogEntryResponse) GetDetails() (res AuditLogEntryResponseGetDetailsRetType) { - 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 *AuditLogEntryResponse) GetDetailsOk() (ret AuditLogEntryResponseGetDetailsRetType, ok bool) { - return getAuditLogEntryResponseGetDetailsAttributeTypeOk(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 *AuditLogEntryResponse) HasDetails() bool { - _, ok := o.GetDetailsOk() - return ok -} - -// SetDetails gets a reference to the given map[string]interface{} 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 *AuditLogEntryResponse) SetDetails(v AuditLogEntryResponseGetDetailsRetType) { - setAuditLogEntryResponseGetDetailsAttributeType(&o.Details, v) -} - -// GetEventName returns the EventName field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) GetEventName() (ret AuditLogEntryResponseGetEventNameRetType) { - ret, _ = o.GetEventNameOk() - return ret -} - -// GetEventNameOk returns a tuple with the EventName 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 *AuditLogEntryResponse) GetEventNameOk() (ret AuditLogEntryResponseGetEventNameRetType, ok bool) { - return getAuditLogEntryResponseGetEventNameAttributeTypeOk(o.EventName) -} - -// SetEventName sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) SetEventName(v AuditLogEntryResponseGetEventNameRetType) { - setAuditLogEntryResponseGetEventNameAttributeType(&o.EventName, v) -} - -// GetEventSource returns the EventSource field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) GetEventSource() (ret AuditLogEntryResponseGetEventSourceRetType) { - ret, _ = o.GetEventSourceOk() - return ret -} - -// GetEventSourceOk returns a tuple with the EventSource 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 *AuditLogEntryResponse) GetEventSourceOk() (ret AuditLogEntryResponseGetEventSourceRetType, ok bool) { - return getAuditLogEntryResponseGetEventSourceAttributeTypeOk(o.EventSource) -} - -// SetEventSource sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) SetEventSource(v AuditLogEntryResponseGetEventSourceRetType) { - setAuditLogEntryResponseGetEventSourceAttributeType(&o.EventSource, v) -} - -// GetEventTimeStamp returns the EventTimeStamp field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) GetEventTimeStamp() (ret AuditLogEntryResponseGetEventTimeStampRetType) { - ret, _ = o.GetEventTimeStampOk() - return ret -} - -// GetEventTimeStampOk returns a tuple with the EventTimeStamp 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 *AuditLogEntryResponse) GetEventTimeStampOk() (ret AuditLogEntryResponseGetEventTimeStampRetType, ok bool) { - return getAuditLogEntryResponseGetEventTimeStampAttributeTypeOk(o.EventTimeStamp) -} - -// SetEventTimeStamp sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) SetEventTimeStamp(v AuditLogEntryResponseGetEventTimeStampRetType) { - setAuditLogEntryResponseGetEventTimeStampAttributeType(&o.EventTimeStamp, v) -} - -// GetEventType returns the EventType field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) GetEventType() (ret AuditLogEntryResponseGetEventTypeRetType) { - ret, _ = o.GetEventTypeOk() - return ret -} - -// GetEventTypeOk returns a tuple with the EventType 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 *AuditLogEntryResponse) GetEventTypeOk() (ret AuditLogEntryResponseGetEventTypeRetType, ok bool) { - return getAuditLogEntryResponseGetEventTypeAttributeTypeOk(o.EventType) -} - -// SetEventType sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) SetEventType(v AuditLogEntryResponseGetEventTypeRetType) { - setAuditLogEntryResponseGetEventTypeAttributeType(&o.EventType, v) -} - -// GetEventVersion returns the EventVersion field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) GetEventVersion() (ret AuditLogEntryResponseGetEventVersionRetType) { - ret, _ = o.GetEventVersionOk() - return ret -} - -// GetEventVersionOk returns a tuple with the EventVersion 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 *AuditLogEntryResponse) GetEventVersionOk() (ret AuditLogEntryResponseGetEventVersionRetType, ok bool) { - return getAuditLogEntryResponseGetEventVersionAttributeTypeOk(o.EventVersion) -} - -// SetEventVersion sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) SetEventVersion(v AuditLogEntryResponseGetEventVersionRetType) { - setAuditLogEntryResponseGetEventVersionAttributeType(&o.EventVersion, 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 *AuditLogEntryResponse) GetId() (ret AuditLogEntryResponseGetIdRetType) { - 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 *AuditLogEntryResponse) GetIdOk() (ret AuditLogEntryResponseGetIdRetType, ok bool) { - return getAuditLogEntryResponseGetIdAttributeTypeOk(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 *AuditLogEntryResponse) SetId(v AuditLogEntryResponseGetIdRetType) { - setAuditLogEntryResponseGetIdAttributeType(&o.Id, v) -} - -// GetInitiator returns the Initiator field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) GetInitiator() (ret AuditLogEntryResponseGetInitiatorRetType) { - ret, _ = o.GetInitiatorOk() - return ret -} - -// GetInitiatorOk returns a tuple with the Initiator 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 *AuditLogEntryResponse) GetInitiatorOk() (ret AuditLogEntryResponseGetInitiatorRetType, ok bool) { - return getAuditLogEntryResponseGetInitiatorAttributeTypeOk(o.Initiator) -} - -// SetInitiator sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) SetInitiator(v AuditLogEntryResponseGetInitiatorRetType) { - setAuditLogEntryResponseGetInitiatorAttributeType(&o.Initiator, v) -} - -// GetReceivedTimeStamp returns the ReceivedTimeStamp field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) GetReceivedTimeStamp() (ret AuditLogEntryResponseGetReceivedTimeStampRetType) { - ret, _ = o.GetReceivedTimeStampOk() - return ret -} - -// GetReceivedTimeStampOk returns a tuple with the ReceivedTimeStamp 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 *AuditLogEntryResponse) GetReceivedTimeStampOk() (ret AuditLogEntryResponseGetReceivedTimeStampRetType, ok bool) { - return getAuditLogEntryResponseGetReceivedTimeStampAttributeTypeOk(o.ReceivedTimeStamp) -} - -// SetReceivedTimeStamp sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) SetReceivedTimeStamp(v AuditLogEntryResponseGetReceivedTimeStampRetType) { - setAuditLogEntryResponseGetReceivedTimeStampAttributeType(&o.ReceivedTimeStamp, 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 *AuditLogEntryResponse) GetRegion() (ret AuditLogEntryResponseGetRegionRetType) { - 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 *AuditLogEntryResponse) GetRegionOk() (ret AuditLogEntryResponseGetRegionRetType, ok bool) { - return getAuditLogEntryResponseGetRegionAttributeTypeOk(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 *AuditLogEntryResponse) SetRegion(v AuditLogEntryResponseGetRegionRetType) { - setAuditLogEntryResponseGetRegionAttributeType(&o.Region, v) -} - -// GetRequest returns the Request field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) GetRequest() (ret AuditLogEntryResponseGetRequestRetType) { - ret, _ = o.GetRequestOk() - return ret -} - -// GetRequestOk returns a tuple with the Request 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 *AuditLogEntryResponse) GetRequestOk() (ret AuditLogEntryResponseGetRequestRetType, ok bool) { - return getAuditLogEntryResponseGetRequestAttributeTypeOk(o.Request) -} - -// SetRequest sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) SetRequest(v AuditLogEntryResponseGetRequestRetType) { - setAuditLogEntryResponseGetRequestAttributeType(&o.Request, v) -} - -// GetResourceId returns the ResourceId 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 *AuditLogEntryResponse) GetResourceId() (res AuditLogEntryResponseGetResourceIdRetType) { - res, _ = o.GetResourceIdOk() - return -} - -// GetResourceIdOk returns a tuple with the ResourceId 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 *AuditLogEntryResponse) GetResourceIdOk() (ret AuditLogEntryResponseGetResourceIdRetType, ok bool) { - return getAuditLogEntryResponseGetResourceIdAttributeTypeOk(o.ResourceId) -} - -// HasResourceId 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 *AuditLogEntryResponse) HasResourceId() bool { - _, ok := o.GetResourceIdOk() - return ok -} - -// SetResourceId gets a reference to the given string and assigns it to the ResourceId field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) SetResourceId(v AuditLogEntryResponseGetResourceIdRetType) { - setAuditLogEntryResponseGetResourceIdAttributeType(&o.ResourceId, v) -} - -// GetResourceName returns the ResourceName 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 *AuditLogEntryResponse) GetResourceName() (res AuditLogEntryResponseGetResourceNameRetType) { - res, _ = o.GetResourceNameOk() - return -} - -// GetResourceNameOk returns a tuple with the ResourceName 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 *AuditLogEntryResponse) GetResourceNameOk() (ret AuditLogEntryResponseGetResourceNameRetType, ok bool) { - return getAuditLogEntryResponseGetResourceNameAttributeTypeOk(o.ResourceName) -} - -// HasResourceName 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 *AuditLogEntryResponse) HasResourceName() bool { - _, ok := o.GetResourceNameOk() - return ok -} - -// SetResourceName gets a reference to the given string and assigns it to the ResourceName field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) SetResourceName(v AuditLogEntryResponseGetResourceNameRetType) { - setAuditLogEntryResponseGetResourceNameAttributeType(&o.ResourceName, v) -} - -// GetResult returns the Result 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 *AuditLogEntryResponse) GetResult() (res AuditLogEntryResponseGetResultRetType) { - res, _ = o.GetResultOk() - return -} - -// GetResultOk returns a tuple with the Result 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 *AuditLogEntryResponse) GetResultOk() (ret AuditLogEntryResponseGetResultRetType, ok bool) { - return getAuditLogEntryResponseGetResultAttributeTypeOk(o.Result) -} - -// HasResult 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 *AuditLogEntryResponse) HasResult() bool { - _, ok := o.GetResultOk() - return ok -} - -// SetResult gets a reference to the given map[string]interface{} and assigns it to the Result field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) SetResult(v AuditLogEntryResponseGetResultRetType) { - setAuditLogEntryResponseGetResultAttributeType(&o.Result, v) -} - -// GetServiceAccountDelegationInfo returns the ServiceAccountDelegationInfo 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 *AuditLogEntryResponse) GetServiceAccountDelegationInfo() (res AuditLogEntryResponseGetServiceAccountDelegationInfoRetType) { - res, _ = o.GetServiceAccountDelegationInfoOk() - return -} - -// GetServiceAccountDelegationInfoOk returns a tuple with the ServiceAccountDelegationInfo 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 *AuditLogEntryResponse) GetServiceAccountDelegationInfoOk() (ret AuditLogEntryResponseGetServiceAccountDelegationInfoRetType, ok bool) { - return getAuditLogEntryResponseGetServiceAccountDelegationInfoAttributeTypeOk(o.ServiceAccountDelegationInfo) -} - -// HasServiceAccountDelegationInfo 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 *AuditLogEntryResponse) HasServiceAccountDelegationInfo() bool { - _, ok := o.GetServiceAccountDelegationInfoOk() - return ok -} - -// SetServiceAccountDelegationInfo gets a reference to the given AuditLogEntryServiceAccountDelegationInfoResponse and assigns it to the ServiceAccountDelegationInfo field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) SetServiceAccountDelegationInfo(v AuditLogEntryResponseGetServiceAccountDelegationInfoRetType) { - setAuditLogEntryResponseGetServiceAccountDelegationInfoAttributeType(&o.ServiceAccountDelegationInfo, v) -} - -// GetSeverity returns the Severity field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) GetSeverity() (ret AuditLogEntryResponseGetSeverityRetType) { - ret, _ = o.GetSeverityOk() - return ret -} - -// GetSeverityOk returns a tuple with the Severity 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 *AuditLogEntryResponse) GetSeverityOk() (ret AuditLogEntryResponseGetSeverityRetType, ok bool) { - return getAuditLogEntryResponseGetSeverityAttributeTypeOk(o.Severity) -} - -// SetSeverity sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) SetSeverity(v AuditLogEntryResponseGetSeverityRetType) { - setAuditLogEntryResponseGetSeverityAttributeType(&o.Severity, v) -} - -// GetSourceIpAddress returns the SourceIpAddress field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) GetSourceIpAddress() (ret AuditLogEntryResponseGetSourceIpAddressRetType) { - ret, _ = o.GetSourceIpAddressOk() - return ret -} - -// GetSourceIpAddressOk returns a tuple with the SourceIpAddress 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 *AuditLogEntryResponse) GetSourceIpAddressOk() (ret AuditLogEntryResponseGetSourceIpAddressRetType, ok bool) { - return getAuditLogEntryResponseGetSourceIpAddressAttributeTypeOk(o.SourceIpAddress) -} - -// SetSourceIpAddress sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) SetSourceIpAddress(v AuditLogEntryResponseGetSourceIpAddressRetType) { - setAuditLogEntryResponseGetSourceIpAddressAttributeType(&o.SourceIpAddress, v) -} - -// GetUserAgent returns the UserAgent field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) GetUserAgent() (ret AuditLogEntryResponseGetUserAgentRetType) { - ret, _ = o.GetUserAgentOk() - return ret -} - -// GetUserAgentOk returns a tuple with the UserAgent 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 *AuditLogEntryResponse) GetUserAgentOk() (ret AuditLogEntryResponseGetUserAgentRetType, ok bool) { - return getAuditLogEntryResponseGetUserAgentAttributeTypeOk(o.UserAgent) -} - -// SetUserAgent sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) SetUserAgent(v AuditLogEntryResponseGetUserAgentRetType) { - setAuditLogEntryResponseGetUserAgentAttributeType(&o.UserAgent, v) -} - -// GetVisibility returns the Visibility field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) GetVisibility() (ret AuditLogEntryResponseGetVisibilityRetType) { - ret, _ = o.GetVisibilityOk() - return ret -} - -// GetVisibilityOk returns a tuple with the Visibility 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 *AuditLogEntryResponse) GetVisibilityOk() (ret AuditLogEntryResponseGetVisibilityRetType, ok bool) { - return getAuditLogEntryResponseGetVisibilityAttributeTypeOk(o.Visibility) -} - -// SetVisibility sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryResponse) SetVisibility(v AuditLogEntryResponseGetVisibilityRetType) { - setAuditLogEntryResponseGetVisibilityAttributeType(&o.Visibility, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o AuditLogEntryResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getAuditLogEntryResponseGetContextAttributeTypeOk(o.Context); ok { - toSerialize["Context"] = val - } - if val, ok := getAuditLogEntryResponseGetCorrelationIdAttributeTypeOk(o.CorrelationId); ok { - toSerialize["CorrelationId"] = val - } - if val, ok := getAuditLogEntryResponseGetDetailsAttributeTypeOk(o.Details); ok { - toSerialize["Details"] = val - } - if val, ok := getAuditLogEntryResponseGetEventNameAttributeTypeOk(o.EventName); ok { - toSerialize["EventName"] = val - } - if val, ok := getAuditLogEntryResponseGetEventSourceAttributeTypeOk(o.EventSource); ok { - toSerialize["EventSource"] = val - } - if val, ok := getAuditLogEntryResponseGetEventTimeStampAttributeTypeOk(o.EventTimeStamp); ok { - toSerialize["EventTimeStamp"] = val - } - if val, ok := getAuditLogEntryResponseGetEventTypeAttributeTypeOk(o.EventType); ok { - toSerialize["EventType"] = val - } - if val, ok := getAuditLogEntryResponseGetEventVersionAttributeTypeOk(o.EventVersion); ok { - toSerialize["EventVersion"] = val - } - if val, ok := getAuditLogEntryResponseGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getAuditLogEntryResponseGetInitiatorAttributeTypeOk(o.Initiator); ok { - toSerialize["Initiator"] = val - } - if val, ok := getAuditLogEntryResponseGetReceivedTimeStampAttributeTypeOk(o.ReceivedTimeStamp); ok { - toSerialize["ReceivedTimeStamp"] = val - } - if val, ok := getAuditLogEntryResponseGetRegionAttributeTypeOk(o.Region); ok { - toSerialize["Region"] = val - } - if val, ok := getAuditLogEntryResponseGetRequestAttributeTypeOk(o.Request); ok { - toSerialize["Request"] = val - } - if val, ok := getAuditLogEntryResponseGetResourceIdAttributeTypeOk(o.ResourceId); ok { - toSerialize["ResourceId"] = val - } - if val, ok := getAuditLogEntryResponseGetResourceNameAttributeTypeOk(o.ResourceName); ok { - toSerialize["ResourceName"] = val - } - if val, ok := getAuditLogEntryResponseGetResultAttributeTypeOk(o.Result); ok { - toSerialize["Result"] = val - } - if val, ok := getAuditLogEntryResponseGetServiceAccountDelegationInfoAttributeTypeOk(o.ServiceAccountDelegationInfo); ok { - toSerialize["ServiceAccountDelegationInfo"] = val - } - if val, ok := getAuditLogEntryResponseGetSeverityAttributeTypeOk(o.Severity); ok { - toSerialize["Severity"] = val - } - if val, ok := getAuditLogEntryResponseGetSourceIpAddressAttributeTypeOk(o.SourceIpAddress); ok { - toSerialize["SourceIpAddress"] = val - } - if val, ok := getAuditLogEntryResponseGetUserAgentAttributeTypeOk(o.UserAgent); ok { - toSerialize["UserAgent"] = val - } - if val, ok := getAuditLogEntryResponseGetVisibilityAttributeTypeOk(o.Visibility); ok { - toSerialize["Visibility"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableAuditLogEntryResponse struct { - value *AuditLogEntryResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableAuditLogEntryResponse) Get() *AuditLogEntryResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableAuditLogEntryResponse) Set(val *AuditLogEntryResponse) { - 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 NullableAuditLogEntryResponse) 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 *NullableAuditLogEntryResponse) 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 NewNullableAuditLogEntryResponse(val *AuditLogEntryResponse) *NullableAuditLogEntryResponse { - return &NullableAuditLogEntryResponse{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 NullableAuditLogEntryResponse) 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 *NullableAuditLogEntryResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/auditlog/model_audit_log_entry_response_test.go b/services/auditlog/model_audit_log_entry_response_test.go deleted file mode 100644 index 1902e70b7..000000000 --- a/services/auditlog/model_audit_log_entry_response_test.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package auditlog - -import ( - "testing" -) - -// isEnum - -func TestAuditLogEntryResponseEventType_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(`"ADMIN_ACTIVITY"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"SYSTEM_EVENT"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 3`, - args: args{ - src: []byte(`"POLICY_DENIED"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := AuditLogEntryResponseEventType("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} - -// isEnum - -func TestAuditLogEntryResponseSeverity_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(`"INFO"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - 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 := AuditLogEntryResponseSeverity("") - if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { - t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} - -// isEnum - -func TestAuditLogEntryResponseVisibility_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(`"PUBLIC"`), - }, - wantErr: false, - }, - { - name: `success - possible enum value no. 2`, - args: args{ - src: []byte(`"PRIVATE"`), - }, - wantErr: false, - }, - { - name: "fail", - args: args{ - src: []byte("\"FOOBAR\""), - }, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - v := AuditLogEntryResponseVisibility("") - 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/auditlog/model_audit_log_entry_service_account_delegation_info_response.go b/services/auditlog/model_audit_log_entry_service_account_delegation_info_response.go deleted file mode 100644 index 4af0f1e1d..000000000 --- a/services/auditlog/model_audit_log_entry_service_account_delegation_info_response.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.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 auditlog - -import ( - "encoding/json" -) - -// checks if the AuditLogEntryServiceAccountDelegationInfoResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AuditLogEntryServiceAccountDelegationInfoResponse{} - -/* - types and functions for principals -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryServiceAccountDelegationInfoResponseGetPrincipalsAttributeType = *[]ServiceAccountDelegationInfoPrincipalResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryServiceAccountDelegationInfoResponseGetPrincipalsArgType = []ServiceAccountDelegationInfoPrincipalResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryServiceAccountDelegationInfoResponseGetPrincipalsRetType = []ServiceAccountDelegationInfoPrincipalResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getAuditLogEntryServiceAccountDelegationInfoResponseGetPrincipalsAttributeTypeOk(arg AuditLogEntryServiceAccountDelegationInfoResponseGetPrincipalsAttributeType) (ret AuditLogEntryServiceAccountDelegationInfoResponseGetPrincipalsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setAuditLogEntryServiceAccountDelegationInfoResponseGetPrincipalsAttributeType(arg *AuditLogEntryServiceAccountDelegationInfoResponseGetPrincipalsAttributeType, val AuditLogEntryServiceAccountDelegationInfoResponseGetPrincipalsRetType) { - *arg = &val -} - -// AuditLogEntryServiceAccountDelegationInfoResponse Information about service account delegation -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type AuditLogEntryServiceAccountDelegationInfoResponse struct { - // Delegation chain for the service account - // REQUIRED - Principals AuditLogEntryServiceAccountDelegationInfoResponseGetPrincipalsAttributeType `json:"principals" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _AuditLogEntryServiceAccountDelegationInfoResponse AuditLogEntryServiceAccountDelegationInfoResponse - -// NewAuditLogEntryServiceAccountDelegationInfoResponse instantiates a new AuditLogEntryServiceAccountDelegationInfoResponse 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 NewAuditLogEntryServiceAccountDelegationInfoResponse(principals AuditLogEntryServiceAccountDelegationInfoResponseGetPrincipalsArgType) *AuditLogEntryServiceAccountDelegationInfoResponse { - this := AuditLogEntryServiceAccountDelegationInfoResponse{} - setAuditLogEntryServiceAccountDelegationInfoResponseGetPrincipalsAttributeType(&this.Principals, principals) - return &this -} - -// NewAuditLogEntryServiceAccountDelegationInfoResponseWithDefaults instantiates a new AuditLogEntryServiceAccountDelegationInfoResponse 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 NewAuditLogEntryServiceAccountDelegationInfoResponseWithDefaults() *AuditLogEntryServiceAccountDelegationInfoResponse { - this := AuditLogEntryServiceAccountDelegationInfoResponse{} - return &this -} - -// GetPrincipals returns the Principals field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryServiceAccountDelegationInfoResponse) GetPrincipals() (ret AuditLogEntryServiceAccountDelegationInfoResponseGetPrincipalsRetType) { - ret, _ = o.GetPrincipalsOk() - return ret -} - -// GetPrincipalsOk returns a tuple with the Principals 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 *AuditLogEntryServiceAccountDelegationInfoResponse) GetPrincipalsOk() (ret AuditLogEntryServiceAccountDelegationInfoResponseGetPrincipalsRetType, ok bool) { - return getAuditLogEntryServiceAccountDelegationInfoResponseGetPrincipalsAttributeTypeOk(o.Principals) -} - -// SetPrincipals sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *AuditLogEntryServiceAccountDelegationInfoResponse) SetPrincipals(v AuditLogEntryServiceAccountDelegationInfoResponseGetPrincipalsRetType) { - setAuditLogEntryServiceAccountDelegationInfoResponseGetPrincipalsAttributeType(&o.Principals, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o AuditLogEntryServiceAccountDelegationInfoResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getAuditLogEntryServiceAccountDelegationInfoResponseGetPrincipalsAttributeTypeOk(o.Principals); ok { - toSerialize["Principals"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableAuditLogEntryServiceAccountDelegationInfoResponse struct { - value *AuditLogEntryServiceAccountDelegationInfoResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableAuditLogEntryServiceAccountDelegationInfoResponse) Get() *AuditLogEntryServiceAccountDelegationInfoResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableAuditLogEntryServiceAccountDelegationInfoResponse) Set(val *AuditLogEntryServiceAccountDelegationInfoResponse) { - 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 NullableAuditLogEntryServiceAccountDelegationInfoResponse) 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 *NullableAuditLogEntryServiceAccountDelegationInfoResponse) 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 NewNullableAuditLogEntryServiceAccountDelegationInfoResponse(val *AuditLogEntryServiceAccountDelegationInfoResponse) *NullableAuditLogEntryServiceAccountDelegationInfoResponse { - return &NullableAuditLogEntryServiceAccountDelegationInfoResponse{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 NullableAuditLogEntryServiceAccountDelegationInfoResponse) 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 *NullableAuditLogEntryServiceAccountDelegationInfoResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/auditlog/model_audit_log_entry_service_account_delegation_info_response_test.go b/services/auditlog/model_audit_log_entry_service_account_delegation_info_response_test.go deleted file mode 100644 index 5e2e7a711..000000000 --- a/services/auditlog/model_audit_log_entry_service_account_delegation_info_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package auditlog diff --git a/services/auditlog/model_error_response.go b/services/auditlog/model_error_response.go deleted file mode 100644 index 485c1ccbe..000000000 --- a/services/auditlog/model_error_response.go +++ /dev/null @@ -1,330 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.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 auditlog - -import ( - "encoding/json" - "time" -) - -// checks if the ErrorResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ErrorResponse{} - -/* - 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 ErrorResponseGetMessageAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getErrorResponseGetMessageAttributeTypeOk(arg ErrorResponseGetMessageAttributeType) (ret ErrorResponseGetMessageRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setErrorResponseGetMessageAttributeType(arg *ErrorResponseGetMessageAttributeType, val ErrorResponseGetMessageRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorResponseGetMessageArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorResponseGetMessageRetType = 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 ErrorResponseGetPathAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getErrorResponseGetPathAttributeTypeOk(arg ErrorResponseGetPathAttributeType) (ret ErrorResponseGetPathRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setErrorResponseGetPathAttributeType(arg *ErrorResponseGetPathAttributeType, val ErrorResponseGetPathRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorResponseGetPathArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorResponseGetPathRetType = string - -/* - types and functions for status -*/ - -// isNumber -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorResponseGetStatusAttributeType = *float64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorResponseGetStatusArgType = float64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorResponseGetStatusRetType = float64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getErrorResponseGetStatusAttributeTypeOk(arg ErrorResponseGetStatusAttributeType) (ret ErrorResponseGetStatusRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setErrorResponseGetStatusAttributeType(arg *ErrorResponseGetStatusAttributeType, val ErrorResponseGetStatusRetType) { - *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 ErrorResponseGetTimestampAttributeType = *time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorResponseGetTimestampArgType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorResponseGetTimestampRetType = time.Time - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getErrorResponseGetTimestampAttributeTypeOk(arg ErrorResponseGetTimestampAttributeType) (ret ErrorResponseGetTimestampRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setErrorResponseGetTimestampAttributeType(arg *ErrorResponseGetTimestampAttributeType, val ErrorResponseGetTimestampRetType) { - *arg = &val -} - -// ErrorResponse struct for ErrorResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ErrorResponse struct { - // Description of the error. - Message ErrorResponseGetMessageAttributeType `json:"message,omitempty"` - // Path which was called. - Path ErrorResponseGetPathAttributeType `json:"path,omitempty"` - // Http status code. - Status ErrorResponseGetStatusAttributeType `json:"status,omitempty"` - // Timestamp at which the error occurred. - Timestamp ErrorResponseGetTimestampAttributeType `json:"timestamp,omitempty"` -} - -// NewErrorResponse instantiates a new ErrorResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewErrorResponse() *ErrorResponse { - this := ErrorResponse{} - return &this -} - -// NewErrorResponseWithDefaults instantiates a new ErrorResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func NewErrorResponseWithDefaults() *ErrorResponse { - this := ErrorResponse{} - return &this -} - -// GetMessage returns the Message 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 *ErrorResponse) GetMessage() (res ErrorResponseGetMessageRetType) { - res, _ = o.GetMessageOk() - return -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ErrorResponse) GetMessageOk() (ret ErrorResponseGetMessageRetType, ok bool) { - return getErrorResponseGetMessageAttributeTypeOk(o.Message) -} - -// HasMessage 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 *ErrorResponse) HasMessage() bool { - _, ok := o.GetMessageOk() - return ok -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ErrorResponse) SetMessage(v ErrorResponseGetMessageRetType) { - setErrorResponseGetMessageAttributeType(&o.Message, v) -} - -// 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 *ErrorResponse) GetPath() (res ErrorResponseGetPathRetType) { - 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 *ErrorResponse) GetPathOk() (ret ErrorResponseGetPathRetType, ok bool) { - return getErrorResponseGetPathAttributeTypeOk(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 *ErrorResponse) 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 *ErrorResponse) SetPath(v ErrorResponseGetPathRetType) { - setErrorResponseGetPathAttributeType(&o.Path, v) -} - -// GetStatus returns the Status 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 *ErrorResponse) GetStatus() (res ErrorResponseGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status 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 *ErrorResponse) GetStatusOk() (ret ErrorResponseGetStatusRetType, ok bool) { - return getErrorResponseGetStatusAttributeTypeOk(o.Status) -} - -// HasStatus 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 *ErrorResponse) HasStatus() bool { - _, ok := o.GetStatusOk() - return ok -} - -// SetStatus gets a reference to the given float64 and assigns it to the Status field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ErrorResponse) SetStatus(v ErrorResponseGetStatusRetType) { - setErrorResponseGetStatusAttributeType(&o.Status, v) -} - -// GetTimestamp returns the Timestamp 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 *ErrorResponse) GetTimestamp() (res ErrorResponseGetTimestampRetType) { - res, _ = o.GetTimestampOk() - return -} - -// GetTimestampOk returns a tuple with the Timestamp 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 *ErrorResponse) GetTimestampOk() (ret ErrorResponseGetTimestampRetType, ok bool) { - return getErrorResponseGetTimestampAttributeTypeOk(o.Timestamp) -} - -// HasTimestamp 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 *ErrorResponse) HasTimestamp() bool { - _, ok := o.GetTimestampOk() - return ok -} - -// SetTimestamp gets a reference to the given time.Time and assigns it to the Timestamp field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ErrorResponse) SetTimestamp(v ErrorResponseGetTimestampRetType) { - setErrorResponseGetTimestampAttributeType(&o.Timestamp, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ErrorResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getErrorResponseGetMessageAttributeTypeOk(o.Message); ok { - toSerialize["Message"] = val - } - if val, ok := getErrorResponseGetPathAttributeTypeOk(o.Path); ok { - toSerialize["Path"] = val - } - if val, ok := getErrorResponseGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getErrorResponseGetTimestampAttributeTypeOk(o.Timestamp); ok { - toSerialize["Timestamp"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableErrorResponse struct { - value *ErrorResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableErrorResponse) Get() *ErrorResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableErrorResponse) Set(val *ErrorResponse) { - 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 NullableErrorResponse) 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 *NullableErrorResponse) 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 NewNullableErrorResponse(val *ErrorResponse) *NullableErrorResponse { - return &NullableErrorResponse{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 NullableErrorResponse) 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 *NullableErrorResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/auditlog/model_error_response_test.go b/services/auditlog/model_error_response_test.go deleted file mode 100644 index 5e2e7a711..000000000 --- a/services/auditlog/model_error_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package auditlog diff --git a/services/auditlog/model_gateway_error_response.go b/services/auditlog/model_gateway_error_response.go deleted file mode 100644 index bea0e9e74..000000000 --- a/services/auditlog/model_gateway_error_response.go +++ /dev/null @@ -1,211 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.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 auditlog - -import ( - "encoding/json" -) - -// checks if the GatewayErrorResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GatewayErrorResponse{} - -/* - 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 GatewayErrorResponseGetMessageAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGatewayErrorResponseGetMessageAttributeTypeOk(arg GatewayErrorResponseGetMessageAttributeType) (ret GatewayErrorResponseGetMessageRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGatewayErrorResponseGetMessageAttributeType(arg *GatewayErrorResponseGetMessageAttributeType, val GatewayErrorResponseGetMessageRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GatewayErrorResponseGetMessageArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GatewayErrorResponseGetMessageRetType = string - -/* - types and functions for status -*/ - -// isNumber -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GatewayErrorResponseGetStatusAttributeType = *float64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GatewayErrorResponseGetStatusArgType = float64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GatewayErrorResponseGetStatusRetType = float64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGatewayErrorResponseGetStatusAttributeTypeOk(arg GatewayErrorResponseGetStatusAttributeType) (ret GatewayErrorResponseGetStatusRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGatewayErrorResponseGetStatusAttributeType(arg *GatewayErrorResponseGetStatusAttributeType, val GatewayErrorResponseGetStatusRetType) { - *arg = &val -} - -// GatewayErrorResponse struct for GatewayErrorResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GatewayErrorResponse struct { - // Description of the error. - Message GatewayErrorResponseGetMessageAttributeType `json:"message,omitempty"` - // Http status code. - Status GatewayErrorResponseGetStatusAttributeType `json:"status,omitempty"` -} - -// NewGatewayErrorResponse instantiates a new GatewayErrorResponse 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 NewGatewayErrorResponse() *GatewayErrorResponse { - this := GatewayErrorResponse{} - return &this -} - -// NewGatewayErrorResponseWithDefaults instantiates a new GatewayErrorResponse 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 NewGatewayErrorResponseWithDefaults() *GatewayErrorResponse { - this := GatewayErrorResponse{} - return &this -} - -// GetMessage returns the Message 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 *GatewayErrorResponse) GetMessage() (res GatewayErrorResponseGetMessageRetType) { - res, _ = o.GetMessageOk() - return -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GatewayErrorResponse) GetMessageOk() (ret GatewayErrorResponseGetMessageRetType, ok bool) { - return getGatewayErrorResponseGetMessageAttributeTypeOk(o.Message) -} - -// HasMessage 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 *GatewayErrorResponse) HasMessage() bool { - _, ok := o.GetMessageOk() - return ok -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GatewayErrorResponse) SetMessage(v GatewayErrorResponseGetMessageRetType) { - setGatewayErrorResponseGetMessageAttributeType(&o.Message, v) -} - -// GetStatus returns the Status 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 *GatewayErrorResponse) GetStatus() (res GatewayErrorResponseGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status 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 *GatewayErrorResponse) GetStatusOk() (ret GatewayErrorResponseGetStatusRetType, ok bool) { - return getGatewayErrorResponseGetStatusAttributeTypeOk(o.Status) -} - -// HasStatus 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 *GatewayErrorResponse) HasStatus() bool { - _, ok := o.GetStatusOk() - return ok -} - -// SetStatus gets a reference to the given float64 and assigns it to the Status field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GatewayErrorResponse) SetStatus(v GatewayErrorResponseGetStatusRetType) { - setGatewayErrorResponseGetStatusAttributeType(&o.Status, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o GatewayErrorResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getGatewayErrorResponseGetMessageAttributeTypeOk(o.Message); ok { - toSerialize["Message"] = val - } - if val, ok := getGatewayErrorResponseGetStatusAttributeTypeOk(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 NullableGatewayErrorResponse struct { - value *GatewayErrorResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableGatewayErrorResponse) Get() *GatewayErrorResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableGatewayErrorResponse) Set(val *GatewayErrorResponse) { - 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 NullableGatewayErrorResponse) 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 *NullableGatewayErrorResponse) 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 NewNullableGatewayErrorResponse(val *GatewayErrorResponse) *NullableGatewayErrorResponse { - return &NullableGatewayErrorResponse{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 NullableGatewayErrorResponse) 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 *NullableGatewayErrorResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/auditlog/model_gateway_error_response_test.go b/services/auditlog/model_gateway_error_response_test.go deleted file mode 100644 index 5e2e7a711..000000000 --- a/services/auditlog/model_gateway_error_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package auditlog diff --git a/services/auditlog/model_list_audit_log_entries_response.go b/services/auditlog/model_list_audit_log_entries_response.go deleted file mode 100644 index 7d1250fcb..000000000 --- a/services/auditlog/model_list_audit_log_entries_response.go +++ /dev/null @@ -1,271 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.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 auditlog - -import ( - "encoding/json" -) - -// checks if the ListAuditLogEntriesResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListAuditLogEntriesResponse{} - -/* - types and functions for cursor -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListAuditLogEntriesResponseGetCursorAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListAuditLogEntriesResponseGetCursorAttributeTypeOk(arg ListAuditLogEntriesResponseGetCursorAttributeType) (ret ListAuditLogEntriesResponseGetCursorRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListAuditLogEntriesResponseGetCursorAttributeType(arg *ListAuditLogEntriesResponseGetCursorAttributeType, val ListAuditLogEntriesResponseGetCursorRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListAuditLogEntriesResponseGetCursorArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListAuditLogEntriesResponseGetCursorRetType = string - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListAuditLogEntriesResponseGetItemsAttributeType = *[]AuditLogEntryResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListAuditLogEntriesResponseGetItemsArgType = []AuditLogEntryResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListAuditLogEntriesResponseGetItemsRetType = []AuditLogEntryResponse - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListAuditLogEntriesResponseGetItemsAttributeTypeOk(arg ListAuditLogEntriesResponseGetItemsAttributeType) (ret ListAuditLogEntriesResponseGetItemsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListAuditLogEntriesResponseGetItemsAttributeType(arg *ListAuditLogEntriesResponseGetItemsAttributeType, val ListAuditLogEntriesResponseGetItemsRetType) { - *arg = &val -} - -/* - types and functions for limit -*/ - -// isNumber -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListAuditLogEntriesResponseGetLimitAttributeType = *float64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListAuditLogEntriesResponseGetLimitArgType = float64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListAuditLogEntriesResponseGetLimitRetType = float64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListAuditLogEntriesResponseGetLimitAttributeTypeOk(arg ListAuditLogEntriesResponseGetLimitAttributeType) (ret ListAuditLogEntriesResponseGetLimitRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListAuditLogEntriesResponseGetLimitAttributeType(arg *ListAuditLogEntriesResponseGetLimitAttributeType, val ListAuditLogEntriesResponseGetLimitRetType) { - *arg = &val -} - -// ListAuditLogEntriesResponse struct for ListAuditLogEntriesResponse -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListAuditLogEntriesResponse struct { - // Optional cursor if more entries are available - Cursor ListAuditLogEntriesResponseGetCursorAttributeType `json:"cursor,omitempty"` - Items ListAuditLogEntriesResponseGetItemsAttributeType `json:"items,omitempty"` - // Maximum amount of entries requested. - Limit ListAuditLogEntriesResponseGetLimitAttributeType `json:"limit,omitempty"` -} - -// NewListAuditLogEntriesResponse instantiates a new ListAuditLogEntriesResponse 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 NewListAuditLogEntriesResponse() *ListAuditLogEntriesResponse { - this := ListAuditLogEntriesResponse{} - return &this -} - -// NewListAuditLogEntriesResponseWithDefaults instantiates a new ListAuditLogEntriesResponse 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 NewListAuditLogEntriesResponseWithDefaults() *ListAuditLogEntriesResponse { - this := ListAuditLogEntriesResponse{} - var limit float64 = 50 - this.Limit = &limit - return &this -} - -// GetCursor returns the Cursor 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 *ListAuditLogEntriesResponse) GetCursor() (res ListAuditLogEntriesResponseGetCursorRetType) { - res, _ = o.GetCursorOk() - return -} - -// GetCursorOk returns a tuple with the Cursor 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 *ListAuditLogEntriesResponse) GetCursorOk() (ret ListAuditLogEntriesResponseGetCursorRetType, ok bool) { - return getListAuditLogEntriesResponseGetCursorAttributeTypeOk(o.Cursor) -} - -// HasCursor 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 *ListAuditLogEntriesResponse) HasCursor() bool { - _, ok := o.GetCursorOk() - return ok -} - -// SetCursor gets a reference to the given string and assigns it to the Cursor field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListAuditLogEntriesResponse) SetCursor(v ListAuditLogEntriesResponseGetCursorRetType) { - setListAuditLogEntriesResponseGetCursorAttributeType(&o.Cursor, v) -} - -// GetItems returns the Items 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 *ListAuditLogEntriesResponse) GetItems() (res ListAuditLogEntriesResponseGetItemsRetType) { - res, _ = o.GetItemsOk() - return -} - -// GetItemsOk returns a tuple with the Items 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 *ListAuditLogEntriesResponse) GetItemsOk() (ret ListAuditLogEntriesResponseGetItemsRetType, ok bool) { - return getListAuditLogEntriesResponseGetItemsAttributeTypeOk(o.Items) -} - -// HasItems 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 *ListAuditLogEntriesResponse) HasItems() bool { - _, ok := o.GetItemsOk() - return ok -} - -// SetItems gets a reference to the given []AuditLogEntryResponse and assigns it to the Items field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListAuditLogEntriesResponse) SetItems(v ListAuditLogEntriesResponseGetItemsRetType) { - setListAuditLogEntriesResponseGetItemsAttributeType(&o.Items, v) -} - -// GetLimit returns the Limit 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 *ListAuditLogEntriesResponse) GetLimit() (res ListAuditLogEntriesResponseGetLimitRetType) { - res, _ = o.GetLimitOk() - return -} - -// GetLimitOk returns a tuple with the Limit 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 *ListAuditLogEntriesResponse) GetLimitOk() (ret ListAuditLogEntriesResponseGetLimitRetType, ok bool) { - return getListAuditLogEntriesResponseGetLimitAttributeTypeOk(o.Limit) -} - -// HasLimit 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 *ListAuditLogEntriesResponse) HasLimit() bool { - _, ok := o.GetLimitOk() - return ok -} - -// SetLimit gets a reference to the given float64 and assigns it to the Limit field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListAuditLogEntriesResponse) SetLimit(v ListAuditLogEntriesResponseGetLimitRetType) { - setListAuditLogEntriesResponseGetLimitAttributeType(&o.Limit, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ListAuditLogEntriesResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getListAuditLogEntriesResponseGetCursorAttributeTypeOk(o.Cursor); ok { - toSerialize["Cursor"] = val - } - if val, ok := getListAuditLogEntriesResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - if val, ok := getListAuditLogEntriesResponseGetLimitAttributeTypeOk(o.Limit); ok { - toSerialize["Limit"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableListAuditLogEntriesResponse struct { - value *ListAuditLogEntriesResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableListAuditLogEntriesResponse) Get() *ListAuditLogEntriesResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableListAuditLogEntriesResponse) Set(val *ListAuditLogEntriesResponse) { - 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 NullableListAuditLogEntriesResponse) 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 *NullableListAuditLogEntriesResponse) 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 NewNullableListAuditLogEntriesResponse(val *ListAuditLogEntriesResponse) *NullableListAuditLogEntriesResponse { - return &NullableListAuditLogEntriesResponse{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 NullableListAuditLogEntriesResponse) 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 *NullableListAuditLogEntriesResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/auditlog/model_list_audit_log_entries_response_test.go b/services/auditlog/model_list_audit_log_entries_response_test.go deleted file mode 100644 index 5e2e7a711..000000000 --- a/services/auditlog/model_list_audit_log_entries_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package auditlog diff --git a/services/auditlog/model_service_account_delegation_info_principal_response.go b/services/auditlog/model_service_account_delegation_info_principal_response.go deleted file mode 100644 index 4020ca57d..000000000 --- a/services/auditlog/model_service_account_delegation_info_principal_response.go +++ /dev/null @@ -1,209 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.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 auditlog - -import ( - "encoding/json" -) - -// checks if the ServiceAccountDelegationInfoPrincipalResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ServiceAccountDelegationInfoPrincipalResponse{} - -/* - types and functions for email -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServiceAccountDelegationInfoPrincipalResponseGetEmailAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServiceAccountDelegationInfoPrincipalResponseGetEmailAttributeTypeOk(arg ServiceAccountDelegationInfoPrincipalResponseGetEmailAttributeType) (ret ServiceAccountDelegationInfoPrincipalResponseGetEmailRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setServiceAccountDelegationInfoPrincipalResponseGetEmailAttributeType(arg *ServiceAccountDelegationInfoPrincipalResponseGetEmailAttributeType, val ServiceAccountDelegationInfoPrincipalResponseGetEmailRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServiceAccountDelegationInfoPrincipalResponseGetEmailArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServiceAccountDelegationInfoPrincipalResponseGetEmailRetType = 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 ServiceAccountDelegationInfoPrincipalResponseGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getServiceAccountDelegationInfoPrincipalResponseGetIdAttributeTypeOk(arg ServiceAccountDelegationInfoPrincipalResponseGetIdAttributeType) (ret ServiceAccountDelegationInfoPrincipalResponseGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setServiceAccountDelegationInfoPrincipalResponseGetIdAttributeType(arg *ServiceAccountDelegationInfoPrincipalResponseGetIdAttributeType, val ServiceAccountDelegationInfoPrincipalResponseGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServiceAccountDelegationInfoPrincipalResponseGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServiceAccountDelegationInfoPrincipalResponseGetIdRetType = string - -// ServiceAccountDelegationInfoPrincipalResponse Principal in delegation chain of a service account -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ServiceAccountDelegationInfoPrincipalResponse struct { - // E-Mail of the subject - Email ServiceAccountDelegationInfoPrincipalResponseGetEmailAttributeType `json:"email,omitempty"` - // Unique identifier of the subject - // REQUIRED - Id ServiceAccountDelegationInfoPrincipalResponseGetIdAttributeType `json:"id" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _ServiceAccountDelegationInfoPrincipalResponse ServiceAccountDelegationInfoPrincipalResponse - -// NewServiceAccountDelegationInfoPrincipalResponse instantiates a new ServiceAccountDelegationInfoPrincipalResponse 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 NewServiceAccountDelegationInfoPrincipalResponse(id ServiceAccountDelegationInfoPrincipalResponseGetIdArgType) *ServiceAccountDelegationInfoPrincipalResponse { - this := ServiceAccountDelegationInfoPrincipalResponse{} - setServiceAccountDelegationInfoPrincipalResponseGetIdAttributeType(&this.Id, id) - return &this -} - -// NewServiceAccountDelegationInfoPrincipalResponseWithDefaults instantiates a new ServiceAccountDelegationInfoPrincipalResponse 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 NewServiceAccountDelegationInfoPrincipalResponseWithDefaults() *ServiceAccountDelegationInfoPrincipalResponse { - this := ServiceAccountDelegationInfoPrincipalResponse{} - return &this -} - -// GetEmail returns the Email 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 *ServiceAccountDelegationInfoPrincipalResponse) GetEmail() (res ServiceAccountDelegationInfoPrincipalResponseGetEmailRetType) { - res, _ = o.GetEmailOk() - return -} - -// GetEmailOk returns a tuple with the Email field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServiceAccountDelegationInfoPrincipalResponse) GetEmailOk() (ret ServiceAccountDelegationInfoPrincipalResponseGetEmailRetType, ok bool) { - return getServiceAccountDelegationInfoPrincipalResponseGetEmailAttributeTypeOk(o.Email) -} - -// HasEmail 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 *ServiceAccountDelegationInfoPrincipalResponse) HasEmail() bool { - _, ok := o.GetEmailOk() - return ok -} - -// SetEmail gets a reference to the given string and assigns it to the Email field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ServiceAccountDelegationInfoPrincipalResponse) SetEmail(v ServiceAccountDelegationInfoPrincipalResponseGetEmailRetType) { - setServiceAccountDelegationInfoPrincipalResponseGetEmailAttributeType(&o.Email, 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 *ServiceAccountDelegationInfoPrincipalResponse) GetId() (ret ServiceAccountDelegationInfoPrincipalResponseGetIdRetType) { - 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 *ServiceAccountDelegationInfoPrincipalResponse) GetIdOk() (ret ServiceAccountDelegationInfoPrincipalResponseGetIdRetType, ok bool) { - return getServiceAccountDelegationInfoPrincipalResponseGetIdAttributeTypeOk(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 *ServiceAccountDelegationInfoPrincipalResponse) SetId(v ServiceAccountDelegationInfoPrincipalResponseGetIdRetType) { - setServiceAccountDelegationInfoPrincipalResponseGetIdAttributeType(&o.Id, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ServiceAccountDelegationInfoPrincipalResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getServiceAccountDelegationInfoPrincipalResponseGetEmailAttributeTypeOk(o.Email); ok { - toSerialize["Email"] = val - } - if val, ok := getServiceAccountDelegationInfoPrincipalResponseGetIdAttributeTypeOk(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 NullableServiceAccountDelegationInfoPrincipalResponse struct { - value *ServiceAccountDelegationInfoPrincipalResponse - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableServiceAccountDelegationInfoPrincipalResponse) Get() *ServiceAccountDelegationInfoPrincipalResponse { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableServiceAccountDelegationInfoPrincipalResponse) Set(val *ServiceAccountDelegationInfoPrincipalResponse) { - 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 NullableServiceAccountDelegationInfoPrincipalResponse) 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 *NullableServiceAccountDelegationInfoPrincipalResponse) 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 NewNullableServiceAccountDelegationInfoPrincipalResponse(val *ServiceAccountDelegationInfoPrincipalResponse) *NullableServiceAccountDelegationInfoPrincipalResponse { - return &NullableServiceAccountDelegationInfoPrincipalResponse{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 NullableServiceAccountDelegationInfoPrincipalResponse) 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 *NullableServiceAccountDelegationInfoPrincipalResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/auditlog/model_service_account_delegation_info_principal_response_test.go b/services/auditlog/model_service_account_delegation_info_principal_response_test.go deleted file mode 100644 index 5e2e7a711..000000000 --- a/services/auditlog/model_service_account_delegation_info_principal_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package auditlog diff --git a/services/auditlog/oas_commit b/services/auditlog/oas_commit deleted file mode 100644 index 8ae9a8db5..000000000 --- a/services/auditlog/oas_commit +++ /dev/null @@ -1 +0,0 @@ -e9fe931e91e0b8f067d5c12518398a52062ca794 diff --git a/services/auditlog/utils.go b/services/auditlog/utils.go deleted file mode 100644 index 1d42973b6..000000000 --- a/services/auditlog/utils.go +++ /dev/null @@ -1,466 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package auditlog - -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/auditlog/v2api/api_default.go b/services/auditlog/v2api/api_default.go deleted file mode 100644 index 7ba3420ee..000000000 --- a/services/auditlog/v2api/api_default.go +++ /dev/null @@ -1,716 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package v2api - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" - "strings" - "time" - - "github.com/stackitcloud/stackit-sdk-go/core/config" - "github.com/stackitcloud/stackit-sdk-go/core/oapierror" -) - -type DefaultAPI interface { - - /* - ListFolderAuditLogEntries Folder - Download audit log entries - - Returns all audit log entries of the folder for the specified period. \ - Period must not be longer than 24 hours within the last 90 days. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param folderId ID of the folder for which entries should be returned. - @return ApiListFolderAuditLogEntriesRequest - - Deprecated - */ - ListFolderAuditLogEntries(ctx context.Context, folderId string) ApiListFolderAuditLogEntriesRequest - - // ListFolderAuditLogEntriesExecute executes the request - // @return ListAuditLogEntriesResponse - // Deprecated - ListFolderAuditLogEntriesExecute(r ApiListFolderAuditLogEntriesRequest) (*ListAuditLogEntriesResponse, error) - - /* - ListOrganizationAuditLogEntries Organization - Download audit log entries - - Returns all audit log entries of the organization for the specified period. \ - Period must not be longer than 24 hours within the last 90 days. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId ID of the organization for which entries should be returned. - @return ApiListOrganizationAuditLogEntriesRequest - - Deprecated - */ - ListOrganizationAuditLogEntries(ctx context.Context, organizationId string) ApiListOrganizationAuditLogEntriesRequest - - // ListOrganizationAuditLogEntriesExecute executes the request - // @return ListAuditLogEntriesResponse - // Deprecated - ListOrganizationAuditLogEntriesExecute(r ApiListOrganizationAuditLogEntriesRequest) (*ListAuditLogEntriesResponse, error) - - /* - ListProjectAuditLogEntries Project - Download audit log entries - - Returns all audit log entries of the project for the specified period. \ - Period must not be longer than 24 hours within the last 90 days. - - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId ID of the project for which entries should be returned. - @return ApiListProjectAuditLogEntriesRequest - - Deprecated - */ - ListProjectAuditLogEntries(ctx context.Context, projectId string) ApiListProjectAuditLogEntriesRequest - - // ListProjectAuditLogEntriesExecute executes the request - // @return ListAuditLogEntriesResponse - // Deprecated - ListProjectAuditLogEntriesExecute(r ApiListProjectAuditLogEntriesRequest) (*ListAuditLogEntriesResponse, error) -} - -// DefaultAPIService DefaultAPI service -type DefaultAPIService service - -type ApiListFolderAuditLogEntriesRequest struct { - ctx context.Context - ApiService DefaultAPI - folderId string - startTimeRange *time.Time - endTimeRange *time.Time - limit *float32 - cursor *string -} - -// An ISO timestamp to specify the beginning of the time range from which entries should be returned, based on the eventTimeStamp. If not given, defaults to the beginning of time. -func (r ApiListFolderAuditLogEntriesRequest) StartTimeRange(startTimeRange time.Time) ApiListFolderAuditLogEntriesRequest { - r.startTimeRange = &startTimeRange - return r -} - -// An ISO timestamp to specify the end of the time range up until which entries should be returned, based on the eventTimeStamp. If not given, defaults to the time this request was received. -func (r ApiListFolderAuditLogEntriesRequest) EndTimeRange(endTimeRange time.Time) ApiListFolderAuditLogEntriesRequest { - r.endTimeRange = &endTimeRange - return r -} - -// The maximum number of entries to return. If the value exceeds the allowed maximum, the maximum value will be used instead. -func (r ApiListFolderAuditLogEntriesRequest) Limit(limit float32) ApiListFolderAuditLogEntriesRequest { - r.limit = &limit - return r -} - -// A pagination cursor to load further audit log entries for. May be included in the response of previous calls of the API. -func (r ApiListFolderAuditLogEntriesRequest) Cursor(cursor string) ApiListFolderAuditLogEntriesRequest { - r.cursor = &cursor - return r -} - -func (r ApiListFolderAuditLogEntriesRequest) Execute() (*ListAuditLogEntriesResponse, error) { - return r.ApiService.ListFolderAuditLogEntriesExecute(r) -} - -/* -ListFolderAuditLogEntries Folder - Download audit log entries - -Returns all audit log entries of the folder for the specified period. \ -Period must not be longer than 24 hours within the last 90 days. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param folderId ID of the folder for which entries should be returned. - @return ApiListFolderAuditLogEntriesRequest - -Deprecated -*/ -func (a *DefaultAPIService) ListFolderAuditLogEntries(ctx context.Context, folderId string) ApiListFolderAuditLogEntriesRequest { - return ApiListFolderAuditLogEntriesRequest{ - ApiService: a, - ctx: ctx, - folderId: folderId, - } -} - -// Execute executes the request -// -// @return ListAuditLogEntriesResponse -// -// Deprecated -func (a *DefaultAPIService) ListFolderAuditLogEntriesExecute(r ApiListFolderAuditLogEntriesRequest) (*ListAuditLogEntriesResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListAuditLogEntriesResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListFolderAuditLogEntries") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/folders/{folderId}" - localVarPath = strings.Replace(localVarPath, "{"+"folderId"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.startTimeRange == nil { - return localVarReturnValue, reportError("startTimeRange is required and must be specified") - } - if r.endTimeRange == nil { - return localVarReturnValue, reportError("endTimeRange is required and must be specified") - } - - parameterAddToHeaderOrQuery(localVarQueryParams, "start-time-range", r.startTimeRange, "form", "") - parameterAddToHeaderOrQuery(localVarQueryParams, "end-time-range", r.endTimeRange, "form", "") - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") - } else { - var defaultValue float32 = 50 - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", defaultValue, "form", "") - r.limit = &defaultValue - } - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v GatewayErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiListOrganizationAuditLogEntriesRequest struct { - ctx context.Context - ApiService DefaultAPI - organizationId string - startTimeRange *time.Time - endTimeRange *time.Time - limit *float32 - cursor *string -} - -// An ISO timestamp to specify the beginning of the time range from which entries should be returned, based on the eventTimeStamp. If not given, defaults to the beginning of time. -func (r ApiListOrganizationAuditLogEntriesRequest) StartTimeRange(startTimeRange time.Time) ApiListOrganizationAuditLogEntriesRequest { - r.startTimeRange = &startTimeRange - return r -} - -// An ISO timestamp to specify the end of the time range up until which entries should be returned, based on the eventTimeStamp. If not given, defaults to the time this request was received. -func (r ApiListOrganizationAuditLogEntriesRequest) EndTimeRange(endTimeRange time.Time) ApiListOrganizationAuditLogEntriesRequest { - r.endTimeRange = &endTimeRange - return r -} - -// The maximum number of entries to return. If the value exceeds the allowed maximum, the maximum value will be used instead. -func (r ApiListOrganizationAuditLogEntriesRequest) Limit(limit float32) ApiListOrganizationAuditLogEntriesRequest { - r.limit = &limit - return r -} - -// A pagination cursor to load further audit log entries for. May be included in the response of previous calls of the API. -func (r ApiListOrganizationAuditLogEntriesRequest) Cursor(cursor string) ApiListOrganizationAuditLogEntriesRequest { - r.cursor = &cursor - return r -} - -func (r ApiListOrganizationAuditLogEntriesRequest) Execute() (*ListAuditLogEntriesResponse, error) { - return r.ApiService.ListOrganizationAuditLogEntriesExecute(r) -} - -/* -ListOrganizationAuditLogEntries Organization - Download audit log entries - -Returns all audit log entries of the organization for the specified period. \ -Period must not be longer than 24 hours within the last 90 days. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param organizationId ID of the organization for which entries should be returned. - @return ApiListOrganizationAuditLogEntriesRequest - -Deprecated -*/ -func (a *DefaultAPIService) ListOrganizationAuditLogEntries(ctx context.Context, organizationId string) ApiListOrganizationAuditLogEntriesRequest { - return ApiListOrganizationAuditLogEntriesRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - } -} - -// Execute executes the request -// -// @return ListAuditLogEntriesResponse -// -// Deprecated -func (a *DefaultAPIService) ListOrganizationAuditLogEntriesExecute(r ApiListOrganizationAuditLogEntriesRequest) (*ListAuditLogEntriesResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListAuditLogEntriesResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListOrganizationAuditLogEntries") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/organizations/{organizationId}" - localVarPath = strings.Replace(localVarPath, "{"+"organizationId"+"}", url.PathEscape(parameterValueToString(r.organizationId, "organizationId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.startTimeRange == nil { - return localVarReturnValue, reportError("startTimeRange is required and must be specified") - } - if r.endTimeRange == nil { - return localVarReturnValue, reportError("endTimeRange is required and must be specified") - } - - parameterAddToHeaderOrQuery(localVarQueryParams, "start-time-range", r.startTimeRange, "form", "") - parameterAddToHeaderOrQuery(localVarQueryParams, "end-time-range", r.endTimeRange, "form", "") - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") - } else { - var defaultValue float32 = 50 - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", defaultValue, "form", "") - r.limit = &defaultValue - } - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v GatewayErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} - -type ApiListProjectAuditLogEntriesRequest struct { - ctx context.Context - ApiService DefaultAPI - projectId string - startTimeRange *time.Time - endTimeRange *time.Time - limit *float32 - cursor *string -} - -// An ISO timestamp to specify the beginning of the time range from which entries should be returned, based on the eventTimeStamp. If not given, defaults to the beginning of time. -func (r ApiListProjectAuditLogEntriesRequest) StartTimeRange(startTimeRange time.Time) ApiListProjectAuditLogEntriesRequest { - r.startTimeRange = &startTimeRange - return r -} - -// An ISO timestamp to specify the end of the time range up until which entries should be returned, based on the eventTimeStamp. If not given, defaults to the time this request was received. -func (r ApiListProjectAuditLogEntriesRequest) EndTimeRange(endTimeRange time.Time) ApiListProjectAuditLogEntriesRequest { - r.endTimeRange = &endTimeRange - return r -} - -// The maximum number of entries to return. If the value exceeds the allowed maximum, the maximum value will be used instead. -func (r ApiListProjectAuditLogEntriesRequest) Limit(limit float32) ApiListProjectAuditLogEntriesRequest { - r.limit = &limit - return r -} - -// A pagination cursor to load further audit log entries for. May be included in the response of previous calls of the API. -func (r ApiListProjectAuditLogEntriesRequest) Cursor(cursor string) ApiListProjectAuditLogEntriesRequest { - r.cursor = &cursor - return r -} - -func (r ApiListProjectAuditLogEntriesRequest) Execute() (*ListAuditLogEntriesResponse, error) { - return r.ApiService.ListProjectAuditLogEntriesExecute(r) -} - -/* -ListProjectAuditLogEntries Project - Download audit log entries - -Returns all audit log entries of the project for the specified period. \ -Period must not be longer than 24 hours within the last 90 days. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId ID of the project for which entries should be returned. - @return ApiListProjectAuditLogEntriesRequest - -Deprecated -*/ -func (a *DefaultAPIService) ListProjectAuditLogEntries(ctx context.Context, projectId string) ApiListProjectAuditLogEntriesRequest { - return ApiListProjectAuditLogEntriesRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - } -} - -// Execute executes the request -// -// @return ListAuditLogEntriesResponse -// -// Deprecated -func (a *DefaultAPIService) ListProjectAuditLogEntriesExecute(r ApiListProjectAuditLogEntriesRequest) (*ListAuditLogEntriesResponse, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListAuditLogEntriesResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListProjectAuditLogEntries") - if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/v2/projects/{projectId}" - 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.startTimeRange == nil { - return localVarReturnValue, reportError("startTimeRange is required and must be specified") - } - if r.endTimeRange == nil { - return localVarReturnValue, reportError("endTimeRange is required and must be specified") - } - - parameterAddToHeaderOrQuery(localVarQueryParams, "start-time-range", r.startTimeRange, "form", "") - parameterAddToHeaderOrQuery(localVarQueryParams, "end-time-range", r.endTimeRange, "form", "") - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") - } else { - var defaultValue float32 = 50 - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", defaultValue, "form", "") - r.limit = &defaultValue - } - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, err - } - - contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) - if ok { - *contextHTTPRequest = req - } - - localVarHTTPResponse, err := a.client.callAPI(req) - contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) - if ok { - *contextHTTPResponse = localVarHTTPResponse - } - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &oapierror.GenericOpenAPIError{ - Body: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - StatusCode: localVarHTTPResponse.StatusCode, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - return localVarReturnValue, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v GatewayErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr - } - newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.Model = v - } - return localVarReturnValue, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, newErr - } - - return localVarReturnValue, nil -} diff --git a/services/auditlog/v2api/api_default_mock.go b/services/auditlog/v2api/api_default_mock.go deleted file mode 100644 index cd80d2468..000000000 --- a/services/auditlog/v2api/api_default_mock.go +++ /dev/null @@ -1,86 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2api - -import ( - "context" -) - -// assert the implementation matches the interface -var _ DefaultAPI = &DefaultAPIServiceMock{} - -// DefaultAPIServiceMock is meant to be used for testing only as a replacement for DefaultAPIService. -// By default all FooExecute() implementations are a no-op. Behavior of the mock can be customized by populating the callbacks in this struct. -type DefaultAPIServiceMock struct { - // Deprecated: ListFolderAuditLogEntriesExecuteMock can be populated to implement the behavior of the ListFolderAuditLogEntriesExecute function of this mock - ListFolderAuditLogEntriesExecuteMock *func(r ApiListFolderAuditLogEntriesRequest) (*ListAuditLogEntriesResponse, error) - // Deprecated: ListOrganizationAuditLogEntriesExecuteMock can be populated to implement the behavior of the ListOrganizationAuditLogEntriesExecute function of this mock - ListOrganizationAuditLogEntriesExecuteMock *func(r ApiListOrganizationAuditLogEntriesRequest) (*ListAuditLogEntriesResponse, error) - // Deprecated: ListProjectAuditLogEntriesExecuteMock can be populated to implement the behavior of the ListProjectAuditLogEntriesExecute function of this mock - ListProjectAuditLogEntriesExecuteMock *func(r ApiListProjectAuditLogEntriesRequest) (*ListAuditLogEntriesResponse, error) -} - -// Deprecated -func (a DefaultAPIServiceMock) ListFolderAuditLogEntries(ctx context.Context, folderId string) ApiListFolderAuditLogEntriesRequest { - return ApiListFolderAuditLogEntriesRequest{ - ApiService: a, - ctx: ctx, - folderId: folderId, - } -} - -// Deprecated: ListFolderAuditLogEntriesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListFolderAuditLogEntriesExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) ListFolderAuditLogEntriesExecute(r ApiListFolderAuditLogEntriesRequest) (*ListAuditLogEntriesResponse, error) { - if a.ListFolderAuditLogEntriesExecuteMock == nil { - var localVarReturnValue *ListAuditLogEntriesResponse - return localVarReturnValue, nil - } - - return (*a.ListFolderAuditLogEntriesExecuteMock)(r) -} - -// Deprecated -func (a DefaultAPIServiceMock) ListOrganizationAuditLogEntries(ctx context.Context, organizationId string) ApiListOrganizationAuditLogEntriesRequest { - return ApiListOrganizationAuditLogEntriesRequest{ - ApiService: a, - ctx: ctx, - organizationId: organizationId, - } -} - -// Deprecated: ListOrganizationAuditLogEntriesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListOrganizationAuditLogEntriesExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) ListOrganizationAuditLogEntriesExecute(r ApiListOrganizationAuditLogEntriesRequest) (*ListAuditLogEntriesResponse, error) { - if a.ListOrganizationAuditLogEntriesExecuteMock == nil { - var localVarReturnValue *ListAuditLogEntriesResponse - return localVarReturnValue, nil - } - - return (*a.ListOrganizationAuditLogEntriesExecuteMock)(r) -} - -// Deprecated -func (a DefaultAPIServiceMock) ListProjectAuditLogEntries(ctx context.Context, projectId string) ApiListProjectAuditLogEntriesRequest { - return ApiListProjectAuditLogEntriesRequest{ - ApiService: a, - ctx: ctx, - projectId: projectId, - } -} - -// Deprecated: ListProjectAuditLogEntriesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListProjectAuditLogEntriesExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) ListProjectAuditLogEntriesExecute(r ApiListProjectAuditLogEntriesRequest) (*ListAuditLogEntriesResponse, error) { - if a.ListProjectAuditLogEntriesExecuteMock == nil { - var localVarReturnValue *ListAuditLogEntriesResponse - return localVarReturnValue, nil - } - - return (*a.ListProjectAuditLogEntriesExecuteMock)(r) -} diff --git a/services/auditlog/v2api/client.go b/services/auditlog/v2api/client.go deleted file mode 100644 index b13f2128e..000000000 --- a/services/auditlog/v2api/client.go +++ /dev/null @@ -1,667 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package v2api - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "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)/(?:[^;]+\+)?json)`) - XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") -) - -// APIClient manages communication with the STACKIT Audit Log API API v2.0 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *config.Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - DefaultAPI DefaultAPI -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error) { - cfg := NewConfiguration() - - for _, option := range opts { - err := option(cfg) - if err != nil { - return nil, fmt.Errorf("configuring the client: %w", err) - } - } - - err := config.ConfigureRegion(cfg) - if err != nil { - return nil, fmt.Errorf("configuring region: %w", err) - } - - if cfg.HTTPClient == nil { - cfg.HTTPClient = &http.Client{} - } - - authRoundTripper, err := auth.SetupAuth(cfg) - if err != nil { - return nil, fmt.Errorf("setting up authentication: %w", err) - } - - roundTripper := authRoundTripper - if cfg.Middleware != nil { - roundTripper = config.ChainMiddleware(roundTripper, cfg.Middleware...) - } - - cfg.HTTPClient.Transport = roundTripper - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.DefaultAPI = (*DefaultAPIService)(&c.common) - - return c, nil -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // Check the type is as expected. - if reflect.TypeOf(obj).String() != expected { - return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) - } - return nil -} - -func parameterValueToString(obj interface{}, key string) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok { - return fmt.Sprintf("%v", actualObj.GetActualInstanceValue()) - } - - 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{}, style string, 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, style, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, 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) - var keyPrefixForCollectionType = keyPrefix - if style == "deepObject" { - keyPrefixForCollectionType = keyPrefix + "[" + strconv.Itoa(i) + "]" - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefixForCollectionType, arrayValue.Interface(), style, 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(), style, collectionType) - } - return - - case reflect.Interface: - fallthrough - case reflect.Ptr: - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), style, collectionType) - return - - case reflect.Int, reflect.Int8, reflect.Int16, - reflect.Int32, reflect.Int64: - value = strconv.FormatInt(v.Int(), 10) - case reflect.Uint, reflect.Uint8, reflect.Uint16, - reflect.Uint32, reflect.Uint64, reflect.Uintptr: - value = strconv.FormatUint(v.Uint(), 10) - case reflect.Float32, reflect.Float64: - value = strconv.FormatFloat(v.Float(), 'g', -1, 32) - case reflect.Bool: - value = strconv.FormatBool(v.Bool()) - case reflect.String: - value = v.String() - default: - value = v.Type().String() + " value" - } - } - - switch valuesMap := headerOrQueryParams.(type) { - case url.Values: - if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" { - valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value) - } else { - valuesMap.Add(keyPrefix, value) - } - break - case map[string]string: - valuesMap[keyPrefix] = value - break - } -} - -// helper for converting interface{} parameters to json strings -func parameterToJson(obj interface{}) (string, error) { - jsonBuf, err := json.Marshal(obj) - if err != nil { - return "", err - } - return string(jsonBuf), err -} - -// callAPI do the request. -func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { - if c.cfg.Debug { - dump, err := httputil.DumpRequestOut(request, true) - if err != nil { - return nil, err - } - log.Printf("\n%s\n", string(dump)) - } - - resp, err := c.cfg.HTTPClient.Do(request) - if err != nil { - return resp, err - } - - if c.cfg.Debug { - dump, err := httputil.DumpResponse(resp, true) - if err != nil { - return resp, err - } - log.Printf("\n%s\n", string(dump)) - } - return resp, err -} - -// Allow modification of underlying config for alternate implementations and testing -// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior -func (c *APIClient) GetConfig() *config.Configuration { - return c.cfg -} - -type formFile struct { - fileBytes []byte - fileName string - formFileName string -} - -// prepareRequest build the request -func (c *APIClient) prepareRequest( - ctx context.Context, - path string, method string, - postBody interface{}, - headerParams map[string]string, - queryParams url.Values, - formParams url.Values, - formFiles []formFile) (localVarRequest *http.Request, err error) { - - var body *bytes.Buffer - - // Detect postBody type and post. - if postBody != nil { - 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, errors.New("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, errors.New("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 r, ok := v.(*io.Reader); ok { - *r = bytes.NewReader(b) - return nil - } - // Must stay before the JSON branch: json.Unmarshal would base64-decode into *[]byte. - if p, ok := v.(*[]byte); ok { - *p = 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 errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("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 -} - -// 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) { - var bs []byte - bs, err = xml.Marshal(body) - if err == nil { - bodyBuf.Write(bs) - } - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// format error message using title and detail when model implements rfc7807 -func formatErrorMessage(status string, v interface{}) string { - str := "" - metaValue := reflect.ValueOf(v).Elem() - - if metaValue.Kind() == reflect.Struct { - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } - - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - } - - return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) -} diff --git a/services/auditlog/v2api/configuration.go b/services/auditlog/v2api/configuration.go deleted file mode 100644 index 26b6ee315..000000000 --- a/services/auditlog/v2api/configuration.go +++ /dev/null @@ -1,37 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package v2api - -import ( - "github.com/stackitcloud/stackit-sdk-go/core/config" -) - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *config.Configuration { - cfg := &config.Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "stackit-sdk-go/auditlog", - Debug: false, - Servers: config.ServerConfigurations{ - { - URL: "https://auditlog.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/auditlog/v2api/model_audit_log_entry_context_response.go b/services/auditlog/v2api/model_audit_log_entry_context_response.go deleted file mode 100644 index 376215d35..000000000 --- a/services/auditlog/v2api/model_audit_log_entry_context_response.go +++ /dev/null @@ -1,230 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2api - -import ( - "encoding/json" -) - -// checks if the AuditLogEntryContextResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AuditLogEntryContextResponse{} - -// AuditLogEntryContextResponse Request context -type AuditLogEntryContextResponse struct { - // Folder id - FolderId *string `json:"folderId,omitempty"` - // Organization id - OrganizationId *string `json:"organizationId,omitempty"` - // Project id - ProjectId *string `json:"projectId,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _AuditLogEntryContextResponse AuditLogEntryContextResponse - -// NewAuditLogEntryContextResponse instantiates a new AuditLogEntryContextResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAuditLogEntryContextResponse() *AuditLogEntryContextResponse { - this := AuditLogEntryContextResponse{} - return &this -} - -// NewAuditLogEntryContextResponseWithDefaults instantiates a new AuditLogEntryContextResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAuditLogEntryContextResponseWithDefaults() *AuditLogEntryContextResponse { - this := AuditLogEntryContextResponse{} - return &this -} - -// GetFolderId returns the FolderId field value if set, zero value otherwise. -func (o *AuditLogEntryContextResponse) GetFolderId() string { - if o == nil || IsNil(o.FolderId) { - var ret string - return ret - } - return *o.FolderId -} - -// GetFolderIdOk returns a tuple with the FolderId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuditLogEntryContextResponse) GetFolderIdOk() (*string, bool) { - if o == nil || IsNil(o.FolderId) { - return nil, false - } - return o.FolderId, true -} - -// HasFolderId returns a boolean if a field has been set. -func (o *AuditLogEntryContextResponse) HasFolderId() bool { - if o != nil && !IsNil(o.FolderId) { - return true - } - - return false -} - -// SetFolderId gets a reference to the given string and assigns it to the FolderId field. -func (o *AuditLogEntryContextResponse) SetFolderId(v string) { - o.FolderId = &v -} - -// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise. -func (o *AuditLogEntryContextResponse) GetOrganizationId() string { - if o == nil || IsNil(o.OrganizationId) { - var ret string - return ret - } - return *o.OrganizationId -} - -// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuditLogEntryContextResponse) GetOrganizationIdOk() (*string, bool) { - if o == nil || IsNil(o.OrganizationId) { - return nil, false - } - return o.OrganizationId, true -} - -// HasOrganizationId returns a boolean if a field has been set. -func (o *AuditLogEntryContextResponse) HasOrganizationId() bool { - if o != nil && !IsNil(o.OrganizationId) { - return true - } - - return false -} - -// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field. -func (o *AuditLogEntryContextResponse) SetOrganizationId(v string) { - o.OrganizationId = &v -} - -// GetProjectId returns the ProjectId field value if set, zero value otherwise. -func (o *AuditLogEntryContextResponse) GetProjectId() string { - if o == nil || IsNil(o.ProjectId) { - var ret string - return ret - } - return *o.ProjectId -} - -// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuditLogEntryContextResponse) GetProjectIdOk() (*string, bool) { - if o == nil || IsNil(o.ProjectId) { - return nil, false - } - return o.ProjectId, true -} - -// HasProjectId returns a boolean if a field has been set. -func (o *AuditLogEntryContextResponse) HasProjectId() bool { - if o != nil && !IsNil(o.ProjectId) { - return true - } - - return false -} - -// SetProjectId gets a reference to the given string and assigns it to the ProjectId field. -func (o *AuditLogEntryContextResponse) SetProjectId(v string) { - o.ProjectId = &v -} - -func (o AuditLogEntryContextResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AuditLogEntryContextResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.FolderId) { - toSerialize["folderId"] = o.FolderId - } - if !IsNil(o.OrganizationId) { - toSerialize["organizationId"] = o.OrganizationId - } - if !IsNil(o.ProjectId) { - toSerialize["projectId"] = o.ProjectId - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *AuditLogEntryContextResponse) UnmarshalJSON(data []byte) (err error) { - varAuditLogEntryContextResponse := _AuditLogEntryContextResponse{} - - err = json.Unmarshal(data, &varAuditLogEntryContextResponse) - - if err != nil { - return err - } - - *o = AuditLogEntryContextResponse(varAuditLogEntryContextResponse) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "folderId") - delete(additionalProperties, "organizationId") - delete(additionalProperties, "projectId") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableAuditLogEntryContextResponse struct { - value *AuditLogEntryContextResponse - isSet bool -} - -func (v NullableAuditLogEntryContextResponse) Get() *AuditLogEntryContextResponse { - return v.value -} - -func (v *NullableAuditLogEntryContextResponse) Set(val *AuditLogEntryContextResponse) { - v.value = val - v.isSet = true -} - -func (v NullableAuditLogEntryContextResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableAuditLogEntryContextResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuditLogEntryContextResponse(val *AuditLogEntryContextResponse) *NullableAuditLogEntryContextResponse { - return &NullableAuditLogEntryContextResponse{value: val, isSet: true} -} - -func (v NullableAuditLogEntryContextResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuditLogEntryContextResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/auditlog/v2api/model_audit_log_entry_initiator_response.go b/services/auditlog/v2api/model_audit_log_entry_initiator_response.go deleted file mode 100644 index a8cc5ee3b..000000000 --- a/services/auditlog/v2api/model_audit_log_entry_initiator_response.go +++ /dev/null @@ -1,205 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2api - -import ( - "encoding/json" - "fmt" -) - -// checks if the AuditLogEntryInitiatorResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AuditLogEntryInitiatorResponse{} - -// AuditLogEntryInitiatorResponse Information about who made the request. -type AuditLogEntryInitiatorResponse struct { - // E-Mail of the user or service account who triggered the request - Email *string `json:"email,omitempty"` - // Unique identifier of the user - Id string `json:"id"` - AdditionalProperties map[string]interface{} -} - -type _AuditLogEntryInitiatorResponse AuditLogEntryInitiatorResponse - -// NewAuditLogEntryInitiatorResponse instantiates a new AuditLogEntryInitiatorResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAuditLogEntryInitiatorResponse(id string) *AuditLogEntryInitiatorResponse { - this := AuditLogEntryInitiatorResponse{} - this.Id = id - return &this -} - -// NewAuditLogEntryInitiatorResponseWithDefaults instantiates a new AuditLogEntryInitiatorResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAuditLogEntryInitiatorResponseWithDefaults() *AuditLogEntryInitiatorResponse { - this := AuditLogEntryInitiatorResponse{} - return &this -} - -// GetEmail returns the Email field value if set, zero value otherwise. -func (o *AuditLogEntryInitiatorResponse) GetEmail() string { - if o == nil || IsNil(o.Email) { - var ret string - return ret - } - return *o.Email -} - -// GetEmailOk returns a tuple with the Email field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuditLogEntryInitiatorResponse) GetEmailOk() (*string, bool) { - if o == nil || IsNil(o.Email) { - return nil, false - } - return o.Email, true -} - -// HasEmail returns a boolean if a field has been set. -func (o *AuditLogEntryInitiatorResponse) HasEmail() bool { - if o != nil && !IsNil(o.Email) { - return true - } - - return false -} - -// SetEmail gets a reference to the given string and assigns it to the Email field. -func (o *AuditLogEntryInitiatorResponse) SetEmail(v string) { - o.Email = &v -} - -// GetId returns the Id field value -func (o *AuditLogEntryInitiatorResponse) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *AuditLogEntryInitiatorResponse) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *AuditLogEntryInitiatorResponse) SetId(v string) { - o.Id = v -} - -func (o AuditLogEntryInitiatorResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AuditLogEntryInitiatorResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Email) { - toSerialize["email"] = o.Email - } - toSerialize["id"] = o.Id - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *AuditLogEntryInitiatorResponse) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "id", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err - } - - for _, requiredProperty := range requiredProperties { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varAuditLogEntryInitiatorResponse := _AuditLogEntryInitiatorResponse{} - - err = json.Unmarshal(data, &varAuditLogEntryInitiatorResponse) - - if err != nil { - return err - } - - *o = AuditLogEntryInitiatorResponse(varAuditLogEntryInitiatorResponse) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "email") - delete(additionalProperties, "id") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableAuditLogEntryInitiatorResponse struct { - value *AuditLogEntryInitiatorResponse - isSet bool -} - -func (v NullableAuditLogEntryInitiatorResponse) Get() *AuditLogEntryInitiatorResponse { - return v.value -} - -func (v *NullableAuditLogEntryInitiatorResponse) Set(val *AuditLogEntryInitiatorResponse) { - v.value = val - v.isSet = true -} - -func (v NullableAuditLogEntryInitiatorResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableAuditLogEntryInitiatorResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuditLogEntryInitiatorResponse(val *AuditLogEntryInitiatorResponse) *NullableAuditLogEntryInitiatorResponse { - return &NullableAuditLogEntryInitiatorResponse{value: val, isSet: true} -} - -func (v NullableAuditLogEntryInitiatorResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuditLogEntryInitiatorResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/auditlog/v2api/model_audit_log_entry_request_response.go b/services/auditlog/v2api/model_audit_log_entry_request_response.go deleted file mode 100644 index 29e0a31d1..000000000 --- a/services/auditlog/v2api/model_audit_log_entry_request_response.go +++ /dev/null @@ -1,281 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2api - -import ( - "encoding/json" - "fmt" -) - -// checks if the AuditLogEntryRequestResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AuditLogEntryRequestResponse{} - -// AuditLogEntryRequestResponse Request, which mirrors the action of the user and the resulting changes within the system -type AuditLogEntryRequestResponse struct { - // Body used to make the request. - Body map[string]interface{} `json:"body,omitempty"` - // Endpoint which received the request. - Endpoint string `json:"endpoint"` - // Headers used to make the request. May only contain (string -> string) key-value pairs. - Headers map[string]interface{} `json:"headers,omitempty"` - // Parameters used to make the request. - Parameters map[string]interface{} `json:"parameters,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _AuditLogEntryRequestResponse AuditLogEntryRequestResponse - -// NewAuditLogEntryRequestResponse instantiates a new AuditLogEntryRequestResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAuditLogEntryRequestResponse(endpoint string) *AuditLogEntryRequestResponse { - this := AuditLogEntryRequestResponse{} - this.Endpoint = endpoint - return &this -} - -// NewAuditLogEntryRequestResponseWithDefaults instantiates a new AuditLogEntryRequestResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAuditLogEntryRequestResponseWithDefaults() *AuditLogEntryRequestResponse { - this := AuditLogEntryRequestResponse{} - return &this -} - -// GetBody returns the Body field value if set, zero value otherwise. -func (o *AuditLogEntryRequestResponse) GetBody() map[string]interface{} { - if o == nil || IsNil(o.Body) { - var ret map[string]interface{} - return ret - } - return o.Body -} - -// GetBodyOk returns a tuple with the Body field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuditLogEntryRequestResponse) GetBodyOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Body) { - return map[string]interface{}{}, false - } - return o.Body, true -} - -// HasBody returns a boolean if a field has been set. -func (o *AuditLogEntryRequestResponse) HasBody() bool { - if o != nil && !IsNil(o.Body) { - return true - } - - return false -} - -// SetBody gets a reference to the given map[string]interface{} and assigns it to the Body field. -func (o *AuditLogEntryRequestResponse) SetBody(v map[string]interface{}) { - o.Body = v -} - -// GetEndpoint returns the Endpoint field value -func (o *AuditLogEntryRequestResponse) GetEndpoint() string { - if o == nil { - var ret string - return ret - } - - return o.Endpoint -} - -// GetEndpointOk returns a tuple with the Endpoint field value -// and a boolean to check if the value has been set. -func (o *AuditLogEntryRequestResponse) GetEndpointOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Endpoint, true -} - -// SetEndpoint sets field value -func (o *AuditLogEntryRequestResponse) SetEndpoint(v string) { - o.Endpoint = v -} - -// GetHeaders returns the Headers field value if set, zero value otherwise. -func (o *AuditLogEntryRequestResponse) GetHeaders() map[string]interface{} { - if o == nil || IsNil(o.Headers) { - var ret map[string]interface{} - return ret - } - return o.Headers -} - -// GetHeadersOk returns a tuple with the Headers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuditLogEntryRequestResponse) GetHeadersOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Headers) { - return map[string]interface{}{}, false - } - return o.Headers, true -} - -// HasHeaders returns a boolean if a field has been set. -func (o *AuditLogEntryRequestResponse) HasHeaders() bool { - if o != nil && !IsNil(o.Headers) { - return true - } - - return false -} - -// SetHeaders gets a reference to the given map[string]interface{} and assigns it to the Headers field. -func (o *AuditLogEntryRequestResponse) SetHeaders(v map[string]interface{}) { - o.Headers = v -} - -// GetParameters returns the Parameters field value if set, zero value otherwise. -func (o *AuditLogEntryRequestResponse) GetParameters() map[string]interface{} { - if o == nil || IsNil(o.Parameters) { - var ret map[string]interface{} - return ret - } - return o.Parameters -} - -// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuditLogEntryRequestResponse) GetParametersOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Parameters) { - return map[string]interface{}{}, false - } - return o.Parameters, true -} - -// HasParameters returns a boolean if a field has been set. -func (o *AuditLogEntryRequestResponse) HasParameters() bool { - if o != nil && !IsNil(o.Parameters) { - return true - } - - return false -} - -// SetParameters gets a reference to the given map[string]interface{} and assigns it to the Parameters field. -func (o *AuditLogEntryRequestResponse) SetParameters(v map[string]interface{}) { - o.Parameters = v -} - -func (o AuditLogEntryRequestResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AuditLogEntryRequestResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Body) { - toSerialize["body"] = o.Body - } - toSerialize["endpoint"] = o.Endpoint - if !IsNil(o.Headers) { - toSerialize["headers"] = o.Headers - } - if !IsNil(o.Parameters) { - toSerialize["parameters"] = o.Parameters - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *AuditLogEntryRequestResponse) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "endpoint", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err - } - - for _, requiredProperty := range requiredProperties { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varAuditLogEntryRequestResponse := _AuditLogEntryRequestResponse{} - - err = json.Unmarshal(data, &varAuditLogEntryRequestResponse) - - if err != nil { - return err - } - - *o = AuditLogEntryRequestResponse(varAuditLogEntryRequestResponse) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "body") - delete(additionalProperties, "endpoint") - delete(additionalProperties, "headers") - delete(additionalProperties, "parameters") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableAuditLogEntryRequestResponse struct { - value *AuditLogEntryRequestResponse - isSet bool -} - -func (v NullableAuditLogEntryRequestResponse) Get() *AuditLogEntryRequestResponse { - return v.value -} - -func (v *NullableAuditLogEntryRequestResponse) Set(val *AuditLogEntryRequestResponse) { - v.value = val - v.isSet = true -} - -func (v NullableAuditLogEntryRequestResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableAuditLogEntryRequestResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuditLogEntryRequestResponse(val *AuditLogEntryRequestResponse) *NullableAuditLogEntryRequestResponse { - return &NullableAuditLogEntryRequestResponse{value: val, isSet: true} -} - -func (v NullableAuditLogEntryRequestResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuditLogEntryRequestResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/auditlog/v2api/model_audit_log_entry_response.go b/services/auditlog/v2api/model_audit_log_entry_response.go deleted file mode 100644 index 64d04cd6f..000000000 --- a/services/auditlog/v2api/model_audit_log_entry_response.go +++ /dev/null @@ -1,817 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2api - -import ( - "encoding/json" - "fmt" - "time" -) - -// checks if the AuditLogEntryResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AuditLogEntryResponse{} - -// AuditLogEntryResponse struct for AuditLogEntryResponse -type AuditLogEntryResponse struct { - Context *AuditLogEntryContextResponse `json:"context,omitempty"` - // Unique ID which identifies the request from the sender point of view. - CorrelationId *string `json:"correlationId,omitempty"` - // Additional information about the event that is not part of the request or response. May contain arbitrary data. - Details map[string]interface{} `json:"details,omitempty"` - // Name of the operation this event represents. - EventName string `json:"eventName"` - // The service in which the causing event was handled. - EventSource string `json:"eventSource"` - // Timestamp at which the event was triggered. - EventTimeStamp time.Time `json:"eventTimeStamp"` - EventType AuditLogEntryResponseEventType `json:"eventType"` - // Version of the log event format. - EventVersion string `json:"eventVersion"` - // Unique ID generated by the audit log. - Id string `json:"id"` - Initiator AuditLogEntryInitiatorResponse `json:"initiator"` - // Timestamp at which the event was received by the audit log. - ReceivedTimeStamp time.Time `json:"receivedTimeStamp"` - // Region from which the event has been emitted. - Region string `json:"region"` - Request AuditLogEntryRequestResponse `json:"request"` - // Unique id of the resource that is target of the operation - ResourceId *string `json:"resourceId,omitempty"` - // Name of the resource that is target of the operation - ResourceName *string `json:"resourceName,omitempty"` - // Object representing the change resulting from this event. May be omitted if no change has been applied. May contain arbitrary data. - Result map[string]interface{} `json:"result,omitempty"` - ServiceAccountDelegationInfo *AuditLogEntryServiceAccountDelegationInfoResponse `json:"serviceAccountDelegationInfo,omitempty"` - Severity AuditLogEntryResponseSeverity `json:"severity"` - // IP address that the request was made from - SourceIpAddress string `json:"sourceIpAddress"` - // Agent through which the request was made from (e.g. Portal, CLI, SDK, ...) - UserAgent string `json:"userAgent"` - Visibility AuditLogEntryResponseVisibility `json:"visibility"` - AdditionalProperties map[string]interface{} -} - -type _AuditLogEntryResponse AuditLogEntryResponse - -// NewAuditLogEntryResponse instantiates a new AuditLogEntryResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAuditLogEntryResponse(eventName string, eventSource string, eventTimeStamp time.Time, eventType AuditLogEntryResponseEventType, eventVersion string, id string, initiator AuditLogEntryInitiatorResponse, receivedTimeStamp time.Time, region string, request AuditLogEntryRequestResponse, severity AuditLogEntryResponseSeverity, sourceIpAddress string, userAgent string, visibility AuditLogEntryResponseVisibility) *AuditLogEntryResponse { - this := AuditLogEntryResponse{} - this.EventName = eventName - this.EventSource = eventSource - this.EventTimeStamp = eventTimeStamp - this.EventType = eventType - this.EventVersion = eventVersion - this.Id = id - this.Initiator = initiator - this.ReceivedTimeStamp = receivedTimeStamp - this.Region = region - this.Request = request - this.Severity = severity - this.SourceIpAddress = sourceIpAddress - this.UserAgent = userAgent - this.Visibility = visibility - return &this -} - -// NewAuditLogEntryResponseWithDefaults instantiates a new AuditLogEntryResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAuditLogEntryResponseWithDefaults() *AuditLogEntryResponse { - this := AuditLogEntryResponse{} - return &this -} - -// GetContext returns the Context field value if set, zero value otherwise. -func (o *AuditLogEntryResponse) GetContext() AuditLogEntryContextResponse { - if o == nil || IsNil(o.Context) { - var ret AuditLogEntryContextResponse - return ret - } - return *o.Context -} - -// GetContextOk returns a tuple with the Context field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuditLogEntryResponse) GetContextOk() (*AuditLogEntryContextResponse, bool) { - if o == nil || IsNil(o.Context) { - return nil, false - } - return o.Context, true -} - -// HasContext returns a boolean if a field has been set. -func (o *AuditLogEntryResponse) HasContext() bool { - if o != nil && !IsNil(o.Context) { - return true - } - - return false -} - -// SetContext gets a reference to the given AuditLogEntryContextResponse and assigns it to the Context field. -func (o *AuditLogEntryResponse) SetContext(v AuditLogEntryContextResponse) { - o.Context = &v -} - -// GetCorrelationId returns the CorrelationId field value if set, zero value otherwise. -func (o *AuditLogEntryResponse) GetCorrelationId() string { - if o == nil || IsNil(o.CorrelationId) { - var ret string - return ret - } - return *o.CorrelationId -} - -// GetCorrelationIdOk returns a tuple with the CorrelationId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuditLogEntryResponse) GetCorrelationIdOk() (*string, bool) { - if o == nil || IsNil(o.CorrelationId) { - return nil, false - } - return o.CorrelationId, true -} - -// HasCorrelationId returns a boolean if a field has been set. -func (o *AuditLogEntryResponse) HasCorrelationId() bool { - if o != nil && !IsNil(o.CorrelationId) { - return true - } - - return false -} - -// SetCorrelationId gets a reference to the given string and assigns it to the CorrelationId field. -func (o *AuditLogEntryResponse) SetCorrelationId(v string) { - o.CorrelationId = &v -} - -// GetDetails returns the Details field value if set, zero value otherwise. -func (o *AuditLogEntryResponse) GetDetails() map[string]interface{} { - if o == nil || IsNil(o.Details) { - var ret map[string]interface{} - return ret - } - return o.Details -} - -// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuditLogEntryResponse) GetDetailsOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Details) { - return map[string]interface{}{}, false - } - return o.Details, true -} - -// HasDetails returns a boolean if a field has been set. -func (o *AuditLogEntryResponse) HasDetails() bool { - if o != nil && !IsNil(o.Details) { - return true - } - - return false -} - -// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field. -func (o *AuditLogEntryResponse) SetDetails(v map[string]interface{}) { - o.Details = v -} - -// GetEventName returns the EventName field value -func (o *AuditLogEntryResponse) GetEventName() string { - if o == nil { - var ret string - return ret - } - - return o.EventName -} - -// GetEventNameOk returns a tuple with the EventName field value -// and a boolean to check if the value has been set. -func (o *AuditLogEntryResponse) GetEventNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.EventName, true -} - -// SetEventName sets field value -func (o *AuditLogEntryResponse) SetEventName(v string) { - o.EventName = v -} - -// GetEventSource returns the EventSource field value -func (o *AuditLogEntryResponse) GetEventSource() string { - if o == nil { - var ret string - return ret - } - - return o.EventSource -} - -// GetEventSourceOk returns a tuple with the EventSource field value -// and a boolean to check if the value has been set. -func (o *AuditLogEntryResponse) GetEventSourceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.EventSource, true -} - -// SetEventSource sets field value -func (o *AuditLogEntryResponse) SetEventSource(v string) { - o.EventSource = v -} - -// GetEventTimeStamp returns the EventTimeStamp field value -func (o *AuditLogEntryResponse) GetEventTimeStamp() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.EventTimeStamp -} - -// GetEventTimeStampOk returns a tuple with the EventTimeStamp field value -// and a boolean to check if the value has been set. -func (o *AuditLogEntryResponse) GetEventTimeStampOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.EventTimeStamp, true -} - -// SetEventTimeStamp sets field value -func (o *AuditLogEntryResponse) SetEventTimeStamp(v time.Time) { - o.EventTimeStamp = v -} - -// GetEventType returns the EventType field value -func (o *AuditLogEntryResponse) GetEventType() AuditLogEntryResponseEventType { - if o == nil { - var ret AuditLogEntryResponseEventType - return ret - } - - return o.EventType -} - -// GetEventTypeOk returns a tuple with the EventType field value -// and a boolean to check if the value has been set. -func (o *AuditLogEntryResponse) GetEventTypeOk() (*AuditLogEntryResponseEventType, bool) { - if o == nil { - return nil, false - } - return &o.EventType, true -} - -// SetEventType sets field value -func (o *AuditLogEntryResponse) SetEventType(v AuditLogEntryResponseEventType) { - o.EventType = v -} - -// GetEventVersion returns the EventVersion field value -func (o *AuditLogEntryResponse) GetEventVersion() string { - if o == nil { - var ret string - return ret - } - - return o.EventVersion -} - -// GetEventVersionOk returns a tuple with the EventVersion field value -// and a boolean to check if the value has been set. -func (o *AuditLogEntryResponse) GetEventVersionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.EventVersion, true -} - -// SetEventVersion sets field value -func (o *AuditLogEntryResponse) SetEventVersion(v string) { - o.EventVersion = v -} - -// GetId returns the Id field value -func (o *AuditLogEntryResponse) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *AuditLogEntryResponse) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *AuditLogEntryResponse) SetId(v string) { - o.Id = v -} - -// GetInitiator returns the Initiator field value -func (o *AuditLogEntryResponse) GetInitiator() AuditLogEntryInitiatorResponse { - if o == nil { - var ret AuditLogEntryInitiatorResponse - return ret - } - - return o.Initiator -} - -// GetInitiatorOk returns a tuple with the Initiator field value -// and a boolean to check if the value has been set. -func (o *AuditLogEntryResponse) GetInitiatorOk() (*AuditLogEntryInitiatorResponse, bool) { - if o == nil { - return nil, false - } - return &o.Initiator, true -} - -// SetInitiator sets field value -func (o *AuditLogEntryResponse) SetInitiator(v AuditLogEntryInitiatorResponse) { - o.Initiator = v -} - -// GetReceivedTimeStamp returns the ReceivedTimeStamp field value -func (o *AuditLogEntryResponse) GetReceivedTimeStamp() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.ReceivedTimeStamp -} - -// GetReceivedTimeStampOk returns a tuple with the ReceivedTimeStamp field value -// and a boolean to check if the value has been set. -func (o *AuditLogEntryResponse) GetReceivedTimeStampOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.ReceivedTimeStamp, true -} - -// SetReceivedTimeStamp sets field value -func (o *AuditLogEntryResponse) SetReceivedTimeStamp(v time.Time) { - o.ReceivedTimeStamp = v -} - -// GetRegion returns the Region field value -func (o *AuditLogEntryResponse) GetRegion() string { - if o == nil { - var ret string - return ret - } - - return o.Region -} - -// GetRegionOk returns a tuple with the Region field value -// and a boolean to check if the value has been set. -func (o *AuditLogEntryResponse) GetRegionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Region, true -} - -// SetRegion sets field value -func (o *AuditLogEntryResponse) SetRegion(v string) { - o.Region = v -} - -// GetRequest returns the Request field value -func (o *AuditLogEntryResponse) GetRequest() AuditLogEntryRequestResponse { - if o == nil { - var ret AuditLogEntryRequestResponse - return ret - } - - return o.Request -} - -// GetRequestOk returns a tuple with the Request field value -// and a boolean to check if the value has been set. -func (o *AuditLogEntryResponse) GetRequestOk() (*AuditLogEntryRequestResponse, bool) { - if o == nil { - return nil, false - } - return &o.Request, true -} - -// SetRequest sets field value -func (o *AuditLogEntryResponse) SetRequest(v AuditLogEntryRequestResponse) { - o.Request = v -} - -// GetResourceId returns the ResourceId field value if set, zero value otherwise. -func (o *AuditLogEntryResponse) GetResourceId() string { - if o == nil || IsNil(o.ResourceId) { - var ret string - return ret - } - return *o.ResourceId -} - -// GetResourceIdOk returns a tuple with the ResourceId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuditLogEntryResponse) GetResourceIdOk() (*string, bool) { - if o == nil || IsNil(o.ResourceId) { - return nil, false - } - return o.ResourceId, true -} - -// HasResourceId returns a boolean if a field has been set. -func (o *AuditLogEntryResponse) HasResourceId() bool { - if o != nil && !IsNil(o.ResourceId) { - return true - } - - return false -} - -// SetResourceId gets a reference to the given string and assigns it to the ResourceId field. -func (o *AuditLogEntryResponse) SetResourceId(v string) { - o.ResourceId = &v -} - -// GetResourceName returns the ResourceName field value if set, zero value otherwise. -func (o *AuditLogEntryResponse) GetResourceName() string { - if o == nil || IsNil(o.ResourceName) { - var ret string - return ret - } - return *o.ResourceName -} - -// GetResourceNameOk returns a tuple with the ResourceName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuditLogEntryResponse) GetResourceNameOk() (*string, bool) { - if o == nil || IsNil(o.ResourceName) { - return nil, false - } - return o.ResourceName, true -} - -// HasResourceName returns a boolean if a field has been set. -func (o *AuditLogEntryResponse) HasResourceName() bool { - if o != nil && !IsNil(o.ResourceName) { - return true - } - - return false -} - -// SetResourceName gets a reference to the given string and assigns it to the ResourceName field. -func (o *AuditLogEntryResponse) SetResourceName(v string) { - o.ResourceName = &v -} - -// GetResult returns the Result field value if set, zero value otherwise. -func (o *AuditLogEntryResponse) GetResult() map[string]interface{} { - if o == nil || IsNil(o.Result) { - var ret map[string]interface{} - return ret - } - return o.Result -} - -// GetResultOk returns a tuple with the Result field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuditLogEntryResponse) GetResultOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Result) { - return map[string]interface{}{}, false - } - return o.Result, true -} - -// HasResult returns a boolean if a field has been set. -func (o *AuditLogEntryResponse) HasResult() bool { - if o != nil && !IsNil(o.Result) { - return true - } - - return false -} - -// SetResult gets a reference to the given map[string]interface{} and assigns it to the Result field. -func (o *AuditLogEntryResponse) SetResult(v map[string]interface{}) { - o.Result = v -} - -// GetServiceAccountDelegationInfo returns the ServiceAccountDelegationInfo field value if set, zero value otherwise. -func (o *AuditLogEntryResponse) GetServiceAccountDelegationInfo() AuditLogEntryServiceAccountDelegationInfoResponse { - if o == nil || IsNil(o.ServiceAccountDelegationInfo) { - var ret AuditLogEntryServiceAccountDelegationInfoResponse - return ret - } - return *o.ServiceAccountDelegationInfo -} - -// GetServiceAccountDelegationInfoOk returns a tuple with the ServiceAccountDelegationInfo field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuditLogEntryResponse) GetServiceAccountDelegationInfoOk() (*AuditLogEntryServiceAccountDelegationInfoResponse, bool) { - if o == nil || IsNil(o.ServiceAccountDelegationInfo) { - return nil, false - } - return o.ServiceAccountDelegationInfo, true -} - -// HasServiceAccountDelegationInfo returns a boolean if a field has been set. -func (o *AuditLogEntryResponse) HasServiceAccountDelegationInfo() bool { - if o != nil && !IsNil(o.ServiceAccountDelegationInfo) { - return true - } - - return false -} - -// SetServiceAccountDelegationInfo gets a reference to the given AuditLogEntryServiceAccountDelegationInfoResponse and assigns it to the ServiceAccountDelegationInfo field. -func (o *AuditLogEntryResponse) SetServiceAccountDelegationInfo(v AuditLogEntryServiceAccountDelegationInfoResponse) { - o.ServiceAccountDelegationInfo = &v -} - -// GetSeverity returns the Severity field value -func (o *AuditLogEntryResponse) GetSeverity() AuditLogEntryResponseSeverity { - if o == nil { - var ret AuditLogEntryResponseSeverity - return ret - } - - return o.Severity -} - -// GetSeverityOk returns a tuple with the Severity field value -// and a boolean to check if the value has been set. -func (o *AuditLogEntryResponse) GetSeverityOk() (*AuditLogEntryResponseSeverity, bool) { - if o == nil { - return nil, false - } - return &o.Severity, true -} - -// SetSeverity sets field value -func (o *AuditLogEntryResponse) SetSeverity(v AuditLogEntryResponseSeverity) { - o.Severity = v -} - -// GetSourceIpAddress returns the SourceIpAddress field value -func (o *AuditLogEntryResponse) GetSourceIpAddress() string { - if o == nil { - var ret string - return ret - } - - return o.SourceIpAddress -} - -// GetSourceIpAddressOk returns a tuple with the SourceIpAddress field value -// and a boolean to check if the value has been set. -func (o *AuditLogEntryResponse) GetSourceIpAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SourceIpAddress, true -} - -// SetSourceIpAddress sets field value -func (o *AuditLogEntryResponse) SetSourceIpAddress(v string) { - o.SourceIpAddress = v -} - -// GetUserAgent returns the UserAgent field value -func (o *AuditLogEntryResponse) GetUserAgent() string { - if o == nil { - var ret string - return ret - } - - return o.UserAgent -} - -// GetUserAgentOk returns a tuple with the UserAgent field value -// and a boolean to check if the value has been set. -func (o *AuditLogEntryResponse) GetUserAgentOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.UserAgent, true -} - -// SetUserAgent sets field value -func (o *AuditLogEntryResponse) SetUserAgent(v string) { - o.UserAgent = v -} - -// GetVisibility returns the Visibility field value -func (o *AuditLogEntryResponse) GetVisibility() AuditLogEntryResponseVisibility { - if o == nil { - var ret AuditLogEntryResponseVisibility - return ret - } - - return o.Visibility -} - -// GetVisibilityOk returns a tuple with the Visibility field value -// and a boolean to check if the value has been set. -func (o *AuditLogEntryResponse) GetVisibilityOk() (*AuditLogEntryResponseVisibility, bool) { - if o == nil { - return nil, false - } - return &o.Visibility, true -} - -// SetVisibility sets field value -func (o *AuditLogEntryResponse) SetVisibility(v AuditLogEntryResponseVisibility) { - o.Visibility = v -} - -func (o AuditLogEntryResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AuditLogEntryResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Context) { - toSerialize["context"] = o.Context - } - if !IsNil(o.CorrelationId) { - toSerialize["correlationId"] = o.CorrelationId - } - if !IsNil(o.Details) { - toSerialize["details"] = o.Details - } - toSerialize["eventName"] = o.EventName - toSerialize["eventSource"] = o.EventSource - toSerialize["eventTimeStamp"] = o.EventTimeStamp - toSerialize["eventType"] = o.EventType - toSerialize["eventVersion"] = o.EventVersion - toSerialize["id"] = o.Id - toSerialize["initiator"] = o.Initiator - toSerialize["receivedTimeStamp"] = o.ReceivedTimeStamp - toSerialize["region"] = o.Region - toSerialize["request"] = o.Request - if !IsNil(o.ResourceId) { - toSerialize["resourceId"] = o.ResourceId - } - if !IsNil(o.ResourceName) { - toSerialize["resourceName"] = o.ResourceName - } - if !IsNil(o.Result) { - toSerialize["result"] = o.Result - } - if !IsNil(o.ServiceAccountDelegationInfo) { - toSerialize["serviceAccountDelegationInfo"] = o.ServiceAccountDelegationInfo - } - toSerialize["severity"] = o.Severity - toSerialize["sourceIpAddress"] = o.SourceIpAddress - toSerialize["userAgent"] = o.UserAgent - toSerialize["visibility"] = o.Visibility - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *AuditLogEntryResponse) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "eventName", - "eventSource", - "eventTimeStamp", - "eventType", - "eventVersion", - "id", - "initiator", - "receivedTimeStamp", - "region", - "request", - "severity", - "sourceIpAddress", - "userAgent", - "visibility", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err - } - - for _, requiredProperty := range requiredProperties { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varAuditLogEntryResponse := _AuditLogEntryResponse{} - - err = json.Unmarshal(data, &varAuditLogEntryResponse) - - if err != nil { - return err - } - - *o = AuditLogEntryResponse(varAuditLogEntryResponse) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "context") - delete(additionalProperties, "correlationId") - delete(additionalProperties, "details") - delete(additionalProperties, "eventName") - delete(additionalProperties, "eventSource") - delete(additionalProperties, "eventTimeStamp") - delete(additionalProperties, "eventType") - delete(additionalProperties, "eventVersion") - delete(additionalProperties, "id") - delete(additionalProperties, "initiator") - delete(additionalProperties, "receivedTimeStamp") - delete(additionalProperties, "region") - delete(additionalProperties, "request") - delete(additionalProperties, "resourceId") - delete(additionalProperties, "resourceName") - delete(additionalProperties, "result") - delete(additionalProperties, "serviceAccountDelegationInfo") - delete(additionalProperties, "severity") - delete(additionalProperties, "sourceIpAddress") - delete(additionalProperties, "userAgent") - delete(additionalProperties, "visibility") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableAuditLogEntryResponse struct { - value *AuditLogEntryResponse - isSet bool -} - -func (v NullableAuditLogEntryResponse) Get() *AuditLogEntryResponse { - return v.value -} - -func (v *NullableAuditLogEntryResponse) Set(val *AuditLogEntryResponse) { - v.value = val - v.isSet = true -} - -func (v NullableAuditLogEntryResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableAuditLogEntryResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuditLogEntryResponse(val *AuditLogEntryResponse) *NullableAuditLogEntryResponse { - return &NullableAuditLogEntryResponse{value: val, isSet: true} -} - -func (v NullableAuditLogEntryResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuditLogEntryResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/auditlog/v2api/model_audit_log_entry_response_event_type.go b/services/auditlog/v2api/model_audit_log_entry_response_event_type.go deleted file mode 100644 index e85c050d1..000000000 --- a/services/auditlog/v2api/model_audit_log_entry_response_event_type.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2api - -import ( - "encoding/json" - "fmt" -) - -// AuditLogEntryResponseEventType Type that can be assigned to the event. For example, an event \"Organization created\" can be assigned to the type ADMIN_EVENT -type AuditLogEntryResponseEventType string - -// List of AuditLogEntryResponse_eventType -const ( - AUDITLOGENTRYRESPONSEEVENTTYPE_ADMIN_ACTIVITY AuditLogEntryResponseEventType = "ADMIN_ACTIVITY" - AUDITLOGENTRYRESPONSEEVENTTYPE_SYSTEM_EVENT AuditLogEntryResponseEventType = "SYSTEM_EVENT" - AUDITLOGENTRYRESPONSEEVENTTYPE_POLICY_DENIED AuditLogEntryResponseEventType = "POLICY_DENIED" - AUDITLOGENTRYRESPONSEEVENTTYPE_UNKNOWN_DEFAULT_OPEN_API AuditLogEntryResponseEventType = "unknown_default_open_api" -) - -// All allowed values of AuditLogEntryResponseEventType enum -var AllowedAuditLogEntryResponseEventTypeEnumValues = []AuditLogEntryResponseEventType{ - "ADMIN_ACTIVITY", - "SYSTEM_EVENT", - "POLICY_DENIED", - "unknown_default_open_api", -} - -func (v *AuditLogEntryResponseEventType) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := AuditLogEntryResponseEventType(value) - for _, existing := range AllowedAuditLogEntryResponseEventTypeEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - *v = AUDITLOGENTRYRESPONSEEVENTTYPE_UNKNOWN_DEFAULT_OPEN_API - return nil -} - -// NewAuditLogEntryResponseEventTypeFromValue returns a pointer to a valid AuditLogEntryResponseEventType -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewAuditLogEntryResponseEventTypeFromValue(v string) (*AuditLogEntryResponseEventType, error) { - ev := AuditLogEntryResponseEventType(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for AuditLogEntryResponseEventType: valid values are %v", v, AllowedAuditLogEntryResponseEventTypeEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v AuditLogEntryResponseEventType) IsValid() bool { - for _, existing := range AllowedAuditLogEntryResponseEventTypeEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to AuditLogEntryResponse_eventType value -func (v AuditLogEntryResponseEventType) Ptr() *AuditLogEntryResponseEventType { - return &v -} - -type NullableAuditLogEntryResponseEventType struct { - value *AuditLogEntryResponseEventType - isSet bool -} - -func (v NullableAuditLogEntryResponseEventType) Get() *AuditLogEntryResponseEventType { - return v.value -} - -func (v *NullableAuditLogEntryResponseEventType) Set(val *AuditLogEntryResponseEventType) { - v.value = val - v.isSet = true -} - -func (v NullableAuditLogEntryResponseEventType) IsSet() bool { - return v.isSet -} - -func (v *NullableAuditLogEntryResponseEventType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuditLogEntryResponseEventType(val *AuditLogEntryResponseEventType) *NullableAuditLogEntryResponseEventType { - return &NullableAuditLogEntryResponseEventType{value: val, isSet: true} -} - -func (v NullableAuditLogEntryResponseEventType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuditLogEntryResponseEventType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/auditlog/v2api/model_audit_log_entry_response_severity.go b/services/auditlog/v2api/model_audit_log_entry_response_severity.go deleted file mode 100644 index dcfbe9a70..000000000 --- a/services/auditlog/v2api/model_audit_log_entry_response_severity.go +++ /dev/null @@ -1,113 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2api - -import ( - "encoding/json" - "fmt" -) - -// AuditLogEntryResponseSeverity The severity of this request. -type AuditLogEntryResponseSeverity string - -// List of AuditLogEntryResponse_severity -const ( - AUDITLOGENTRYRESPONSESEVERITY_INFO AuditLogEntryResponseSeverity = "INFO" - AUDITLOGENTRYRESPONSESEVERITY_ERROR AuditLogEntryResponseSeverity = "ERROR" - AUDITLOGENTRYRESPONSESEVERITY_UNKNOWN_DEFAULT_OPEN_API AuditLogEntryResponseSeverity = "unknown_default_open_api" -) - -// All allowed values of AuditLogEntryResponseSeverity enum -var AllowedAuditLogEntryResponseSeverityEnumValues = []AuditLogEntryResponseSeverity{ - "INFO", - "ERROR", - "unknown_default_open_api", -} - -func (v *AuditLogEntryResponseSeverity) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := AuditLogEntryResponseSeverity(value) - for _, existing := range AllowedAuditLogEntryResponseSeverityEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - *v = AUDITLOGENTRYRESPONSESEVERITY_UNKNOWN_DEFAULT_OPEN_API - return nil -} - -// NewAuditLogEntryResponseSeverityFromValue returns a pointer to a valid AuditLogEntryResponseSeverity -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewAuditLogEntryResponseSeverityFromValue(v string) (*AuditLogEntryResponseSeverity, error) { - ev := AuditLogEntryResponseSeverity(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for AuditLogEntryResponseSeverity: valid values are %v", v, AllowedAuditLogEntryResponseSeverityEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v AuditLogEntryResponseSeverity) IsValid() bool { - for _, existing := range AllowedAuditLogEntryResponseSeverityEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to AuditLogEntryResponse_severity value -func (v AuditLogEntryResponseSeverity) Ptr() *AuditLogEntryResponseSeverity { - return &v -} - -type NullableAuditLogEntryResponseSeverity struct { - value *AuditLogEntryResponseSeverity - isSet bool -} - -func (v NullableAuditLogEntryResponseSeverity) Get() *AuditLogEntryResponseSeverity { - return v.value -} - -func (v *NullableAuditLogEntryResponseSeverity) Set(val *AuditLogEntryResponseSeverity) { - v.value = val - v.isSet = true -} - -func (v NullableAuditLogEntryResponseSeverity) IsSet() bool { - return v.isSet -} - -func (v *NullableAuditLogEntryResponseSeverity) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuditLogEntryResponseSeverity(val *AuditLogEntryResponseSeverity) *NullableAuditLogEntryResponseSeverity { - return &NullableAuditLogEntryResponseSeverity{value: val, isSet: true} -} - -func (v NullableAuditLogEntryResponseSeverity) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuditLogEntryResponseSeverity) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/auditlog/v2api/model_audit_log_entry_response_visibility.go b/services/auditlog/v2api/model_audit_log_entry_response_visibility.go deleted file mode 100644 index 3f7db0590..000000000 --- a/services/auditlog/v2api/model_audit_log_entry_response_visibility.go +++ /dev/null @@ -1,113 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2api - -import ( - "encoding/json" - "fmt" -) - -// AuditLogEntryResponseVisibility PUBLIC for entries that are intended for end users, while PRIVATE entries can only be viewed with system privileges. -type AuditLogEntryResponseVisibility string - -// List of AuditLogEntryResponse_visibility -const ( - AUDITLOGENTRYRESPONSEVISIBILITY_PUBLIC AuditLogEntryResponseVisibility = "PUBLIC" - AUDITLOGENTRYRESPONSEVISIBILITY_PRIVATE AuditLogEntryResponseVisibility = "PRIVATE" - AUDITLOGENTRYRESPONSEVISIBILITY_UNKNOWN_DEFAULT_OPEN_API AuditLogEntryResponseVisibility = "unknown_default_open_api" -) - -// All allowed values of AuditLogEntryResponseVisibility enum -var AllowedAuditLogEntryResponseVisibilityEnumValues = []AuditLogEntryResponseVisibility{ - "PUBLIC", - "PRIVATE", - "unknown_default_open_api", -} - -func (v *AuditLogEntryResponseVisibility) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := AuditLogEntryResponseVisibility(value) - for _, existing := range AllowedAuditLogEntryResponseVisibilityEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - *v = AUDITLOGENTRYRESPONSEVISIBILITY_UNKNOWN_DEFAULT_OPEN_API - return nil -} - -// NewAuditLogEntryResponseVisibilityFromValue returns a pointer to a valid AuditLogEntryResponseVisibility -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewAuditLogEntryResponseVisibilityFromValue(v string) (*AuditLogEntryResponseVisibility, error) { - ev := AuditLogEntryResponseVisibility(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for AuditLogEntryResponseVisibility: valid values are %v", v, AllowedAuditLogEntryResponseVisibilityEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v AuditLogEntryResponseVisibility) IsValid() bool { - for _, existing := range AllowedAuditLogEntryResponseVisibilityEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to AuditLogEntryResponse_visibility value -func (v AuditLogEntryResponseVisibility) Ptr() *AuditLogEntryResponseVisibility { - return &v -} - -type NullableAuditLogEntryResponseVisibility struct { - value *AuditLogEntryResponseVisibility - isSet bool -} - -func (v NullableAuditLogEntryResponseVisibility) Get() *AuditLogEntryResponseVisibility { - return v.value -} - -func (v *NullableAuditLogEntryResponseVisibility) Set(val *AuditLogEntryResponseVisibility) { - v.value = val - v.isSet = true -} - -func (v NullableAuditLogEntryResponseVisibility) IsSet() bool { - return v.isSet -} - -func (v *NullableAuditLogEntryResponseVisibility) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuditLogEntryResponseVisibility(val *AuditLogEntryResponseVisibility) *NullableAuditLogEntryResponseVisibility { - return &NullableAuditLogEntryResponseVisibility{value: val, isSet: true} -} - -func (v NullableAuditLogEntryResponseVisibility) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuditLogEntryResponseVisibility) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/auditlog/v2api/model_audit_log_entry_service_account_delegation_info_response.go b/services/auditlog/v2api/model_audit_log_entry_service_account_delegation_info_response.go deleted file mode 100644 index a736da33a..000000000 --- a/services/auditlog/v2api/model_audit_log_entry_service_account_delegation_info_response.go +++ /dev/null @@ -1,167 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2api - -import ( - "encoding/json" - "fmt" -) - -// checks if the AuditLogEntryServiceAccountDelegationInfoResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AuditLogEntryServiceAccountDelegationInfoResponse{} - -// AuditLogEntryServiceAccountDelegationInfoResponse Information about service account delegation -type AuditLogEntryServiceAccountDelegationInfoResponse struct { - // Delegation chain for the service account - Principals []ServiceAccountDelegationInfoPrincipalResponse `json:"principals"` - AdditionalProperties map[string]interface{} -} - -type _AuditLogEntryServiceAccountDelegationInfoResponse AuditLogEntryServiceAccountDelegationInfoResponse - -// NewAuditLogEntryServiceAccountDelegationInfoResponse instantiates a new AuditLogEntryServiceAccountDelegationInfoResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAuditLogEntryServiceAccountDelegationInfoResponse(principals []ServiceAccountDelegationInfoPrincipalResponse) *AuditLogEntryServiceAccountDelegationInfoResponse { - this := AuditLogEntryServiceAccountDelegationInfoResponse{} - this.Principals = principals - return &this -} - -// NewAuditLogEntryServiceAccountDelegationInfoResponseWithDefaults instantiates a new AuditLogEntryServiceAccountDelegationInfoResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAuditLogEntryServiceAccountDelegationInfoResponseWithDefaults() *AuditLogEntryServiceAccountDelegationInfoResponse { - this := AuditLogEntryServiceAccountDelegationInfoResponse{} - return &this -} - -// GetPrincipals returns the Principals field value -func (o *AuditLogEntryServiceAccountDelegationInfoResponse) GetPrincipals() []ServiceAccountDelegationInfoPrincipalResponse { - if o == nil { - var ret []ServiceAccountDelegationInfoPrincipalResponse - return ret - } - - return o.Principals -} - -// GetPrincipalsOk returns a tuple with the Principals field value -// and a boolean to check if the value has been set. -func (o *AuditLogEntryServiceAccountDelegationInfoResponse) GetPrincipalsOk() ([]ServiceAccountDelegationInfoPrincipalResponse, bool) { - if o == nil { - return nil, false - } - return o.Principals, true -} - -// SetPrincipals sets field value -func (o *AuditLogEntryServiceAccountDelegationInfoResponse) SetPrincipals(v []ServiceAccountDelegationInfoPrincipalResponse) { - o.Principals = v -} - -func (o AuditLogEntryServiceAccountDelegationInfoResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AuditLogEntryServiceAccountDelegationInfoResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["principals"] = o.Principals - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *AuditLogEntryServiceAccountDelegationInfoResponse) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "principals", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err - } - - for _, requiredProperty := range requiredProperties { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varAuditLogEntryServiceAccountDelegationInfoResponse := _AuditLogEntryServiceAccountDelegationInfoResponse{} - - err = json.Unmarshal(data, &varAuditLogEntryServiceAccountDelegationInfoResponse) - - if err != nil { - return err - } - - *o = AuditLogEntryServiceAccountDelegationInfoResponse(varAuditLogEntryServiceAccountDelegationInfoResponse) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "principals") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableAuditLogEntryServiceAccountDelegationInfoResponse struct { - value *AuditLogEntryServiceAccountDelegationInfoResponse - isSet bool -} - -func (v NullableAuditLogEntryServiceAccountDelegationInfoResponse) Get() *AuditLogEntryServiceAccountDelegationInfoResponse { - return v.value -} - -func (v *NullableAuditLogEntryServiceAccountDelegationInfoResponse) Set(val *AuditLogEntryServiceAccountDelegationInfoResponse) { - v.value = val - v.isSet = true -} - -func (v NullableAuditLogEntryServiceAccountDelegationInfoResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableAuditLogEntryServiceAccountDelegationInfoResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuditLogEntryServiceAccountDelegationInfoResponse(val *AuditLogEntryServiceAccountDelegationInfoResponse) *NullableAuditLogEntryServiceAccountDelegationInfoResponse { - return &NullableAuditLogEntryServiceAccountDelegationInfoResponse{value: val, isSet: true} -} - -func (v NullableAuditLogEntryServiceAccountDelegationInfoResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuditLogEntryServiceAccountDelegationInfoResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/auditlog/v2api/model_error_response.go b/services/auditlog/v2api/model_error_response.go deleted file mode 100644 index 710c07852..000000000 --- a/services/auditlog/v2api/model_error_response.go +++ /dev/null @@ -1,269 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2api - -import ( - "encoding/json" - "time" -) - -// checks if the ErrorResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ErrorResponse{} - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - // Description of the error. - Message *string `json:"message,omitempty"` - // Path which was called. - Path *string `json:"path,omitempty"` - // Http status code. - Status *float32 `json:"status,omitempty"` - // Timestamp at which the error occurred. - Timestamp *time.Time `json:"timestamp,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _ErrorResponse ErrorResponse - -// NewErrorResponse instantiates a new ErrorResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewErrorResponse() *ErrorResponse { - this := ErrorResponse{} - return &this -} - -// NewErrorResponseWithDefaults instantiates a new ErrorResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewErrorResponseWithDefaults() *ErrorResponse { - this := ErrorResponse{} - return &this -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *ErrorResponse) GetMessage() string { - if o == nil || IsNil(o.Message) { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ErrorResponse) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *ErrorResponse) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *ErrorResponse) SetMessage(v string) { - o.Message = &v -} - -// GetPath returns the Path field value if set, zero value otherwise. -func (o *ErrorResponse) GetPath() string { - if o == nil || IsNil(o.Path) { - var ret string - return ret - } - return *o.Path -} - -// GetPathOk returns a tuple with the Path field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ErrorResponse) GetPathOk() (*string, bool) { - if o == nil || IsNil(o.Path) { - return nil, false - } - return o.Path, true -} - -// HasPath returns a boolean if a field has been set. -func (o *ErrorResponse) HasPath() bool { - if o != nil && !IsNil(o.Path) { - return true - } - - return false -} - -// SetPath gets a reference to the given string and assigns it to the Path field. -func (o *ErrorResponse) SetPath(v string) { - o.Path = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *ErrorResponse) GetStatus() float32 { - if o == nil || IsNil(o.Status) { - var ret float32 - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ErrorResponse) GetStatusOk() (*float32, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *ErrorResponse) HasStatus() bool { - if o != nil && !IsNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given float32 and assigns it to the Status field. -func (o *ErrorResponse) SetStatus(v float32) { - o.Status = &v -} - -// GetTimestamp returns the Timestamp field value if set, zero value otherwise. -func (o *ErrorResponse) GetTimestamp() time.Time { - if o == nil || IsNil(o.Timestamp) { - var ret time.Time - return ret - } - return *o.Timestamp -} - -// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ErrorResponse) GetTimestampOk() (*time.Time, bool) { - if o == nil || IsNil(o.Timestamp) { - return nil, false - } - return o.Timestamp, true -} - -// HasTimestamp returns a boolean if a field has been set. -func (o *ErrorResponse) HasTimestamp() bool { - if o != nil && !IsNil(o.Timestamp) { - return true - } - - return false -} - -// SetTimestamp gets a reference to the given time.Time and assigns it to the Timestamp field. -func (o *ErrorResponse) SetTimestamp(v time.Time) { - o.Timestamp = &v -} - -func (o ErrorResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ErrorResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Message) { - toSerialize["message"] = o.Message - } - if !IsNil(o.Path) { - toSerialize["path"] = o.Path - } - if !IsNil(o.Status) { - toSerialize["status"] = o.Status - } - if !IsNil(o.Timestamp) { - toSerialize["timestamp"] = o.Timestamp - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ErrorResponse) UnmarshalJSON(data []byte) (err error) { - varErrorResponse := _ErrorResponse{} - - err = json.Unmarshal(data, &varErrorResponse) - - if err != nil { - return err - } - - *o = ErrorResponse(varErrorResponse) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "message") - delete(additionalProperties, "path") - delete(additionalProperties, "status") - delete(additionalProperties, "timestamp") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableErrorResponse struct { - value *ErrorResponse - isSet bool -} - -func (v NullableErrorResponse) Get() *ErrorResponse { - return v.value -} - -func (v *NullableErrorResponse) Set(val *ErrorResponse) { - v.value = val - v.isSet = true -} - -func (v NullableErrorResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableErrorResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableErrorResponse(val *ErrorResponse) *NullableErrorResponse { - return &NullableErrorResponse{value: val, isSet: true} -} - -func (v NullableErrorResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableErrorResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/auditlog/v2api/model_gateway_error_response.go b/services/auditlog/v2api/model_gateway_error_response.go deleted file mode 100644 index a34ba090e..000000000 --- a/services/auditlog/v2api/model_gateway_error_response.go +++ /dev/null @@ -1,192 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2api - -import ( - "encoding/json" -) - -// checks if the GatewayErrorResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GatewayErrorResponse{} - -// GatewayErrorResponse struct for GatewayErrorResponse -type GatewayErrorResponse struct { - // Description of the error. - Message *string `json:"message,omitempty"` - // Http status code. - Status *float32 `json:"status,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GatewayErrorResponse GatewayErrorResponse - -// NewGatewayErrorResponse instantiates a new GatewayErrorResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGatewayErrorResponse() *GatewayErrorResponse { - this := GatewayErrorResponse{} - return &this -} - -// NewGatewayErrorResponseWithDefaults instantiates a new GatewayErrorResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGatewayErrorResponseWithDefaults() *GatewayErrorResponse { - this := GatewayErrorResponse{} - return &this -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *GatewayErrorResponse) GetMessage() string { - if o == nil || IsNil(o.Message) { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GatewayErrorResponse) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *GatewayErrorResponse) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *GatewayErrorResponse) SetMessage(v string) { - o.Message = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *GatewayErrorResponse) GetStatus() float32 { - if o == nil || IsNil(o.Status) { - var ret float32 - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GatewayErrorResponse) GetStatusOk() (*float32, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *GatewayErrorResponse) HasStatus() bool { - if o != nil && !IsNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given float32 and assigns it to the Status field. -func (o *GatewayErrorResponse) SetStatus(v float32) { - o.Status = &v -} - -func (o GatewayErrorResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GatewayErrorResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Message) { - toSerialize["message"] = o.Message - } - if !IsNil(o.Status) { - toSerialize["status"] = o.Status - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GatewayErrorResponse) UnmarshalJSON(data []byte) (err error) { - varGatewayErrorResponse := _GatewayErrorResponse{} - - err = json.Unmarshal(data, &varGatewayErrorResponse) - - if err != nil { - return err - } - - *o = GatewayErrorResponse(varGatewayErrorResponse) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "message") - delete(additionalProperties, "status") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGatewayErrorResponse struct { - value *GatewayErrorResponse - isSet bool -} - -func (v NullableGatewayErrorResponse) Get() *GatewayErrorResponse { - return v.value -} - -func (v *NullableGatewayErrorResponse) Set(val *GatewayErrorResponse) { - v.value = val - v.isSet = true -} - -func (v NullableGatewayErrorResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableGatewayErrorResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGatewayErrorResponse(val *GatewayErrorResponse) *NullableGatewayErrorResponse { - return &NullableGatewayErrorResponse{value: val, isSet: true} -} - -func (v NullableGatewayErrorResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGatewayErrorResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/auditlog/v2api/model_list_audit_log_entries_response.go b/services/auditlog/v2api/model_list_audit_log_entries_response.go deleted file mode 100644 index 84c537a18..000000000 --- a/services/auditlog/v2api/model_list_audit_log_entries_response.go +++ /dev/null @@ -1,233 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2api - -import ( - "encoding/json" -) - -// checks if the ListAuditLogEntriesResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListAuditLogEntriesResponse{} - -// ListAuditLogEntriesResponse struct for ListAuditLogEntriesResponse -type ListAuditLogEntriesResponse struct { - // Optional cursor if more entries are available - Cursor *string `json:"cursor,omitempty"` - Items []AuditLogEntryResponse `json:"items,omitempty"` - // Maximum amount of entries requested. - Limit *float32 `json:"limit,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _ListAuditLogEntriesResponse ListAuditLogEntriesResponse - -// NewListAuditLogEntriesResponse instantiates a new ListAuditLogEntriesResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewListAuditLogEntriesResponse() *ListAuditLogEntriesResponse { - this := ListAuditLogEntriesResponse{} - var limit float32 = 50 - this.Limit = &limit - return &this -} - -// NewListAuditLogEntriesResponseWithDefaults instantiates a new ListAuditLogEntriesResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewListAuditLogEntriesResponseWithDefaults() *ListAuditLogEntriesResponse { - this := ListAuditLogEntriesResponse{} - var limit float32 = 50 - this.Limit = &limit - return &this -} - -// GetCursor returns the Cursor field value if set, zero value otherwise. -func (o *ListAuditLogEntriesResponse) GetCursor() string { - if o == nil || IsNil(o.Cursor) { - var ret string - return ret - } - return *o.Cursor -} - -// GetCursorOk returns a tuple with the Cursor field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListAuditLogEntriesResponse) GetCursorOk() (*string, bool) { - if o == nil || IsNil(o.Cursor) { - return nil, false - } - return o.Cursor, true -} - -// HasCursor returns a boolean if a field has been set. -func (o *ListAuditLogEntriesResponse) HasCursor() bool { - if o != nil && !IsNil(o.Cursor) { - return true - } - - return false -} - -// SetCursor gets a reference to the given string and assigns it to the Cursor field. -func (o *ListAuditLogEntriesResponse) SetCursor(v string) { - o.Cursor = &v -} - -// GetItems returns the Items field value if set, zero value otherwise. -func (o *ListAuditLogEntriesResponse) GetItems() []AuditLogEntryResponse { - if o == nil || IsNil(o.Items) { - var ret []AuditLogEntryResponse - return ret - } - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListAuditLogEntriesResponse) GetItemsOk() ([]AuditLogEntryResponse, bool) { - if o == nil || IsNil(o.Items) { - return nil, false - } - return o.Items, true -} - -// HasItems returns a boolean if a field has been set. -func (o *ListAuditLogEntriesResponse) HasItems() bool { - if o != nil && !IsNil(o.Items) { - return true - } - - return false -} - -// SetItems gets a reference to the given []AuditLogEntryResponse and assigns it to the Items field. -func (o *ListAuditLogEntriesResponse) SetItems(v []AuditLogEntryResponse) { - o.Items = v -} - -// GetLimit returns the Limit field value if set, zero value otherwise. -func (o *ListAuditLogEntriesResponse) GetLimit() float32 { - if o == nil || IsNil(o.Limit) { - var ret float32 - return ret - } - return *o.Limit -} - -// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListAuditLogEntriesResponse) GetLimitOk() (*float32, bool) { - if o == nil || IsNil(o.Limit) { - return nil, false - } - return o.Limit, true -} - -// HasLimit returns a boolean if a field has been set. -func (o *ListAuditLogEntriesResponse) HasLimit() bool { - if o != nil && !IsNil(o.Limit) { - return true - } - - return false -} - -// SetLimit gets a reference to the given float32 and assigns it to the Limit field. -func (o *ListAuditLogEntriesResponse) SetLimit(v float32) { - o.Limit = &v -} - -func (o ListAuditLogEntriesResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ListAuditLogEntriesResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Cursor) { - toSerialize["cursor"] = o.Cursor - } - if !IsNil(o.Items) { - toSerialize["items"] = o.Items - } - if !IsNil(o.Limit) { - toSerialize["limit"] = o.Limit - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ListAuditLogEntriesResponse) UnmarshalJSON(data []byte) (err error) { - varListAuditLogEntriesResponse := _ListAuditLogEntriesResponse{} - - err = json.Unmarshal(data, &varListAuditLogEntriesResponse) - - if err != nil { - return err - } - - *o = ListAuditLogEntriesResponse(varListAuditLogEntriesResponse) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "cursor") - delete(additionalProperties, "items") - delete(additionalProperties, "limit") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableListAuditLogEntriesResponse struct { - value *ListAuditLogEntriesResponse - isSet bool -} - -func (v NullableListAuditLogEntriesResponse) Get() *ListAuditLogEntriesResponse { - return v.value -} - -func (v *NullableListAuditLogEntriesResponse) Set(val *ListAuditLogEntriesResponse) { - v.value = val - v.isSet = true -} - -func (v NullableListAuditLogEntriesResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableListAuditLogEntriesResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListAuditLogEntriesResponse(val *ListAuditLogEntriesResponse) *NullableListAuditLogEntriesResponse { - return &NullableListAuditLogEntriesResponse{value: val, isSet: true} -} - -func (v NullableListAuditLogEntriesResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListAuditLogEntriesResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/auditlog/v2api/model_service_account_delegation_info_principal_response.go b/services/auditlog/v2api/model_service_account_delegation_info_principal_response.go deleted file mode 100644 index aeb85e229..000000000 --- a/services/auditlog/v2api/model_service_account_delegation_info_principal_response.go +++ /dev/null @@ -1,205 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2api - -import ( - "encoding/json" - "fmt" -) - -// checks if the ServiceAccountDelegationInfoPrincipalResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ServiceAccountDelegationInfoPrincipalResponse{} - -// ServiceAccountDelegationInfoPrincipalResponse Principal in delegation chain of a service account -type ServiceAccountDelegationInfoPrincipalResponse struct { - // E-Mail of the subject - Email *string `json:"email,omitempty"` - // Unique identifier of the subject - Id string `json:"id"` - AdditionalProperties map[string]interface{} -} - -type _ServiceAccountDelegationInfoPrincipalResponse ServiceAccountDelegationInfoPrincipalResponse - -// NewServiceAccountDelegationInfoPrincipalResponse instantiates a new ServiceAccountDelegationInfoPrincipalResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewServiceAccountDelegationInfoPrincipalResponse(id string) *ServiceAccountDelegationInfoPrincipalResponse { - this := ServiceAccountDelegationInfoPrincipalResponse{} - this.Id = id - return &this -} - -// NewServiceAccountDelegationInfoPrincipalResponseWithDefaults instantiates a new ServiceAccountDelegationInfoPrincipalResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewServiceAccountDelegationInfoPrincipalResponseWithDefaults() *ServiceAccountDelegationInfoPrincipalResponse { - this := ServiceAccountDelegationInfoPrincipalResponse{} - return &this -} - -// GetEmail returns the Email field value if set, zero value otherwise. -func (o *ServiceAccountDelegationInfoPrincipalResponse) GetEmail() string { - if o == nil || IsNil(o.Email) { - var ret string - return ret - } - return *o.Email -} - -// GetEmailOk returns a tuple with the Email field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ServiceAccountDelegationInfoPrincipalResponse) GetEmailOk() (*string, bool) { - if o == nil || IsNil(o.Email) { - return nil, false - } - return o.Email, true -} - -// HasEmail returns a boolean if a field has been set. -func (o *ServiceAccountDelegationInfoPrincipalResponse) HasEmail() bool { - if o != nil && !IsNil(o.Email) { - return true - } - - return false -} - -// SetEmail gets a reference to the given string and assigns it to the Email field. -func (o *ServiceAccountDelegationInfoPrincipalResponse) SetEmail(v string) { - o.Email = &v -} - -// GetId returns the Id field value -func (o *ServiceAccountDelegationInfoPrincipalResponse) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ServiceAccountDelegationInfoPrincipalResponse) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ServiceAccountDelegationInfoPrincipalResponse) SetId(v string) { - o.Id = v -} - -func (o ServiceAccountDelegationInfoPrincipalResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ServiceAccountDelegationInfoPrincipalResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Email) { - toSerialize["email"] = o.Email - } - toSerialize["id"] = o.Id - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ServiceAccountDelegationInfoPrincipalResponse) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "id", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err - } - - for _, requiredProperty := range requiredProperties { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varServiceAccountDelegationInfoPrincipalResponse := _ServiceAccountDelegationInfoPrincipalResponse{} - - err = json.Unmarshal(data, &varServiceAccountDelegationInfoPrincipalResponse) - - if err != nil { - return err - } - - *o = ServiceAccountDelegationInfoPrincipalResponse(varServiceAccountDelegationInfoPrincipalResponse) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "email") - delete(additionalProperties, "id") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableServiceAccountDelegationInfoPrincipalResponse struct { - value *ServiceAccountDelegationInfoPrincipalResponse - isSet bool -} - -func (v NullableServiceAccountDelegationInfoPrincipalResponse) Get() *ServiceAccountDelegationInfoPrincipalResponse { - return v.value -} - -func (v *NullableServiceAccountDelegationInfoPrincipalResponse) Set(val *ServiceAccountDelegationInfoPrincipalResponse) { - v.value = val - v.isSet = true -} - -func (v NullableServiceAccountDelegationInfoPrincipalResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableServiceAccountDelegationInfoPrincipalResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableServiceAccountDelegationInfoPrincipalResponse(val *ServiceAccountDelegationInfoPrincipalResponse) *NullableServiceAccountDelegationInfoPrincipalResponse { - return &NullableServiceAccountDelegationInfoPrincipalResponse{value: val, isSet: true} -} - -func (v NullableServiceAccountDelegationInfoPrincipalResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableServiceAccountDelegationInfoPrincipalResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/auditlog/v2api/response.go b/services/auditlog/v2api/response.go deleted file mode 100644 index 7a4ebeaa9..000000000 --- a/services/auditlog/v2api/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2api - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/services/auditlog/v2api/utils.go b/services/auditlog/v2api/utils.go deleted file mode 100644 index 569521a43..000000000 --- a/services/auditlog/v2api/utils.go +++ /dev/null @@ -1,361 +0,0 @@ -/* -STACKIT Audit Log API - -**Deprecated:** The auditlog API is deprecated and will be removed shortly. Please use the [telemetry-router](https://docs.stackit.cloud/products/logging-and-monitoring/telemetry-router/) to retrieve audit log messages in the future. - -API version: 2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v2api - -import ( - "bytes" - "encoding/json" - "fmt" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTime) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -// IsNil checks if an input is nil -func IsNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} - -type MappedNullable interface { - ToMap() (map[string]interface{}, error) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -}