diff --git a/services/auditlog/api_default.go b/services/auditlog/api_default.go index da1d1bb25..f55f11ed7 100644 --- a/services/auditlog/api_default.go +++ b/services/auditlog/api_default.go @@ -8,6 +8,7 @@ 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 ( @@ -24,6 +25,7 @@ import ( "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 @@ -34,6 +36,8 @@ type DefaultApi interface { @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 /* @@ -43,6 +47,7 @@ type DefaultApi interface { @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) /* @@ -54,6 +59,8 @@ type DefaultApi interface { @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 /* @@ -63,6 +70,7 @@ type DefaultApi interface { @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) /* @@ -74,6 +82,8 @@ type DefaultApi interface { @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 /* @@ -83,49 +93,70 @@ type DefaultApi interface { @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 @@ -137,33 +168,34 @@ type ListFolderAuditLogEntriesRequest struct { } // 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 @@ -313,8 +345,7 @@ func (r ListFolderAuditLogEntriesRequest) Execute() (*ListAuditLogEntriesRespons /* 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. +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. @@ -328,6 +359,7 @@ func (a *APIClient) ListFolderAuditLogEntries(ctx context.Context, folderId stri } } +// 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, @@ -337,6 +369,7 @@ func (a *APIClient) ListFolderAuditLogEntriesExecute(ctx context.Context, folder 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 @@ -348,33 +381,34 @@ type ListOrganizationAuditLogEntriesRequest struct { } // 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 @@ -524,8 +558,7 @@ func (r ListOrganizationAuditLogEntriesRequest) Execute() (*ListAuditLogEntriesR /* 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. +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. @@ -539,6 +572,7 @@ func (a *APIClient) ListOrganizationAuditLogEntries(ctx context.Context, organiz } } +// 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, @@ -548,6 +582,7 @@ func (a *APIClient) ListOrganizationAuditLogEntriesExecute(ctx context.Context, 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 @@ -559,33 +594,34 @@ type ListProjectAuditLogEntriesRequest struct { } // 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 @@ -735,8 +771,7 @@ func (r ListProjectAuditLogEntriesRequest) Execute() (*ListAuditLogEntriesRespon /* 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. +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. @@ -750,6 +785,7 @@ func (a *APIClient) ListProjectAuditLogEntries(ctx context.Context, projectId st } } +// 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, diff --git a/services/auditlog/client.go b/services/auditlog/client.go index bb03ffdfa..3069c1bb4 100644 --- a/services/auditlog/client.go +++ b/services/auditlog/client.go @@ -8,6 +8,7 @@ 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 ( @@ -44,18 +45,21 @@ var ( // 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() @@ -147,6 +151,7 @@ func typeCheckParameter(obj interface{}, expected string, name string) error { 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) @@ -285,6 +290,7 @@ func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { // 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 } @@ -595,6 +601,7 @@ func parseCacheControl(headers http.Header) cacheControl { } // 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 diff --git a/services/auditlog/configuration.go b/services/auditlog/configuration.go index 7f0db2694..e00bcabe2 100644 --- a/services/auditlog/configuration.go +++ b/services/auditlog/configuration.go @@ -8,6 +8,7 @@ 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 ( @@ -15,6 +16,7 @@ import ( ) // 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), diff --git a/services/auditlog/go.mod b/services/auditlog/go.mod index 9905faf29..a06119ea3 100644 --- a/services/auditlog/go.mod +++ b/services/auditlog/go.mod @@ -2,7 +2,7 @@ module github.com/stackitcloud/stackit-sdk-go/services/auditlog go 1.21 -require github.com/stackitcloud/stackit-sdk-go/core v0.21.1 +require github.com/stackitcloud/stackit-sdk-go/core v0.22.0 require ( github.com/golang-jwt/jwt/v5 v5.3.1 // indirect diff --git a/services/auditlog/go.sum b/services/auditlog/go.sum index ca103c909..195011dd5 100644 --- a/services/auditlog/go.sum +++ b/services/auditlog/go.sum @@ -4,5 +4,5 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/stackitcloud/stackit-sdk-go/core v0.21.1 h1:Y/PcAgM7DPYMNqum0MLv4n1mF9ieuevzcCIZYQfm3Ts= -github.com/stackitcloud/stackit-sdk-go/core v0.21.1/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI= +github.com/stackitcloud/stackit-sdk-go/core v0.22.0 h1:6rViz7GnNwXSh51Lur5xuDzO8EWSZfN9J0HvEkBKq6c= +github.com/stackitcloud/stackit-sdk-go/core v0.22.0/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI= diff --git a/services/auditlog/model_audit_log_entry_context_response.go b/services/auditlog/model_audit_log_entry_context_response.go index b64c918f2..ca679124f 100644 --- a/services/auditlog/model_audit_log_entry_context_response.go +++ b/services/auditlog/model_audit_log_entry_context_response.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &AuditLogEntryContextResponse{} */ // 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 @@ -31,11 +34,15 @@ func getAuditLogEntryContextResponseGetFolderIdAttributeTypeOk(arg AuditLogEntry 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 /* @@ -43,8 +50,10 @@ type AuditLogEntryContextResponseGetFolderIdRetType = string */ // 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 @@ -52,11 +61,15 @@ func getAuditLogEntryContextResponseGetOrganizationIdAttributeTypeOk(arg AuditLo 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 /* @@ -64,8 +77,10 @@ type AuditLogEntryContextResponseGetOrganizationIdRetType = string */ // 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 @@ -73,14 +88,19 @@ func getAuditLogEntryContextResponseGetProjectIdAttributeTypeOk(arg AuditLogEntr 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"` @@ -94,6 +114,7 @@ type AuditLogEntryContextResponse struct { // 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 @@ -102,12 +123,14 @@ func NewAuditLogEntryContextResponse() *AuditLogEntryContextResponse { // 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 @@ -115,22 +138,26 @@ func (o *AuditLogEntryContextResponse) GetFolderId() (res AuditLogEntryContextRe // 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 @@ -138,22 +165,26 @@ func (o *AuditLogEntryContextResponse) GetOrganizationId() (res AuditLogEntryCon // 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 @@ -161,21 +192,25 @@ func (o *AuditLogEntryContextResponse) GetProjectId() (res AuditLogEntryContextR // 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 { @@ -190,37 +225,45 @@ func (o AuditLogEntryContextResponse) ToMap() (map[string]interface{}, error) { 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_initiator_response.go b/services/auditlog/model_audit_log_entry_initiator_response.go index 31e2f11de..dc476c055 100644 --- a/services/auditlog/model_audit_log_entry_initiator_response.go +++ b/services/auditlog/model_audit_log_entry_initiator_response.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &AuditLogEntryInitiatorResponse{} */ // 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 @@ -31,11 +34,15 @@ func getAuditLogEntryInitiatorResponseGetEmailAttributeTypeOk(arg AuditLogEntryI 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 /* @@ -43,8 +50,10 @@ type AuditLogEntryInitiatorResponseGetEmailRetType = string */ // 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 @@ -52,14 +61,19 @@ func getAuditLogEntryInitiatorResponseGetIdAttributeTypeOk(arg AuditLogEntryInit 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"` @@ -68,12 +82,14 @@ type AuditLogEntryInitiatorResponse struct { 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) @@ -83,12 +99,14 @@ func NewAuditLogEntryInitiatorResponse(id AuditLogEntryInitiatorResponseGetIdArg // 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 @@ -96,22 +114,26 @@ func (o *AuditLogEntryInitiatorResponse) GetEmail() (res AuditLogEntryInitiatorR // 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 @@ -119,15 +141,18 @@ func (o *AuditLogEntryInitiatorResponse) GetId() (ret AuditLogEntryInitiatorResp // 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 { @@ -139,37 +164,45 @@ func (o AuditLogEntryInitiatorResponse) ToMap() (map[string]interface{}, error) 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_request_response.go b/services/auditlog/model_audit_log_entry_request_response.go index 1b166957f..34f618911 100644 --- a/services/auditlog/model_audit_log_entry_request_response.go +++ b/services/auditlog/model_audit_log_entry_request_response.go @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &AuditLogEntryRequestResponse{} */ // 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 @@ -33,6 +40,7 @@ func getAuditLogEntryRequestResponseGetBodyAttributeTypeOk(arg AuditLogEntryRequ 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 } @@ -42,8 +50,10 @@ func setAuditLogEntryRequestResponseGetBodyAttributeType(arg *AuditLogEntryReque */ // 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 @@ -51,11 +61,15 @@ func getAuditLogEntryRequestResponseGetEndpointAttributeTypeOk(arg AuditLogEntry 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 /* @@ -63,10 +77,16 @@ type AuditLogEntryRequestResponseGetEndpointRetType = string */ // 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 @@ -74,6 +94,7 @@ func getAuditLogEntryRequestResponseGetHeadersAttributeTypeOk(arg AuditLogEntryR 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 } @@ -83,10 +104,16 @@ func setAuditLogEntryRequestResponseGetHeadersAttributeType(arg *AuditLogEntryRe */ // 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 @@ -94,11 +121,13 @@ func getAuditLogEntryRequestResponseGetParametersAttributeTypeOk(arg AuditLogEnt 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"` @@ -111,12 +140,14 @@ type AuditLogEntryRequestResponse struct { 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) @@ -126,12 +157,14 @@ func NewAuditLogEntryRequestResponse(endpoint AuditLogEntryRequestResponseGetEnd // 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 @@ -139,22 +172,26 @@ func (o *AuditLogEntryRequestResponse) GetBody() (res AuditLogEntryRequestRespon // 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 @@ -162,16 +199,19 @@ func (o *AuditLogEntryRequestResponse) GetEndpoint() (ret AuditLogEntryRequestRe // 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 @@ -179,22 +219,26 @@ func (o *AuditLogEntryRequestResponse) GetHeaders() (res AuditLogEntryRequestRes // 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 @@ -202,21 +246,25 @@ func (o *AuditLogEntryRequestResponse) GetParameters() (res AuditLogEntryRequest // 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 { @@ -234,37 +282,45 @@ func (o AuditLogEntryRequestResponse) ToMap() (map[string]interface{}, error) { 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_response.go b/services/auditlog/model_audit_log_entry_response.go index 84426cf35..925ff4f66 100644 --- a/services/auditlog/model_audit_log_entry_response.go +++ b/services/auditlog/model_audit_log_entry_response.go @@ -8,6 +8,7 @@ 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 ( @@ -24,10 +25,16 @@ var _ MappedNullable = &AuditLogEntryResponse{} */ // 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 @@ -35,6 +42,7 @@ func getAuditLogEntryResponseGetContextAttributeTypeOk(arg AuditLogEntryResponse 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 } @@ -44,8 +52,10 @@ func setAuditLogEntryResponseGetContextAttributeType(arg *AuditLogEntryResponseG */ // 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 @@ -53,11 +63,15 @@ func getAuditLogEntryResponseGetCorrelationIdAttributeTypeOk(arg AuditLogEntryRe 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 /* @@ -65,10 +79,16 @@ type AuditLogEntryResponseGetCorrelationIdRetType = string */ // 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 @@ -76,6 +96,7 @@ func getAuditLogEntryResponseGetDetailsAttributeTypeOk(arg AuditLogEntryResponse 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 } @@ -85,8 +106,10 @@ func setAuditLogEntryResponseGetDetailsAttributeType(arg *AuditLogEntryResponseG */ // 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 @@ -94,11 +117,15 @@ func getAuditLogEntryResponseGetEventNameAttributeTypeOk(arg AuditLogEntryRespon 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 /* @@ -106,8 +133,10 @@ type AuditLogEntryResponseGetEventNameRetType = string */ // 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 @@ -115,11 +144,15 @@ func getAuditLogEntryResponseGetEventSourceAttributeTypeOk(arg AuditLogEntryResp 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 /* @@ -127,10 +160,16 @@ type AuditLogEntryResponseGetEventSourceRetType = string */ // 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 @@ -138,6 +177,7 @@ func getAuditLogEntryResponseGetEventTimeStampAttributeTypeOk(arg AuditLogEntryR 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 } @@ -150,22 +190,28 @@ func setAuditLogEntryResponseGetEventTimeStampAttributeType(arg *AuditLogEntryRe // 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" - AUDITLOGENTRYRESPONSEEVENT_TYPE_SYSTEM_EVENT AuditLogEntryResponseEventType = "SYSTEM_EVENT" - AUDITLOGENTRYRESPONSEEVENT_TYPE_POLICY_DENIED AuditLogEntryResponseEventType = "POLICY_DENIED" + // 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 @@ -193,6 +239,7 @@ func (v *AuditLogEntryResponseEventType) UnmarshalJSON(src []byte) error { // 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() { @@ -203,6 +250,7 @@ func NewAuditLogEntryResponseEventTypeFromValue(v AuditLogEntryResponseEventType } // 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 { @@ -213,50 +261,65 @@ func (v AuditLogEntryResponseEventType) IsValid() bool { } // 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 @@ -264,6 +327,7 @@ func getAuditLogEntryResponseGetEventTypeAttributeTypeOk(arg AuditLogEntryRespon 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 } @@ -273,8 +337,10 @@ func setAuditLogEntryResponseGetEventTypeAttributeType(arg *AuditLogEntryRespons */ // 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 @@ -282,11 +348,15 @@ func getAuditLogEntryResponseGetEventVersionAttributeTypeOk(arg AuditLogEntryRes 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 /* @@ -294,8 +364,10 @@ type AuditLogEntryResponseGetEventVersionRetType = string */ // 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 @@ -303,11 +375,15 @@ func getAuditLogEntryResponseGetIdAttributeTypeOk(arg AuditLogEntryResponseGetId 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 /* @@ -315,10 +391,16 @@ type AuditLogEntryResponseGetIdRetType = string */ // 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 @@ -326,6 +408,7 @@ func getAuditLogEntryResponseGetInitiatorAttributeTypeOk(arg AuditLogEntryRespon 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 } @@ -335,10 +418,16 @@ func setAuditLogEntryResponseGetInitiatorAttributeType(arg *AuditLogEntryRespons */ // 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 @@ -346,6 +435,7 @@ func getAuditLogEntryResponseGetReceivedTimeStampAttributeTypeOk(arg AuditLogEnt 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 } @@ -355,8 +445,10 @@ func setAuditLogEntryResponseGetReceivedTimeStampAttributeType(arg *AuditLogEntr */ // 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 @@ -364,11 +456,15 @@ func getAuditLogEntryResponseGetRegionAttributeTypeOk(arg AuditLogEntryResponseG 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 /* @@ -376,10 +472,16 @@ type AuditLogEntryResponseGetRegionRetType = string */ // 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 @@ -387,6 +489,7 @@ func getAuditLogEntryResponseGetRequestAttributeTypeOk(arg AuditLogEntryResponse 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 } @@ -396,8 +499,10 @@ func setAuditLogEntryResponseGetRequestAttributeType(arg *AuditLogEntryResponseG */ // 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 @@ -405,11 +510,15 @@ func getAuditLogEntryResponseGetResourceIdAttributeTypeOk(arg AuditLogEntryRespo 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 /* @@ -417,8 +526,10 @@ type AuditLogEntryResponseGetResourceIdRetType = string */ // 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 @@ -426,11 +537,15 @@ func getAuditLogEntryResponseGetResourceNameAttributeTypeOk(arg AuditLogEntryRes 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 /* @@ -438,10 +553,16 @@ type AuditLogEntryResponseGetResourceNameRetType = string */ // 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 @@ -449,6 +570,7 @@ func getAuditLogEntryResponseGetResultAttributeTypeOk(arg AuditLogEntryResponseG 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 } @@ -458,10 +580,16 @@ func setAuditLogEntryResponseGetResultAttributeType(arg *AuditLogEntryResponseGe */ // 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 @@ -469,6 +597,7 @@ func getAuditLogEntryResponseGetServiceAccountDelegationInfoAttributeTypeOk(arg 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 } @@ -481,20 +610,25 @@ func setAuditLogEntryResponseGetServiceAccountDelegationInfoAttributeType(arg *A // 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 ( - AUDITLOGENTRYRESPONSESEVERITY_INFO AuditLogEntryResponseSeverity = "INFO" + // 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 @@ -522,6 +656,7 @@ func (v *AuditLogEntryResponseSeverity) UnmarshalJSON(src []byte) error { // 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() { @@ -532,6 +667,7 @@ func NewAuditLogEntryResponseSeverityFromValue(v AuditLogEntryResponseSeverity) } // 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 { @@ -542,50 +678,65 @@ func (v AuditLogEntryResponseSeverity) IsValid() bool { } // 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 @@ -593,6 +744,7 @@ func getAuditLogEntryResponseGetSeverityAttributeTypeOk(arg AuditLogEntryRespons 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 } @@ -602,8 +754,10 @@ func setAuditLogEntryResponseGetSeverityAttributeType(arg *AuditLogEntryResponse */ // 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 @@ -611,11 +765,15 @@ func getAuditLogEntryResponseGetSourceIpAddressAttributeTypeOk(arg AuditLogEntry 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 /* @@ -623,8 +781,10 @@ type AuditLogEntryResponseGetSourceIpAddressRetType = string */ // 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 @@ -632,11 +792,15 @@ func getAuditLogEntryResponseGetUserAgentAttributeTypeOk(arg AuditLogEntryRespon 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 /* @@ -647,20 +811,25 @@ type AuditLogEntryResponseGetUserAgentRetType = string // 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 ( - AUDITLOGENTRYRESPONSEVISIBILITY_PUBLIC AuditLogEntryResponseVisibility = "PUBLIC" + // 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 @@ -688,6 +857,7 @@ func (v *AuditLogEntryResponseVisibility) UnmarshalJSON(src []byte) error { // 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() { @@ -698,6 +868,7 @@ func NewAuditLogEntryResponseVisibilityFromValue(v AuditLogEntryResponseVisibili } // 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 { @@ -708,50 +879,65 @@ func (v AuditLogEntryResponseVisibility) IsValid() bool { } // 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 @@ -759,11 +945,13 @@ func getAuditLogEntryResponseGetVisibilityAttributeTypeOk(arg AuditLogEntryRespo 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. @@ -819,12 +1007,14 @@ type AuditLogEntryResponse struct { 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) @@ -847,12 +1037,14 @@ func NewAuditLogEntryResponse(eventName AuditLogEntryResponseGetEventNameArgType // 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 @@ -860,22 +1052,26 @@ func (o *AuditLogEntryResponse) GetContext() (res AuditLogEntryResponseGetContex // 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 @@ -883,22 +1079,26 @@ func (o *AuditLogEntryResponse) GetCorrelationId() (res AuditLogEntryResponseGet // 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 @@ -906,22 +1106,26 @@ func (o *AuditLogEntryResponse) GetDetails() (res AuditLogEntryResponseGetDetail // 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 @@ -929,16 +1133,19 @@ func (o *AuditLogEntryResponse) GetEventName() (ret AuditLogEntryResponseGetEven // 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 @@ -946,16 +1153,19 @@ func (o *AuditLogEntryResponse) GetEventSource() (ret AuditLogEntryResponseGetEv // 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 @@ -963,16 +1173,19 @@ func (o *AuditLogEntryResponse) GetEventTimeStamp() (ret AuditLogEntryResponseGe // 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 @@ -980,16 +1193,19 @@ func (o *AuditLogEntryResponse) GetEventType() (ret AuditLogEntryResponseGetEven // 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 @@ -997,16 +1213,19 @@ func (o *AuditLogEntryResponse) GetEventVersion() (ret AuditLogEntryResponseGetE // 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 @@ -1014,16 +1233,19 @@ func (o *AuditLogEntryResponse) GetId() (ret AuditLogEntryResponseGetIdRetType) // 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 @@ -1031,16 +1253,19 @@ func (o *AuditLogEntryResponse) GetInitiator() (ret AuditLogEntryResponseGetInit // 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 @@ -1048,16 +1273,19 @@ func (o *AuditLogEntryResponse) GetReceivedTimeStamp() (ret AuditLogEntryRespons // 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 @@ -1065,16 +1293,19 @@ func (o *AuditLogEntryResponse) GetRegion() (ret AuditLogEntryResponseGetRegionR // 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 @@ -1082,16 +1313,19 @@ func (o *AuditLogEntryResponse) GetRequest() (ret AuditLogEntryResponseGetReques // 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 @@ -1099,22 +1333,26 @@ func (o *AuditLogEntryResponse) GetResourceId() (res AuditLogEntryResponseGetRes // 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 @@ -1122,22 +1360,26 @@ func (o *AuditLogEntryResponse) GetResourceName() (res AuditLogEntryResponseGetR // 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 @@ -1145,22 +1387,26 @@ func (o *AuditLogEntryResponse) GetResult() (res AuditLogEntryResponseGetResultR // 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 @@ -1168,22 +1414,26 @@ func (o *AuditLogEntryResponse) GetServiceAccountDelegationInfo() (res AuditLogE // 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 @@ -1191,16 +1441,19 @@ func (o *AuditLogEntryResponse) GetSeverity() (ret AuditLogEntryResponseGetSever // 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 @@ -1208,16 +1461,19 @@ func (o *AuditLogEntryResponse) GetSourceIpAddress() (ret AuditLogEntryResponseG // 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 @@ -1225,16 +1481,19 @@ func (o *AuditLogEntryResponse) GetUserAgent() (ret AuditLogEntryResponseGetUser // 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 @@ -1242,15 +1501,18 @@ func (o *AuditLogEntryResponse) GetVisibility() (ret AuditLogEntryResponseGetVis // 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 { @@ -1319,37 +1581,45 @@ func (o AuditLogEntryResponse) ToMap() (map[string]interface{}, error) { 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_service_account_delegation_info_response.go b/services/auditlog/model_audit_log_entry_service_account_delegation_info_response.go index 2b97180d6..31c167884 100644 --- 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 @@ -8,6 +8,7 @@ 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 ( @@ -22,10 +23,16 @@ var _ MappedNullable = &AuditLogEntryServiceAccountDelegationInfoResponse{} */ // 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 @@ -33,23 +40,27 @@ func getAuditLogEntryServiceAccountDelegationInfoResponseGetPrincipalsAttributeT 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) @@ -59,12 +70,14 @@ func NewAuditLogEntryServiceAccountDelegationInfoResponse(principals AuditLogEnt // 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 @@ -72,15 +85,18 @@ func (o *AuditLogEntryServiceAccountDelegationInfoResponse) GetPrincipals() (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 { @@ -89,37 +105,45 @@ func (o AuditLogEntryServiceAccountDelegationInfoResponse) ToMap() (map[string]i 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_error_response.go b/services/auditlog/model_error_response.go index d9a552439..6c40b9101 100644 --- a/services/auditlog/model_error_response.go +++ b/services/auditlog/model_error_response.go @@ -8,6 +8,7 @@ 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 ( @@ -23,8 +24,10 @@ var _ MappedNullable = &ErrorResponse{} */ // 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 @@ -32,11 +35,15 @@ func getErrorResponseGetMessageAttributeTypeOk(arg ErrorResponseGetMessageAttrib 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 /* @@ -44,8 +51,10 @@ type ErrorResponseGetMessageRetType = string */ // 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 @@ -53,11 +62,15 @@ func getErrorResponseGetPathAttributeTypeOk(arg ErrorResponseGetPathAttributeTyp 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 /* @@ -65,10 +78,16 @@ type ErrorResponseGetPathRetType = string */ // 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 @@ -76,6 +95,7 @@ func getErrorResponseGetStatusAttributeTypeOk(arg ErrorResponseGetStatusAttribut 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 } @@ -85,10 +105,16 @@ func setErrorResponseGetStatusAttributeType(arg *ErrorResponseGetStatusAttribute */ // 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 @@ -96,11 +122,13 @@ func getErrorResponseGetTimestampAttributeTypeOk(arg ErrorResponseGetTimestampAt 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"` @@ -116,6 +144,7 @@ type ErrorResponse struct { // 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 @@ -124,12 +153,14 @@ func NewErrorResponse() *ErrorResponse { // 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 @@ -137,22 +168,26 @@ func (o *ErrorResponse) GetMessage() (res ErrorResponseGetMessageRetType) { // 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 @@ -160,22 +195,26 @@ func (o *ErrorResponse) GetPath() (res ErrorResponseGetPathRetType) { // 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 @@ -183,22 +222,26 @@ func (o *ErrorResponse) GetStatus() (res ErrorResponseGetStatusRetType) { // 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 @@ -206,21 +249,25 @@ func (o *ErrorResponse) GetTimestamp() (res ErrorResponseGetTimestampRetType) { // 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 { @@ -238,37 +285,45 @@ func (o ErrorResponse) ToMap() (map[string]interface{}, error) { 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_gateway_error_response.go b/services/auditlog/model_gateway_error_response.go index b2f5ad633..357b14ac9 100644 --- a/services/auditlog/model_gateway_error_response.go +++ b/services/auditlog/model_gateway_error_response.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &GatewayErrorResponse{} */ // 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 @@ -31,11 +34,15 @@ func getGatewayErrorResponseGetMessageAttributeTypeOk(arg GatewayErrorResponseGe 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 /* @@ -43,10 +50,16 @@ type GatewayErrorResponseGetMessageRetType = string */ // 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 @@ -54,11 +67,13 @@ func getGatewayErrorResponseGetStatusAttributeTypeOk(arg GatewayErrorResponseGet 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"` @@ -70,6 +85,7 @@ type GatewayErrorResponse struct { // 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 @@ -78,12 +94,14 @@ func NewGatewayErrorResponse() *GatewayErrorResponse { // 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 @@ -91,22 +109,26 @@ func (o *GatewayErrorResponse) GetMessage() (res GatewayErrorResponseGetMessageR // 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 @@ -114,21 +136,25 @@ func (o *GatewayErrorResponse) GetStatus() (res GatewayErrorResponseGetStatusRet // 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 { @@ -140,37 +166,45 @@ func (o GatewayErrorResponse) ToMap() (map[string]interface{}, error) { 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_list_audit_log_entries_response.go b/services/auditlog/model_list_audit_log_entries_response.go index 3ec3b973d..1cbd11f13 100644 --- a/services/auditlog/model_list_audit_log_entries_response.go +++ b/services/auditlog/model_list_audit_log_entries_response.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &ListAuditLogEntriesResponse{} */ // 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 @@ -31,11 +34,15 @@ func getListAuditLogEntriesResponseGetCursorAttributeTypeOk(arg ListAuditLogEntr 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 /* @@ -43,10 +50,16 @@ type ListAuditLogEntriesResponseGetCursorRetType = string */ // 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 @@ -54,6 +67,7 @@ func getListAuditLogEntriesResponseGetItemsAttributeTypeOk(arg ListAuditLogEntri 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 } @@ -63,10 +77,16 @@ func setListAuditLogEntriesResponseGetItemsAttributeType(arg *ListAuditLogEntrie */ // 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 @@ -74,11 +94,13 @@ func getListAuditLogEntriesResponseGetLimitAttributeTypeOk(arg ListAuditLogEntri 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"` @@ -91,6 +113,7 @@ type ListAuditLogEntriesResponse struct { // 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 @@ -99,6 +122,7 @@ func NewListAuditLogEntriesResponse() *ListAuditLogEntriesResponse { // 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 @@ -107,6 +131,7 @@ func NewListAuditLogEntriesResponseWithDefaults() *ListAuditLogEntriesResponse { } // 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 @@ -114,22 +139,26 @@ func (o *ListAuditLogEntriesResponse) GetCursor() (res ListAuditLogEntriesRespon // 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 @@ -137,22 +166,26 @@ func (o *ListAuditLogEntriesResponse) GetItems() (res ListAuditLogEntriesRespons // 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 @@ -160,21 +193,25 @@ func (o *ListAuditLogEntriesResponse) GetLimit() (res ListAuditLogEntriesRespons // 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 { @@ -189,37 +226,45 @@ func (o ListAuditLogEntriesResponse) ToMap() (map[string]interface{}, error) { 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_service_account_delegation_info_principal_response.go b/services/auditlog/model_service_account_delegation_info_principal_response.go index 747bf35f8..c9134ef8c 100644 --- a/services/auditlog/model_service_account_delegation_info_principal_response.go +++ b/services/auditlog/model_service_account_delegation_info_principal_response.go @@ -8,6 +8,7 @@ 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 ( @@ -22,8 +23,10 @@ var _ MappedNullable = &ServiceAccountDelegationInfoPrincipalResponse{} */ // 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 @@ -31,11 +34,15 @@ func getServiceAccountDelegationInfoPrincipalResponseGetEmailAttributeTypeOk(arg 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 /* @@ -43,8 +50,10 @@ type ServiceAccountDelegationInfoPrincipalResponseGetEmailRetType = string */ // 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 @@ -52,14 +61,19 @@ func getServiceAccountDelegationInfoPrincipalResponseGetIdAttributeTypeOk(arg Se 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"` @@ -68,12 +82,14 @@ type ServiceAccountDelegationInfoPrincipalResponse struct { 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) @@ -83,12 +99,14 @@ func NewServiceAccountDelegationInfoPrincipalResponse(id ServiceAccountDelegatio // 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 @@ -96,22 +114,26 @@ func (o *ServiceAccountDelegationInfoPrincipalResponse) GetEmail() (res ServiceA // 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 @@ -119,15 +141,18 @@ func (o *ServiceAccountDelegationInfoPrincipalResponse) GetId() (ret ServiceAcco // 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 { @@ -139,37 +164,45 @@ func (o ServiceAccountDelegationInfoPrincipalResponse) ToMap() (map[string]inter 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/oas_commit b/services/auditlog/oas_commit index 064e1081f..bf3189995 100644 --- a/services/auditlog/oas_commit +++ b/services/auditlog/oas_commit @@ -1 +1 @@ -cfcfc32bc1ae335acecd7bf7ffb60354fdc565ab +3e9c109388be83b40c16d8cb5ab146aa314eb6e8 diff --git a/services/auditlog/utils.go b/services/auditlog/utils.go index 20a2e6e89..743b783fd 100644 --- a/services/auditlog/utils.go +++ b/services/auditlog/utils.go @@ -18,341 +18,419 @@ import ( ) // 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 @@ -369,13 +447,16 @@ func IsNil(i interface{}) bool { 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 { diff --git a/services/auditlog/v2api/api_default.go b/services/auditlog/v2api/api_default.go new file mode 100644 index 000000000..5f022f4e5 --- /dev/null +++ b/services/auditlog/v2api/api_default.go @@ -0,0 +1,707 @@ +/* +STACKIT Audit Log API + +API Endpoints to retrieve recorded actions and resulting changes in the system. ### Documentation The user documentation with explanations how to use the api can be found [here](https://docs.stackit.cloud/stackit/en/retrieve-audit-log-per-api-request-134415907.html). ### Audit Logging Changes on organizations, folders and projects and respective cloud resources are logged and collected in the audit log. ### API Constraints The audit log API allows to download messages from the last 90 days. The maximum duration that can be queried at once is 24 hours. Requests are rate limited - the current maximum is 60 requests per minute. + +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 + */ + ListFolderAuditLogEntries(ctx context.Context, folderId string) ApiListFolderAuditLogEntriesRequest + + // ListFolderAuditLogEntriesExecute executes the request + // @return ListAuditLogEntriesResponse + 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 + */ + ListOrganizationAuditLogEntries(ctx context.Context, organizationId string) ApiListOrganizationAuditLogEntriesRequest + + // ListOrganizationAuditLogEntriesExecute executes the request + // @return ListAuditLogEntriesResponse + 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 + */ + ListProjectAuditLogEntries(ctx context.Context, projectId string) ApiListProjectAuditLogEntriesRequest + + // ListProjectAuditLogEntriesExecute executes the request + // @return ListAuditLogEntriesResponse + 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 +*/ +func (a *DefaultAPIService) ListFolderAuditLogEntries(ctx context.Context, folderId string) ApiListFolderAuditLogEntriesRequest { + return ApiListFolderAuditLogEntriesRequest{ + ApiService: a, + ctx: ctx, + folderId: folderId, + } +} + +// Execute executes the request +// +// @return ListAuditLogEntriesResponse +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 + 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 + 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 + 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 + } + 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 +*/ +func (a *DefaultAPIService) ListOrganizationAuditLogEntries(ctx context.Context, organizationId string) ApiListOrganizationAuditLogEntriesRequest { + return ApiListOrganizationAuditLogEntriesRequest{ + ApiService: a, + ctx: ctx, + organizationId: organizationId, + } +} + +// Execute executes the request +// +// @return ListAuditLogEntriesResponse +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 + 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 + 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 + 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 + } + 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 +*/ +func (a *DefaultAPIService) ListProjectAuditLogEntries(ctx context.Context, projectId string) ApiListProjectAuditLogEntriesRequest { + return ApiListProjectAuditLogEntriesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return ListAuditLogEntriesResponse +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 + 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 + 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 + 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 + } + 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 new file mode 100644 index 000000000..d845319e3 --- /dev/null +++ b/services/auditlog/v2api/api_default_mock.go @@ -0,0 +1,83 @@ +/* +STACKIT Audit Log API + +API Endpoints to retrieve recorded actions and resulting changes in the system. ### Documentation The user documentation with explanations how to use the api can be found [here](https://docs.stackit.cloud/stackit/en/retrieve-audit-log-per-api-request-134415907.html). ### Audit Logging Changes on organizations, folders and projects and respective cloud resources are logged and collected in the audit log. ### API Constraints The audit log API allows to download messages from the last 90 days. The maximum duration that can be queried at once is 24 hours. Requests are rate limited - the current maximum is 60 requests per minute. + +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 { + // ListFolderAuditLogEntriesExecuteMock can be populated to implement the behavior of the ListFolderAuditLogEntriesExecute function of this mock + ListFolderAuditLogEntriesExecuteMock *func(r ApiListFolderAuditLogEntriesRequest) (*ListAuditLogEntriesResponse, error) + // ListOrganizationAuditLogEntriesExecuteMock can be populated to implement the behavior of the ListOrganizationAuditLogEntriesExecute function of this mock + ListOrganizationAuditLogEntriesExecuteMock *func(r ApiListOrganizationAuditLogEntriesRequest) (*ListAuditLogEntriesResponse, error) + // ListProjectAuditLogEntriesExecuteMock can be populated to implement the behavior of the ListProjectAuditLogEntriesExecute function of this mock + ListProjectAuditLogEntriesExecuteMock *func(r ApiListProjectAuditLogEntriesRequest) (*ListAuditLogEntriesResponse, error) +} + +func (a DefaultAPIServiceMock) ListFolderAuditLogEntries(ctx context.Context, folderId string) ApiListFolderAuditLogEntriesRequest { + return ApiListFolderAuditLogEntriesRequest{ + ApiService: a, + ctx: ctx, + folderId: folderId, + } +} + +// 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) +} + +func (a DefaultAPIServiceMock) ListOrganizationAuditLogEntries(ctx context.Context, organizationId string) ApiListOrganizationAuditLogEntriesRequest { + return ApiListOrganizationAuditLogEntriesRequest{ + ApiService: a, + ctx: ctx, + organizationId: organizationId, + } +} + +// 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) +} + +func (a DefaultAPIServiceMock) ListProjectAuditLogEntries(ctx context.Context, projectId string) ApiListProjectAuditLogEntriesRequest { + return ApiListProjectAuditLogEntriesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// 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 new file mode 100644 index 000000000..fb3cd5e2a --- /dev/null +++ b/services/auditlog/v2api/client.go @@ -0,0 +1,658 @@ +/* +STACKIT Audit Log API + +API Endpoints to retrieve recorded actions and resulting changes in the system. ### Documentation The user documentation with explanations how to use the api can be found [here](https://docs.stackit.cloud/stackit/en/retrieve-audit-log-per-api-request-134415907.html). ### Audit Logging Changes on organizations, folders and projects and respective cloud resources are logged and collected in the audit log. ### API Constraints The audit log API allows to download messages from the last 90 days. The maximum duration that can be queried at once is 24 hours. Requests are rate limited - the current maximum is 60 requests per minute. + +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 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 new file mode 100644 index 000000000..e7b03b503 --- /dev/null +++ b/services/auditlog/v2api/configuration.go @@ -0,0 +1,37 @@ +/* +STACKIT Audit Log API + +API Endpoints to retrieve recorded actions and resulting changes in the system. ### Documentation The user documentation with explanations how to use the api can be found [here](https://docs.stackit.cloud/stackit/en/retrieve-audit-log-per-api-request-134415907.html). ### Audit Logging Changes on organizations, folders and projects and respective cloud resources are logged and collected in the audit log. ### API Constraints The audit log API allows to download messages from the last 90 days. The maximum duration that can be queried at once is 24 hours. Requests are rate limited - the current maximum is 60 requests per minute. + +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 new file mode 100644 index 000000000..12dd6e1b1 --- /dev/null +++ b/services/auditlog/v2api/model_audit_log_entry_context_response.go @@ -0,0 +1,199 @@ +/* +STACKIT Audit Log API + +API Endpoints to retrieve recorded actions and resulting changes in the system. ### Documentation The user documentation with explanations how to use the api can be found [here](https://docs.stackit.cloud/stackit/en/retrieve-audit-log-per-api-request-134415907.html). ### Audit Logging Changes on organizations, folders and projects and respective cloud resources are logged and collected in the audit log. ### API Constraints The audit log API allows to download messages from the last 90 days. The maximum duration that can be queried at once is 24 hours. Requests are rate limited - the current maximum is 60 requests per minute. + +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"` +} + +// 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 + } + return toSerialize, nil +} + +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 new file mode 100644 index 000000000..74bcca4f5 --- /dev/null +++ b/services/auditlog/v2api/model_audit_log_entry_initiator_response.go @@ -0,0 +1,194 @@ +/* +STACKIT Audit Log API + +API Endpoints to retrieve recorded actions and resulting changes in the system. ### Documentation The user documentation with explanations how to use the api can be found [here](https://docs.stackit.cloud/stackit/en/retrieve-audit-log-per-api-request-134415907.html). ### Audit Logging Changes on organizations, folders and projects and respective cloud resources are logged and collected in the audit log. ### API Constraints The audit log API allows to download messages from the last 90 days. The maximum duration that can be queried at once is 24 hours. Requests are rate limited - the current maximum is 60 requests per minute. + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "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"` +} + +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 + 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{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAuditLogEntryInitiatorResponse) + + if err != nil { + return err + } + + *o = AuditLogEntryInitiatorResponse(varAuditLogEntryInitiatorResponse) + + 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 new file mode 100644 index 000000000..7142e46b6 --- /dev/null +++ b/services/auditlog/v2api/model_audit_log_entry_request_response.go @@ -0,0 +1,268 @@ +/* +STACKIT Audit Log API + +API Endpoints to retrieve recorded actions and resulting changes in the system. ### Documentation The user documentation with explanations how to use the api can be found [here](https://docs.stackit.cloud/stackit/en/retrieve-audit-log-per-api-request-134415907.html). ### Audit Logging Changes on organizations, folders and projects and respective cloud resources are logged and collected in the audit log. ### API Constraints The audit log API allows to download messages from the last 90 days. The maximum duration that can be queried at once is 24 hours. Requests are rate limited - the current maximum is 60 requests per minute. + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "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"` +} + +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 + } + 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{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAuditLogEntryRequestResponse) + + if err != nil { + return err + } + + *o = AuditLogEntryRequestResponse(varAuditLogEntryRequestResponse) + + 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 new file mode 100644 index 000000000..1381c4c0c --- /dev/null +++ b/services/auditlog/v2api/model_audit_log_entry_response.go @@ -0,0 +1,790 @@ +/* +STACKIT Audit Log API + +API Endpoints to retrieve recorded actions and resulting changes in the system. ### Documentation The user documentation with explanations how to use the api can be found [here](https://docs.stackit.cloud/stackit/en/retrieve-audit-log-per-api-request-134415907.html). ### Audit Logging Changes on organizations, folders and projects and respective cloud resources are logged and collected in the audit log. ### API Constraints The audit log API allows to download messages from the last 90 days. The maximum duration that can be queried at once is 24 hours. Requests are rate limited - the current maximum is 60 requests per minute. + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "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"` + // Type that can be assigned to the event. For example, an event \"Organization created\" can be assigned to the type ADMIN_EVENT + EventType string `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"` + // The severity of this request. + Severity string `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"` + // PUBLIC for entries that are intended for end users, while PRIVATE entries can only be viewed with system privileges. + Visibility string `json:"visibility"` +} + +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 string, eventVersion string, id string, initiator AuditLogEntryInitiatorResponse, receivedTimeStamp time.Time, region string, request AuditLogEntryRequestResponse, severity string, sourceIpAddress string, userAgent string, visibility string) *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() string { + if o == nil { + var ret string + 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() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EventType, true +} + +// SetEventType sets field value +func (o *AuditLogEntryResponse) SetEventType(v string) { + 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() string { + if o == nil { + var ret string + 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() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Severity, true +} + +// SetSeverity sets field value +func (o *AuditLogEntryResponse) SetSeverity(v string) { + 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() string { + if o == nil { + var ret string + 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() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Visibility, true +} + +// SetVisibility sets field value +func (o *AuditLogEntryResponse) SetVisibility(v string) { + 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 + 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{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAuditLogEntryResponse) + + if err != nil { + return err + } + + *o = AuditLogEntryResponse(varAuditLogEntryResponse) + + 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_service_account_delegation_info_response.go b/services/auditlog/v2api/model_audit_log_entry_service_account_delegation_info_response.go new file mode 100644 index 000000000..b0fa19bb9 --- /dev/null +++ b/services/auditlog/v2api/model_audit_log_entry_service_account_delegation_info_response.go @@ -0,0 +1,157 @@ +/* +STACKIT Audit Log API + +API Endpoints to retrieve recorded actions and resulting changes in the system. ### Documentation The user documentation with explanations how to use the api can be found [here](https://docs.stackit.cloud/stackit/en/retrieve-audit-log-per-api-request-134415907.html). ### Audit Logging Changes on organizations, folders and projects and respective cloud resources are logged and collected in the audit log. ### API Constraints The audit log API allows to download messages from the last 90 days. The maximum duration that can be queried at once is 24 hours. Requests are rate limited - the current maximum is 60 requests per minute. + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "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"` +} + +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 + 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{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAuditLogEntryServiceAccountDelegationInfoResponse) + + if err != nil { + return err + } + + *o = AuditLogEntryServiceAccountDelegationInfoResponse(varAuditLogEntryServiceAccountDelegationInfoResponse) + + 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 new file mode 100644 index 000000000..c126fe05b --- /dev/null +++ b/services/auditlog/v2api/model_error_response.go @@ -0,0 +1,237 @@ +/* +STACKIT Audit Log API + +API Endpoints to retrieve recorded actions and resulting changes in the system. ### Documentation The user documentation with explanations how to use the api can be found [here](https://docs.stackit.cloud/stackit/en/retrieve-audit-log-per-api-request-134415907.html). ### Audit Logging Changes on organizations, folders and projects and respective cloud resources are logged and collected in the audit log. ### API Constraints The audit log API allows to download messages from the last 90 days. The maximum duration that can be queried at once is 24 hours. Requests are rate limited - the current maximum is 60 requests per minute. + +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"` +} + +// 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 + } + return toSerialize, nil +} + +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 new file mode 100644 index 000000000..402e0e540 --- /dev/null +++ b/services/auditlog/v2api/model_gateway_error_response.go @@ -0,0 +1,162 @@ +/* +STACKIT Audit Log API + +API Endpoints to retrieve recorded actions and resulting changes in the system. ### Documentation The user documentation with explanations how to use the api can be found [here](https://docs.stackit.cloud/stackit/en/retrieve-audit-log-per-api-request-134415907.html). ### Audit Logging Changes on organizations, folders and projects and respective cloud resources are logged and collected in the audit log. ### API Constraints The audit log API allows to download messages from the last 90 days. The maximum duration that can be queried at once is 24 hours. Requests are rate limited - the current maximum is 60 requests per minute. + +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"` +} + +// 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 + } + return toSerialize, nil +} + +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 new file mode 100644 index 000000000..52be9a54f --- /dev/null +++ b/services/auditlog/v2api/model_list_audit_log_entries_response.go @@ -0,0 +1,202 @@ +/* +STACKIT Audit Log API + +API Endpoints to retrieve recorded actions and resulting changes in the system. ### Documentation The user documentation with explanations how to use the api can be found [here](https://docs.stackit.cloud/stackit/en/retrieve-audit-log-per-api-request-134415907.html). ### Audit Logging Changes on organizations, folders and projects and respective cloud resources are logged and collected in the audit log. ### API Constraints The audit log API allows to download messages from the last 90 days. The maximum duration that can be queried at once is 24 hours. Requests are rate limited - the current maximum is 60 requests per minute. + +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"` +} + +// 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 + } + return toSerialize, nil +} + +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 new file mode 100644 index 000000000..54b36ac54 --- /dev/null +++ b/services/auditlog/v2api/model_service_account_delegation_info_principal_response.go @@ -0,0 +1,194 @@ +/* +STACKIT Audit Log API + +API Endpoints to retrieve recorded actions and resulting changes in the system. ### Documentation The user documentation with explanations how to use the api can be found [here](https://docs.stackit.cloud/stackit/en/retrieve-audit-log-per-api-request-134415907.html). ### Audit Logging Changes on organizations, folders and projects and respective cloud resources are logged and collected in the audit log. ### API Constraints The audit log API allows to download messages from the last 90 days. The maximum duration that can be queried at once is 24 hours. Requests are rate limited - the current maximum is 60 requests per minute. + +API version: 2.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "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"` +} + +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 + 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{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varServiceAccountDelegationInfoPrincipalResponse) + + if err != nil { + return err + } + + *o = ServiceAccountDelegationInfoPrincipalResponse(varServiceAccountDelegationInfoPrincipalResponse) + + 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 new file mode 100644 index 000000000..72c0cc2e9 --- /dev/null +++ b/services/auditlog/v2api/response.go @@ -0,0 +1,47 @@ +/* +STACKIT Audit Log API + +API Endpoints to retrieve recorded actions and resulting changes in the system. ### Documentation The user documentation with explanations how to use the api can be found [here](https://docs.stackit.cloud/stackit/en/retrieve-audit-log-per-api-request-134415907.html). ### Audit Logging Changes on organizations, folders and projects and respective cloud resources are logged and collected in the audit log. ### API Constraints The audit log API allows to download messages from the last 90 days. The maximum duration that can be queried at once is 24 hours. Requests are rate limited - the current maximum is 60 requests per minute. + +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 new file mode 100644 index 000000000..699adb5bf --- /dev/null +++ b/services/auditlog/v2api/utils.go @@ -0,0 +1,361 @@ +/* +STACKIT Audit Log API + +API Endpoints to retrieve recorded actions and resulting changes in the system. ### Documentation The user documentation with explanations how to use the api can be found [here](https://docs.stackit.cloud/stackit/en/retrieve-audit-log-per-api-request-134415907.html). ### Audit Logging Changes on organizations, folders and projects and respective cloud resources are logged and collected in the audit log. ### API Constraints The audit log API allows to download messages from the last 90 days. The maximum duration that can be queried at once is 24 hours. Requests are rate limited - the current maximum is 60 requests per minute. + +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...) +}