diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f366fbfb..4c79e8d0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -70,6 +70,12 @@ - **Feature:** New model struct `Audit` - **Feature:** Add Audit (type Audit) field to model struct `CreateOrUpdateClusterPayload` - `sqlserverflex`: + - [v1.16.0](services/sqlserverflex/CHANGELOG.md#v1160) + - **Breaking Change:** The `v3api` replaces the `v2api`. + - The order of the parameters has changed in some cases. Region and the resource id has changed. + - `v3api`: **New:** New package which can be used for communication with the sqlserverflex v3 API + - `v2api`: **Deprecated:** `v2api` is deprecated, use instead `v3api` + - `v3beta2api`: **Deprecated:** `v3beta2api` is deprecated, use instead `v3api` - [v1.15.0](services/sqlserverflex/CHANGELOG.md#v1150) - `v3beta2api`: - **Breaking change:** Rename methods: diff --git a/examples/sqlserverflex/go.mod b/examples/sqlserverflex/go.mod index 71c4b294d..292279e44 100644 --- a/examples/sqlserverflex/go.mod +++ b/examples/sqlserverflex/go.mod @@ -5,12 +5,10 @@ go 1.25 // This is not needed in production. This is only here to point the golangci linter to the local version instead of the last release on GitHub. replace github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex => ../../services/sqlserverflex -require ( - github.com/stackitcloud/stackit-sdk-go/core v0.26.0 - github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.13.0 -) +require github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex v1.15.0 require ( github.com/golang-jwt/jwt/v5 v5.3.1 // indirect github.com/google/uuid v1.6.0 // indirect + github.com/stackitcloud/stackit-sdk-go/core v0.26.0 // indirect ) diff --git a/examples/sqlserverflex/v2/sqlserverflex.go b/examples/sqlserverflex/v2/sqlserverflex.go deleted file mode 100644 index 24bd1edca..000000000 --- a/examples/sqlserverflex/v2/sqlserverflex.go +++ /dev/null @@ -1,73 +0,0 @@ -package main - -import ( - "context" - "fmt" - "os" - - "github.com/stackitcloud/stackit-sdk-go/core/utils" - sqlserverflex "github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex/v2api" - "github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex/v2api/wait" -) - -func main() { - projectId := "PROJECT_ID" // the uuid of your STACKIT project - - // Specify the region - region := "eu01" - - // Specify instance configuration options - flavorId := "FLAVOR_ID" - version := "VERSION" - - ctx := context.Background() - - // Create a new API client, that uses default authentication and configuration - sqlserverflexClient, err := sqlserverflex.NewAPIClient() - if err != nil { - fmt.Fprintf(os.Stderr, "Creating API client: %v\n", err) - os.Exit(1) - } - - // Get the SQLServer Flex instances for your project - getInstancesResp, err := sqlserverflexClient.DefaultAPI.ListInstances(ctx, projectId, region).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ListInstances`: %v\n", err) - os.Exit(1) - } - items := getInstancesResp.Items - fmt.Printf("Number of instances: %v\n", len(items)) - - // Create an instance - createInstancePayload := sqlserverflex.CreateInstancePayload{ - Name: "my-instance", - FlavorId: flavorId, - Version: utils.Ptr(version), - } - instance, err := sqlserverflexClient.DefaultAPI.CreateInstance(ctx, projectId, region).CreateInstancePayload(createInstancePayload).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error creating SQL Server Flex instance: %v\n", err) - } - instanceId := *instance.Id - - _, err = wait.CreateInstanceWaitHandler(ctx, sqlserverflexClient.DefaultAPI, projectId, instanceId, region).WaitWithContext(ctx) - if err != nil { - fmt.Fprintf(os.Stderr, "Error when waiting for SQL Server Flex instance creation: %v\n", err) - } - - fmt.Printf("Created SQL Server Flex instance \"%s\".\n", instanceId) - - // Delete an instance - err = sqlserverflexClient.DefaultAPI.DeleteInstance(ctx, projectId, instanceId, region).Execute() - - if err != nil { - fmt.Fprintf(os.Stderr, "Error deleting SQL Server Flex instance: %v\n", err) - } - - _, err = wait.DeleteInstanceWaitHandler(ctx, sqlserverflexClient.DefaultAPI, projectId, instanceId, region).WaitWithContext(ctx) - if err != nil { - fmt.Fprintf(os.Stderr, "Error when waiting for SQL Server Flex instance deletion: %v\n", err) - } - - fmt.Printf("Deleted SQL Server Flex instance \"%s\".\n", instanceId) -} diff --git a/examples/sqlserverflex/v3beta2/sqlserverflex_v3beta2.go b/examples/sqlserverflex/v3/sqlserverflex_v3.go similarity index 98% rename from examples/sqlserverflex/v3beta2/sqlserverflex_v3beta2.go rename to examples/sqlserverflex/v3/sqlserverflex_v3.go index a779c2b30..d39226d1e 100644 --- a/examples/sqlserverflex/v3beta2/sqlserverflex_v3beta2.go +++ b/examples/sqlserverflex/v3/sqlserverflex_v3.go @@ -5,8 +5,8 @@ import ( "fmt" "os" - sqlserverflex "github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex/v3beta2api" - "github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex/v3beta2api/wait" + sqlserverflex "github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex/v3api" + "github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex/v3api/wait" ) func main() { diff --git a/services/sqlserverflex/CHANGELOG.md b/services/sqlserverflex/CHANGELOG.md index 62b985267..501cced5b 100644 --- a/services/sqlserverflex/CHANGELOG.md +++ b/services/sqlserverflex/CHANGELOG.md @@ -1,3 +1,10 @@ +## v1.16.0 +- **Breaking Change:** The `v3api` replaces the `v2api`. + - The order of the parameters has changed in some cases. Region and the resource id has changed. +- `v3api`: **New:** New package which can be used for communication with the sqlserverflex v3 API +- `v2api`: **Deprecated:** `v2api` is deprecated, use instead `v3api` +- `v3beta2api`: **Deprecated:** `v3beta2api` is deprecated, use instead `v3api` + ## v1.15.0 - `v3beta2api`: - **Breaking change:** Rename methods: diff --git a/services/sqlserverflex/VERSION b/services/sqlserverflex/VERSION index 853aaa675..4d9d07e23 100644 --- a/services/sqlserverflex/VERSION +++ b/services/sqlserverflex/VERSION @@ -1 +1 @@ -v1.15.0 \ No newline at end of file +v1.16.0 \ No newline at end of file diff --git a/services/sqlserverflex/api_default.go b/services/sqlserverflex/api_default.go index d01eda73a..6f1ba53f3 100644 --- a/services/sqlserverflex/api_default.go +++ b/services/sqlserverflex/api_default.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -27,36 +27,36 @@ import ( // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DefaultApi interface { /* - CreateDatabase Create a Database - Create a Database for an instance + CreateDatabase Create Database + Create database for a user. Note: The name of a valid user must be provided in the 'options' map field using the key 'owner' @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return ApiCreateDatabaseRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - CreateDatabase(ctx context.Context, projectId string, instanceId string, region string) ApiCreateDatabaseRequest + CreateDatabase(ctx context.Context, projectId string, region string, instanceId string) ApiCreateDatabaseRequest /* CreateDatabaseExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return CreateDatabaseResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - CreateDatabaseExecute(ctx context.Context, projectId string, instanceId string, region string) (*CreateDatabaseResponse, error) + CreateDatabaseExecute(ctx context.Context, projectId string, region string, instanceId string) (*CreateDatabaseResponse, error) /* CreateInstance Create Instance - Create a new instance of a sqlServerCRD database + Create a new instance of a sqlserver database instance. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID + @param projectId The STACKIT project ID. @param region The region which should be addressed @return ApiCreateInstanceRequest @@ -67,7 +67,7 @@ type DefaultApi interface { CreateInstanceExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID + @param projectId The STACKIT project ID. @param region The region which should be addressed @return CreateInstanceResponse @@ -76,300 +76,325 @@ type DefaultApi interface { CreateInstanceExecute(ctx context.Context, projectId string, region string) (*CreateInstanceResponse, error) /* CreateUser Create User - Create user for an instance + Create user for an instance. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return ApiCreateUserRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - CreateUser(ctx context.Context, projectId string, instanceId string, region string) ApiCreateUserRequest + CreateUser(ctx context.Context, projectId string, region string, instanceId string) ApiCreateUserRequest /* CreateUserExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return CreateUserResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - CreateUserExecute(ctx context.Context, projectId string, instanceId string, region string) (*CreateUserResponse, error) + CreateUserExecute(ctx context.Context, projectId string, region string, instanceId string) (*CreateUserResponse, error) /* DeleteDatabase Delete Database - Delete Database for an instance + Delete database for an instance. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID - @param databaseName Database Name + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. + @param databaseName The name of the database. @return ApiDeleteDatabaseRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - DeleteDatabase(ctx context.Context, projectId string, instanceId string, databaseName string, region string) ApiDeleteDatabaseRequest + DeleteDatabase(ctx context.Context, projectId string, region string, instanceId string, databaseName string) ApiDeleteDatabaseRequest /* DeleteDatabaseExecute executes the request // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - DeleteDatabaseExecute(ctx context.Context, projectId string, instanceId string, databaseName string, region string) error + DeleteDatabaseExecute(ctx context.Context, projectId string, region string, instanceId string, databaseName string) error /* DeleteInstance Delete Instance - Delete available instance + Delete an available sqlserver instance. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return ApiDeleteInstanceRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - DeleteInstance(ctx context.Context, projectId string, instanceId string, region string) ApiDeleteInstanceRequest + DeleteInstance(ctx context.Context, projectId string, region string, instanceId string) ApiDeleteInstanceRequest /* DeleteInstanceExecute executes the request // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - DeleteInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) error + DeleteInstanceExecute(ctx context.Context, projectId string, region string, instanceId string) error /* DeleteUser Delete User - Delete user for an instance + Delete an user from a specific instance. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID - @param userId User ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. + @param userId The ID of the user. @return ApiDeleteUserRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - DeleteUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiDeleteUserRequest + DeleteUser(ctx context.Context, projectId string, region string, instanceId string, userId int64) ApiDeleteUserRequest /* DeleteUserExecute executes the request // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - DeleteUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) error + DeleteUserExecute(ctx context.Context, projectId string, region string, instanceId string, userId int64) error /* GetBackup Get specific backup - Get specific available backup + Get information about a specific backup for an instance. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID - @param backupId Backup ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. + @param backupId The ID of the backup. @return ApiGetBackupRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - GetBackup(ctx context.Context, projectId string, instanceId string, backupId string, region string) ApiGetBackupRequest + GetBackup(ctx context.Context, projectId string, region string, instanceId string, backupId int64) ApiGetBackupRequest /* GetBackupExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID - @param backupId Backup ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. + @param backupId The ID of the backup. @return GetBackupResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - GetBackupExecute(ctx context.Context, projectId string, instanceId string, backupId string, region string) (*GetBackupResponse, error) + GetBackupExecute(ctx context.Context, projectId string, region string, instanceId string, backupId int64) (*GetBackupResponse, error) /* - GetDatabase Get specific Database + GetDatabase Get Database Get specific available database @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID - @param databaseName Database Name + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. + @param databaseName The name of the database. @return ApiGetDatabaseRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - GetDatabase(ctx context.Context, projectId string, instanceId string, databaseName string, region string) ApiGetDatabaseRequest + GetDatabase(ctx context.Context, projectId string, region string, instanceId string, databaseName string) ApiGetDatabaseRequest /* GetDatabaseExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID - @param databaseName Database Name + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. + @param databaseName The name of the database. @return GetDatabaseResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - GetDatabaseExecute(ctx context.Context, projectId string, instanceId string, databaseName string, region string) (*GetDatabaseResponse, error) + GetDatabaseExecute(ctx context.Context, projectId string, region string, instanceId string, databaseName string) (*GetDatabaseResponse, error) /* - GetInstance Get specific instance - Get specific available instances + GetInstance Get Specific Instance + Get information about a specific available instance @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return ApiGetInstanceRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - GetInstance(ctx context.Context, projectId string, instanceId string, region string) ApiGetInstanceRequest + GetInstance(ctx context.Context, projectId string, region string, instanceId string) ApiGetInstanceRequest /* GetInstanceExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return GetInstanceResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - GetInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*GetInstanceResponse, error) + GetInstanceExecute(ctx context.Context, projectId string, region string, instanceId string) (*GetInstanceResponse, error) /* GetUser Get User - Get specific available user for an instance + Get a specific available user for an instance. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID - @param userId User ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. + @param userId The ID of the user. @return ApiGetUserRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - GetUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiGetUserRequest + GetUser(ctx context.Context, projectId string, region string, instanceId string, userId int64) ApiGetUserRequest /* GetUserExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID - @param userId User ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. + @param userId The ID of the user. @return GetUserResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - GetUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) (*GetUserResponse, error) + GetUserExecute(ctx context.Context, projectId string, region string, instanceId string, userId int64) (*GetUserResponse, error) /* ListBackups List backups - List all backups which are available for a specific instance + List all backups which are available for a specific instance. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return ApiListBackupsRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - ListBackups(ctx context.Context, projectId string, instanceId string, region string) ApiListBackupsRequest + ListBackups(ctx context.Context, projectId string, region string, instanceId string) ApiListBackupsRequest /* ListBackupsExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return ListBackupsResponse + @param instanceId The ID of the instance. + @return ListBackupResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - ListBackupsExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListBackupsResponse, error) + ListBackupsExecute(ctx context.Context, projectId string, region string, instanceId string) (*ListBackupResponse, error) /* ListCollations Get database collation list - Returns a list of collations + Returns a list of collations for an instance @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The ID of the STACKIT project - @param instanceId The ID of the instance + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return ApiListCollationsRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - ListCollations(ctx context.Context, projectId string, instanceId string, region string) ApiListCollationsRequest + ListCollations(ctx context.Context, projectId string, region string, instanceId string) ApiListCollationsRequest /* ListCollationsExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The ID of the STACKIT project - @param instanceId The ID of the instance + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return ListCollationsResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - ListCollationsExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListCollationsResponse, error) + ListCollationsExecute(ctx context.Context, projectId string, region string, instanceId string) (*ListCollationsResponse, error) /* - ListCompatibility Get database compatibility list + ListCompatibilities Get database compatibility list Returns a list of compatibility levels for creating a new database @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The ID of the STACKIT project - @param instanceId The ID of the instance + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return ApiListCompatibilityRequest + @param instanceId The ID of the instance. + @return ApiListCompatibilitiesRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - ListCompatibility(ctx context.Context, projectId string, instanceId string, region string) ApiListCompatibilityRequest + ListCompatibilities(ctx context.Context, projectId string, region string, instanceId string) ApiListCompatibilitiesRequest /* - ListCompatibilityExecute executes the request + ListCompatibilitiesExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The ID of the STACKIT project - @param instanceId The ID of the instance + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return ListCompatibilityResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - ListCompatibilityExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListCompatibilityResponse, error) + ListCompatibilitiesExecute(ctx context.Context, projectId string, region string, instanceId string) (*ListCompatibilityResponse, error) /* - ListDatabases Get list of databases - Get list of all databases in the instance + ListCurrentRunningRestoreJobs List current running restore jobs + List all currently running restore jobs which are available for a specific instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiListCurrentRunningRestoreJobsRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + */ + ListCurrentRunningRestoreJobs(ctx context.Context, projectId string, region string, instanceId string) ApiListCurrentRunningRestoreJobsRequest + /* + ListCurrentRunningRestoreJobsExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ListCurrentRunningRestoreJobs + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + */ + ListCurrentRunningRestoreJobsExecute(ctx context.Context, projectId string, region string, instanceId string) (*ListCurrentRunningRestoreJobs, error) + /* + ListDatabases List Databases + List available databases for an instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. @return ApiListDatabasesRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - ListDatabases(ctx context.Context, projectId string, instanceId string, region string) ApiListDatabasesRequest + ListDatabases(ctx context.Context, projectId string, region string, instanceId string) ApiListDatabasesRequest /* ListDatabasesExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return ListDatabasesResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - ListDatabasesExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListDatabasesResponse, error) + ListDatabasesExecute(ctx context.Context, projectId string, region string, instanceId string) (*ListDatabasesResponse, error) /* ListFlavors Get Flavors - Get available flavors for a specific projectID + Get all available flavors for a project. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID + @param projectId The STACKIT project ID. @param region The region which should be addressed @return ApiListFlavorsRequest @@ -380,7 +405,7 @@ type DefaultApi interface { ListFlavorsExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID + @param projectId The STACKIT project ID. @param region The region which should be addressed @return ListFlavorsResponse @@ -389,10 +414,10 @@ type DefaultApi interface { ListFlavorsExecute(ctx context.Context, projectId string, region string) (*ListFlavorsResponse, error) /* ListInstances List Instances - List available instances + List all available instances for your project. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID + @param projectId The STACKIT project ID. @param region The region which should be addressed @return ApiListInstancesRequest @@ -403,146 +428,94 @@ type DefaultApi interface { ListInstancesExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID + @param projectId The STACKIT project ID. @param region The region which should be addressed @return ListInstancesResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListInstancesExecute(ctx context.Context, projectId string, region string) (*ListInstancesResponse, error) - /* - ListMetrics Get Metric - Returns a metric for an instance. The metric will only be for the master pod if needed. Granularity parameter is always needed. If start and end time is provided, period is not considered in max-connections and disk-use. If you provide start time, you have to provide end time as well and vice versa. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The UUID of the project. - @param instanceId The UUID of the instance. - @param region The region which should be addressed - @param metric The name of the metric. Valid metrics are 'cpu', 'memory', 'data-disk-size', 'data-disk-use','log-disk-size', 'log-disk-use', 'life-expectancy' and 'connections'. - @return ApiListMetricsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListMetrics(ctx context.Context, projectId string, instanceId string, region string, metric string) ApiListMetricsRequest - /* - ListMetricsExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId The UUID of the project. - @param instanceId The UUID of the instance. - @param region The region which should be addressed - @param metric The name of the metric. Valid metrics are 'cpu', 'memory', 'data-disk-size', 'data-disk-use','log-disk-size', 'log-disk-use', 'life-expectancy' and 'connections'. - @return ListMetricsResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListMetricsExecute(ctx context.Context, projectId string, instanceId string, region string, metric string) (*ListMetricsResponse, error) - /* - ListRestoreJobs List current running restore jobs - List all currently running restore jobs which are available for a specific instance - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID - @param region The region which should be addressed - @return ApiListRestoreJobsRequest - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListRestoreJobs(ctx context.Context, projectId string, instanceId string, region string) ApiListRestoreJobsRequest - /* - ListRestoreJobsExecute executes the request - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID - @param region The region which should be addressed - @return ListRestoreJobsResponse - - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - */ - ListRestoreJobsExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListRestoreJobsResponse, error) /* ListRoles List Roles List available roles for an instance that can be assigned to a user @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return ApiListRolesRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - ListRoles(ctx context.Context, projectId string, instanceId string, region string) ApiListRolesRequest + ListRoles(ctx context.Context, projectId string, region string, instanceId string) ApiListRolesRequest /* ListRolesExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return ListRolesResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - ListRolesExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListRolesResponse, error) + ListRolesExecute(ctx context.Context, projectId string, region string, instanceId string) (*ListRolesResponse, error) /* ListStorages Get Storages Get available storages for a specific flavor @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param flavorId Flavor ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param flavorId The id of an instance flavor. @return ApiListStoragesRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - ListStorages(ctx context.Context, projectId string, flavorId string, region string) ApiListStoragesRequest + ListStorages(ctx context.Context, projectId string, region string, flavorId string) ApiListStoragesRequest /* ListStoragesExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param flavorId Flavor ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param flavorId The id of an instance flavor. @return ListStoragesResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - ListStoragesExecute(ctx context.Context, projectId string, flavorId string, region string) (*ListStoragesResponse, error) + ListStoragesExecute(ctx context.Context, projectId string, region string, flavorId string) (*ListStoragesResponse, error) /* ListUsers List Users - List available users for an instance + List available users for an instance. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return ApiListUsersRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - ListUsers(ctx context.Context, projectId string, instanceId string, region string) ApiListUsersRequest + ListUsers(ctx context.Context, projectId string, region string, instanceId string) ApiListUsersRequest /* ListUsersExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return ListUsersResponse + @param instanceId The ID of the instance. + @return ListUserResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - ListUsersExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListUsersResponse, error) + ListUsersExecute(ctx context.Context, projectId string, region string, instanceId string) (*ListUserResponse, error) /* ListVersions Get Versions - Get available versions for mssql database + Get the sqlserver available versions for the project. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID + @param projectId The STACKIT project ID. @param region The region which should be addressed @return ApiListVersionsRequest @@ -553,7 +526,7 @@ type DefaultApi interface { ListVersionsExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID + @param projectId The STACKIT project ID. @param region The region which should be addressed @return ListVersionsResponse @@ -561,151 +534,168 @@ type DefaultApi interface { */ ListVersionsExecute(ctx context.Context, projectId string, region string) (*ListVersionsResponse, error) /* - PartialUpdateInstance Update Instance - Update available instance of a mssql database. + PartialUpdateInstance Update Instance Partially + Update an available instance of a mssql database. No fields are required. **Please note that any changes applied via PUT or PATCH requests will initiate a reboot of the SQL Server Flex Instance.** @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return ApiPartialUpdateInstanceRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - PartialUpdateInstance(ctx context.Context, projectId string, instanceId string, region string) ApiPartialUpdateInstanceRequest + PartialUpdateInstance(ctx context.Context, projectId string, region string, instanceId string) ApiPartialUpdateInstanceRequest /* PartialUpdateInstanceExecute executes the request - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID - @param region The region which should be addressed - @return UpdateInstanceResponse - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - PartialUpdateInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*UpdateInstanceResponse, error) + PartialUpdateInstanceExecute(ctx context.Context, projectId string, region string, instanceId string) error /* ResetUser Reset User - Reset user password for a mssql instance + Reset an user from an specific instance. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID - @param userId user ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. + @param userId The ID of the user. @return ApiResetUserRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - ResetUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiResetUserRequest + ResetUser(ctx context.Context, projectId string, region string, instanceId string, userId int64) ApiResetUserRequest /* ResetUserExecute executes the request @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID - @param userId user ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. + @param userId The ID of the user. @return ResetUserResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - ResetUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) (*ResetUserResponse, error) + ResetUserExecute(ctx context.Context, projectId string, region string, instanceId string, userId int64) (*ResetUserResponse, error) /* - TerminateProject Terminate the Project - Termination is the deletion of a whole project which causes the deletion of all instances for this project. Only System with permission system.databases-project.remove is able to call this resource + RestoreDatabaseFromBackup Create a Restore Operation + Triggers a new restore operation for the specified instance. + The request body defines the source + (e.g., internal backup, external S3) and the target database. + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return ApiTerminateProjectRequest + @param instanceId The ID of the instance. + @return ApiRestoreDatabaseFromBackupRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - TerminateProject(ctx context.Context, projectId string, region string) ApiTerminateProjectRequest + RestoreDatabaseFromBackup(ctx context.Context, projectId string, region string, instanceId string) ApiRestoreDatabaseFromBackupRequest /* - TerminateProjectExecute executes the request + RestoreDatabaseFromBackupExecute executes the request // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - TerminateProjectExecute(ctx context.Context, projectId string, region string) error + RestoreDatabaseFromBackupExecute(ctx context.Context, projectId string, region string, instanceId string) error /* - TriggerDatabaseBackup Trigger backup for a specific Database - Trigger backup for a specific Database + TriggerBackup Trigger backup for a specific Database + Trigger backup for a specific database @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID - @param databaseName Database Name + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return ApiTriggerDatabaseBackupRequest + @param instanceId The ID of the instance. + @param databaseName The name of the database. + @return ApiTriggerBackupRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - TriggerDatabaseBackup(ctx context.Context, projectId string, instanceId string, databaseName string, region string) ApiTriggerDatabaseBackupRequest + TriggerBackup(ctx context.Context, projectId string, region string, instanceId string, databaseName string) ApiTriggerBackupRequest /* - TriggerDatabaseBackupExecute executes the request + TriggerBackupExecute executes the request // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - TriggerDatabaseBackupExecute(ctx context.Context, projectId string, instanceId string, databaseName string, region string) error + TriggerBackupExecute(ctx context.Context, projectId string, region string, instanceId string, databaseName string) error /* - TriggerDatabaseRestore Trigger restore for a specific Database + TriggerRestore Trigger restore for a specific Database Trigger restore for a specific Database @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID - @param databaseName Database Name + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return ApiTriggerDatabaseRestoreRequest + @param instanceId The ID of the instance. + @param databaseName The name of the database. + @return ApiTriggerRestoreRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - TriggerDatabaseRestore(ctx context.Context, projectId string, instanceId string, databaseName string, region string) ApiTriggerDatabaseRestoreRequest + TriggerRestore(ctx context.Context, projectId string, region string, instanceId string, databaseName string) ApiTriggerRestoreRequest /* - TriggerDatabaseRestoreExecute executes the request + TriggerRestoreExecute executes the request // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - TriggerDatabaseRestoreExecute(ctx context.Context, projectId string, instanceId string, databaseName string, region string) error + TriggerRestoreExecute(ctx context.Context, projectId string, region string, instanceId string, databaseName string) error /* UpdateInstance Update Instance - Update available instance of a mssql database. + Updates an available instance of a sqlserver database **Please note that any changes applied via PUT or PATCH requests will initiate a reboot of the SQL Server Flex Instance.** @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return ApiUpdateInstanceRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - UpdateInstance(ctx context.Context, projectId string, instanceId string, region string) ApiUpdateInstanceRequest + UpdateInstance(ctx context.Context, projectId string, region string, instanceId string) ApiUpdateInstanceRequest /* UpdateInstanceExecute executes the request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + */ + UpdateInstanceExecute(ctx context.Context, projectId string, region string, instanceId string) error + /* + UpdateInstanceProtection Protect Instance + Toggle the deletion protection for an instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiUpdateInstanceProtectionRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + */ + UpdateInstanceProtection(ctx context.Context, projectId string, region string, instanceId string) ApiUpdateInstanceProtectionRequest + /* + UpdateInstanceProtectionExecute executes the request + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param projectId Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return UpdateInstanceResponse + @param instanceId The ID of the instance. + @return UpdateInstanceProtectionResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ - UpdateInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*UpdateInstanceResponse, error) + UpdateInstanceProtectionExecute(ctx context.Context, projectId string, region string, instanceId string) (*UpdateInstanceProtectionResponse, error) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCreateDatabaseRequest interface { - // Body + // The request body containing the information for the new database. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CreateDatabasePayload(createDatabasePayload CreateDatabasePayload) ApiCreateDatabaseRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -714,7 +704,7 @@ type ApiCreateDatabaseRequest interface { // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCreateInstanceRequest interface { - // Body + // The request body with the parameters for the instance creation. Every parameter is required. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CreateInstancePayload(createInstancePayload CreateInstancePayload) ApiCreateInstanceRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -723,7 +713,7 @@ type ApiCreateInstanceRequest interface { // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCreateUserRequest interface { - // The request body contains a username, a list of roles and database. The possible roles can be fetched from the ListRoles endpoint. + // The request body containing the user details. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CreateUserPayload(createUserPayload CreateUserPayload) ApiCreateUserRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -774,8 +764,17 @@ type ApiGetUserRequest interface { // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListBackupsRequest interface { + // Number of the page of items list to be returned. + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + Page(page int64) ApiListBackupsRequest + // Number of items to be returned on each page. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ListBackupsResponse, error) + Size(size int64) ApiListBackupsRequest + // Sorting of the backups to be returned on each page. + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + Sort(sort BackupSort) ApiListBackupsRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + Execute() (*ListBackupResponse, error) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -785,51 +784,60 @@ type ApiListCollationsRequest interface { } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListCompatibilityRequest interface { +type ApiListCompatibilitiesRequest interface { // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListCompatibilityResponse, error) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListDatabasesRequest interface { +type ApiListCurrentRunningRestoreJobsRequest interface { // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ListDatabasesResponse, error) + Execute() (*ListCurrentRunningRestoreJobs, error) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListFlavorsRequest interface { +type ApiListDatabasesRequest interface { + // Number of the page of items list to be returned. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ListFlavorsResponse, error) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListInstancesRequest interface { + Page(page int64) ApiListDatabasesRequest + // Number of items to be returned on each page. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ListInstancesResponse, error) + Size(size int64) ApiListDatabasesRequest + // Sorting of the databases to be returned on each page. + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + Sort(sort DatabaseSort) ApiListDatabasesRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + Execute() (*ListDatabasesResponse, error) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListMetricsRequest interface { - // The granularity in ISO8601 e.g. 5 minutes are 'PT5M'. - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Granularity(granularity string) ApiListMetricsRequest - // The period in ISO8601 format e.g. 5 minutes are 'PT5M'. If no period is provided, the standard value of 5 minutes is used. +type ApiListFlavorsRequest interface { + // Number of the page of items list to be returned. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Period(period string) ApiListMetricsRequest - // The start of the timeframe as timestamp in ISO8601 (RFC3339) e.g. '2023-08-28T07:10:52.536Z'. If no start time is provided, current server time as UTC is used. + Page(page int64) ApiListFlavorsRequest + // Number of items to be returned on each page. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Start(start string) ApiListMetricsRequest - // The end of the timeframe as timestamp in ISO8601 (RFC3339) e.g. '2023-08-28T07:10:52.536Z'. + Size(size int64) ApiListFlavorsRequest + // Sorting of the flavors to be returned on each page. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - End(end string) ApiListMetricsRequest + Sort(sort FlavorSort) ApiListFlavorsRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ListMetricsResponse, error) + Execute() (*ListFlavorsResponse, error) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiListRestoreJobsRequest interface { +type ApiListInstancesRequest interface { + // Number of the page of items list to be returned. + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + Page(page int64) ApiListInstancesRequest + // Number of items to be returned on each page. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ListRestoreJobsResponse, error) + Size(size int64) ApiListInstancesRequest + // Sorting of the items to be returned on each page. + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + Sort(sort InstanceSort) ApiListInstancesRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + Execute() (*ListInstancesResponse, error) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -846,26 +854,32 @@ type ApiListStoragesRequest interface { // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListUsersRequest interface { + // Number of the page of items list to be returned. + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + Page(page int64) ApiListUsersRequest + // Number of items to be returned on each page. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*ListUsersResponse, error) + Size(size int64) ApiListUsersRequest + // Sorting of the users to be returned on each page. + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + Sort(sort UserSort) ApiListUsersRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + Execute() (*ListUserResponse, error) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListVersionsRequest interface { - // Instance ID - // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - InstanceId(instanceId string) ApiListVersionsRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListVersionsResponse, error) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiPartialUpdateInstanceRequest interface { - // Body + // The request body with the parameters for updating the instance. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead PartialUpdateInstancePayload(partialUpdateInstancePayload PartialUpdateInstancePayload) ApiPartialUpdateInstanceRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*UpdateInstanceResponse, error) + Execute() error } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -875,33 +889,45 @@ type ApiResetUserRequest interface { } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiTerminateProjectRequest interface { +type ApiRestoreDatabaseFromBackupRequest interface { + // The restore operation payload. + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + RestoreDatabaseFromBackupPayload(restoreDatabaseFromBackupPayload RestoreDatabaseFromBackupPayload) ApiRestoreDatabaseFromBackupRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() error } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiTriggerDatabaseBackupRequest interface { +type ApiTriggerBackupRequest interface { // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() error } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ApiTriggerDatabaseRestoreRequest interface { - // Body +type ApiTriggerRestoreRequest interface { + // The request body with the parameters for the database restore. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - TriggerDatabaseRestorePayload(triggerDatabaseRestorePayload TriggerDatabaseRestorePayload) ApiTriggerDatabaseRestoreRequest + TriggerRestorePayload(triggerRestorePayload TriggerRestorePayload) ApiTriggerRestoreRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() error } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiUpdateInstanceRequest interface { - // Body + // The request body with the parameters for updating the instance // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead UpdateInstancePayload(updateInstancePayload UpdateInstancePayload) ApiUpdateInstanceRequest // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - Execute() (*UpdateInstanceResponse, error) + Execute() error +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ApiUpdateInstanceProtectionRequest interface { + // The request body with flag isDeletable. Parameter is required. + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + UpdateInstanceProtectionPayload(updateInstanceProtectionPayload UpdateInstanceProtectionPayload) ApiUpdateInstanceProtectionRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + Execute() (*UpdateInstanceProtectionResponse, error) } // DefaultApiService DefaultApi service @@ -913,12 +939,12 @@ type CreateDatabaseRequest struct { ctx context.Context apiService *DefaultApiService projectId string - instanceId string region string + instanceId string createDatabasePayload *CreateDatabasePayload } -// Body +// The request body containing the information for the new database. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateDatabaseRequest) CreateDatabasePayload(createDatabasePayload CreateDatabasePayload) ApiCreateDatabaseRequest { r.createDatabasePayload = &createDatabasePayload @@ -943,10 +969,10 @@ func (r CreateDatabaseRequest) Execute() (*CreateDatabaseResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/databases" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/databases" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1007,7 +1033,7 @@ func (r CreateDatabaseRequest) Execute() (*CreateDatabaseResponse, error) { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1018,7 +1044,40 @@ func (r CreateDatabaseRequest) Execute() (*CreateDatabaseResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationError err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1028,6 +1087,16 @@ func (r CreateDatabaseRequest) Execute() (*CreateDatabaseResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } return localVarReturnValue, newErr } @@ -1045,34 +1114,34 @@ func (r CreateDatabaseRequest) Execute() (*CreateDatabaseResponse, error) { } /* -CreateDatabase: Create a Database +CreateDatabase: Create Database 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 Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return ApiCreateDatabaseRequest */ -func (a *APIClient) CreateDatabase(ctx context.Context, projectId string, instanceId string, region string) ApiCreateDatabaseRequest { +func (a *APIClient) CreateDatabase(ctx context.Context, projectId string, region string, instanceId string) ApiCreateDatabaseRequest { return CreateDatabaseRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreateDatabaseExecute(ctx context.Context, projectId string, instanceId string, region string) (*CreateDatabaseResponse, error) { +func (a *APIClient) CreateDatabaseExecute(ctx context.Context, projectId string, region string, instanceId string) (*CreateDatabaseResponse, error) { r := CreateDatabaseRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, } return r.Execute() } @@ -1086,7 +1155,7 @@ type CreateInstanceRequest struct { createInstancePayload *CreateInstancePayload } -// Body +// The request body with the parameters for the instance creation. Every parameter is required. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateInstanceRequest) CreateInstancePayload(createInstancePayload CreateInstancePayload) ApiCreateInstanceRequest { r.createInstancePayload = &createInstancePayload @@ -1111,7 +1180,7 @@ func (r CreateInstanceRequest) Execute() (*CreateInstanceResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) @@ -1174,7 +1243,7 @@ func (r CreateInstanceRequest) Execute() (*CreateInstanceResponse, error) { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1185,7 +1254,40 @@ func (r CreateInstanceRequest) Execute() (*CreateInstanceResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1195,6 +1297,16 @@ func (r CreateInstanceRequest) Execute() (*CreateInstanceResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } return localVarReturnValue, newErr } @@ -1217,7 +1329,7 @@ CreateInstance: Create Instance 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 Project ID + @param projectId The STACKIT project ID. @param region The region which should be addressed @return ApiCreateInstanceRequest */ @@ -1246,12 +1358,12 @@ type CreateUserRequest struct { ctx context.Context apiService *DefaultApiService projectId string - instanceId string region string + instanceId string createUserPayload *CreateUserPayload } -// The request body contains a username, a list of roles and database. The possible roles can be fetched from the ListRoles endpoint. +// The request body containing the user details. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateUserRequest) CreateUserPayload(createUserPayload CreateUserPayload) ApiCreateUserRequest { r.createUserPayload = &createUserPayload @@ -1276,10 +1388,10 @@ func (r CreateUserRequest) Execute() (*CreateUserResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1340,7 +1452,7 @@ func (r CreateUserRequest) Execute() (*CreateUserResponse, error) { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1351,7 +1463,40 @@ func (r CreateUserRequest) Execute() (*CreateUserResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationError err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1361,6 +1506,16 @@ func (r CreateUserRequest) Execute() (*CreateUserResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } return localVarReturnValue, newErr } @@ -1383,29 +1538,29 @@ CreateUser: Create User 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 Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return ApiCreateUserRequest */ -func (a *APIClient) CreateUser(ctx context.Context, projectId string, instanceId string, region string) ApiCreateUserRequest { +func (a *APIClient) CreateUser(ctx context.Context, projectId string, region string, instanceId string) ApiCreateUserRequest { return CreateUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) CreateUserExecute(ctx context.Context, projectId string, instanceId string, region string) (*CreateUserResponse, error) { +func (a *APIClient) CreateUserExecute(ctx context.Context, projectId string, region string, instanceId string) (*CreateUserResponse, error) { r := CreateUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, } return r.Execute() } @@ -1415,9 +1570,9 @@ type DeleteDatabaseRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string databaseName string - region string } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -1437,11 +1592,11 @@ func (r DeleteDatabaseRequest) Execute() error { return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/databases/{databaseName}" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/databases/{databaseName}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"databaseName"+"}", url.PathEscape(ParameterValueToString(r.databaseName, "databaseName")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1497,7 +1652,7 @@ func (r DeleteDatabaseRequest) Execute() error { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1508,7 +1663,29 @@ func (r DeleteDatabaseRequest) Execute() error { return newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1518,6 +1695,16 @@ func (r DeleteDatabaseRequest) Execute() error { newErr.Model = v return newErr } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } return newErr } @@ -1530,32 +1717,32 @@ DeleteDatabase: Delete Database 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 Project ID - @param instanceId Instance ID - @param databaseName Database Name + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. + @param databaseName The name of the database. @return ApiDeleteDatabaseRequest */ -func (a *APIClient) DeleteDatabase(ctx context.Context, projectId string, instanceId string, databaseName string, region string) ApiDeleteDatabaseRequest { +func (a *APIClient) DeleteDatabase(ctx context.Context, projectId string, region string, instanceId string, databaseName string) ApiDeleteDatabaseRequest { return DeleteDatabaseRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, databaseName: databaseName, - region: region, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteDatabaseExecute(ctx context.Context, projectId string, instanceId string, databaseName string, region string) error { +func (a *APIClient) DeleteDatabaseExecute(ctx context.Context, projectId string, region string, instanceId string, databaseName string) error { r := DeleteDatabaseRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, databaseName: databaseName, - region: region, } return r.Execute() } @@ -1565,8 +1752,8 @@ type DeleteInstanceRequest struct { ctx context.Context apiService *DefaultApiService projectId string - instanceId string region string + instanceId string } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -1586,10 +1773,10 @@ func (r DeleteInstanceRequest) Execute() error { return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1645,7 +1832,7 @@ func (r DeleteInstanceRequest) Execute() error { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1656,7 +1843,29 @@ func (r DeleteInstanceRequest) Execute() error { return newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1666,6 +1875,16 @@ func (r DeleteInstanceRequest) Execute() error { newErr.Model = v return newErr } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } return newErr } @@ -1678,29 +1897,29 @@ DeleteInstance: Delete Instance 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 Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return ApiDeleteInstanceRequest */ -func (a *APIClient) DeleteInstance(ctx context.Context, projectId string, instanceId string, region string) ApiDeleteInstanceRequest { +func (a *APIClient) DeleteInstance(ctx context.Context, projectId string, region string, instanceId string) ApiDeleteInstanceRequest { return DeleteInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) error { +func (a *APIClient) DeleteInstanceExecute(ctx context.Context, projectId string, region string, instanceId string) error { r := DeleteInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, } return r.Execute() } @@ -1710,9 +1929,9 @@ type DeleteUserRequest struct { ctx context.Context apiService *DefaultApiService projectId string - instanceId string - userId string region string + instanceId string + userId int64 } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -1732,11 +1951,11 @@ func (r DeleteUserRequest) Execute() error { return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", url.PathEscape(ParameterValueToString(r.userId, "userId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1792,7 +2011,7 @@ func (r DeleteUserRequest) Execute() error { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1803,7 +2022,29 @@ func (r DeleteUserRequest) Execute() error { return newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1813,6 +2054,16 @@ func (r DeleteUserRequest) Execute() error { newErr.Model = v return newErr } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } return newErr } @@ -1825,32 +2076,32 @@ DeleteUser: Delete User 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 Project ID - @param instanceId Instance ID - @param userId User ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. + @param userId The ID of the user. @return ApiDeleteUserRequest */ -func (a *APIClient) DeleteUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiDeleteUserRequest { +func (a *APIClient) DeleteUser(ctx context.Context, projectId string, region string, instanceId string, userId int64) ApiDeleteUserRequest { return DeleteUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, userId: userId, - region: region, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) DeleteUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) error { +func (a *APIClient) DeleteUserExecute(ctx context.Context, projectId string, region string, instanceId string, userId int64) error { r := DeleteUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, userId: userId, - region: region, } return r.Execute() } @@ -1860,9 +2111,9 @@ type GetBackupRequest struct { ctx context.Context apiService *DefaultApiService projectId string - instanceId string - backupId string region string + instanceId string + backupId int64 } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -1883,11 +2134,11 @@ func (r GetBackupRequest) Execute() (*GetBackupResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/backups/{backupId}" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/backups/{backupId}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"backupId"+"}", url.PathEscape(ParameterValueToString(r.backupId, "backupId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1943,7 +2194,7 @@ func (r GetBackupRequest) Execute() (*GetBackupResponse, error) { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1954,7 +2205,40 @@ func (r GetBackupRequest) Execute() (*GetBackupResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -1964,6 +2248,16 @@ func (r GetBackupRequest) Execute() (*GetBackupResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } return localVarReturnValue, newErr } @@ -1986,32 +2280,32 @@ GetBackup: Get specific backup 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 Project ID - @param instanceId Instance ID - @param backupId Backup ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. + @param backupId The ID of the backup. @return ApiGetBackupRequest */ -func (a *APIClient) GetBackup(ctx context.Context, projectId string, instanceId string, backupId string, region string) ApiGetBackupRequest { +func (a *APIClient) GetBackup(ctx context.Context, projectId string, region string, instanceId string, backupId int64) ApiGetBackupRequest { return GetBackupRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, backupId: backupId, - region: region, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetBackupExecute(ctx context.Context, projectId string, instanceId string, backupId string, region string) (*GetBackupResponse, error) { +func (a *APIClient) GetBackupExecute(ctx context.Context, projectId string, region string, instanceId string, backupId int64) (*GetBackupResponse, error) { r := GetBackupRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, backupId: backupId, - region: region, } return r.Execute() } @@ -2021,9 +2315,9 @@ type GetDatabaseRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string databaseName string - region string } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -2044,11 +2338,11 @@ func (r GetDatabaseRequest) Execute() (*GetDatabaseResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/databases/{databaseName}" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/databases/{databaseName}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"databaseName"+"}", url.PathEscape(ParameterValueToString(r.databaseName, "databaseName")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2104,7 +2398,7 @@ func (r GetDatabaseRequest) Execute() (*GetDatabaseResponse, error) { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2115,7 +2409,40 @@ func (r GetDatabaseRequest) Execute() (*GetDatabaseResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2125,6 +2452,16 @@ func (r GetDatabaseRequest) Execute() (*GetDatabaseResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } return localVarReturnValue, newErr } @@ -2142,37 +2479,37 @@ func (r GetDatabaseRequest) Execute() (*GetDatabaseResponse, error) { } /* -GetDatabase: Get specific Database +GetDatabase: Get Database 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 Project ID - @param instanceId Instance ID - @param databaseName Database Name + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. + @param databaseName The name of the database. @return ApiGetDatabaseRequest */ -func (a *APIClient) GetDatabase(ctx context.Context, projectId string, instanceId string, databaseName string, region string) ApiGetDatabaseRequest { +func (a *APIClient) GetDatabase(ctx context.Context, projectId string, region string, instanceId string, databaseName string) ApiGetDatabaseRequest { return GetDatabaseRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, databaseName: databaseName, - region: region, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetDatabaseExecute(ctx context.Context, projectId string, instanceId string, databaseName string, region string) (*GetDatabaseResponse, error) { +func (a *APIClient) GetDatabaseExecute(ctx context.Context, projectId string, region string, instanceId string, databaseName string) (*GetDatabaseResponse, error) { r := GetDatabaseRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, databaseName: databaseName, - region: region, } return r.Execute() } @@ -2182,8 +2519,8 @@ type GetInstanceRequest struct { ctx context.Context apiService *DefaultApiService projectId string - instanceId string region string + instanceId string } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -2204,10 +2541,10 @@ func (r GetInstanceRequest) Execute() (*GetInstanceResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2263,7 +2600,7 @@ func (r GetInstanceRequest) Execute() (*GetInstanceResponse, error) { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2274,7 +2611,29 @@ func (r GetInstanceRequest) Execute() (*GetInstanceResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2284,6 +2643,16 @@ func (r GetInstanceRequest) Execute() (*GetInstanceResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } return localVarReturnValue, newErr } @@ -2301,34 +2670,34 @@ func (r GetInstanceRequest) Execute() (*GetInstanceResponse, error) { } /* -GetInstance: Get specific instance +GetInstance: Get Specific Instance 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 Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return ApiGetInstanceRequest */ -func (a *APIClient) GetInstance(ctx context.Context, projectId string, instanceId string, region string) ApiGetInstanceRequest { +func (a *APIClient) GetInstance(ctx context.Context, projectId string, region string, instanceId string) ApiGetInstanceRequest { return GetInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*GetInstanceResponse, error) { +func (a *APIClient) GetInstanceExecute(ctx context.Context, projectId string, region string, instanceId string) (*GetInstanceResponse, error) { r := GetInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, } return r.Execute() } @@ -2338,9 +2707,9 @@ type GetUserRequest struct { ctx context.Context apiService *DefaultApiService projectId string - instanceId string - userId string region string + instanceId string + userId int64 } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -2361,11 +2730,11 @@ func (r GetUserRequest) Execute() (*GetUserResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", url.PathEscape(ParameterValueToString(r.userId, "userId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2421,7 +2790,7 @@ func (r GetUserRequest) Execute() (*GetUserResponse, error) { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2432,7 +2801,18 @@ func (r GetUserRequest) Execute() (*GetUserResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2443,7 +2823,7 @@ func (r GetUserRequest) Execute() (*GetUserResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 404 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2454,7 +2834,7 @@ func (r GetUserRequest) Execute() (*GetUserResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 500 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2485,32 +2865,32 @@ GetUser: Get User 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 Project ID - @param instanceId Instance ID - @param userId User ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. + @param userId The ID of the user. @return ApiGetUserRequest */ -func (a *APIClient) GetUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiGetUserRequest { +func (a *APIClient) GetUser(ctx context.Context, projectId string, region string, instanceId string, userId int64) ApiGetUserRequest { return GetUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, userId: userId, - region: region, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) GetUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) (*GetUserResponse, error) { +func (a *APIClient) GetUserExecute(ctx context.Context, projectId string, region string, instanceId string, userId int64) (*GetUserResponse, error) { r := GetUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, userId: userId, - region: region, } return r.Execute() } @@ -2520,17 +2900,41 @@ type ListBackupsRequest struct { ctx context.Context apiService *DefaultApiService projectId string - instanceId string region string + instanceId string + page *int64 + size *int64 + sort *BackupSort +} + +// Number of the page of items list to be returned. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (r ListBackupsRequest) Page(page int64) ApiListBackupsRequest { + r.page = &page + return r +} + +// Number of items to be returned on each page. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (r ListBackupsRequest) Size(size int64) ApiListBackupsRequest { + r.size = &size + return r +} + +// Sorting of the backups to be returned on each page. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (r ListBackupsRequest) Sort(sort BackupSort) ApiListBackupsRequest { + r.sort = &sort + return r } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListBackupsRequest) Execute() (*ListBackupsResponse, error) { +func (r ListBackupsRequest) Execute() (*ListBackupResponse, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListBackupsResponse + localVarReturnValue *ListBackupResponse ) a := r.apiService client, ok := a.client.(*APIClient) @@ -2542,15 +2946,24 @@ func (r ListBackupsRequest) Execute() (*ListBackupsResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/backups" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/backups" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "") + } + if r.sort != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -2601,7 +3014,7 @@ func (r ListBackupsRequest) Execute() (*ListBackupsResponse, error) { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2612,7 +3025,7 @@ func (r ListBackupsRequest) Execute() (*ListBackupsResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2622,19 +3035,62 @@ func (r ListBackupsRequest) Execute() (*ListBackupsResponse, error) { newErr.Model = v return localVarReturnValue, newErr } - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr } - return localVarReturnValue, newErr - } - + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + return localVarReturnValue, nil } @@ -2644,29 +3100,29 @@ ListBackups: List backups 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 Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return ApiListBackupsRequest */ -func (a *APIClient) ListBackups(ctx context.Context, projectId string, instanceId string, region string) ApiListBackupsRequest { +func (a *APIClient) ListBackups(ctx context.Context, projectId string, region string, instanceId string) ApiListBackupsRequest { return ListBackupsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListBackupsExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListBackupsResponse, error) { +func (a *APIClient) ListBackupsExecute(ctx context.Context, projectId string, region string, instanceId string) (*ListBackupResponse, error) { r := ListBackupsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, } return r.Execute() } @@ -2676,8 +3132,8 @@ type ListCollationsRequest struct { ctx context.Context apiService *DefaultApiService projectId string - instanceId string region string + instanceId string } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -2698,10 +3154,10 @@ func (r ListCollationsRequest) Execute() (*ListCollationsResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/collation" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/collations" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2757,7 +3213,7 @@ func (r ListCollationsRequest) Execute() (*ListCollationsResponse, error) { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2768,7 +3224,18 @@ func (r ListCollationsRequest) Execute() (*ListCollationsResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2778,8 +3245,8 @@ func (r ListCollationsRequest) Execute() (*ListCollationsResponse, error) { newErr.Model = v return localVarReturnValue, newErr } - if localVarHTTPResponse.StatusCode == 405 { - var v InstanceError + if localVarHTTPResponse.StatusCode == 404 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2790,7 +3257,18 @@ func (r ListCollationsRequest) Execute() (*ListCollationsResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 500 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 501 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2821,44 +3299,44 @@ ListCollations: Get database collation list 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 The ID of the STACKIT project - @param instanceId The ID of the instance + @param projectId The STACKIT project ID. @param region The region which should be addressed + @param instanceId The ID of the instance. @return ApiListCollationsRequest */ -func (a *APIClient) ListCollations(ctx context.Context, projectId string, instanceId string, region string) ApiListCollationsRequest { +func (a *APIClient) ListCollations(ctx context.Context, projectId string, region string, instanceId string) ApiListCollationsRequest { return ListCollationsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListCollationsExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListCollationsResponse, error) { +func (a *APIClient) ListCollationsExecute(ctx context.Context, projectId string, region string, instanceId string) (*ListCollationsResponse, error) { r := ListCollationsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, } return r.Execute() } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListCompatibilityRequest struct { +type ListCompatibilitiesRequest struct { ctx context.Context apiService *DefaultApiService projectId string - instanceId string region string + instanceId string } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListCompatibilityRequest) Execute() (*ListCompatibilityResponse, error) { +func (r ListCompatibilitiesRequest) Execute() (*ListCompatibilityResponse, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -2870,15 +3348,15 @@ func (r ListCompatibilityRequest) Execute() (*ListCompatibilityResponse, error) if !ok { return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListCompatibility") + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListCompatibilities") if err != nil { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/compatibility" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/compatibility" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -2934,7 +3412,7 @@ func (r ListCompatibilityRequest) Execute() (*ListCompatibilityResponse, error) ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2945,7 +3423,18 @@ func (r ListCompatibilityRequest) Execute() (*ListCompatibilityResponse, error) return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2955,8 +3444,8 @@ func (r ListCompatibilityRequest) Execute() (*ListCompatibilityResponse, error) newErr.Model = v return localVarReturnValue, newErr } - if localVarHTTPResponse.StatusCode == 405 { - var v InstanceError + if localVarHTTPResponse.StatusCode == 404 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2967,7 +3456,18 @@ func (r ListCompatibilityRequest) Execute() (*ListCompatibilityResponse, error) return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 500 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 501 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -2993,69 +3493,69 @@ func (r ListCompatibilityRequest) Execute() (*ListCompatibilityResponse, error) } /* -ListCompatibility: Get database compatibility list +ListCompatibilities: Get database compatibility list 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 The ID of the STACKIT project - @param instanceId The ID of the instance + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return ApiListCompatibilityRequest + @param instanceId The ID of the instance. + @return ApiListCompatibilitiesRequest */ -func (a *APIClient) ListCompatibility(ctx context.Context, projectId string, instanceId string, region string) ApiListCompatibilityRequest { - return ListCompatibilityRequest{ +func (a *APIClient) ListCompatibilities(ctx context.Context, projectId string, region string, instanceId string) ApiListCompatibilitiesRequest { + return ListCompatibilitiesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListCompatibilityExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListCompatibilityResponse, error) { - r := ListCompatibilityRequest{ +func (a *APIClient) ListCompatibilitiesExecute(ctx context.Context, projectId string, region string, instanceId string) (*ListCompatibilityResponse, error) { + r := ListCompatibilitiesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, } return r.Execute() } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListDatabasesRequest struct { +type ListCurrentRunningRestoreJobsRequest struct { ctx context.Context apiService *DefaultApiService projectId string - instanceId string region string + instanceId string } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListDatabasesRequest) Execute() (*ListDatabasesResponse, error) { +func (r ListCurrentRunningRestoreJobsRequest) Execute() (*ListCurrentRunningRestoreJobs, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListDatabasesResponse + localVarReturnValue *ListCurrentRunningRestoreJobs ) a := r.apiService client, ok := a.client.(*APIClient) if !ok { return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListDatabases") + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListCurrentRunningRestoreJobs") if err != nil { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/databases" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/restore-jobs" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3111,7 +3611,7 @@ func (r ListDatabasesRequest) Execute() (*ListDatabasesResponse, error) { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -3122,7 +3622,40 @@ func (r ListDatabasesRequest) Execute() (*ListDatabasesResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -3132,6 +3665,16 @@ func (r ListDatabasesRequest) Execute() (*ListDatabasesResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } return localVarReturnValue, newErr } @@ -3149,72 +3692,107 @@ func (r ListDatabasesRequest) Execute() (*ListDatabasesResponse, error) { } /* -ListDatabases: Get list of databases +ListCurrentRunningRestoreJobs: List current running restore jobs 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 Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return ApiListDatabasesRequest + @param instanceId The ID of the instance. + @return ApiListCurrentRunningRestoreJobsRequest */ -func (a *APIClient) ListDatabases(ctx context.Context, projectId string, instanceId string, region string) ApiListDatabasesRequest { - return ListDatabasesRequest{ +func (a *APIClient) ListCurrentRunningRestoreJobs(ctx context.Context, projectId string, region string, instanceId string) ApiListCurrentRunningRestoreJobsRequest { + return ListCurrentRunningRestoreJobsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListDatabasesExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListDatabasesResponse, error) { - r := ListDatabasesRequest{ +func (a *APIClient) ListCurrentRunningRestoreJobsExecute(ctx context.Context, projectId string, region string, instanceId string) (*ListCurrentRunningRestoreJobs, error) { + r := ListCurrentRunningRestoreJobsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, } return r.Execute() } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListFlavorsRequest struct { +type ListDatabasesRequest struct { ctx context.Context apiService *DefaultApiService projectId string region string + instanceId string + page *int64 + size *int64 + sort *DatabaseSort } +// Number of the page of items list to be returned. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListFlavorsRequest) Execute() (*ListFlavorsResponse, error) { +func (r ListDatabasesRequest) Page(page int64) ApiListDatabasesRequest { + r.page = &page + return r +} + +// Number of items to be returned on each page. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (r ListDatabasesRequest) Size(size int64) ApiListDatabasesRequest { + r.size = &size + return r +} + +// Sorting of the databases to be returned on each page. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (r ListDatabasesRequest) Sort(sort DatabaseSort) ApiListDatabasesRequest { + r.sort = &sort + return r +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (r ListDatabasesRequest) Execute() (*ListDatabasesResponse, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListFlavorsResponse + localVarReturnValue *ListDatabasesResponse ) a := r.apiService client, ok := a.client.(*APIClient) if !ok { return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListFlavors") + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListDatabases") if err != nil { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/flavors" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/databases" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "") + } + if r.sort != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -3265,7 +3843,7 @@ func (r ListFlavorsRequest) Execute() (*ListFlavorsResponse, error) { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -3276,7 +3854,29 @@ func (r ListFlavorsRequest) Execute() (*ListFlavorsResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -3286,6 +3886,16 @@ func (r ListFlavorsRequest) Execute() (*ListFlavorsResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } return localVarReturnValue, newErr } @@ -3303,62 +3913,89 @@ func (r ListFlavorsRequest) Execute() (*ListFlavorsResponse, error) { } /* -ListFlavors: Get Flavors +ListDatabases: List Databases 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 Project ID + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return ApiListFlavorsRequest + @param instanceId The ID of the instance. + @return ApiListDatabasesRequest */ -func (a *APIClient) ListFlavors(ctx context.Context, projectId string, region string) ApiListFlavorsRequest { - return ListFlavorsRequest{ +func (a *APIClient) ListDatabases(ctx context.Context, projectId string, region string, instanceId string) ApiListDatabasesRequest { + return ListDatabasesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, region: region, + instanceId: instanceId, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListFlavorsExecute(ctx context.Context, projectId string, region string) (*ListFlavorsResponse, error) { - r := ListFlavorsRequest{ +func (a *APIClient) ListDatabasesExecute(ctx context.Context, projectId string, region string, instanceId string) (*ListDatabasesResponse, error) { + r := ListDatabasesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, region: region, + instanceId: instanceId, } return r.Execute() } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListInstancesRequest struct { +type ListFlavorsRequest struct { ctx context.Context apiService *DefaultApiService projectId string region string + page *int64 + size *int64 + sort *FlavorSort } +// Number of the page of items list to be returned. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListInstancesRequest) Execute() (*ListInstancesResponse, error) { +func (r ListFlavorsRequest) Page(page int64) ApiListFlavorsRequest { + r.page = &page + return r +} + +// Number of items to be returned on each page. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (r ListFlavorsRequest) Size(size int64) ApiListFlavorsRequest { + r.size = &size + return r +} + +// Sorting of the flavors to be returned on each page. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (r ListFlavorsRequest) Sort(sort FlavorSort) ApiListFlavorsRequest { + r.sort = &sort + return r +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (r ListFlavorsRequest) Execute() (*ListFlavorsResponse, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListInstancesResponse + localVarReturnValue *ListFlavorsResponse ) a := r.apiService client, ok := a.client.(*APIClient) if !ok { return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListInstances") + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListFlavors") if err != nil { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/flavors" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) @@ -3366,6 +4003,15 @@ func (r ListInstancesRequest) Execute() (*ListInstancesResponse, error) { localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "") + } + if r.sort != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -3416,7 +4062,7 @@ func (r ListInstancesRequest) Execute() (*ListInstancesResponse, error) { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -3427,7 +4073,7 @@ func (r ListInstancesRequest) Execute() (*ListInstancesResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -3437,34 +4083,77 @@ func (r ListInstancesRequest) Execute() (*ListInstancesResponse, error) { newErr.Model = v return localVarReturnValue, newErr } - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr } - return localVarReturnValue, newErr + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr } return localVarReturnValue, nil } /* -ListInstances: List Instances +ListFlavors: Get Flavors 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 Project ID + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return ApiListInstancesRequest + @return ApiListFlavorsRequest */ -func (a *APIClient) ListInstances(ctx context.Context, projectId string, region string) ApiListInstancesRequest { - return ListInstancesRequest{ +func (a *APIClient) ListFlavors(ctx context.Context, projectId string, region string) ApiListFlavorsRequest { + return ListFlavorsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, @@ -3473,8 +4162,8 @@ func (a *APIClient) ListInstances(ctx context.Context, projectId string, region } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListInstancesExecute(ctx context.Context, projectId string, region string) (*ListInstancesResponse, error) { - r := ListInstancesRequest{ +func (a *APIClient) ListFlavorsExecute(ctx context.Context, projectId string, region string) (*ListFlavorsResponse, error) { + r := ListFlavorsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, @@ -3484,87 +4173,71 @@ func (a *APIClient) ListInstancesExecute(ctx context.Context, projectId string, } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListMetricsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - instanceId string - region string - metric string - granularity *string - period *string - start *string - end *string -} - -// The granularity in ISO8601 e.g. 5 minutes are 'PT5M'. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListMetricsRequest) Granularity(granularity string) ApiListMetricsRequest { - r.granularity = &granularity - return r +type ListInstancesRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + page *int64 + size *int64 + sort *InstanceSort } -// The period in ISO8601 format e.g. 5 minutes are 'PT5M'. If no period is provided, the standard value of 5 minutes is used. +// Number of the page of items list to be returned. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListMetricsRequest) Period(period string) ApiListMetricsRequest { - r.period = &period +func (r ListInstancesRequest) Page(page int64) ApiListInstancesRequest { + r.page = &page return r } -// The start of the timeframe as timestamp in ISO8601 (RFC3339) e.g. '2023-08-28T07:10:52.536Z'. If no start time is provided, current server time as UTC is used. +// Number of items to be returned on each page. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListMetricsRequest) Start(start string) ApiListMetricsRequest { - r.start = &start +func (r ListInstancesRequest) Size(size int64) ApiListInstancesRequest { + r.size = &size return r } -// The end of the timeframe as timestamp in ISO8601 (RFC3339) e.g. '2023-08-28T07:10:52.536Z'. +// Sorting of the items to be returned on each page. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListMetricsRequest) End(end string) ApiListMetricsRequest { - r.end = &end +func (r ListInstancesRequest) Sort(sort InstanceSort) ApiListInstancesRequest { + r.sort = &sort return r } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListMetricsRequest) Execute() (*ListMetricsResponse, error) { +func (r ListInstancesRequest) Execute() (*ListInstancesResponse, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListMetricsResponse + localVarReturnValue *ListInstancesResponse ) a := r.apiService client, ok := a.client.(*APIClient) if !ok { return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListMetrics") + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListInstances") if err != nil { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/metrics/{metric}" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"metric"+"}", url.PathEscape(ParameterValueToString(r.metric, "metric")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.granularity == nil { - return localVarReturnValue, fmt.Errorf("granularity is required and must be specified") - } - parameterAddToHeaderOrQuery(localVarQueryParams, "granularity", r.granularity, "") - if r.period != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "") + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } - if r.start != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "start", r.start, "") + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "") } - if r.end != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "end", r.end, "") + if r.sort != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -3616,7 +4289,29 @@ func (r ListMetricsRequest) Execute() (*ListMetricsResponse, error) { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -3626,8 +4321,8 @@ func (r ListMetricsRequest) Execute() (*ListMetricsResponse, error) { newErr.Model = v return localVarReturnValue, newErr } - if localVarHTTPResponse.StatusCode == 405 { - var v InstanceError + if localVarHTTPResponse.StatusCode == 404 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -3638,7 +4333,7 @@ func (r ListMetricsRequest) Execute() (*ListMetricsResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 500 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -3664,72 +4359,66 @@ func (r ListMetricsRequest) Execute() (*ListMetricsResponse, error) { } /* -ListMetrics: Get Metric +ListInstances: List Instances 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 The UUID of the project. - @param instanceId The UUID of the instance. + @param projectId The STACKIT project ID. @param region The region which should be addressed - @param metric The name of the metric. Valid metrics are 'cpu', 'memory', 'data-disk-size', 'data-disk-use','log-disk-size', 'log-disk-use', 'life-expectancy' and 'connections'. - @return ApiListMetricsRequest + @return ApiListInstancesRequest */ -func (a *APIClient) ListMetrics(ctx context.Context, projectId string, instanceId string, region string, metric string) ApiListMetricsRequest { - return ListMetricsRequest{ +func (a *APIClient) ListInstances(ctx context.Context, projectId string, region string) ApiListInstancesRequest { + return ListInstancesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, - metric: metric, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListMetricsExecute(ctx context.Context, projectId string, instanceId string, region string, metric string) (*ListMetricsResponse, error) { - r := ListMetricsRequest{ +func (a *APIClient) ListInstancesExecute(ctx context.Context, projectId string, region string) (*ListInstancesResponse, error) { + r := ListInstancesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, - metric: metric, } return r.Execute() } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListRestoreJobsRequest struct { +type ListRolesRequest struct { ctx context.Context apiService *DefaultApiService projectId string - instanceId string region string + instanceId string } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListRestoreJobsRequest) Execute() (*ListRestoreJobsResponse, error) { +func (r ListRolesRequest) Execute() (*ListRolesResponse, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListRestoreJobsResponse + localVarReturnValue *ListRolesResponse ) a := r.apiService client, ok := a.client.(*APIClient) if !ok { return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListRestoreJobs") + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListRoles") if err != nil { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/restores" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/roles" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3785,7 +4474,7 @@ func (r ListRestoreJobsRequest) Execute() (*ListRestoreJobsResponse, error) { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -3796,7 +4485,40 @@ func (r ListRestoreJobsRequest) Execute() (*ListRestoreJobsResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -3806,6 +4528,16 @@ func (r ListRestoreJobsRequest) Execute() (*ListRestoreJobsResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } return localVarReturnValue, newErr } @@ -3823,69 +4555,69 @@ func (r ListRestoreJobsRequest) Execute() (*ListRestoreJobsResponse, error) { } /* -ListRestoreJobs: List current running restore jobs +ListRoles: List Roles 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 Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return ApiListRestoreJobsRequest + @param instanceId The ID of the instance. + @return ApiListRolesRequest */ -func (a *APIClient) ListRestoreJobs(ctx context.Context, projectId string, instanceId string, region string) ApiListRestoreJobsRequest { - return ListRestoreJobsRequest{ +func (a *APIClient) ListRoles(ctx context.Context, projectId string, region string, instanceId string) ApiListRolesRequest { + return ListRolesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListRestoreJobsExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListRestoreJobsResponse, error) { - r := ListRestoreJobsRequest{ +func (a *APIClient) ListRolesExecute(ctx context.Context, projectId string, region string, instanceId string) (*ListRolesResponse, error) { + r := ListRolesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, } return r.Execute() } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListRolesRequest struct { +type ListStoragesRequest struct { ctx context.Context apiService *DefaultApiService projectId string - instanceId string region string + flavorId string } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListRolesRequest) Execute() (*ListRolesResponse, error) { +func (r ListStoragesRequest) Execute() (*ListStoragesResponse, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListRolesResponse + localVarReturnValue *ListStoragesResponse ) a := r.apiService client, ok := a.client.(*APIClient) if !ok { return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListRoles") + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListStorages") if err != nil { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/roles" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/storages/{flavorId}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"flavorId"+"}", url.PathEscape(ParameterValueToString(r.flavorId, "flavorId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3941,7 +4673,7 @@ func (r ListRolesRequest) Execute() (*ListRolesResponse, error) { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -3952,7 +4684,29 @@ func (r ListRolesRequest) Execute() (*ListRolesResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -3962,6 +4716,16 @@ func (r ListRolesRequest) Execute() (*ListRolesResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } return localVarReturnValue, newErr } @@ -3979,74 +4743,107 @@ func (r ListRolesRequest) Execute() (*ListRolesResponse, error) { } /* -ListRoles: List Roles +ListStorages: Get Storages 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 Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return ApiListRolesRequest + @param flavorId The id of an instance flavor. + @return ApiListStoragesRequest */ -func (a *APIClient) ListRoles(ctx context.Context, projectId string, instanceId string, region string) ApiListRolesRequest { - return ListRolesRequest{ +func (a *APIClient) ListStorages(ctx context.Context, projectId string, region string, flavorId string) ApiListStoragesRequest { + return ListStoragesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + flavorId: flavorId, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListRolesExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListRolesResponse, error) { - r := ListRolesRequest{ +func (a *APIClient) ListStoragesExecute(ctx context.Context, projectId string, region string, flavorId string) (*ListStoragesResponse, error) { + r := ListStoragesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + flavorId: flavorId, } return r.Execute() } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListStoragesRequest struct { +type ListUsersRequest struct { ctx context.Context apiService *DefaultApiService projectId string - flavorId string region string + instanceId string + page *int64 + size *int64 + sort *UserSort } +// Number of the page of items list to be returned. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListStoragesRequest) Execute() (*ListStoragesResponse, error) { +func (r ListUsersRequest) Page(page int64) ApiListUsersRequest { + r.page = &page + return r +} + +// Number of items to be returned on each page. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (r ListUsersRequest) Size(size int64) ApiListUsersRequest { + r.size = &size + return r +} + +// Sorting of the users to be returned on each page. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (r ListUsersRequest) Sort(sort UserSort) ApiListUsersRequest { + r.sort = &sort + return r +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (r ListUsersRequest) Execute() (*ListUserResponse, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListStoragesResponse + localVarReturnValue *ListUserResponse ) a := r.apiService client, ok := a.client.(*APIClient) if !ok { return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListStorages") + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListUsers") if err != nil { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/storages/{flavorId}" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"flavorId"+"}", url.PathEscape(ParameterValueToString(r.flavorId, "flavorId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "") + } + if r.sort != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -4097,7 +4894,7 @@ func (r ListStoragesRequest) Execute() (*ListStoragesResponse, error) { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -4108,7 +4905,29 @@ func (r ListStoragesRequest) Execute() (*ListStoragesResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -4118,6 +4937,16 @@ func (r ListStoragesRequest) Execute() (*ListStoragesResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } return localVarReturnValue, newErr } @@ -4135,68 +4964,66 @@ func (r ListStoragesRequest) Execute() (*ListStoragesResponse, error) { } /* -ListStorages: Get Storages +ListUsers: List Users 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 Project ID - @param flavorId Flavor ID + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return ApiListStoragesRequest + @param instanceId The ID of the instance. + @return ApiListUsersRequest */ -func (a *APIClient) ListStorages(ctx context.Context, projectId string, flavorId string, region string) ApiListStoragesRequest { - return ListStoragesRequest{ +func (a *APIClient) ListUsers(ctx context.Context, projectId string, region string, instanceId string) ApiListUsersRequest { + return ListUsersRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - flavorId: flavorId, region: region, + instanceId: instanceId, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListStoragesExecute(ctx context.Context, projectId string, flavorId string, region string) (*ListStoragesResponse, error) { - r := ListStoragesRequest{ +func (a *APIClient) ListUsersExecute(ctx context.Context, projectId string, region string, instanceId string) (*ListUserResponse, error) { + r := ListUsersRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - flavorId: flavorId, region: region, + instanceId: instanceId, } return r.Execute() } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListUsersRequest struct { +type ListVersionsRequest struct { ctx context.Context apiService *DefaultApiService projectId string - instanceId string region string } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListUsersRequest) Execute() (*ListUsersResponse, error) { +func (r ListVersionsRequest) Execute() (*ListVersionsResponse, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListUsersResponse + localVarReturnValue *ListVersionsResponse ) a := r.apiService client, ok := a.client.(*APIClient) if !ok { return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListUsers") + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListVersions") if err != nil { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/versions" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarHeaderParams := make(map[string]string) @@ -4253,7 +5080,7 @@ func (r ListUsersRequest) Execute() (*ListUsersResponse, error) { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -4264,7 +5091,40 @@ func (r ListUsersRequest) Execute() (*ListUsersResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -4274,6 +5134,16 @@ func (r ListUsersRequest) Execute() (*ListUsersResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } return localVarReturnValue, newErr } @@ -4291,85 +5161,83 @@ func (r ListUsersRequest) Execute() (*ListUsersResponse, error) { } /* -ListUsers: List Users +ListVersions: Get Versions 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 Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return ApiListUsersRequest + @return ApiListVersionsRequest */ -func (a *APIClient) ListUsers(ctx context.Context, projectId string, instanceId string, region string) ApiListUsersRequest { - return ListUsersRequest{ +func (a *APIClient) ListVersions(ctx context.Context, projectId string, region string) ApiListVersionsRequest { + return ListVersionsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListUsersExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListUsersResponse, error) { - r := ListUsersRequest{ +func (a *APIClient) ListVersionsExecute(ctx context.Context, projectId string, region string) (*ListVersionsResponse, error) { + r := ListVersionsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, } return r.Execute() } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListVersionsRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string - instanceId *string +type PartialUpdateInstanceRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + instanceId string + partialUpdateInstancePayload *PartialUpdateInstancePayload } -// Instance ID +// The request body with the parameters for updating the instance. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListVersionsRequest) InstanceId(instanceId string) ApiListVersionsRequest { - r.instanceId = &instanceId +func (r PartialUpdateInstanceRequest) PartialUpdateInstancePayload(partialUpdateInstancePayload PartialUpdateInstancePayload) ApiPartialUpdateInstanceRequest { + r.partialUpdateInstancePayload = &partialUpdateInstancePayload return r } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ListVersionsRequest) Execute() (*ListVersionsResponse, error) { +func (r PartialUpdateInstanceRequest) Execute() error { var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListVersionsResponse + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile ) a := r.apiService client, ok := a.client.(*APIClient) if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") + return fmt.Errorf("could not parse client to type APIClient") } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListVersions") + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.PartialUpdateInstance") if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/versions" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - - if r.instanceId != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "instanceId", r.instanceId, "") + if r.partialUpdateInstancePayload == nil { + return fmt.Errorf("partialUpdateInstancePayload is required and must be specified") } + // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -4385,9 +5253,11 @@ func (r ListVersionsRequest) Execute() (*ListVersionsResponse, error) { if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + // body params + localVarPostBody = r.partialUpdateInstancePayload req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { - return localVarReturnValue, err + return err } contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) @@ -4401,14 +5271,14 @@ func (r ListVersionsRequest) Execute() (*ListVersionsResponse, error) { *contextHTTPResponse = localVarHTTPResponse } if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err + return err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return err } if localVarHTTPResponse.StatusCode >= 300 { @@ -4418,122 +5288,149 @@ func (r ListVersionsRequest) Execute() (*ListVersionsResponse, error) { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr + return newErr } newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) newErr.Model = v - return localVarReturnValue, newErr + return newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr + return newErr } newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) newErr.Model = v - return localVarReturnValue, newErr + return newErr } - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr } - return localVarReturnValue, newErr + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return newErr } - return localVarReturnValue, nil + return nil } /* -ListVersions: Get Versions +PartialUpdateInstance: Update Instance Partially 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 Project ID + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return ApiListVersionsRequest + @param instanceId The ID of the instance. + @return ApiPartialUpdateInstanceRequest */ -func (a *APIClient) ListVersions(ctx context.Context, projectId string, region string) ApiListVersionsRequest { - return ListVersionsRequest{ +func (a *APIClient) PartialUpdateInstance(ctx context.Context, projectId string, region string, instanceId string) ApiPartialUpdateInstanceRequest { + return PartialUpdateInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, region: region, + instanceId: instanceId, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ListVersionsExecute(ctx context.Context, projectId string, region string) (*ListVersionsResponse, error) { - r := ListVersionsRequest{ +func (a *APIClient) PartialUpdateInstanceExecute(ctx context.Context, projectId string, region string, instanceId string) error { + r := PartialUpdateInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, region: region, + instanceId: instanceId, } return r.Execute() } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateInstanceRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - instanceId string - region string - partialUpdateInstancePayload *PartialUpdateInstancePayload -} - -// Body -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r PartialUpdateInstanceRequest) PartialUpdateInstancePayload(partialUpdateInstancePayload PartialUpdateInstancePayload) ApiPartialUpdateInstanceRequest { - r.partialUpdateInstancePayload = &partialUpdateInstancePayload - return r +type ResetUserRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + instanceId string + userId int64 } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r PartialUpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) { +func (r ResetUserRequest) Execute() (*ResetUserResponse, error) { var ( - localVarHTTPMethod = http.MethodPatch + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *UpdateInstanceResponse + localVarReturnValue *ResetUserResponse ) a := r.apiService client, ok := a.client.(*APIClient) if !ok { return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.PartialUpdateInstance") + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ResetUser") if err != nil { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}/reset" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", url.PathEscape(ParameterValueToString(r.userId, "userId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.partialUpdateInstancePayload == nil { - return localVarReturnValue, fmt.Errorf("partialUpdateInstancePayload is required and must be specified") - } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -4549,8 +5446,6 @@ func (r PartialUpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.partialUpdateInstancePayload req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, err @@ -4584,7 +5479,7 @@ func (r PartialUpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -4595,7 +5490,18 @@ func (r PartialUpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -4605,6 +5511,38 @@ func (r PartialUpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } return localVarReturnValue, newErr } @@ -4622,78 +5560,89 @@ func (r PartialUpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) } /* -PartialUpdateInstance: Update Instance +ResetUser: Reset User 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 Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return ApiPartialUpdateInstanceRequest + @param instanceId The ID of the instance. + @param userId The ID of the user. + @return ApiResetUserRequest */ -func (a *APIClient) PartialUpdateInstance(ctx context.Context, projectId string, instanceId string, region string) ApiPartialUpdateInstanceRequest { - return PartialUpdateInstanceRequest{ +func (a *APIClient) ResetUser(ctx context.Context, projectId string, region string, instanceId string, userId int64) ApiResetUserRequest { + return ResetUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, + userId: userId, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) PartialUpdateInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*UpdateInstanceResponse, error) { - r := PartialUpdateInstanceRequest{ +func (a *APIClient) ResetUserExecute(ctx context.Context, projectId string, region string, instanceId string, userId int64) (*ResetUserResponse, error) { + r := ResetUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, + userId: userId, } return r.Execute() } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ResetUserRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - instanceId string - userId string - region string +type RestoreDatabaseFromBackupRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + instanceId string + restoreDatabaseFromBackupPayload *RestoreDatabaseFromBackupPayload } +// The restore operation payload. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r ResetUserRequest) Execute() (*ResetUserResponse, error) { +func (r RestoreDatabaseFromBackupRequest) RestoreDatabaseFromBackupPayload(restoreDatabaseFromBackupPayload RestoreDatabaseFromBackupPayload) ApiRestoreDatabaseFromBackupRequest { + r.restoreDatabaseFromBackupPayload = &restoreDatabaseFromBackupPayload + return r +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (r RestoreDatabaseFromBackupRequest) Execute() error { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ResetUserResponse + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile ) a := r.apiService client, ok := a.client.(*APIClient) if !ok { - return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") + return fmt.Errorf("could not parse client to type APIClient") } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ResetUser") + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RestoreDatabaseFromBackup") if err != nil { - return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}/reset" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/restores" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", url.PathEscape(ParameterValueToString(r.userId, "userId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.restoreDatabaseFromBackupPayload == nil { + return fmt.Errorf("restoreDatabaseFromBackupPayload is required and must be specified") + } // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -4709,9 +5658,11 @@ func (r ResetUserRequest) Execute() (*ResetUserResponse, error) { if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + // body params + localVarPostBody = r.restoreDatabaseFromBackupPayload req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { - return localVarReturnValue, err + return err } contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) @@ -4725,14 +5676,14 @@ func (r ResetUserRequest) Execute() (*ResetUserResponse, error) { *contextHTTPResponse = localVarHTTPResponse } if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, err + return err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, err + return err } if localVarHTTPResponse.StatusCode >= 300 { @@ -4742,112 +5693,123 @@ func (r ResetUserRequest) Execute() (*ResetUserResponse, error) { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr + return newErr } newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) newErr.Model = v - return localVarReturnValue, newErr + return newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr + return newErr } newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) newErr.Model = v - return localVarReturnValue, newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr } if localVarHTTPResponse.StatusCode == 404 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr + return newErr } newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) newErr.Model = v - return localVarReturnValue, newErr + return newErr } if localVarHTTPResponse.StatusCode == 500 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() - return localVarReturnValue, newErr + return newErr } newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) newErr.Model = v + return newErr } - return localVarReturnValue, newErr - } - - err = client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &oapierror.GenericOpenAPIError{ - StatusCode: localVarHTTPResponse.StatusCode, - Body: localVarBody, - ErrorMessage: err.Error(), + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v } - return localVarReturnValue, newErr + return newErr } - return localVarReturnValue, nil + return nil } /* -ResetUser: Reset User +RestoreDatabaseFromBackup: Create a Restore Operation 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 Project ID - @param instanceId Instance ID - @param userId user ID + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return ApiResetUserRequest + @param instanceId The ID of the instance. + @return ApiRestoreDatabaseFromBackupRequest */ -func (a *APIClient) ResetUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiResetUserRequest { - return ResetUserRequest{ +func (a *APIClient) RestoreDatabaseFromBackup(ctx context.Context, projectId string, region string, instanceId string) ApiRestoreDatabaseFromBackupRequest { + return RestoreDatabaseFromBackupRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, - userId: userId, region: region, + instanceId: instanceId, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) ResetUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) (*ResetUserResponse, error) { - r := ResetUserRequest{ +func (a *APIClient) RestoreDatabaseFromBackupExecute(ctx context.Context, projectId string, region string, instanceId string) error { + r := RestoreDatabaseFromBackupRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, - userId: userId, region: region, + instanceId: instanceId, } return r.Execute() } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TerminateProjectRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - region string +type TriggerBackupRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + instanceId string + databaseName string } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r TerminateProjectRequest) Execute() error { +func (r TriggerBackupRequest) Execute() error { var ( - localVarHTTPMethod = http.MethodDelete + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile ) @@ -4856,14 +5818,16 @@ func (r TerminateProjectRequest) Execute() error { if !ok { return fmt.Errorf("could not parse client to type APIClient") } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.TerminateProject") + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.TriggerBackup") if err != nil { return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/backups/databases/{databaseName}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"databaseName"+"}", url.PathEscape(ParameterValueToString(r.databaseName, "databaseName")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4919,7 +5883,7 @@ func (r TerminateProjectRequest) Execute() error { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -4930,7 +5894,40 @@ func (r TerminateProjectRequest) Execute() error { return newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationError err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -4941,7 +5938,18 @@ func (r TerminateProjectRequest) Execute() error { return newErr } if localVarHTTPResponse.StatusCode == 500 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 501 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -4957,47 +5965,61 @@ func (r TerminateProjectRequest) Execute() error { } /* -TerminateProject: Terminate the Project +TriggerBackup: Trigger backup for a specific Database 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 Project ID + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return ApiTerminateProjectRequest + @param instanceId The ID of the instance. + @param databaseName The name of the database. + @return ApiTriggerBackupRequest */ -func (a *APIClient) TerminateProject(ctx context.Context, projectId string, region string) ApiTerminateProjectRequest { - return TerminateProjectRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, +func (a *APIClient) TriggerBackup(ctx context.Context, projectId string, region string, instanceId string, databaseName string) ApiTriggerBackupRequest { + return TriggerBackupRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + databaseName: databaseName, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) TerminateProjectExecute(ctx context.Context, projectId string, region string) error { - r := TerminateProjectRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - region: region, +func (a *APIClient) TriggerBackupExecute(ctx context.Context, projectId string, region string, instanceId string, databaseName string) error { + r := TriggerBackupRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + databaseName: databaseName, } return r.Execute() } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TriggerDatabaseBackupRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - instanceId string - databaseName string - region string +type TriggerRestoreRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + instanceId string + databaseName string + triggerRestorePayload *TriggerRestorePayload +} + +// The request body with the parameters for the database restore. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (r TriggerRestoreRequest) TriggerRestorePayload(triggerRestorePayload TriggerRestorePayload) ApiTriggerRestoreRequest { + r.triggerRestorePayload = &triggerRestorePayload + return r } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r TriggerDatabaseBackupRequest) Execute() error { +func (r TriggerRestoreRequest) Execute() error { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -5008,23 +6030,23 @@ func (r TriggerDatabaseBackupRequest) Execute() error { if !ok { return fmt.Errorf("could not parse client to type APIClient") } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.TriggerDatabaseBackup") + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.TriggerRestore") if err != nil { return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/backups/databases/{databaseName}" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/backups/databases/{databaseName}/restores" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"databaseName"+"}", url.PathEscape(ParameterValueToString(r.databaseName, "databaseName")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -5033,13 +6055,15 @@ func (r TriggerDatabaseBackupRequest) Execute() error { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"*/*", "application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + // body params + localVarPostBody = r.triggerRestorePayload req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return err @@ -5073,7 +6097,7 @@ func (r TriggerDatabaseBackupRequest) Execute() error { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -5084,7 +6108,18 @@ func (r TriggerDatabaseBackupRequest) Execute() error { return newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -5095,7 +6130,18 @@ func (r TriggerDatabaseBackupRequest) Execute() error { return newErr } if localVarHTTPResponse.StatusCode == 404 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationError err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -5106,7 +6152,18 @@ func (r TriggerDatabaseBackupRequest) Execute() error { return newErr } if localVarHTTPResponse.StatusCode == 500 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 501 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -5122,63 +6179,62 @@ func (r TriggerDatabaseBackupRequest) Execute() error { } /* -TriggerDatabaseBackup: Trigger backup for a specific Database +TriggerRestore: Trigger restore for a specific Database 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 Project ID - @param instanceId Instance ID - @param databaseName Database Name + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return ApiTriggerDatabaseBackupRequest + @param instanceId The ID of the instance. + @param databaseName The name of the database. + @return ApiTriggerRestoreRequest */ -func (a *APIClient) TriggerDatabaseBackup(ctx context.Context, projectId string, instanceId string, databaseName string, region string) ApiTriggerDatabaseBackupRequest { - return TriggerDatabaseBackupRequest{ +func (a *APIClient) TriggerRestore(ctx context.Context, projectId string, region string, instanceId string, databaseName string) ApiTriggerRestoreRequest { + return TriggerRestoreRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, databaseName: databaseName, - region: region, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) TriggerDatabaseBackupExecute(ctx context.Context, projectId string, instanceId string, databaseName string, region string) error { - r := TriggerDatabaseBackupRequest{ +func (a *APIClient) TriggerRestoreExecute(ctx context.Context, projectId string, region string, instanceId string, databaseName string) error { + r := TriggerRestoreRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, databaseName: databaseName, - region: region, } return r.Execute() } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TriggerDatabaseRestoreRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - instanceId string - databaseName string - region string - triggerDatabaseRestorePayload *TriggerDatabaseRestorePayload +type UpdateInstanceRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + instanceId string + updateInstancePayload *UpdateInstancePayload } -// Body +// The request body with the parameters for updating the instance // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r TriggerDatabaseRestoreRequest) TriggerDatabaseRestorePayload(triggerDatabaseRestorePayload TriggerDatabaseRestorePayload) ApiTriggerDatabaseRestoreRequest { - r.triggerDatabaseRestorePayload = &triggerDatabaseRestorePayload +func (r UpdateInstanceRequest) UpdateInstancePayload(updateInstancePayload UpdateInstancePayload) ApiUpdateInstanceRequest { + r.updateInstancePayload = &updateInstancePayload return r } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r TriggerDatabaseRestoreRequest) Execute() error { +func (r UpdateInstanceRequest) Execute() error { var ( - localVarHTTPMethod = http.MethodPost + localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile ) @@ -5187,22 +6243,21 @@ func (r TriggerDatabaseRestoreRequest) Execute() error { if !ok { return fmt.Errorf("could not parse client to type APIClient") } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.TriggerDatabaseRestore") + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateInstance") if err != nil { return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/backups/databases/{databaseName}/restores" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"databaseName"+"}", url.PathEscape(ParameterValueToString(r.databaseName, "databaseName")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.triggerDatabaseRestorePayload == nil { - return fmt.Errorf("triggerDatabaseRestorePayload is required and must be specified") + if r.updateInstancePayload == nil { + return fmt.Errorf("updateInstancePayload is required and must be specified") } // to determine the Content-Type header @@ -5215,7 +6270,7 @@ func (r TriggerDatabaseRestoreRequest) Execute() error { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"*/*", "application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -5223,7 +6278,7 @@ func (r TriggerDatabaseRestoreRequest) Execute() error { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.triggerDatabaseRestorePayload + localVarPostBody = r.updateInstancePayload req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return err @@ -5257,7 +6312,7 @@ func (r TriggerDatabaseRestoreRequest) Execute() error { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -5268,7 +6323,18 @@ func (r TriggerDatabaseRestoreRequest) Execute() error { return newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -5279,7 +6345,18 @@ func (r TriggerDatabaseRestoreRequest) Execute() error { return newErr } if localVarHTTPResponse.StatusCode == 404 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationError err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -5290,7 +6367,7 @@ func (r TriggerDatabaseRestoreRequest) Execute() error { return newErr } if localVarHTTPResponse.StatusCode == 500 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -5306,86 +6383,83 @@ func (r TriggerDatabaseRestoreRequest) Execute() error { } /* -TriggerDatabaseRestore: Trigger restore for a specific Database +UpdateInstance: Update Instance 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 Project ID - @param instanceId Instance ID - @param databaseName Database Name + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return ApiTriggerDatabaseRestoreRequest + @param instanceId The ID of the instance. + @return ApiUpdateInstanceRequest */ -func (a *APIClient) TriggerDatabaseRestore(ctx context.Context, projectId string, instanceId string, databaseName string, region string) ApiTriggerDatabaseRestoreRequest { - return TriggerDatabaseRestoreRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - databaseName: databaseName, - region: region, +func (a *APIClient) UpdateInstance(ctx context.Context, projectId string, region string, instanceId string) ApiUpdateInstanceRequest { + return UpdateInstanceRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) TriggerDatabaseRestoreExecute(ctx context.Context, projectId string, instanceId string, databaseName string, region string) error { - r := TriggerDatabaseRestoreRequest{ - apiService: a.defaultApi, - ctx: ctx, - projectId: projectId, - instanceId: instanceId, - databaseName: databaseName, - region: region, +func (a *APIClient) UpdateInstanceExecute(ctx context.Context, projectId string, region string, instanceId string) error { + r := UpdateInstanceRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, } return r.Execute() } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateInstanceRequest struct { - ctx context.Context - apiService *DefaultApiService - projectId string - instanceId string - region string - updateInstancePayload *UpdateInstancePayload +type UpdateInstanceProtectionRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + region string + instanceId string + updateInstanceProtectionPayload *UpdateInstanceProtectionPayload } -// Body +// The request body with flag isDeletable. Parameter is required. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateInstanceRequest) UpdateInstancePayload(updateInstancePayload UpdateInstancePayload) ApiUpdateInstanceRequest { - r.updateInstancePayload = &updateInstancePayload +func (r UpdateInstanceProtectionRequest) UpdateInstanceProtectionPayload(updateInstanceProtectionPayload UpdateInstanceProtectionPayload) ApiUpdateInstanceProtectionRequest { + r.updateInstanceProtectionPayload = &updateInstanceProtectionPayload return r } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (r UpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) { +func (r UpdateInstanceProtectionRequest) Execute() (*UpdateInstanceProtectionResponse, error) { var ( - localVarHTTPMethod = http.MethodPut + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *UpdateInstanceResponse + localVarReturnValue *UpdateInstanceProtectionResponse ) a := r.apiService client, ok := a.client.(*APIClient) if !ok { return localVarReturnValue, fmt.Errorf("could not parse client to type APIClient") } - localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateInstance") + localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateInstanceProtection") if err != nil { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}" + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/protections" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.updateInstancePayload == nil { - return localVarReturnValue, fmt.Errorf("updateInstancePayload is required and must be specified") + if r.updateInstanceProtectionPayload == nil { + return localVarReturnValue, fmt.Errorf("updateInstanceProtectionPayload is required and must be specified") } // to determine the Content-Type header @@ -5406,7 +6480,7 @@ func (r UpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.updateInstancePayload + localVarPostBody = r.updateInstanceProtectionPayload req, err := client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, err @@ -5440,7 +6514,7 @@ func (r UpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) { ErrorMessage: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v InstanceError + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -5451,7 +6525,51 @@ func (r UpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) { return localVarReturnValue, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v InstanceError + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationError + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.ErrorMessage = err.Error() @@ -5461,6 +6579,16 @@ func (r UpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } return localVarReturnValue, newErr } @@ -5478,34 +6606,34 @@ func (r UpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) { } /* -UpdateInstance: Update Instance +UpdateInstanceProtection: Protect Instance 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 Project ID - @param instanceId Instance ID + @param projectId The STACKIT project ID. @param region The region which should be addressed - @return ApiUpdateInstanceRequest + @param instanceId The ID of the instance. + @return ApiUpdateInstanceProtectionRequest */ -func (a *APIClient) UpdateInstance(ctx context.Context, projectId string, instanceId string, region string) ApiUpdateInstanceRequest { - return UpdateInstanceRequest{ +func (a *APIClient) UpdateInstanceProtection(ctx context.Context, projectId string, region string, instanceId string) ApiUpdateInstanceProtectionRequest { + return UpdateInstanceProtectionRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, } } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (a *APIClient) UpdateInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*UpdateInstanceResponse, error) { - r := UpdateInstanceRequest{ +func (a *APIClient) UpdateInstanceProtectionExecute(ctx context.Context, projectId string, region string, instanceId string) (*UpdateInstanceProtectionResponse, error) { + r := UpdateInstanceProtectionRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, - instanceId: instanceId, region: region, + instanceId: instanceId, } return r.Execute() } diff --git a/services/sqlserverflex/client.go b/services/sqlserverflex/client.go index 473ddd13b..f803ea83e 100644 --- a/services/sqlserverflex/client.go +++ b/services/sqlserverflex/client.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -43,7 +43,7 @@ var ( queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") ) -// APIClient manages communication with the STACKIT MSSQL Service API API v2.0.0 +// APIClient manages communication with the STACKIT MSSQL Service API API v3.0.0 // In most cases there should be only one, shared, APIClient. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type APIClient struct { diff --git a/services/sqlserverflex/configuration.go b/services/sqlserverflex/configuration.go index c0b720f4b..e66a160bd 100644 --- a/services/sqlserverflex/configuration.go +++ b/services/sqlserverflex/configuration.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_backup_list_backups_response_grouped.go b/services/sqlserverflex/model_backup_list_backups_response_grouped.go deleted file mode 100644 index fd84b505f..000000000 --- a/services/sqlserverflex/model_backup_list_backups_response_grouped.go +++ /dev/null @@ -1,209 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package sqlserverflex - -import ( - "encoding/json" -) - -// checks if the BackupListBackupsResponseGrouped type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BackupListBackupsResponseGrouped{} - -/* - types and functions for backups -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupListBackupsResponseGroupedGetBackupsAttributeType = *[]Backup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupListBackupsResponseGroupedGetBackupsArgType = []Backup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupListBackupsResponseGroupedGetBackupsRetType = []Backup - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupListBackupsResponseGroupedGetBackupsAttributeTypeOk(arg BackupListBackupsResponseGroupedGetBackupsAttributeType) (ret BackupListBackupsResponseGroupedGetBackupsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBackupListBackupsResponseGroupedGetBackupsAttributeType(arg *BackupListBackupsResponseGroupedGetBackupsAttributeType, val BackupListBackupsResponseGroupedGetBackupsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupListBackupsResponseGroupedGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupListBackupsResponseGroupedGetNameAttributeTypeOk(arg BackupListBackupsResponseGroupedGetNameAttributeType) (ret BackupListBackupsResponseGroupedGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBackupListBackupsResponseGroupedGetNameAttributeType(arg *BackupListBackupsResponseGroupedGetNameAttributeType, val BackupListBackupsResponseGroupedGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupListBackupsResponseGroupedGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupListBackupsResponseGroupedGetNameRetType = string - -// BackupListBackupsResponseGrouped struct for BackupListBackupsResponseGrouped -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupListBackupsResponseGrouped struct { - Backups BackupListBackupsResponseGroupedGetBackupsAttributeType `json:"backups,omitempty"` - Name BackupListBackupsResponseGroupedGetNameAttributeType `json:"name,omitempty"` -} - -// NewBackupListBackupsResponseGrouped instantiates a new BackupListBackupsResponseGrouped 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 NewBackupListBackupsResponseGrouped() *BackupListBackupsResponseGrouped { - this := BackupListBackupsResponseGrouped{} - return &this -} - -// NewBackupListBackupsResponseGroupedWithDefaults instantiates a new BackupListBackupsResponseGrouped 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 NewBackupListBackupsResponseGroupedWithDefaults() *BackupListBackupsResponseGrouped { - this := BackupListBackupsResponseGrouped{} - return &this -} - -// GetBackups returns the Backups 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 *BackupListBackupsResponseGrouped) GetBackups() (res BackupListBackupsResponseGroupedGetBackupsRetType) { - res, _ = o.GetBackupsOk() - return -} - -// GetBackupsOk returns a tuple with the Backups 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 *BackupListBackupsResponseGrouped) GetBackupsOk() (ret BackupListBackupsResponseGroupedGetBackupsRetType, ok bool) { - return getBackupListBackupsResponseGroupedGetBackupsAttributeTypeOk(o.Backups) -} - -// HasBackups 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 *BackupListBackupsResponseGrouped) HasBackups() bool { - _, ok := o.GetBackupsOk() - return ok -} - -// SetBackups gets a reference to the given []Backup and assigns it to the Backups field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BackupListBackupsResponseGrouped) SetBackups(v BackupListBackupsResponseGroupedGetBackupsRetType) { - setBackupListBackupsResponseGroupedGetBackupsAttributeType(&o.Backups, v) -} - -// GetName returns the Name 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 *BackupListBackupsResponseGrouped) GetName() (res BackupListBackupsResponseGroupedGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *BackupListBackupsResponseGrouped) GetNameOk() (ret BackupListBackupsResponseGroupedGetNameRetType, ok bool) { - return getBackupListBackupsResponseGroupedGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *BackupListBackupsResponseGrouped) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *BackupListBackupsResponseGrouped) SetName(v BackupListBackupsResponseGroupedGetNameRetType) { - setBackupListBackupsResponseGroupedGetNameAttributeType(&o.Name, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o BackupListBackupsResponseGrouped) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getBackupListBackupsResponseGroupedGetBackupsAttributeTypeOk(o.Backups); ok { - toSerialize["Backups"] = val - } - if val, ok := getBackupListBackupsResponseGroupedGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableBackupListBackupsResponseGrouped struct { - value *BackupListBackupsResponseGrouped - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBackupListBackupsResponseGrouped) Get() *BackupListBackupsResponseGrouped { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBackupListBackupsResponseGrouped) Set(val *BackupListBackupsResponseGrouped) { - 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 NullableBackupListBackupsResponseGrouped) 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 *NullableBackupListBackupsResponseGrouped) 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 NewNullableBackupListBackupsResponseGrouped(val *BackupListBackupsResponseGrouped) *NullableBackupListBackupsResponseGrouped { - return &NullableBackupListBackupsResponseGrouped{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 NullableBackupListBackupsResponseGrouped) 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 *NullableBackupListBackupsResponseGrouped) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/sqlserverflex/model_backup_running_restore.go b/services/sqlserverflex/model_backup_running_restore.go new file mode 100644 index 000000000..e4b5be9fe --- /dev/null +++ b/services/sqlserverflex/model_backup_running_restore.go @@ -0,0 +1,367 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" +) + +// checks if the BackupRunningRestore type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BackupRunningRestore{} + +/* + types and functions for command +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type BackupRunningRestoreGetCommandAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getBackupRunningRestoreGetCommandAttributeTypeOk(arg BackupRunningRestoreGetCommandAttributeType) (ret BackupRunningRestoreGetCommandRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setBackupRunningRestoreGetCommandAttributeType(arg *BackupRunningRestoreGetCommandAttributeType, val BackupRunningRestoreGetCommandRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type BackupRunningRestoreGetCommandArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type BackupRunningRestoreGetCommandRetType = string + +/* + types and functions for database_name +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type BackupRunningRestoreGetDatabaseNameAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getBackupRunningRestoreGetDatabaseNameAttributeTypeOk(arg BackupRunningRestoreGetDatabaseNameAttributeType) (ret BackupRunningRestoreGetDatabaseNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setBackupRunningRestoreGetDatabaseNameAttributeType(arg *BackupRunningRestoreGetDatabaseNameAttributeType, val BackupRunningRestoreGetDatabaseNameRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type BackupRunningRestoreGetDatabaseNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type BackupRunningRestoreGetDatabaseNameRetType = string + +/* + types and functions for estimated_completion_time +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type BackupRunningRestoreGetEstimatedCompletionTimeAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getBackupRunningRestoreGetEstimatedCompletionTimeAttributeTypeOk(arg BackupRunningRestoreGetEstimatedCompletionTimeAttributeType) (ret BackupRunningRestoreGetEstimatedCompletionTimeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setBackupRunningRestoreGetEstimatedCompletionTimeAttributeType(arg *BackupRunningRestoreGetEstimatedCompletionTimeAttributeType, val BackupRunningRestoreGetEstimatedCompletionTimeRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type BackupRunningRestoreGetEstimatedCompletionTimeArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type BackupRunningRestoreGetEstimatedCompletionTimeRetType = string + +/* + types and functions for percent_complete +*/ + +// isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type BackupRunningRestoreGetPercentCompleteAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type BackupRunningRestoreGetPercentCompleteArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type BackupRunningRestoreGetPercentCompleteRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getBackupRunningRestoreGetPercentCompleteAttributeTypeOk(arg BackupRunningRestoreGetPercentCompleteAttributeType) (ret BackupRunningRestoreGetPercentCompleteRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setBackupRunningRestoreGetPercentCompleteAttributeType(arg *BackupRunningRestoreGetPercentCompleteAttributeType, val BackupRunningRestoreGetPercentCompleteRetType) { + *arg = &val +} + +/* + types and functions for start_time +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type BackupRunningRestoreGetStartTimeAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getBackupRunningRestoreGetStartTimeAttributeTypeOk(arg BackupRunningRestoreGetStartTimeAttributeType) (ret BackupRunningRestoreGetStartTimeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setBackupRunningRestoreGetStartTimeAttributeType(arg *BackupRunningRestoreGetStartTimeAttributeType, val BackupRunningRestoreGetStartTimeRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type BackupRunningRestoreGetStartTimeArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type BackupRunningRestoreGetStartTimeRetType = string + +// BackupRunningRestore struct for BackupRunningRestore +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type BackupRunningRestore struct { + // the command that was executed + // REQUIRED + Command BackupRunningRestoreGetCommandAttributeType `json:"command" required:"true"` + // the name of the database that is being restored + // REQUIRED + DatabaseName BackupRunningRestoreGetDatabaseNameAttributeType `json:"database_name" required:"true"` + // the projected time when the restore should be completed + // REQUIRED + EstimatedCompletionTime BackupRunningRestoreGetEstimatedCompletionTimeAttributeType `json:"estimated_completion_time" required:"true"` + // the percentage of the current running restore job + // Can be cast to int32 without loss of precision. + // REQUIRED + PercentComplete BackupRunningRestoreGetPercentCompleteAttributeType `json:"percent_complete" required:"true"` + // the start time of the current running restore job + // REQUIRED + StartTime BackupRunningRestoreGetStartTimeAttributeType `json:"start_time" required:"true"` +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _BackupRunningRestore BackupRunningRestore + +// NewBackupRunningRestore instantiates a new BackupRunningRestore 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 NewBackupRunningRestore(command BackupRunningRestoreGetCommandArgType, databaseName BackupRunningRestoreGetDatabaseNameArgType, estimatedCompletionTime BackupRunningRestoreGetEstimatedCompletionTimeArgType, percentComplete BackupRunningRestoreGetPercentCompleteArgType, startTime BackupRunningRestoreGetStartTimeArgType) *BackupRunningRestore { + this := BackupRunningRestore{} + setBackupRunningRestoreGetCommandAttributeType(&this.Command, command) + setBackupRunningRestoreGetDatabaseNameAttributeType(&this.DatabaseName, databaseName) + setBackupRunningRestoreGetEstimatedCompletionTimeAttributeType(&this.EstimatedCompletionTime, estimatedCompletionTime) + setBackupRunningRestoreGetPercentCompleteAttributeType(&this.PercentComplete, percentComplete) + setBackupRunningRestoreGetStartTimeAttributeType(&this.StartTime, startTime) + return &this +} + +// NewBackupRunningRestoreWithDefaults instantiates a new BackupRunningRestore 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 NewBackupRunningRestoreWithDefaults() *BackupRunningRestore { + this := BackupRunningRestore{} + return &this +} + +// GetCommand returns the Command field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *BackupRunningRestore) GetCommand() (ret BackupRunningRestoreGetCommandRetType) { + ret, _ = o.GetCommandOk() + return ret +} + +// GetCommandOk returns a tuple with the Command 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 *BackupRunningRestore) GetCommandOk() (ret BackupRunningRestoreGetCommandRetType, ok bool) { + return getBackupRunningRestoreGetCommandAttributeTypeOk(o.Command) +} + +// SetCommand sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *BackupRunningRestore) SetCommand(v BackupRunningRestoreGetCommandRetType) { + setBackupRunningRestoreGetCommandAttributeType(&o.Command, v) +} + +// GetDatabaseName returns the DatabaseName field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *BackupRunningRestore) GetDatabaseName() (ret BackupRunningRestoreGetDatabaseNameRetType) { + ret, _ = o.GetDatabaseNameOk() + return ret +} + +// GetDatabaseNameOk returns a tuple with the DatabaseName 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 *BackupRunningRestore) GetDatabaseNameOk() (ret BackupRunningRestoreGetDatabaseNameRetType, ok bool) { + return getBackupRunningRestoreGetDatabaseNameAttributeTypeOk(o.DatabaseName) +} + +// SetDatabaseName sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *BackupRunningRestore) SetDatabaseName(v BackupRunningRestoreGetDatabaseNameRetType) { + setBackupRunningRestoreGetDatabaseNameAttributeType(&o.DatabaseName, v) +} + +// GetEstimatedCompletionTime returns the EstimatedCompletionTime field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *BackupRunningRestore) GetEstimatedCompletionTime() (ret BackupRunningRestoreGetEstimatedCompletionTimeRetType) { + ret, _ = o.GetEstimatedCompletionTimeOk() + return ret +} + +// GetEstimatedCompletionTimeOk returns a tuple with the EstimatedCompletionTime 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 *BackupRunningRestore) GetEstimatedCompletionTimeOk() (ret BackupRunningRestoreGetEstimatedCompletionTimeRetType, ok bool) { + return getBackupRunningRestoreGetEstimatedCompletionTimeAttributeTypeOk(o.EstimatedCompletionTime) +} + +// SetEstimatedCompletionTime sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *BackupRunningRestore) SetEstimatedCompletionTime(v BackupRunningRestoreGetEstimatedCompletionTimeRetType) { + setBackupRunningRestoreGetEstimatedCompletionTimeAttributeType(&o.EstimatedCompletionTime, v) +} + +// GetPercentComplete returns the PercentComplete field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *BackupRunningRestore) GetPercentComplete() (ret BackupRunningRestoreGetPercentCompleteRetType) { + ret, _ = o.GetPercentCompleteOk() + return ret +} + +// GetPercentCompleteOk returns a tuple with the PercentComplete 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 *BackupRunningRestore) GetPercentCompleteOk() (ret BackupRunningRestoreGetPercentCompleteRetType, ok bool) { + return getBackupRunningRestoreGetPercentCompleteAttributeTypeOk(o.PercentComplete) +} + +// SetPercentComplete sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *BackupRunningRestore) SetPercentComplete(v BackupRunningRestoreGetPercentCompleteRetType) { + setBackupRunningRestoreGetPercentCompleteAttributeType(&o.PercentComplete, v) +} + +// GetStartTime returns the StartTime field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *BackupRunningRestore) GetStartTime() (ret BackupRunningRestoreGetStartTimeRetType) { + ret, _ = o.GetStartTimeOk() + return ret +} + +// GetStartTimeOk returns a tuple with the StartTime 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 *BackupRunningRestore) GetStartTimeOk() (ret BackupRunningRestoreGetStartTimeRetType, ok bool) { + return getBackupRunningRestoreGetStartTimeAttributeTypeOk(o.StartTime) +} + +// SetStartTime sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *BackupRunningRestore) SetStartTime(v BackupRunningRestoreGetStartTimeRetType) { + setBackupRunningRestoreGetStartTimeAttributeType(&o.StartTime, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o BackupRunningRestore) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getBackupRunningRestoreGetCommandAttributeTypeOk(o.Command); ok { + toSerialize["Command"] = val + } + if val, ok := getBackupRunningRestoreGetDatabaseNameAttributeTypeOk(o.DatabaseName); ok { + toSerialize["DatabaseName"] = val + } + if val, ok := getBackupRunningRestoreGetEstimatedCompletionTimeAttributeTypeOk(o.EstimatedCompletionTime); ok { + toSerialize["EstimatedCompletionTime"] = val + } + if val, ok := getBackupRunningRestoreGetPercentCompleteAttributeTypeOk(o.PercentComplete); ok { + toSerialize["PercentComplete"] = val + } + if val, ok := getBackupRunningRestoreGetStartTimeAttributeTypeOk(o.StartTime); ok { + toSerialize["StartTime"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableBackupRunningRestore struct { + value *BackupRunningRestore + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableBackupRunningRestore) Get() *BackupRunningRestore { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableBackupRunningRestore) Set(val *BackupRunningRestore) { + 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 NullableBackupRunningRestore) 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 *NullableBackupRunningRestore) 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 NewNullableBackupRunningRestore(val *BackupRunningRestore) *NullableBackupRunningRestore { + return &NullableBackupRunningRestore{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 NullableBackupRunningRestore) 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 *NullableBackupRunningRestore) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_backup_list_backups_response_grouped_test.go b/services/sqlserverflex/model_backup_running_restore_test.go similarity index 91% rename from services/sqlserverflex/model_backup_list_backups_response_grouped_test.go rename to services/sqlserverflex/model_backup_running_restore_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_backup_list_backups_response_grouped_test.go +++ b/services/sqlserverflex/model_backup_running_restore_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_backup_sort.go b/services/sqlserverflex/model_backup_sort.go new file mode 100644 index 000000000..091e4c934 --- /dev/null +++ b/services/sqlserverflex/model_backup_sort.go @@ -0,0 +1,162 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" + "fmt" +) + +// BackupSort the model 'BackupSort' +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type BackupSort string + +// List of backup.sort +const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + BACKUPSORT_END_TIME_DESC BackupSort = "end_time.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + BACKUPSORT_END_TIME_ASC BackupSort = "end_time.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + BACKUPSORT_INDEX_DESC BackupSort = "index.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + BACKUPSORT_INDEX_ASC BackupSort = "index.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + BACKUPSORT_NAME_DESC BackupSort = "name.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + BACKUPSORT_NAME_ASC BackupSort = "name.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + BACKUPSORT_RETAINED_UNTIL_DESC BackupSort = "retained_until.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + BACKUPSORT_RETAINED_UNTIL_ASC BackupSort = "retained_until.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + BACKUPSORT_SIZE_DESC BackupSort = "size.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + BACKUPSORT_SIZE_ASC BackupSort = "size.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + BACKUPSORT_TYPE_DESC BackupSort = "type.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + BACKUPSORT_TYPE_ASC BackupSort = "type.asc" +) + +// All allowed values of BackupSort enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +var AllowedBackupSortEnumValues = []BackupSort{ + "end_time.desc", + "end_time.asc", + "index.desc", + "index.asc", + "name.desc", + "name.asc", + "retained_until.desc", + "retained_until.asc", + "size.desc", + "size.asc", + "type.desc", + "type.asc", +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *BackupSort) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue string + if value == zeroValue { + return nil + } + enumTypeValue := BackupSort(value) + for _, existing := range AllowedBackupSortEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid BackupSort", value) +} + +// NewBackupSortFromValue returns a pointer to a valid BackupSort +// 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 NewBackupSortFromValue(v string) (*BackupSort, error) { + ev := BackupSort(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for BackupSort: valid values are %v", v, AllowedBackupSortEnumValues) + } +} + +// 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 BackupSort) IsValid() bool { + for _, existing := range AllowedBackupSortEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to backup.sort value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v BackupSort) Ptr() *BackupSort { + return &v +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableBackupSort struct { + value *BackupSort + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableBackupSort) Get() *BackupSort { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableBackupSort) Set(val *BackupSort) { + 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 NullableBackupSort) 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 *NullableBackupSort) 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 NewNullableBackupSort(val *BackupSort) *NullableBackupSort { + return &NullableBackupSort{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 NullableBackupSort) 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 *NullableBackupSort) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_backup_test.go b/services/sqlserverflex/model_backup_sort_test.go similarity index 91% rename from services/sqlserverflex/model_backup_test.go rename to services/sqlserverflex/model_backup_sort_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_backup_test.go +++ b/services/sqlserverflex/model_backup_sort_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_create_database_payload.go b/services/sqlserverflex/model_create_database_payload.go index f0df0fbe9..c841db1ab 100644 --- a/services/sqlserverflex/model_create_database_payload.go +++ b/services/sqlserverflex/model_create_database_payload.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -18,6 +18,60 @@ import ( // checks if the CreateDatabasePayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateDatabasePayload{} +/* + types and functions for collation +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateDatabasePayloadGetCollationAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateDatabasePayloadGetCollationAttributeTypeOk(arg CreateDatabasePayloadGetCollationAttributeType) (ret CreateDatabasePayloadGetCollationRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setCreateDatabasePayloadGetCollationAttributeType(arg *CreateDatabasePayloadGetCollationAttributeType, val CreateDatabasePayloadGetCollationRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateDatabasePayloadGetCollationArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateDatabasePayloadGetCollationRetType = string + +/* + types and functions for compatibility +*/ + +// isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateDatabasePayloadGetCompatibilityAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateDatabasePayloadGetCompatibilityArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateDatabasePayloadGetCompatibilityRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateDatabasePayloadGetCompatibilityAttributeTypeOk(arg CreateDatabasePayloadGetCompatibilityAttributeType) (ret CreateDatabasePayloadGetCompatibilityRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setCreateDatabasePayloadGetCompatibilityAttributeType(arg *CreateDatabasePayloadGetCompatibilityAttributeType, val CreateDatabasePayloadGetCompatibilityRetType) { + *arg = &val +} + /* types and functions for name */ @@ -46,21 +100,15 @@ type CreateDatabasePayloadGetNameArgType = string type CreateDatabasePayloadGetNameRetType = string /* - types and functions for options + types and functions for owner */ -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDatabasePayloadGetOptionsAttributeType = *DatabaseDocumentationCreateDatabaseRequestOptions - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDatabasePayloadGetOptionsArgType = DatabaseDocumentationCreateDatabaseRequestOptions - +// isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDatabasePayloadGetOptionsRetType = DatabaseDocumentationCreateDatabaseRequestOptions +type CreateDatabasePayloadGetOwnerAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateDatabasePayloadGetOptionsAttributeTypeOk(arg CreateDatabasePayloadGetOptionsAttributeType) (ret CreateDatabasePayloadGetOptionsRetType, ok bool) { +func getCreateDatabasePayloadGetOwnerAttributeTypeOk(arg CreateDatabasePayloadGetOwnerAttributeType) (ret CreateDatabasePayloadGetOwnerRetType, ok bool) { if arg == nil { return ret, false } @@ -68,17 +116,30 @@ func getCreateDatabasePayloadGetOptionsAttributeTypeOk(arg CreateDatabasePayload } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateDatabasePayloadGetOptionsAttributeType(arg *CreateDatabasePayloadGetOptionsAttributeType, val CreateDatabasePayloadGetOptionsRetType) { +func setCreateDatabasePayloadGetOwnerAttributeType(arg *CreateDatabasePayloadGetOwnerAttributeType, val CreateDatabasePayloadGetOwnerRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateDatabasePayloadGetOwnerArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateDatabasePayloadGetOwnerRetType = string + // CreateDatabasePayload struct for CreateDatabasePayload // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateDatabasePayload struct { + // The collation of the database. This database collation should match the *collation_name* of one of the collations given by the **Get database collation list** endpoint. + Collation CreateDatabasePayloadGetCollationAttributeType `json:"collation,omitempty"` + // CompatibilityLevel of the Database. + // Can be cast to int32 without loss of precision. + Compatibility CreateDatabasePayloadGetCompatibilityAttributeType `json:"compatibility,omitempty"` + // The name of the database. // REQUIRED Name CreateDatabasePayloadGetNameAttributeType `json:"name" required:"true"` + // The owner of the database. // REQUIRED - Options CreateDatabasePayloadGetOptionsAttributeType `json:"options" required:"true"` + Owner CreateDatabasePayloadGetOwnerAttributeType `json:"owner" required:"true"` } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -89,10 +150,10 @@ type _CreateDatabasePayload CreateDatabasePayload // 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 NewCreateDatabasePayload(name CreateDatabasePayloadGetNameArgType, options CreateDatabasePayloadGetOptionsArgType) *CreateDatabasePayload { +func NewCreateDatabasePayload(name CreateDatabasePayloadGetNameArgType, owner CreateDatabasePayloadGetOwnerArgType) *CreateDatabasePayload { this := CreateDatabasePayload{} setCreateDatabasePayloadGetNameAttributeType(&this.Name, name) - setCreateDatabasePayloadGetOptionsAttributeType(&this.Options, options) + setCreateDatabasePayloadGetOwnerAttributeType(&this.Owner, owner) return &this } @@ -105,6 +166,60 @@ func NewCreateDatabasePayloadWithDefaults() *CreateDatabasePayload { return &this } +// GetCollation returns the Collation 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 *CreateDatabasePayload) GetCollation() (res CreateDatabasePayloadGetCollationRetType) { + res, _ = o.GetCollationOk() + return +} + +// GetCollationOk returns a tuple with the Collation 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 *CreateDatabasePayload) GetCollationOk() (ret CreateDatabasePayloadGetCollationRetType, ok bool) { + return getCreateDatabasePayloadGetCollationAttributeTypeOk(o.Collation) +} + +// HasCollation 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 *CreateDatabasePayload) HasCollation() bool { + _, ok := o.GetCollationOk() + return ok +} + +// SetCollation gets a reference to the given string and assigns it to the Collation field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateDatabasePayload) SetCollation(v CreateDatabasePayloadGetCollationRetType) { + setCreateDatabasePayloadGetCollationAttributeType(&o.Collation, v) +} + +// GetCompatibility returns the Compatibility 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 *CreateDatabasePayload) GetCompatibility() (res CreateDatabasePayloadGetCompatibilityRetType) { + res, _ = o.GetCompatibilityOk() + return +} + +// GetCompatibilityOk returns a tuple with the Compatibility 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 *CreateDatabasePayload) GetCompatibilityOk() (ret CreateDatabasePayloadGetCompatibilityRetType, ok bool) { + return getCreateDatabasePayloadGetCompatibilityAttributeTypeOk(o.Compatibility) +} + +// HasCompatibility 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 *CreateDatabasePayload) HasCompatibility() bool { + _, ok := o.GetCompatibilityOk() + return ok +} + +// SetCompatibility gets a reference to the given int64 and assigns it to the Compatibility field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateDatabasePayload) SetCompatibility(v CreateDatabasePayloadGetCompatibilityRetType) { + setCreateDatabasePayloadGetCompatibilityAttributeType(&o.Compatibility, v) +} + // GetName returns the Name field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateDatabasePayload) GetName() (ret CreateDatabasePayloadGetNameRetType) { @@ -125,34 +240,40 @@ func (o *CreateDatabasePayload) SetName(v CreateDatabasePayloadGetNameRetType) { setCreateDatabasePayloadGetNameAttributeType(&o.Name, v) } -// GetOptions returns the Options field value +// GetOwner returns the Owner field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDatabasePayload) GetOptions() (ret CreateDatabasePayloadGetOptionsRetType) { - ret, _ = o.GetOptionsOk() +func (o *CreateDatabasePayload) GetOwner() (ret CreateDatabasePayloadGetOwnerRetType) { + ret, _ = o.GetOwnerOk() return ret } -// GetOptionsOk returns a tuple with the Options field value +// GetOwnerOk returns a tuple with the Owner 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 *CreateDatabasePayload) GetOptionsOk() (ret CreateDatabasePayloadGetOptionsRetType, ok bool) { - return getCreateDatabasePayloadGetOptionsAttributeTypeOk(o.Options) +func (o *CreateDatabasePayload) GetOwnerOk() (ret CreateDatabasePayloadGetOwnerRetType, ok bool) { + return getCreateDatabasePayloadGetOwnerAttributeTypeOk(o.Owner) } -// SetOptions sets field value +// SetOwner sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateDatabasePayload) SetOptions(v CreateDatabasePayloadGetOptionsRetType) { - setCreateDatabasePayloadGetOptionsAttributeType(&o.Options, v) +func (o *CreateDatabasePayload) SetOwner(v CreateDatabasePayloadGetOwnerRetType) { + setCreateDatabasePayloadGetOwnerAttributeType(&o.Owner, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateDatabasePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getCreateDatabasePayloadGetCollationAttributeTypeOk(o.Collation); ok { + toSerialize["Collation"] = val + } + if val, ok := getCreateDatabasePayloadGetCompatibilityAttributeTypeOk(o.Compatibility); ok { + toSerialize["Compatibility"] = val + } if val, ok := getCreateDatabasePayloadGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } - if val, ok := getCreateDatabasePayloadGetOptionsAttributeTypeOk(o.Options); ok { - toSerialize["Options"] = val + if val, ok := getCreateDatabasePayloadGetOwnerAttributeTypeOk(o.Owner); ok { + toSerialize["Owner"] = val } return toSerialize, nil } diff --git a/services/sqlserverflex/model_create_database_payload_test.go b/services/sqlserverflex/model_create_database_payload_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_create_database_payload_test.go +++ b/services/sqlserverflex/model_create_database_payload_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_create_database_response.go b/services/sqlserverflex/model_create_database_response.go index e88ead67f..f10ddd450 100644 --- a/services/sqlserverflex/model_create_database_response.go +++ b/services/sqlserverflex/model_create_database_response.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -22,9 +22,15 @@ var _ MappedNullable = &CreateDatabaseResponse{} types and functions for id */ -// isNotNullableString +// isLong // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDatabaseResponseGetIdAttributeType = *string +type CreateDatabaseResponseGetIdAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateDatabaseResponseGetIdArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateDatabaseResponseGetIdRetType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateDatabaseResponseGetIdAttributeTypeOk(arg CreateDatabaseResponseGetIdAttributeType) (ret CreateDatabaseResponseGetIdRetType, ok bool) { @@ -39,25 +45,25 @@ func setCreateDatabaseResponseGetIdAttributeType(arg *CreateDatabaseResponseGetI *arg = &val } -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDatabaseResponseGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateDatabaseResponseGetIdRetType = string - // CreateDatabaseResponse struct for CreateDatabaseResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateDatabaseResponse struct { - Id CreateDatabaseResponseGetIdAttributeType `json:"id,omitempty"` + // The id of the database. + // REQUIRED + Id CreateDatabaseResponseGetIdAttributeType `json:"id" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _CreateDatabaseResponse CreateDatabaseResponse + // NewCreateDatabaseResponse instantiates a new CreateDatabaseResponse 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 NewCreateDatabaseResponse() *CreateDatabaseResponse { +func NewCreateDatabaseResponse(id CreateDatabaseResponseGetIdArgType) *CreateDatabaseResponse { this := CreateDatabaseResponse{} + setCreateDatabaseResponseGetIdAttributeType(&this.Id, id) return &this } @@ -70,28 +76,21 @@ func NewCreateDatabaseResponseWithDefaults() *CreateDatabaseResponse { return &this } -// GetId returns the Id field value if set, zero value otherwise. +// 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 *CreateDatabaseResponse) GetId() (res CreateDatabaseResponseGetIdRetType) { - res, _ = o.GetIdOk() - return +func (o *CreateDatabaseResponse) GetId() (ret CreateDatabaseResponseGetIdRetType) { + ret, _ = o.GetIdOk() + return ret } -// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// 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 *CreateDatabaseResponse) GetIdOk() (ret CreateDatabaseResponseGetIdRetType, ok bool) { return getCreateDatabaseResponseGetIdAttributeTypeOk(o.Id) } -// HasId 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 *CreateDatabaseResponse) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. +// 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 *CreateDatabaseResponse) SetId(v CreateDatabaseResponseGetIdRetType) { setCreateDatabaseResponseGetIdAttributeType(&o.Id, v) diff --git a/services/sqlserverflex/model_create_database_response_test.go b/services/sqlserverflex/model_create_database_response_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_create_database_response_test.go +++ b/services/sqlserverflex/model_create_database_response_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_create_instance_payload.go b/services/sqlserverflex/model_create_instance_payload.go index dd899af4e..a3fd9ee05 100644 --- a/services/sqlserverflex/model_create_instance_payload.go +++ b/services/sqlserverflex/model_create_instance_payload.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,21 +19,15 @@ import ( var _ MappedNullable = &CreateInstancePayload{} /* - types and functions for acl + types and functions for backupSchedule */ -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetAclAttributeType = *CreateInstancePayloadAcl - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetAclArgType = CreateInstancePayloadAcl - +// isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetAclRetType = CreateInstancePayloadAcl +type CreateInstancePayloadGetBackupScheduleAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateInstancePayloadGetAclAttributeTypeOk(arg CreateInstancePayloadGetAclAttributeType) (ret CreateInstancePayloadGetAclRetType, ok bool) { +func getCreateInstancePayloadGetBackupScheduleAttributeTypeOk(arg CreateInstancePayloadGetBackupScheduleAttributeType) (ret CreateInstancePayloadGetBackupScheduleRetType, ok bool) { if arg == nil { return ret, false } @@ -41,20 +35,32 @@ func getCreateInstancePayloadGetAclAttributeTypeOk(arg CreateInstancePayloadGetA } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateInstancePayloadGetAclAttributeType(arg *CreateInstancePayloadGetAclAttributeType, val CreateInstancePayloadGetAclRetType) { +func setCreateInstancePayloadGetBackupScheduleAttributeType(arg *CreateInstancePayloadGetBackupScheduleAttributeType, val CreateInstancePayloadGetBackupScheduleRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateInstancePayloadGetBackupScheduleArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateInstancePayloadGetBackupScheduleRetType = string + /* - types and functions for backupSchedule + types and functions for encryption */ -// isNotNullableString +// isModel // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetBackupScheduleAttributeType = *string +type CreateInstancePayloadGetEncryptionAttributeType = *InstanceEncryption // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateInstancePayloadGetBackupScheduleAttributeTypeOk(arg CreateInstancePayloadGetBackupScheduleAttributeType) (ret CreateInstancePayloadGetBackupScheduleRetType, ok bool) { +type CreateInstancePayloadGetEncryptionArgType = InstanceEncryption + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateInstancePayloadGetEncryptionRetType = InstanceEncryption + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateInstancePayloadGetEncryptionAttributeTypeOk(arg CreateInstancePayloadGetEncryptionAttributeType) (ret CreateInstancePayloadGetEncryptionRetType, ok bool) { if arg == nil { return ret, false } @@ -62,16 +68,10 @@ func getCreateInstancePayloadGetBackupScheduleAttributeTypeOk(arg CreateInstance } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateInstancePayloadGetBackupScheduleAttributeType(arg *CreateInstancePayloadGetBackupScheduleAttributeType, val CreateInstancePayloadGetBackupScheduleRetType) { +func setCreateInstancePayloadGetEncryptionAttributeType(arg *CreateInstancePayloadGetEncryptionAttributeType, val CreateInstancePayloadGetEncryptionRetType) { *arg = &val } -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetBackupScheduleArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetBackupScheduleRetType = string - /* types and functions for flavorId */ @@ -103,15 +103,15 @@ type CreateInstancePayloadGetFlavorIdRetType = string types and functions for labels */ -// isFreeform +// isContainer // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetLabelsAttributeType = *map[string]interface{} +type CreateInstancePayloadGetLabelsAttributeType = *map[string]string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetLabelsArgType = map[string]interface{} +type CreateInstancePayloadGetLabelsArgType = map[string]string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetLabelsRetType = map[string]interface{} +type CreateInstancePayloadGetLabelsRetType = map[string]string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateInstancePayloadGetLabelsAttributeTypeOk(arg CreateInstancePayloadGetLabelsAttributeType) (ret CreateInstancePayloadGetLabelsRetType, ok bool) { @@ -154,21 +154,48 @@ type CreateInstancePayloadGetNameArgType = string type CreateInstancePayloadGetNameRetType = string /* - types and functions for options + types and functions for network */ // isModel // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetOptionsAttributeType = *CreateInstancePayloadOptions +type CreateInstancePayloadGetNetworkAttributeType = *CreateInstancePayloadNetwork + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateInstancePayloadGetNetworkArgType = CreateInstancePayloadNetwork + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateInstancePayloadGetNetworkRetType = CreateInstancePayloadNetwork + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateInstancePayloadGetNetworkAttributeTypeOk(arg CreateInstancePayloadGetNetworkAttributeType) (ret CreateInstancePayloadGetNetworkRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setCreateInstancePayloadGetNetworkAttributeType(arg *CreateInstancePayloadGetNetworkAttributeType, val CreateInstancePayloadGetNetworkRetType) { + *arg = &val +} +/* + types and functions for retentionDays +*/ + +// isInteger // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetOptionsArgType = CreateInstancePayloadOptions +type CreateInstancePayloadGetRetentionDaysAttributeType = *int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetOptionsRetType = CreateInstancePayloadOptions +type CreateInstancePayloadGetRetentionDaysArgType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateInstancePayloadGetOptionsAttributeTypeOk(arg CreateInstancePayloadGetOptionsAttributeType) (ret CreateInstancePayloadGetOptionsRetType, ok bool) { +type CreateInstancePayloadGetRetentionDaysRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateInstancePayloadGetRetentionDaysAttributeTypeOk(arg CreateInstancePayloadGetRetentionDaysAttributeType) (ret CreateInstancePayloadGetRetentionDaysRetType, ok bool) { if arg == nil { return ret, false } @@ -176,7 +203,7 @@ func getCreateInstancePayloadGetOptionsAttributeTypeOk(arg CreateInstancePayload } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateInstancePayloadGetOptionsAttributeType(arg *CreateInstancePayloadGetOptionsAttributeType, val CreateInstancePayloadGetOptionsRetType) { +func setCreateInstancePayloadGetRetentionDaysAttributeType(arg *CreateInstancePayloadGetRetentionDaysAttributeType, val CreateInstancePayloadGetRetentionDaysRetType) { *arg = &val } @@ -186,13 +213,13 @@ func setCreateInstancePayloadGetOptionsAttributeType(arg *CreateInstancePayloadG // isModel // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetStorageAttributeType = *CreateInstancePayloadStorage +type CreateInstancePayloadGetStorageAttributeType = *StorageCreate // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetStorageArgType = CreateInstancePayloadStorage +type CreateInstancePayloadGetStorageArgType = StorageCreate // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetStorageRetType = CreateInstancePayloadStorage +type CreateInstancePayloadGetStorageRetType = StorageCreate // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateInstancePayloadGetStorageAttributeTypeOk(arg CreateInstancePayloadGetStorageAttributeType) (ret CreateInstancePayloadGetStorageRetType, ok bool) { @@ -211,9 +238,15 @@ func setCreateInstancePayloadGetStorageAttributeType(arg *CreateInstancePayloadG types and functions for version */ -// isNotNullableString +// isEnumRef // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetVersionAttributeType = *string +type CreateInstancePayloadGetVersionAttributeType = *InstanceVersion + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateInstancePayloadGetVersionArgType = InstanceVersion + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateInstancePayloadGetVersionRetType = InstanceVersion // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateInstancePayloadGetVersionAttributeTypeOk(arg CreateInstancePayloadGetVersionAttributeType) (ret CreateInstancePayloadGetVersionRetType, ok bool) { @@ -228,29 +261,31 @@ func setCreateInstancePayloadGetVersionAttributeType(arg *CreateInstancePayloadG *arg = &val } -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetVersionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadGetVersionRetType = string - // CreateInstancePayload struct for CreateInstancePayload // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayload struct { - Acl CreateInstancePayloadGetAclAttributeType `json:"acl,omitempty"` - // Cronjob for the daily full backup if not provided a job will generated between 00:00 and 04:59 - BackupSchedule CreateInstancePayloadGetBackupScheduleAttributeType `json:"backupSchedule,omitempty"` - // Id of the selected flavor + // The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule. + // REQUIRED + BackupSchedule CreateInstancePayloadGetBackupScheduleAttributeType `json:"backupSchedule" required:"true"` + Encryption CreateInstancePayloadGetEncryptionAttributeType `json:"encryption,omitempty"` + // The id of the instance flavor. // REQUIRED FlavorId CreateInstancePayloadGetFlavorIdAttributeType `json:"flavorId" required:"true"` - Labels CreateInstancePayloadGetLabelsAttributeType `json:"labels,omitempty"` - // Name of the instance + // A dictionary of user-defined key-value pairs used to categorize or organize the resource. **Rules for Keys:** * Must be between 1 and 63 characters long. * Must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$` * **Restriction:** The prefix `stackit-` is strictly reserved and cannot be used. **Rules for Values:** * Must be between 0 (empty string) and 63 characters long. * If not empty, must begin and end with an alphanumeric character. * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$` + Labels CreateInstancePayloadGetLabelsAttributeType `json:"labels,omitempty"` + // The name of the instance. + // REQUIRED + Name CreateInstancePayloadGetNameAttributeType `json:"name" required:"true"` + // REQUIRED + Network CreateInstancePayloadGetNetworkAttributeType `json:"network" required:"true"` + // The days for how long the backup files should be stored before cleaned up. 30 to 90 + // Can be cast to int32 without loss of precision. // REQUIRED - Name CreateInstancePayloadGetNameAttributeType `json:"name" required:"true"` - Options CreateInstancePayloadGetOptionsAttributeType `json:"options,omitempty"` - Storage CreateInstancePayloadGetStorageAttributeType `json:"storage,omitempty"` - // Version of the MSSQL Server - Version CreateInstancePayloadGetVersionAttributeType `json:"version,omitempty"` + RetentionDays CreateInstancePayloadGetRetentionDaysAttributeType `json:"retentionDays" required:"true"` + // REQUIRED + Storage CreateInstancePayloadGetStorageAttributeType `json:"storage" required:"true"` + // REQUIRED + Version CreateInstancePayloadGetVersionAttributeType `json:"version" required:"true"` } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -261,10 +296,15 @@ type _CreateInstancePayload CreateInstancePayload // 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 NewCreateInstancePayload(flavorId CreateInstancePayloadGetFlavorIdArgType, name CreateInstancePayloadGetNameArgType) *CreateInstancePayload { +func NewCreateInstancePayload(backupSchedule CreateInstancePayloadGetBackupScheduleArgType, flavorId CreateInstancePayloadGetFlavorIdArgType, name CreateInstancePayloadGetNameArgType, network CreateInstancePayloadGetNetworkArgType, retentionDays CreateInstancePayloadGetRetentionDaysArgType, storage CreateInstancePayloadGetStorageArgType, version CreateInstancePayloadGetVersionArgType) *CreateInstancePayload { this := CreateInstancePayload{} + setCreateInstancePayloadGetBackupScheduleAttributeType(&this.BackupSchedule, backupSchedule) setCreateInstancePayloadGetFlavorIdAttributeType(&this.FlavorId, flavorId) setCreateInstancePayloadGetNameAttributeType(&this.Name, name) + setCreateInstancePayloadGetNetworkAttributeType(&this.Network, network) + setCreateInstancePayloadGetRetentionDaysAttributeType(&this.RetentionDays, retentionDays) + setCreateInstancePayloadGetStorageAttributeType(&this.Storage, storage) + setCreateInstancePayloadGetVersionAttributeType(&this.Version, version) return &this } @@ -274,63 +314,54 @@ func NewCreateInstancePayload(flavorId CreateInstancePayloadGetFlavorIdArgType, // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateInstancePayloadWithDefaults() *CreateInstancePayload { this := CreateInstancePayload{} - var version string = "2022" - this.Version = &version return &this } -// GetAcl returns the Acl field value if set, zero value otherwise. +// GetBackupSchedule returns the BackupSchedule field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayload) GetAcl() (res CreateInstancePayloadGetAclRetType) { - res, _ = o.GetAclOk() - return +func (o *CreateInstancePayload) GetBackupSchedule() (ret CreateInstancePayloadGetBackupScheduleRetType) { + ret, _ = o.GetBackupScheduleOk() + return ret } -// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// GetBackupScheduleOk returns a tuple with the BackupSchedule 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 *CreateInstancePayload) GetAclOk() (ret CreateInstancePayloadGetAclRetType, ok bool) { - return getCreateInstancePayloadGetAclAttributeTypeOk(o.Acl) -} - -// HasAcl 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 *CreateInstancePayload) HasAcl() bool { - _, ok := o.GetAclOk() - return ok +func (o *CreateInstancePayload) GetBackupScheduleOk() (ret CreateInstancePayloadGetBackupScheduleRetType, ok bool) { + return getCreateInstancePayloadGetBackupScheduleAttributeTypeOk(o.BackupSchedule) } -// SetAcl gets a reference to the given CreateInstancePayloadAcl and assigns it to the Acl field. +// SetBackupSchedule sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayload) SetAcl(v CreateInstancePayloadGetAclRetType) { - setCreateInstancePayloadGetAclAttributeType(&o.Acl, v) +func (o *CreateInstancePayload) SetBackupSchedule(v CreateInstancePayloadGetBackupScheduleRetType) { + setCreateInstancePayloadGetBackupScheduleAttributeType(&o.BackupSchedule, v) } -// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. +// GetEncryption returns the Encryption 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 *CreateInstancePayload) GetBackupSchedule() (res CreateInstancePayloadGetBackupScheduleRetType) { - res, _ = o.GetBackupScheduleOk() +func (o *CreateInstancePayload) GetEncryption() (res CreateInstancePayloadGetEncryptionRetType) { + res, _ = o.GetEncryptionOk() return } -// GetBackupScheduleOk returns a tuple with the BackupSchedule field value if set, nil otherwise +// GetEncryptionOk returns a tuple with the Encryption 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 *CreateInstancePayload) GetBackupScheduleOk() (ret CreateInstancePayloadGetBackupScheduleRetType, ok bool) { - return getCreateInstancePayloadGetBackupScheduleAttributeTypeOk(o.BackupSchedule) +func (o *CreateInstancePayload) GetEncryptionOk() (ret CreateInstancePayloadGetEncryptionRetType, ok bool) { + return getCreateInstancePayloadGetEncryptionAttributeTypeOk(o.Encryption) } -// HasBackupSchedule returns a boolean if a field has been set. +// HasEncryption 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 *CreateInstancePayload) HasBackupSchedule() bool { - _, ok := o.GetBackupScheduleOk() +func (o *CreateInstancePayload) HasEncryption() bool { + _, ok := o.GetEncryptionOk() return ok } -// SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. +// SetEncryption gets a reference to the given InstanceEncryption and assigns it to the Encryption field. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayload) SetBackupSchedule(v CreateInstancePayloadGetBackupScheduleRetType) { - setCreateInstancePayloadGetBackupScheduleAttributeType(&o.BackupSchedule, v) +func (o *CreateInstancePayload) SetEncryption(v CreateInstancePayloadGetEncryptionRetType) { + setCreateInstancePayloadGetEncryptionAttributeType(&o.Encryption, v) } // GetFlavorId returns the FlavorId field value @@ -374,7 +405,7 @@ func (o *CreateInstancePayload) HasLabels() bool { return ok } -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) SetLabels(v CreateInstancePayloadGetLabelsRetType) { setCreateInstancePayloadGetLabelsAttributeType(&o.Labels, v) @@ -400,82 +431,81 @@ func (o *CreateInstancePayload) SetName(v CreateInstancePayloadGetNameRetType) { setCreateInstancePayloadGetNameAttributeType(&o.Name, v) } -// GetOptions returns the Options field value if set, zero value otherwise. +// GetNetwork returns the Network field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayload) GetOptions() (res CreateInstancePayloadGetOptionsRetType) { - res, _ = o.GetOptionsOk() - return +func (o *CreateInstancePayload) GetNetwork() (ret CreateInstancePayloadGetNetworkRetType) { + ret, _ = o.GetNetworkOk() + return ret } -// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// GetNetworkOk returns a tuple with the Network 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 *CreateInstancePayload) GetOptionsOk() (ret CreateInstancePayloadGetOptionsRetType, ok bool) { - return getCreateInstancePayloadGetOptionsAttributeTypeOk(o.Options) +func (o *CreateInstancePayload) GetNetworkOk() (ret CreateInstancePayloadGetNetworkRetType, ok bool) { + return getCreateInstancePayloadGetNetworkAttributeTypeOk(o.Network) } -// HasOptions returns a boolean if a field has been set. +// SetNetwork sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayload) HasOptions() bool { - _, ok := o.GetOptionsOk() - return ok +func (o *CreateInstancePayload) SetNetwork(v CreateInstancePayloadGetNetworkRetType) { + setCreateInstancePayloadGetNetworkAttributeType(&o.Network, v) } -// SetOptions gets a reference to the given CreateInstancePayloadOptions and assigns it to the Options field. +// GetRetentionDays returns the RetentionDays field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayload) SetOptions(v CreateInstancePayloadGetOptionsRetType) { - setCreateInstancePayloadGetOptionsAttributeType(&o.Options, v) +func (o *CreateInstancePayload) GetRetentionDays() (ret CreateInstancePayloadGetRetentionDaysRetType) { + ret, _ = o.GetRetentionDaysOk() + return ret } -// GetStorage returns the Storage field value if set, zero value otherwise. +// GetRetentionDaysOk returns a tuple with the RetentionDays 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 *CreateInstancePayload) GetStorage() (res CreateInstancePayloadGetStorageRetType) { - res, _ = o.GetStorageOk() - return +func (o *CreateInstancePayload) GetRetentionDaysOk() (ret CreateInstancePayloadGetRetentionDaysRetType, ok bool) { + return getCreateInstancePayloadGetRetentionDaysAttributeTypeOk(o.RetentionDays) } -// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise -// and a boolean to check if the value has been set. +// SetRetentionDays sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayload) GetStorageOk() (ret CreateInstancePayloadGetStorageRetType, ok bool) { - return getCreateInstancePayloadGetStorageAttributeTypeOk(o.Storage) +func (o *CreateInstancePayload) SetRetentionDays(v CreateInstancePayloadGetRetentionDaysRetType) { + setCreateInstancePayloadGetRetentionDaysAttributeType(&o.RetentionDays, v) } -// HasStorage returns a boolean if a field has been set. +// GetStorage returns the Storage field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayload) HasStorage() bool { - _, ok := o.GetStorageOk() - return ok +func (o *CreateInstancePayload) GetStorage() (ret CreateInstancePayloadGetStorageRetType) { + ret, _ = o.GetStorageOk() + return ret +} + +// GetStorageOk returns a tuple with the Storage 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 *CreateInstancePayload) GetStorageOk() (ret CreateInstancePayloadGetStorageRetType, ok bool) { + return getCreateInstancePayloadGetStorageAttributeTypeOk(o.Storage) } -// SetStorage gets a reference to the given CreateInstancePayloadStorage and assigns it to the Storage field. +// SetStorage sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) SetStorage(v CreateInstancePayloadGetStorageRetType) { setCreateInstancePayloadGetStorageAttributeType(&o.Storage, v) } -// GetVersion returns the Version field value if set, zero value otherwise. +// GetVersion returns the Version field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayload) GetVersion() (res CreateInstancePayloadGetVersionRetType) { - res, _ = o.GetVersionOk() - return +func (o *CreateInstancePayload) GetVersion() (ret CreateInstancePayloadGetVersionRetType) { + ret, _ = o.GetVersionOk() + return ret } -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// GetVersionOk returns a tuple with the Version field value // and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) GetVersionOk() (ret CreateInstancePayloadGetVersionRetType, ok bool) { return getCreateInstancePayloadGetVersionAttributeTypeOk(o.Version) } -// HasVersion 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 *CreateInstancePayload) HasVersion() bool { - _, ok := o.GetVersionOk() - return ok -} - -// SetVersion gets a reference to the given string and assigns it to the Version field. +// SetVersion sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) SetVersion(v CreateInstancePayloadGetVersionRetType) { setCreateInstancePayloadGetVersionAttributeType(&o.Version, v) @@ -484,12 +514,12 @@ func (o *CreateInstancePayload) SetVersion(v CreateInstancePayloadGetVersionRetT // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateInstancePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getCreateInstancePayloadGetAclAttributeTypeOk(o.Acl); ok { - toSerialize["Acl"] = val - } if val, ok := getCreateInstancePayloadGetBackupScheduleAttributeTypeOk(o.BackupSchedule); ok { toSerialize["BackupSchedule"] = val } + if val, ok := getCreateInstancePayloadGetEncryptionAttributeTypeOk(o.Encryption); ok { + toSerialize["Encryption"] = val + } if val, ok := getCreateInstancePayloadGetFlavorIdAttributeTypeOk(o.FlavorId); ok { toSerialize["FlavorId"] = val } @@ -499,8 +529,11 @@ func (o CreateInstancePayload) ToMap() (map[string]interface{}, error) { if val, ok := getCreateInstancePayloadGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } - if val, ok := getCreateInstancePayloadGetOptionsAttributeTypeOk(o.Options); ok { - toSerialize["Options"] = val + if val, ok := getCreateInstancePayloadGetNetworkAttributeTypeOk(o.Network); ok { + toSerialize["Network"] = val + } + if val, ok := getCreateInstancePayloadGetRetentionDaysAttributeTypeOk(o.RetentionDays); ok { + toSerialize["RetentionDays"] = val } if val, ok := getCreateInstancePayloadGetStorageAttributeTypeOk(o.Storage); ok { toSerialize["Storage"] = val diff --git a/services/sqlserverflex/model_create_instance_payload_storage.go b/services/sqlserverflex/model_create_instance_payload_network.go similarity index 50% rename from services/sqlserverflex/model_create_instance_payload_storage.go rename to services/sqlserverflex/model_create_instance_payload_network.go index b7b9f3ae4..cd810f8bb 100644 --- a/services/sqlserverflex/model_create_instance_payload_storage.go +++ b/services/sqlserverflex/model_create_instance_payload_network.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,19 +15,25 @@ import ( "encoding/json" ) -// checks if the CreateInstancePayloadStorage type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateInstancePayloadStorage{} +// checks if the CreateInstancePayloadNetwork type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateInstancePayloadNetwork{} /* - types and functions for class + types and functions for accessScope */ -// isNotNullableString +// isEnumRef // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadStorageGetClassAttributeType = *string +type CreateInstancePayloadNetworkGetAccessScopeAttributeType = *InstanceNetworkAccessScope // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateInstancePayloadStorageGetClassAttributeTypeOk(arg CreateInstancePayloadStorageGetClassAttributeType) (ret CreateInstancePayloadStorageGetClassRetType, ok bool) { +type CreateInstancePayloadNetworkGetAccessScopeArgType = InstanceNetworkAccessScope + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateInstancePayloadNetworkGetAccessScopeRetType = InstanceNetworkAccessScope + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateInstancePayloadNetworkGetAccessScopeAttributeTypeOk(arg CreateInstancePayloadNetworkGetAccessScopeAttributeType) (ret CreateInstancePayloadNetworkGetAccessScopeRetType, ok bool) { if arg == nil { return ret, false } @@ -35,32 +41,26 @@ func getCreateInstancePayloadStorageGetClassAttributeTypeOk(arg CreateInstancePa } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateInstancePayloadStorageGetClassAttributeType(arg *CreateInstancePayloadStorageGetClassAttributeType, val CreateInstancePayloadStorageGetClassRetType) { +func setCreateInstancePayloadNetworkGetAccessScopeAttributeType(arg *CreateInstancePayloadNetworkGetAccessScopeAttributeType, val CreateInstancePayloadNetworkGetAccessScopeRetType) { *arg = &val } -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadStorageGetClassArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadStorageGetClassRetType = string - /* - types and functions for size + types and functions for acl */ -// isLong +// isArray // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadStorageGetSizeAttributeType = *int64 +type CreateInstancePayloadNetworkGetAclAttributeType = *[]string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadStorageGetSizeArgType = int64 +type CreateInstancePayloadNetworkGetAclArgType = []string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadStorageGetSizeRetType = int64 +type CreateInstancePayloadNetworkGetAclRetType = []string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateInstancePayloadStorageGetSizeAttributeTypeOk(arg CreateInstancePayloadStorageGetSizeAttributeType) (ret CreateInstancePayloadStorageGetSizeRetType, ok bool) { +func getCreateInstancePayloadNetworkGetAclAttributeTypeOk(arg CreateInstancePayloadNetworkGetAclAttributeType) (ret CreateInstancePayloadNetworkGetAclRetType, ok bool) { if arg == nil { return ret, false } @@ -68,146 +68,143 @@ func getCreateInstancePayloadStorageGetSizeAttributeTypeOk(arg CreateInstancePay } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateInstancePayloadStorageGetSizeAttributeType(arg *CreateInstancePayloadStorageGetSizeAttributeType, val CreateInstancePayloadStorageGetSizeRetType) { +func setCreateInstancePayloadNetworkGetAclAttributeType(arg *CreateInstancePayloadNetworkGetAclAttributeType, val CreateInstancePayloadNetworkGetAclRetType) { *arg = &val } -// CreateInstancePayloadStorage Storage for the instance +// CreateInstancePayloadNetwork the network configuration of the instance. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadStorage struct { - // Class of the instance. - Class CreateInstancePayloadStorageGetClassAttributeType `json:"class,omitempty"` - // Size of the instance storage in GB - Size CreateInstancePayloadStorageGetSizeAttributeType `json:"size,omitempty"` +type CreateInstancePayloadNetwork struct { + AccessScope CreateInstancePayloadNetworkGetAccessScopeAttributeType `json:"accessScope,omitempty"` + // List of IPV4 cidr. + // REQUIRED + Acl CreateInstancePayloadNetworkGetAclAttributeType `json:"acl" required:"true"` } -// NewCreateInstancePayloadStorage instantiates a new CreateInstancePayloadStorage object +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _CreateInstancePayloadNetwork CreateInstancePayloadNetwork + +// NewCreateInstancePayloadNetwork instantiates a new CreateInstancePayloadNetwork 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 NewCreateInstancePayloadStorage() *CreateInstancePayloadStorage { - this := CreateInstancePayloadStorage{} +func NewCreateInstancePayloadNetwork(acl CreateInstancePayloadNetworkGetAclArgType) *CreateInstancePayloadNetwork { + this := CreateInstancePayloadNetwork{} + setCreateInstancePayloadNetworkGetAclAttributeType(&this.Acl, acl) return &this } -// NewCreateInstancePayloadStorageWithDefaults instantiates a new CreateInstancePayloadStorage object +// NewCreateInstancePayloadNetworkWithDefaults instantiates a new CreateInstancePayloadNetwork 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 NewCreateInstancePayloadStorageWithDefaults() *CreateInstancePayloadStorage { - this := CreateInstancePayloadStorage{} - var class string = "premium-perf12-stackit" - this.Class = &class +func NewCreateInstancePayloadNetworkWithDefaults() *CreateInstancePayloadNetwork { + this := CreateInstancePayloadNetwork{} + var accessScope InstanceNetworkAccessScope = INSTANCENETWORKACCESSSCOPE_PUBLIC + this.AccessScope = &accessScope return &this } -// GetClass returns the Class field value if set, zero value otherwise. +// GetAccessScope returns the AccessScope 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 *CreateInstancePayloadStorage) GetClass() (res CreateInstancePayloadStorageGetClassRetType) { - res, _ = o.GetClassOk() +func (o *CreateInstancePayloadNetwork) GetAccessScope() (res CreateInstancePayloadNetworkGetAccessScopeRetType) { + res, _ = o.GetAccessScopeOk() return } -// GetClassOk returns a tuple with the Class field value if set, nil otherwise +// GetAccessScopeOk returns a tuple with the AccessScope 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 *CreateInstancePayloadStorage) GetClassOk() (ret CreateInstancePayloadStorageGetClassRetType, ok bool) { - return getCreateInstancePayloadStorageGetClassAttributeTypeOk(o.Class) +func (o *CreateInstancePayloadNetwork) GetAccessScopeOk() (ret CreateInstancePayloadNetworkGetAccessScopeRetType, ok bool) { + return getCreateInstancePayloadNetworkGetAccessScopeAttributeTypeOk(o.AccessScope) } -// HasClass returns a boolean if a field has been set. +// HasAccessScope 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 *CreateInstancePayloadStorage) HasClass() bool { - _, ok := o.GetClassOk() +func (o *CreateInstancePayloadNetwork) HasAccessScope() bool { + _, ok := o.GetAccessScopeOk() return ok } -// SetClass gets a reference to the given string and assigns it to the Class field. +// SetAccessScope gets a reference to the given InstanceNetworkAccessScope and assigns it to the AccessScope field. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayloadStorage) SetClass(v CreateInstancePayloadStorageGetClassRetType) { - setCreateInstancePayloadStorageGetClassAttributeType(&o.Class, v) +func (o *CreateInstancePayloadNetwork) SetAccessScope(v CreateInstancePayloadNetworkGetAccessScopeRetType) { + setCreateInstancePayloadNetworkGetAccessScopeAttributeType(&o.AccessScope, v) } -// GetSize returns the Size field value if set, zero value otherwise. +// GetAcl returns the Acl field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayloadStorage) GetSize() (res CreateInstancePayloadStorageGetSizeRetType) { - res, _ = o.GetSizeOk() - return +func (o *CreateInstancePayloadNetwork) GetAcl() (ret CreateInstancePayloadNetworkGetAclRetType) { + ret, _ = o.GetAclOk() + return ret } -// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// GetAclOk returns a tuple with the Acl 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 *CreateInstancePayloadStorage) GetSizeOk() (ret CreateInstancePayloadStorageGetSizeRetType, ok bool) { - return getCreateInstancePayloadStorageGetSizeAttributeTypeOk(o.Size) -} - -// HasSize 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 *CreateInstancePayloadStorage) HasSize() bool { - _, ok := o.GetSizeOk() - return ok +func (o *CreateInstancePayloadNetwork) GetAclOk() (ret CreateInstancePayloadNetworkGetAclRetType, ok bool) { + return getCreateInstancePayloadNetworkGetAclAttributeTypeOk(o.Acl) } -// SetSize gets a reference to the given int64 and assigns it to the Size field. +// SetAcl sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayloadStorage) SetSize(v CreateInstancePayloadStorageGetSizeRetType) { - setCreateInstancePayloadStorageGetSizeAttributeType(&o.Size, v) +func (o *CreateInstancePayloadNetwork) SetAcl(v CreateInstancePayloadNetworkGetAclRetType) { + setCreateInstancePayloadNetworkGetAclAttributeType(&o.Acl, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateInstancePayloadStorage) ToMap() (map[string]interface{}, error) { +func (o CreateInstancePayloadNetwork) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getCreateInstancePayloadStorageGetClassAttributeTypeOk(o.Class); ok { - toSerialize["Class"] = val + if val, ok := getCreateInstancePayloadNetworkGetAccessScopeAttributeTypeOk(o.AccessScope); ok { + toSerialize["AccessScope"] = val } - if val, ok := getCreateInstancePayloadStorageGetSizeAttributeTypeOk(o.Size); ok { - toSerialize["Size"] = val + if val, ok := getCreateInstancePayloadNetworkGetAclAttributeTypeOk(o.Acl); ok { + toSerialize["Acl"] = val } return toSerialize, nil } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateInstancePayloadStorage struct { - value *CreateInstancePayloadStorage +type NullableCreateInstancePayloadNetwork struct { + value *CreateInstancePayloadNetwork isSet bool } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateInstancePayloadStorage) Get() *CreateInstancePayloadStorage { +func (v NullableCreateInstancePayloadNetwork) Get() *CreateInstancePayloadNetwork { return v.value } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateInstancePayloadStorage) Set(val *CreateInstancePayloadStorage) { +func (v *NullableCreateInstancePayloadNetwork) Set(val *CreateInstancePayloadNetwork) { 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 NullableCreateInstancePayloadStorage) IsSet() bool { +func (v NullableCreateInstancePayloadNetwork) 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 *NullableCreateInstancePayloadStorage) Unset() { +func (v *NullableCreateInstancePayloadNetwork) 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 NewNullableCreateInstancePayloadStorage(val *CreateInstancePayloadStorage) *NullableCreateInstancePayloadStorage { - return &NullableCreateInstancePayloadStorage{value: val, isSet: true} +func NewNullableCreateInstancePayloadNetwork(val *CreateInstancePayloadNetwork) *NullableCreateInstancePayloadNetwork { + return &NullableCreateInstancePayloadNetwork{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 NullableCreateInstancePayloadStorage) MarshalJSON() ([]byte, error) { +func (v NullableCreateInstancePayloadNetwork) 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 *NullableCreateInstancePayloadStorage) UnmarshalJSON(src []byte) error { +func (v *NullableCreateInstancePayloadNetwork) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/sqlserverflex/model_create_instance_payload_acl_test.go b/services/sqlserverflex/model_create_instance_payload_network_test.go similarity index 91% rename from services/sqlserverflex/model_create_instance_payload_acl_test.go rename to services/sqlserverflex/model_create_instance_payload_network_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_create_instance_payload_acl_test.go +++ b/services/sqlserverflex/model_create_instance_payload_network_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_create_instance_payload_options.go b/services/sqlserverflex/model_create_instance_payload_options.go deleted file mode 100644 index 1ed3fe7e3..000000000 --- a/services/sqlserverflex/model_create_instance_payload_options.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package sqlserverflex - -import ( - "encoding/json" -) - -// checks if the CreateInstancePayloadOptions type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateInstancePayloadOptions{} - -/* - types and functions for edition -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadOptionsGetEditionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateInstancePayloadOptionsGetEditionAttributeTypeOk(arg CreateInstancePayloadOptionsGetEditionAttributeType) (ret CreateInstancePayloadOptionsGetEditionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateInstancePayloadOptionsGetEditionAttributeType(arg *CreateInstancePayloadOptionsGetEditionAttributeType, val CreateInstancePayloadOptionsGetEditionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadOptionsGetEditionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadOptionsGetEditionRetType = string - -/* - types and functions for retentionDays -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadOptionsGetRetentionDaysAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateInstancePayloadOptionsGetRetentionDaysAttributeTypeOk(arg CreateInstancePayloadOptionsGetRetentionDaysAttributeType) (ret CreateInstancePayloadOptionsGetRetentionDaysRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateInstancePayloadOptionsGetRetentionDaysAttributeType(arg *CreateInstancePayloadOptionsGetRetentionDaysAttributeType, val CreateInstancePayloadOptionsGetRetentionDaysRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadOptionsGetRetentionDaysArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadOptionsGetRetentionDaysRetType = string - -// CreateInstancePayloadOptions Database instance specific options are requested via this field -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadOptions struct { - // Edition of the MSSQL server instance - Edition CreateInstancePayloadOptionsGetEditionAttributeType `json:"edition,omitempty"` - // The days for how long the backup files should be stored before cleaned up. 30 to 365 - RetentionDays CreateInstancePayloadOptionsGetRetentionDaysAttributeType `json:"retentionDays,omitempty"` -} - -// NewCreateInstancePayloadOptions instantiates a new CreateInstancePayloadOptions 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 NewCreateInstancePayloadOptions() *CreateInstancePayloadOptions { - this := CreateInstancePayloadOptions{} - return &this -} - -// NewCreateInstancePayloadOptionsWithDefaults instantiates a new CreateInstancePayloadOptions 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 NewCreateInstancePayloadOptionsWithDefaults() *CreateInstancePayloadOptions { - this := CreateInstancePayloadOptions{} - var edition string = "developer" - this.Edition = &edition - var retentionDays string = "32" - this.RetentionDays = &retentionDays - return &this -} - -// GetEdition returns the Edition 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 *CreateInstancePayloadOptions) GetEdition() (res CreateInstancePayloadOptionsGetEditionRetType) { - res, _ = o.GetEditionOk() - return -} - -// GetEditionOk returns a tuple with the Edition 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 *CreateInstancePayloadOptions) GetEditionOk() (ret CreateInstancePayloadOptionsGetEditionRetType, ok bool) { - return getCreateInstancePayloadOptionsGetEditionAttributeTypeOk(o.Edition) -} - -// HasEdition 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 *CreateInstancePayloadOptions) HasEdition() bool { - _, ok := o.GetEditionOk() - return ok -} - -// SetEdition gets a reference to the given string and assigns it to the Edition field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayloadOptions) SetEdition(v CreateInstancePayloadOptionsGetEditionRetType) { - setCreateInstancePayloadOptionsGetEditionAttributeType(&o.Edition, v) -} - -// GetRetentionDays returns the RetentionDays 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 *CreateInstancePayloadOptions) GetRetentionDays() (res CreateInstancePayloadOptionsGetRetentionDaysRetType) { - res, _ = o.GetRetentionDaysOk() - return -} - -// GetRetentionDaysOk returns a tuple with the RetentionDays 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 *CreateInstancePayloadOptions) GetRetentionDaysOk() (ret CreateInstancePayloadOptionsGetRetentionDaysRetType, ok bool) { - return getCreateInstancePayloadOptionsGetRetentionDaysAttributeTypeOk(o.RetentionDays) -} - -// HasRetentionDays 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 *CreateInstancePayloadOptions) HasRetentionDays() bool { - _, ok := o.GetRetentionDaysOk() - return ok -} - -// SetRetentionDays gets a reference to the given string and assigns it to the RetentionDays field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayloadOptions) SetRetentionDays(v CreateInstancePayloadOptionsGetRetentionDaysRetType) { - setCreateInstancePayloadOptionsGetRetentionDaysAttributeType(&o.RetentionDays, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateInstancePayloadOptions) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getCreateInstancePayloadOptionsGetEditionAttributeTypeOk(o.Edition); ok { - toSerialize["Edition"] = val - } - if val, ok := getCreateInstancePayloadOptionsGetRetentionDaysAttributeTypeOk(o.RetentionDays); ok { - toSerialize["RetentionDays"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateInstancePayloadOptions struct { - value *CreateInstancePayloadOptions - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateInstancePayloadOptions) Get() *CreateInstancePayloadOptions { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateInstancePayloadOptions) Set(val *CreateInstancePayloadOptions) { - 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 NullableCreateInstancePayloadOptions) 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 *NullableCreateInstancePayloadOptions) 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 NewNullableCreateInstancePayloadOptions(val *CreateInstancePayloadOptions) *NullableCreateInstancePayloadOptions { - return &NullableCreateInstancePayloadOptions{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 NullableCreateInstancePayloadOptions) 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 *NullableCreateInstancePayloadOptions) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/sqlserverflex/model_create_instance_payload_options_test.go b/services/sqlserverflex/model_create_instance_payload_options_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_create_instance_payload_options_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_create_instance_payload_storage_test.go b/services/sqlserverflex/model_create_instance_payload_storage_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_create_instance_payload_storage_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_create_instance_payload_test.go b/services/sqlserverflex/model_create_instance_payload_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_create_instance_payload_test.go +++ b/services/sqlserverflex/model_create_instance_payload_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_create_instance_response.go b/services/sqlserverflex/model_create_instance_response.go index cea48eeee..abce2af3d 100644 --- a/services/sqlserverflex/model_create_instance_response.go +++ b/services/sqlserverflex/model_create_instance_response.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -48,16 +48,22 @@ type CreateInstanceResponseGetIdRetType = string // CreateInstanceResponse struct for CreateInstanceResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstanceResponse struct { - Id CreateInstanceResponseGetIdAttributeType `json:"id,omitempty"` + // The ID of the instance. + // REQUIRED + Id CreateInstanceResponseGetIdAttributeType `json:"id" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _CreateInstanceResponse CreateInstanceResponse + // NewCreateInstanceResponse instantiates a new CreateInstanceResponse 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 NewCreateInstanceResponse() *CreateInstanceResponse { +func NewCreateInstanceResponse(id CreateInstanceResponseGetIdArgType) *CreateInstanceResponse { this := CreateInstanceResponse{} + setCreateInstanceResponseGetIdAttributeType(&this.Id, id) return &this } @@ -70,28 +76,21 @@ func NewCreateInstanceResponseWithDefaults() *CreateInstanceResponse { return &this } -// GetId returns the Id field value if set, zero value otherwise. +// 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 *CreateInstanceResponse) GetId() (res CreateInstanceResponseGetIdRetType) { - res, _ = o.GetIdOk() - return +func (o *CreateInstanceResponse) GetId() (ret CreateInstanceResponseGetIdRetType) { + ret, _ = o.GetIdOk() + return ret } -// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// 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 *CreateInstanceResponse) GetIdOk() (ret CreateInstanceResponseGetIdRetType, ok bool) { return getCreateInstanceResponseGetIdAttributeTypeOk(o.Id) } -// HasId 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 *CreateInstanceResponse) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. +// 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 *CreateInstanceResponse) SetId(v CreateInstanceResponseGetIdRetType) { setCreateInstanceResponseGetIdAttributeType(&o.Id, v) diff --git a/services/sqlserverflex/model_create_instance_response_test.go b/services/sqlserverflex/model_create_instance_response_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_create_instance_response_test.go +++ b/services/sqlserverflex/model_create_instance_response_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_create_user_payload.go b/services/sqlserverflex/model_create_user_payload.go index 31d353597..5d8b405b6 100644 --- a/services/sqlserverflex/model_create_user_payload.go +++ b/services/sqlserverflex/model_create_user_payload.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -102,9 +102,12 @@ type CreateUserPayloadGetUsernameRetType = string // CreateUserPayload struct for CreateUserPayload // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserPayload struct { + // The default database for a user of the instance. DefaultDatabase CreateUserPayloadGetDefaultDatabaseAttributeType `json:"default_database,omitempty"` + // A list containing the user roles for the instance. A list with the valid user roles can be retrieved using the List Roles endpoint. // REQUIRED Roles CreateUserPayloadGetRolesAttributeType `json:"roles" required:"true"` + // The name of the user. // REQUIRED Username CreateUserPayloadGetUsernameAttributeType `json:"username" required:"true"` } diff --git a/services/sqlserverflex/model_create_user_payload_test.go b/services/sqlserverflex/model_create_user_payload_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_create_user_payload_test.go +++ b/services/sqlserverflex/model_create_user_payload_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_create_user_response.go b/services/sqlserverflex/model_create_user_response.go index f558e27fb..02ed318af 100644 --- a/services/sqlserverflex/model_create_user_response.go +++ b/services/sqlserverflex/model_create_user_response.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,21 +19,156 @@ import ( var _ MappedNullable = &CreateUserResponse{} /* - types and functions for item + types and functions for default_database */ -// isModel +// isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateUserResponseGetItemAttributeType = *SingleUser +type CreateUserResponseGetDefaultDatabaseAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateUserResponseGetItemArgType = SingleUser +func getCreateUserResponseGetDefaultDatabaseAttributeTypeOk(arg CreateUserResponseGetDefaultDatabaseAttributeType) (ret CreateUserResponseGetDefaultDatabaseRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setCreateUserResponseGetDefaultDatabaseAttributeType(arg *CreateUserResponseGetDefaultDatabaseAttributeType, val CreateUserResponseGetDefaultDatabaseRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetDefaultDatabaseArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetDefaultDatabaseRetType = string + +/* + types and functions for host +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetHostAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateUserResponseGetHostAttributeTypeOk(arg CreateUserResponseGetHostAttributeType) (ret CreateUserResponseGetHostRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setCreateUserResponseGetHostAttributeType(arg *CreateUserResponseGetHostAttributeType, val CreateUserResponseGetHostRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetHostArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetHostRetType = string + +/* + types and functions for id +*/ + +// isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetIdAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetIdArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetIdRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateUserResponseGetIdAttributeTypeOk(arg CreateUserResponseGetIdAttributeType) (ret CreateUserResponseGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setCreateUserResponseGetIdAttributeType(arg *CreateUserResponseGetIdAttributeType, val CreateUserResponseGetIdRetType) { + *arg = &val +} + +/* + types and functions for password +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetPasswordAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateUserResponseGetPasswordAttributeTypeOk(arg CreateUserResponseGetPasswordAttributeType) (ret CreateUserResponseGetPasswordRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setCreateUserResponseGetPasswordAttributeType(arg *CreateUserResponseGetPasswordAttributeType, val CreateUserResponseGetPasswordRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetPasswordArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetPasswordRetType = string + +/* + types and functions for port +*/ + +// isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetPortAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetPortArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetPortRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateUserResponseGetPortAttributeTypeOk(arg CreateUserResponseGetPortAttributeType) (ret CreateUserResponseGetPortRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setCreateUserResponseGetPortAttributeType(arg *CreateUserResponseGetPortAttributeType, val CreateUserResponseGetPortRetType) { + *arg = &val +} + +/* + types and functions for roles +*/ + +// isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetRolesAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetRolesArgType = []string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateUserResponseGetItemRetType = SingleUser +type CreateUserResponseGetRolesRetType = []string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateUserResponseGetItemAttributeTypeOk(arg CreateUserResponseGetItemAttributeType) (ret CreateUserResponseGetItemRetType, ok bool) { +func getCreateUserResponseGetRolesAttributeTypeOk(arg CreateUserResponseGetRolesAttributeType) (ret CreateUserResponseGetRolesRetType, ok bool) { if arg == nil { return ret, false } @@ -41,23 +176,142 @@ func getCreateUserResponseGetItemAttributeTypeOk(arg CreateUserResponseGetItemAt } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateUserResponseGetItemAttributeType(arg *CreateUserResponseGetItemAttributeType, val CreateUserResponseGetItemRetType) { +func setCreateUserResponseGetRolesAttributeType(arg *CreateUserResponseGetRolesAttributeType, val CreateUserResponseGetRolesRetType) { *arg = &val } +/* + types and functions for status +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetStatusAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateUserResponseGetStatusAttributeTypeOk(arg CreateUserResponseGetStatusAttributeType) (ret CreateUserResponseGetStatusRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setCreateUserResponseGetStatusAttributeType(arg *CreateUserResponseGetStatusAttributeType, val CreateUserResponseGetStatusRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetStatusArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetStatusRetType = string + +/* + types and functions for uri +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetUriAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateUserResponseGetUriAttributeTypeOk(arg CreateUserResponseGetUriAttributeType) (ret CreateUserResponseGetUriRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setCreateUserResponseGetUriAttributeType(arg *CreateUserResponseGetUriAttributeType, val CreateUserResponseGetUriRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetUriArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetUriRetType = string + +/* + types and functions for username +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetUsernameAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getCreateUserResponseGetUsernameAttributeTypeOk(arg CreateUserResponseGetUsernameAttributeType) (ret CreateUserResponseGetUsernameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setCreateUserResponseGetUsernameAttributeType(arg *CreateUserResponseGetUsernameAttributeType, val CreateUserResponseGetUsernameRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetUsernameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type CreateUserResponseGetUsernameRetType = string + // CreateUserResponse struct for CreateUserResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserResponse struct { - Item CreateUserResponseGetItemAttributeType `json:"item,omitempty"` + // The default database for a user of the instance. + // REQUIRED + DefaultDatabase CreateUserResponseGetDefaultDatabaseAttributeType `json:"default_database" required:"true"` + // The host of the instance in which the user belongs to. + // REQUIRED + Host CreateUserResponseGetHostAttributeType `json:"host" required:"true"` + // The ID of the user. + // REQUIRED + Id CreateUserResponseGetIdAttributeType `json:"id" required:"true"` + // The password for the user. + // REQUIRED + Password CreateUserResponseGetPasswordAttributeType `json:"password" required:"true"` + // The port of the instance in which the user belongs to. + // Can be cast to int32 without loss of precision. + // REQUIRED + Port CreateUserResponseGetPortAttributeType `json:"port" required:"true"` + // REQUIRED + Roles CreateUserResponseGetRolesAttributeType `json:"roles" required:"true"` + // The current status of the user. + // REQUIRED + Status CreateUserResponseGetStatusAttributeType `json:"status" required:"true"` + // The connection string for the user to the instance. + // REQUIRED + Uri CreateUserResponseGetUriAttributeType `json:"uri" required:"true"` + // The name of the user. + // REQUIRED + Username CreateUserResponseGetUsernameAttributeType `json:"username" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _CreateUserResponse CreateUserResponse + // NewCreateUserResponse instantiates a new CreateUserResponse 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 NewCreateUserResponse() *CreateUserResponse { +func NewCreateUserResponse(defaultDatabase CreateUserResponseGetDefaultDatabaseArgType, host CreateUserResponseGetHostArgType, id CreateUserResponseGetIdArgType, password CreateUserResponseGetPasswordArgType, port CreateUserResponseGetPortArgType, roles CreateUserResponseGetRolesArgType, status CreateUserResponseGetStatusArgType, uri CreateUserResponseGetUriArgType, username CreateUserResponseGetUsernameArgType) *CreateUserResponse { this := CreateUserResponse{} + setCreateUserResponseGetDefaultDatabaseAttributeType(&this.DefaultDatabase, defaultDatabase) + setCreateUserResponseGetHostAttributeType(&this.Host, host) + setCreateUserResponseGetIdAttributeType(&this.Id, id) + setCreateUserResponseGetPasswordAttributeType(&this.Password, password) + setCreateUserResponseGetPortAttributeType(&this.Port, port) + setCreateUserResponseGetRolesAttributeType(&this.Roles, roles) + setCreateUserResponseGetStatusAttributeType(&this.Status, status) + setCreateUserResponseGetUriAttributeType(&this.Uri, uri) + setCreateUserResponseGetUsernameAttributeType(&this.Username, username) return &this } @@ -70,38 +324,215 @@ func NewCreateUserResponseWithDefaults() *CreateUserResponse { return &this } -// GetItem returns the Item field value if set, zero value otherwise. +// GetDefaultDatabase returns the DefaultDatabase field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateUserResponse) GetItem() (res CreateUserResponseGetItemRetType) { - res, _ = o.GetItemOk() - return +func (o *CreateUserResponse) GetDefaultDatabase() (ret CreateUserResponseGetDefaultDatabaseRetType) { + ret, _ = o.GetDefaultDatabaseOk() + return ret } -// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// GetDefaultDatabaseOk returns a tuple with the DefaultDatabase 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 *CreateUserResponse) GetItemOk() (ret CreateUserResponseGetItemRetType, ok bool) { - return getCreateUserResponseGetItemAttributeTypeOk(o.Item) +func (o *CreateUserResponse) GetDefaultDatabaseOk() (ret CreateUserResponseGetDefaultDatabaseRetType, ok bool) { + return getCreateUserResponseGetDefaultDatabaseAttributeTypeOk(o.DefaultDatabase) +} + +// SetDefaultDatabase sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateUserResponse) SetDefaultDatabase(v CreateUserResponseGetDefaultDatabaseRetType) { + setCreateUserResponseGetDefaultDatabaseAttributeType(&o.DefaultDatabase, v) +} + +// GetHost returns the Host field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateUserResponse) GetHost() (ret CreateUserResponseGetHostRetType) { + ret, _ = o.GetHostOk() + return ret } -// HasItem returns a boolean if a field has been set. +// GetHostOk returns a tuple with the Host field value +// and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateUserResponse) HasItem() bool { - _, ok := o.GetItemOk() - return ok +func (o *CreateUserResponse) GetHostOk() (ret CreateUserResponseGetHostRetType, ok bool) { + return getCreateUserResponseGetHostAttributeTypeOk(o.Host) } -// SetItem gets a reference to the given SingleUser and assigns it to the Item field. +// SetHost sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateUserResponse) SetHost(v CreateUserResponseGetHostRetType) { + setCreateUserResponseGetHostAttributeType(&o.Host, 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 *CreateUserResponse) GetId() (ret CreateUserResponseGetIdRetType) { + ret, _ = o.GetIdOk() + return ret +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateUserResponse) GetIdOk() (ret CreateUserResponseGetIdRetType, ok bool) { + return getCreateUserResponseGetIdAttributeTypeOk(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 *CreateUserResponse) SetId(v CreateUserResponseGetIdRetType) { + setCreateUserResponseGetIdAttributeType(&o.Id, v) +} + +// GetPassword returns the Password field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateUserResponse) GetPassword() (ret CreateUserResponseGetPasswordRetType) { + ret, _ = o.GetPasswordOk() + return ret +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateUserResponse) SetItem(v CreateUserResponseGetItemRetType) { - setCreateUserResponseGetItemAttributeType(&o.Item, v) +func (o *CreateUserResponse) GetPasswordOk() (ret CreateUserResponseGetPasswordRetType, ok bool) { + return getCreateUserResponseGetPasswordAttributeTypeOk(o.Password) +} + +// SetPassword sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateUserResponse) SetPassword(v CreateUserResponseGetPasswordRetType) { + setCreateUserResponseGetPasswordAttributeType(&o.Password, v) +} + +// GetPort returns the Port field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateUserResponse) GetPort() (ret CreateUserResponseGetPortRetType) { + ret, _ = o.GetPortOk() + return ret +} + +// GetPortOk returns a tuple with the Port 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 *CreateUserResponse) GetPortOk() (ret CreateUserResponseGetPortRetType, ok bool) { + return getCreateUserResponseGetPortAttributeTypeOk(o.Port) +} + +// SetPort sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateUserResponse) SetPort(v CreateUserResponseGetPortRetType) { + setCreateUserResponseGetPortAttributeType(&o.Port, v) +} + +// GetRoles returns the Roles field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateUserResponse) GetRoles() (ret CreateUserResponseGetRolesRetType) { + ret, _ = o.GetRolesOk() + return ret +} + +// GetRolesOk returns a tuple with the Roles 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 *CreateUserResponse) GetRolesOk() (ret CreateUserResponseGetRolesRetType, ok bool) { + return getCreateUserResponseGetRolesAttributeTypeOk(o.Roles) +} + +// SetRoles sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateUserResponse) SetRoles(v CreateUserResponseGetRolesRetType) { + setCreateUserResponseGetRolesAttributeType(&o.Roles, v) +} + +// GetStatus returns the Status field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateUserResponse) GetStatus() (ret CreateUserResponseGetStatusRetType) { + ret, _ = o.GetStatusOk() + return ret +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateUserResponse) GetStatusOk() (ret CreateUserResponseGetStatusRetType, ok bool) { + return getCreateUserResponseGetStatusAttributeTypeOk(o.Status) +} + +// SetStatus sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateUserResponse) SetStatus(v CreateUserResponseGetStatusRetType) { + setCreateUserResponseGetStatusAttributeType(&o.Status, v) +} + +// GetUri returns the Uri field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateUserResponse) GetUri() (ret CreateUserResponseGetUriRetType) { + ret, _ = o.GetUriOk() + return ret +} + +// GetUriOk returns a tuple with the Uri 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 *CreateUserResponse) GetUriOk() (ret CreateUserResponseGetUriRetType, ok bool) { + return getCreateUserResponseGetUriAttributeTypeOk(o.Uri) +} + +// SetUri sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateUserResponse) SetUri(v CreateUserResponseGetUriRetType) { + setCreateUserResponseGetUriAttributeType(&o.Uri, v) +} + +// GetUsername returns the Username field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateUserResponse) GetUsername() (ret CreateUserResponseGetUsernameRetType) { + ret, _ = o.GetUsernameOk() + return ret +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateUserResponse) GetUsernameOk() (ret CreateUserResponseGetUsernameRetType, ok bool) { + return getCreateUserResponseGetUsernameAttributeTypeOk(o.Username) +} + +// SetUsername sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *CreateUserResponse) SetUsername(v CreateUserResponseGetUsernameRetType) { + setCreateUserResponseGetUsernameAttributeType(&o.Username, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateUserResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getCreateUserResponseGetItemAttributeTypeOk(o.Item); ok { - toSerialize["Item"] = val + if val, ok := getCreateUserResponseGetDefaultDatabaseAttributeTypeOk(o.DefaultDatabase); ok { + toSerialize["DefaultDatabase"] = val + } + if val, ok := getCreateUserResponseGetHostAttributeTypeOk(o.Host); ok { + toSerialize["Host"] = val + } + if val, ok := getCreateUserResponseGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getCreateUserResponseGetPasswordAttributeTypeOk(o.Password); ok { + toSerialize["Password"] = val + } + if val, ok := getCreateUserResponseGetPortAttributeTypeOk(o.Port); ok { + toSerialize["Port"] = val + } + if val, ok := getCreateUserResponseGetRolesAttributeTypeOk(o.Roles); ok { + toSerialize["Roles"] = val + } + if val, ok := getCreateUserResponseGetStatusAttributeTypeOk(o.Status); ok { + toSerialize["Status"] = val + } + if val, ok := getCreateUserResponseGetUriAttributeTypeOk(o.Uri); ok { + toSerialize["Uri"] = val + } + if val, ok := getCreateUserResponseGetUsernameAttributeTypeOk(o.Username); ok { + toSerialize["Username"] = val } return toSerialize, nil } diff --git a/services/sqlserverflex/model_create_user_response_test.go b/services/sqlserverflex/model_create_user_response_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_create_user_response_test.go +++ b/services/sqlserverflex/model_create_user_response_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_data_point_test.go b/services/sqlserverflex/model_data_point_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_data_point_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_database_documentation_create_database_request_options.go b/services/sqlserverflex/model_database_documentation_create_database_request_options.go deleted file mode 100644 index 117d749cf..000000000 --- a/services/sqlserverflex/model_database_documentation_create_database_request_options.go +++ /dev/null @@ -1,268 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package sqlserverflex - -import ( - "encoding/json" -) - -// checks if the DatabaseDocumentationCreateDatabaseRequestOptions type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DatabaseDocumentationCreateDatabaseRequestOptions{} - -/* - types and functions for collation -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseDocumentationCreateDatabaseRequestOptionsGetCollationAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDatabaseDocumentationCreateDatabaseRequestOptionsGetCollationAttributeTypeOk(arg DatabaseDocumentationCreateDatabaseRequestOptionsGetCollationAttributeType) (ret DatabaseDocumentationCreateDatabaseRequestOptionsGetCollationRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDatabaseDocumentationCreateDatabaseRequestOptionsGetCollationAttributeType(arg *DatabaseDocumentationCreateDatabaseRequestOptionsGetCollationAttributeType, val DatabaseDocumentationCreateDatabaseRequestOptionsGetCollationRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseDocumentationCreateDatabaseRequestOptionsGetCollationArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseDocumentationCreateDatabaseRequestOptionsGetCollationRetType = string - -/* - types and functions for compatibilityLevel -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseDocumentationCreateDatabaseRequestOptionsGetCompatibilityLevelAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDatabaseDocumentationCreateDatabaseRequestOptionsGetCompatibilityLevelAttributeTypeOk(arg DatabaseDocumentationCreateDatabaseRequestOptionsGetCompatibilityLevelAttributeType) (ret DatabaseDocumentationCreateDatabaseRequestOptionsGetCompatibilityLevelRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDatabaseDocumentationCreateDatabaseRequestOptionsGetCompatibilityLevelAttributeType(arg *DatabaseDocumentationCreateDatabaseRequestOptionsGetCompatibilityLevelAttributeType, val DatabaseDocumentationCreateDatabaseRequestOptionsGetCompatibilityLevelRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseDocumentationCreateDatabaseRequestOptionsGetCompatibilityLevelArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseDocumentationCreateDatabaseRequestOptionsGetCompatibilityLevelRetType = string - -/* - types and functions for owner -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseDocumentationCreateDatabaseRequestOptionsGetOwnerAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDatabaseDocumentationCreateDatabaseRequestOptionsGetOwnerAttributeTypeOk(arg DatabaseDocumentationCreateDatabaseRequestOptionsGetOwnerAttributeType) (ret DatabaseDocumentationCreateDatabaseRequestOptionsGetOwnerRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDatabaseDocumentationCreateDatabaseRequestOptionsGetOwnerAttributeType(arg *DatabaseDocumentationCreateDatabaseRequestOptionsGetOwnerAttributeType, val DatabaseDocumentationCreateDatabaseRequestOptionsGetOwnerRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseDocumentationCreateDatabaseRequestOptionsGetOwnerArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseDocumentationCreateDatabaseRequestOptionsGetOwnerRetType = string - -// DatabaseDocumentationCreateDatabaseRequestOptions struct for DatabaseDocumentationCreateDatabaseRequestOptions -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseDocumentationCreateDatabaseRequestOptions struct { - // Collation of the database - Collation DatabaseDocumentationCreateDatabaseRequestOptionsGetCollationAttributeType `json:"collation,omitempty"` - // CompatibilityLevel of the Database. - CompatibilityLevel DatabaseDocumentationCreateDatabaseRequestOptionsGetCompatibilityLevelAttributeType `json:"compatibilityLevel,omitempty"` - // Name of the owner of the database. - // REQUIRED - Owner DatabaseDocumentationCreateDatabaseRequestOptionsGetOwnerAttributeType `json:"owner" required:"true"` -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _DatabaseDocumentationCreateDatabaseRequestOptions DatabaseDocumentationCreateDatabaseRequestOptions - -// NewDatabaseDocumentationCreateDatabaseRequestOptions instantiates a new DatabaseDocumentationCreateDatabaseRequestOptions 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 NewDatabaseDocumentationCreateDatabaseRequestOptions(owner DatabaseDocumentationCreateDatabaseRequestOptionsGetOwnerArgType) *DatabaseDocumentationCreateDatabaseRequestOptions { - this := DatabaseDocumentationCreateDatabaseRequestOptions{} - setDatabaseDocumentationCreateDatabaseRequestOptionsGetOwnerAttributeType(&this.Owner, owner) - return &this -} - -// NewDatabaseDocumentationCreateDatabaseRequestOptionsWithDefaults instantiates a new DatabaseDocumentationCreateDatabaseRequestOptions 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 NewDatabaseDocumentationCreateDatabaseRequestOptionsWithDefaults() *DatabaseDocumentationCreateDatabaseRequestOptions { - this := DatabaseDocumentationCreateDatabaseRequestOptions{} - return &this -} - -// GetCollation returns the Collation 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 *DatabaseDocumentationCreateDatabaseRequestOptions) GetCollation() (res DatabaseDocumentationCreateDatabaseRequestOptionsGetCollationRetType) { - res, _ = o.GetCollationOk() - return -} - -// GetCollationOk returns a tuple with the Collation 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 *DatabaseDocumentationCreateDatabaseRequestOptions) GetCollationOk() (ret DatabaseDocumentationCreateDatabaseRequestOptionsGetCollationRetType, ok bool) { - return getDatabaseDocumentationCreateDatabaseRequestOptionsGetCollationAttributeTypeOk(o.Collation) -} - -// HasCollation 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 *DatabaseDocumentationCreateDatabaseRequestOptions) HasCollation() bool { - _, ok := o.GetCollationOk() - return ok -} - -// SetCollation gets a reference to the given string and assigns it to the Collation field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DatabaseDocumentationCreateDatabaseRequestOptions) SetCollation(v DatabaseDocumentationCreateDatabaseRequestOptionsGetCollationRetType) { - setDatabaseDocumentationCreateDatabaseRequestOptionsGetCollationAttributeType(&o.Collation, v) -} - -// GetCompatibilityLevel returns the CompatibilityLevel 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 *DatabaseDocumentationCreateDatabaseRequestOptions) GetCompatibilityLevel() (res DatabaseDocumentationCreateDatabaseRequestOptionsGetCompatibilityLevelRetType) { - res, _ = o.GetCompatibilityLevelOk() - return -} - -// GetCompatibilityLevelOk returns a tuple with the CompatibilityLevel 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 *DatabaseDocumentationCreateDatabaseRequestOptions) GetCompatibilityLevelOk() (ret DatabaseDocumentationCreateDatabaseRequestOptionsGetCompatibilityLevelRetType, ok bool) { - return getDatabaseDocumentationCreateDatabaseRequestOptionsGetCompatibilityLevelAttributeTypeOk(o.CompatibilityLevel) -} - -// HasCompatibilityLevel 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 *DatabaseDocumentationCreateDatabaseRequestOptions) HasCompatibilityLevel() bool { - _, ok := o.GetCompatibilityLevelOk() - return ok -} - -// SetCompatibilityLevel gets a reference to the given string and assigns it to the CompatibilityLevel field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DatabaseDocumentationCreateDatabaseRequestOptions) SetCompatibilityLevel(v DatabaseDocumentationCreateDatabaseRequestOptionsGetCompatibilityLevelRetType) { - setDatabaseDocumentationCreateDatabaseRequestOptionsGetCompatibilityLevelAttributeType(&o.CompatibilityLevel, v) -} - -// GetOwner returns the Owner field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DatabaseDocumentationCreateDatabaseRequestOptions) GetOwner() (ret DatabaseDocumentationCreateDatabaseRequestOptionsGetOwnerRetType) { - ret, _ = o.GetOwnerOk() - return ret -} - -// GetOwnerOk returns a tuple with the Owner 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 *DatabaseDocumentationCreateDatabaseRequestOptions) GetOwnerOk() (ret DatabaseDocumentationCreateDatabaseRequestOptionsGetOwnerRetType, ok bool) { - return getDatabaseDocumentationCreateDatabaseRequestOptionsGetOwnerAttributeTypeOk(o.Owner) -} - -// SetOwner sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DatabaseDocumentationCreateDatabaseRequestOptions) SetOwner(v DatabaseDocumentationCreateDatabaseRequestOptionsGetOwnerRetType) { - setDatabaseDocumentationCreateDatabaseRequestOptionsGetOwnerAttributeType(&o.Owner, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o DatabaseDocumentationCreateDatabaseRequestOptions) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getDatabaseDocumentationCreateDatabaseRequestOptionsGetCollationAttributeTypeOk(o.Collation); ok { - toSerialize["Collation"] = val - } - if val, ok := getDatabaseDocumentationCreateDatabaseRequestOptionsGetCompatibilityLevelAttributeTypeOk(o.CompatibilityLevel); ok { - toSerialize["CompatibilityLevel"] = val - } - if val, ok := getDatabaseDocumentationCreateDatabaseRequestOptionsGetOwnerAttributeTypeOk(o.Owner); ok { - toSerialize["Owner"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableDatabaseDocumentationCreateDatabaseRequestOptions struct { - value *DatabaseDocumentationCreateDatabaseRequestOptions - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDatabaseDocumentationCreateDatabaseRequestOptions) Get() *DatabaseDocumentationCreateDatabaseRequestOptions { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDatabaseDocumentationCreateDatabaseRequestOptions) Set(val *DatabaseDocumentationCreateDatabaseRequestOptions) { - 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 NullableDatabaseDocumentationCreateDatabaseRequestOptions) 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 *NullableDatabaseDocumentationCreateDatabaseRequestOptions) 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 NewNullableDatabaseDocumentationCreateDatabaseRequestOptions(val *DatabaseDocumentationCreateDatabaseRequestOptions) *NullableDatabaseDocumentationCreateDatabaseRequestOptions { - return &NullableDatabaseDocumentationCreateDatabaseRequestOptions{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 NullableDatabaseDocumentationCreateDatabaseRequestOptions) 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 *NullableDatabaseDocumentationCreateDatabaseRequestOptions) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/sqlserverflex/model_database_documentation_create_database_request_options_test.go b/services/sqlserverflex/model_database_documentation_create_database_request_options_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_database_documentation_create_database_request_options_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_mssql_database_collation.go b/services/sqlserverflex/model_database_getcollation.go similarity index 60% rename from services/sqlserverflex/model_mssql_database_collation.go rename to services/sqlserverflex/model_database_getcollation.go index 1a142978a..e2df8d2c5 100644 --- a/services/sqlserverflex/model_mssql_database_collation.go +++ b/services/sqlserverflex/model_database_getcollation.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,8 +15,8 @@ import ( "encoding/json" ) -// checks if the MssqlDatabaseCollation type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &MssqlDatabaseCollation{} +// checks if the DatabaseGetcollation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatabaseGetcollation{} /* types and functions for collation_name @@ -24,10 +24,10 @@ var _ MappedNullable = &MssqlDatabaseCollation{} // isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MssqlDatabaseCollationGetCollationNameAttributeType = *string +type DatabaseGetcollationGetCollationNameAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getMssqlDatabaseCollationGetCollationNameAttributeTypeOk(arg MssqlDatabaseCollationGetCollationNameAttributeType) (ret MssqlDatabaseCollationGetCollationNameRetType, ok bool) { +func getDatabaseGetcollationGetCollationNameAttributeTypeOk(arg DatabaseGetcollationGetCollationNameAttributeType) (ret DatabaseGetcollationGetCollationNameRetType, ok bool) { if arg == nil { return ret, false } @@ -35,15 +35,15 @@ func getMssqlDatabaseCollationGetCollationNameAttributeTypeOk(arg MssqlDatabaseC } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setMssqlDatabaseCollationGetCollationNameAttributeType(arg *MssqlDatabaseCollationGetCollationNameAttributeType, val MssqlDatabaseCollationGetCollationNameRetType) { +func setDatabaseGetcollationGetCollationNameAttributeType(arg *DatabaseGetcollationGetCollationNameAttributeType, val DatabaseGetcollationGetCollationNameRetType) { *arg = &val } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MssqlDatabaseCollationGetCollationNameArgType = string +type DatabaseGetcollationGetCollationNameArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MssqlDatabaseCollationGetCollationNameRetType = string +type DatabaseGetcollationGetCollationNameRetType = string /* types and functions for description @@ -51,10 +51,10 @@ type MssqlDatabaseCollationGetCollationNameRetType = string // isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MssqlDatabaseCollationGetDescriptionAttributeType = *string +type DatabaseGetcollationGetDescriptionAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getMssqlDatabaseCollationGetDescriptionAttributeTypeOk(arg MssqlDatabaseCollationGetDescriptionAttributeType) (ret MssqlDatabaseCollationGetDescriptionRetType, ok bool) { +func getDatabaseGetcollationGetDescriptionAttributeTypeOk(arg DatabaseGetcollationGetDescriptionAttributeType) (ret DatabaseGetcollationGetDescriptionRetType, ok bool) { if arg == nil { return ret, false } @@ -62,45 +62,45 @@ func getMssqlDatabaseCollationGetDescriptionAttributeTypeOk(arg MssqlDatabaseCol } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setMssqlDatabaseCollationGetDescriptionAttributeType(arg *MssqlDatabaseCollationGetDescriptionAttributeType, val MssqlDatabaseCollationGetDescriptionRetType) { +func setDatabaseGetcollationGetDescriptionAttributeType(arg *DatabaseGetcollationGetDescriptionAttributeType, val DatabaseGetcollationGetDescriptionRetType) { *arg = &val } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MssqlDatabaseCollationGetDescriptionArgType = string +type DatabaseGetcollationGetDescriptionArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MssqlDatabaseCollationGetDescriptionRetType = string +type DatabaseGetcollationGetDescriptionRetType = string -// MssqlDatabaseCollation struct for MssqlDatabaseCollation +// DatabaseGetcollation struct for DatabaseGetcollation // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MssqlDatabaseCollation struct { - CollationName MssqlDatabaseCollationGetCollationNameAttributeType `json:"collation_name,omitempty"` - Description MssqlDatabaseCollationGetDescriptionAttributeType `json:"description,omitempty"` +type DatabaseGetcollation struct { + CollationName DatabaseGetcollationGetCollationNameAttributeType `json:"collation_name,omitempty"` + Description DatabaseGetcollationGetDescriptionAttributeType `json:"description,omitempty"` } -// NewMssqlDatabaseCollation instantiates a new MssqlDatabaseCollation object +// NewDatabaseGetcollation instantiates a new DatabaseGetcollation 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 NewMssqlDatabaseCollation() *MssqlDatabaseCollation { - this := MssqlDatabaseCollation{} +func NewDatabaseGetcollation() *DatabaseGetcollation { + this := DatabaseGetcollation{} return &this } -// NewMssqlDatabaseCollationWithDefaults instantiates a new MssqlDatabaseCollation object +// NewDatabaseGetcollationWithDefaults instantiates a new DatabaseGetcollation 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 NewMssqlDatabaseCollationWithDefaults() *MssqlDatabaseCollation { - this := MssqlDatabaseCollation{} +func NewDatabaseGetcollationWithDefaults() *DatabaseGetcollation { + this := DatabaseGetcollation{} return &this } // GetCollationName returns the CollationName 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 *MssqlDatabaseCollation) GetCollationName() (res MssqlDatabaseCollationGetCollationNameRetType) { +func (o *DatabaseGetcollation) GetCollationName() (res DatabaseGetcollationGetCollationNameRetType) { res, _ = o.GetCollationNameOk() return } @@ -108,26 +108,26 @@ func (o *MssqlDatabaseCollation) GetCollationName() (res MssqlDatabaseCollationG // GetCollationNameOk returns a tuple with the CollationName 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 *MssqlDatabaseCollation) GetCollationNameOk() (ret MssqlDatabaseCollationGetCollationNameRetType, ok bool) { - return getMssqlDatabaseCollationGetCollationNameAttributeTypeOk(o.CollationName) +func (o *DatabaseGetcollation) GetCollationNameOk() (ret DatabaseGetcollationGetCollationNameRetType, ok bool) { + return getDatabaseGetcollationGetCollationNameAttributeTypeOk(o.CollationName) } // HasCollationName 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 *MssqlDatabaseCollation) HasCollationName() bool { +func (o *DatabaseGetcollation) HasCollationName() bool { _, ok := o.GetCollationNameOk() return ok } // SetCollationName gets a reference to the given string and assigns it to the CollationName field. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *MssqlDatabaseCollation) SetCollationName(v MssqlDatabaseCollationGetCollationNameRetType) { - setMssqlDatabaseCollationGetCollationNameAttributeType(&o.CollationName, v) +func (o *DatabaseGetcollation) SetCollationName(v DatabaseGetcollationGetCollationNameRetType) { + setDatabaseGetcollationGetCollationNameAttributeType(&o.CollationName, v) } // GetDescription returns the Description field value if set, zero value otherwise. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *MssqlDatabaseCollation) GetDescription() (res MssqlDatabaseCollationGetDescriptionRetType) { +func (o *DatabaseGetcollation) GetDescription() (res DatabaseGetcollationGetDescriptionRetType) { res, _ = o.GetDescriptionOk() return } @@ -135,75 +135,75 @@ func (o *MssqlDatabaseCollation) GetDescription() (res MssqlDatabaseCollationGet // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *MssqlDatabaseCollation) GetDescriptionOk() (ret MssqlDatabaseCollationGetDescriptionRetType, ok bool) { - return getMssqlDatabaseCollationGetDescriptionAttributeTypeOk(o.Description) +func (o *DatabaseGetcollation) GetDescriptionOk() (ret DatabaseGetcollationGetDescriptionRetType, ok bool) { + return getDatabaseGetcollationGetDescriptionAttributeTypeOk(o.Description) } // HasDescription returns a boolean if a field has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *MssqlDatabaseCollation) HasDescription() bool { +func (o *DatabaseGetcollation) HasDescription() bool { _, ok := o.GetDescriptionOk() return ok } // SetDescription gets a reference to the given string and assigns it to the Description field. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *MssqlDatabaseCollation) SetDescription(v MssqlDatabaseCollationGetDescriptionRetType) { - setMssqlDatabaseCollationGetDescriptionAttributeType(&o.Description, v) +func (o *DatabaseGetcollation) SetDescription(v DatabaseGetcollationGetDescriptionRetType) { + setDatabaseGetcollationGetDescriptionAttributeType(&o.Description, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o MssqlDatabaseCollation) ToMap() (map[string]interface{}, error) { +func (o DatabaseGetcollation) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getMssqlDatabaseCollationGetCollationNameAttributeTypeOk(o.CollationName); ok { + if val, ok := getDatabaseGetcollationGetCollationNameAttributeTypeOk(o.CollationName); ok { toSerialize["CollationName"] = val } - if val, ok := getMssqlDatabaseCollationGetDescriptionAttributeTypeOk(o.Description); ok { + if val, ok := getDatabaseGetcollationGetDescriptionAttributeTypeOk(o.Description); ok { toSerialize["Description"] = val } return toSerialize, nil } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableMssqlDatabaseCollation struct { - value *MssqlDatabaseCollation +type NullableDatabaseGetcollation struct { + value *DatabaseGetcollation isSet bool } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableMssqlDatabaseCollation) Get() *MssqlDatabaseCollation { +func (v NullableDatabaseGetcollation) Get() *DatabaseGetcollation { return v.value } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableMssqlDatabaseCollation) Set(val *MssqlDatabaseCollation) { +func (v *NullableDatabaseGetcollation) Set(val *DatabaseGetcollation) { 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 NullableMssqlDatabaseCollation) IsSet() bool { +func (v NullableDatabaseGetcollation) 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 *NullableMssqlDatabaseCollation) Unset() { +func (v *NullableDatabaseGetcollation) 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 NewNullableMssqlDatabaseCollation(val *MssqlDatabaseCollation) *NullableMssqlDatabaseCollation { - return &NullableMssqlDatabaseCollation{value: val, isSet: true} +func NewNullableDatabaseGetcollation(val *DatabaseGetcollation) *NullableDatabaseGetcollation { + return &NullableDatabaseGetcollation{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 NullableMssqlDatabaseCollation) MarshalJSON() ([]byte, error) { +func (v NullableDatabaseGetcollation) 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 *NullableMssqlDatabaseCollation) UnmarshalJSON(src []byte) error { +func (v *NullableDatabaseGetcollation) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/sqlserverflex/model_acl_test.go b/services/sqlserverflex/model_database_getcollation_test.go similarity index 91% rename from services/sqlserverflex/model_acl_test.go rename to services/sqlserverflex/model_database_getcollation_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_acl_test.go +++ b/services/sqlserverflex/model_database_getcollation_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_mssql_database_compatibility.go b/services/sqlserverflex/model_database_getcompatibility.go similarity index 58% rename from services/sqlserverflex/model_mssql_database_compatibility.go rename to services/sqlserverflex/model_database_getcompatibility.go index 3a400ab37..04b80adcd 100644 --- a/services/sqlserverflex/model_mssql_database_compatibility.go +++ b/services/sqlserverflex/model_database_getcompatibility.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,25 +15,25 @@ import ( "encoding/json" ) -// checks if the MssqlDatabaseCompatibility type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &MssqlDatabaseCompatibility{} +// checks if the DatabaseGetcompatibility type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatabaseGetcompatibility{} /* types and functions for compatibility_level */ -// isLong +// isInteger // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MssqlDatabaseCompatibilityGetCompatibilityLevelAttributeType = *int64 +type DatabaseGetcompatibilityGetCompatibilityLevelAttributeType = *int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MssqlDatabaseCompatibilityGetCompatibilityLevelArgType = int64 +type DatabaseGetcompatibilityGetCompatibilityLevelArgType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MssqlDatabaseCompatibilityGetCompatibilityLevelRetType = int64 +type DatabaseGetcompatibilityGetCompatibilityLevelRetType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getMssqlDatabaseCompatibilityGetCompatibilityLevelAttributeTypeOk(arg MssqlDatabaseCompatibilityGetCompatibilityLevelAttributeType) (ret MssqlDatabaseCompatibilityGetCompatibilityLevelRetType, ok bool) { +func getDatabaseGetcompatibilityGetCompatibilityLevelAttributeTypeOk(arg DatabaseGetcompatibilityGetCompatibilityLevelAttributeType) (ret DatabaseGetcompatibilityGetCompatibilityLevelRetType, ok bool) { if arg == nil { return ret, false } @@ -41,7 +41,7 @@ func getMssqlDatabaseCompatibilityGetCompatibilityLevelAttributeTypeOk(arg Mssql } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setMssqlDatabaseCompatibilityGetCompatibilityLevelAttributeType(arg *MssqlDatabaseCompatibilityGetCompatibilityLevelAttributeType, val MssqlDatabaseCompatibilityGetCompatibilityLevelRetType) { +func setDatabaseGetcompatibilityGetCompatibilityLevelAttributeType(arg *DatabaseGetcompatibilityGetCompatibilityLevelAttributeType, val DatabaseGetcompatibilityGetCompatibilityLevelRetType) { *arg = &val } @@ -51,10 +51,10 @@ func setMssqlDatabaseCompatibilityGetCompatibilityLevelAttributeType(arg *MssqlD // isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MssqlDatabaseCompatibilityGetDescriptionAttributeType = *string +type DatabaseGetcompatibilityGetDescriptionAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getMssqlDatabaseCompatibilityGetDescriptionAttributeTypeOk(arg MssqlDatabaseCompatibilityGetDescriptionAttributeType) (ret MssqlDatabaseCompatibilityGetDescriptionRetType, ok bool) { +func getDatabaseGetcompatibilityGetDescriptionAttributeTypeOk(arg DatabaseGetcompatibilityGetDescriptionAttributeType) (ret DatabaseGetcompatibilityGetDescriptionRetType, ok bool) { if arg == nil { return ret, false } @@ -62,45 +62,46 @@ func getMssqlDatabaseCompatibilityGetDescriptionAttributeTypeOk(arg MssqlDatabas } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setMssqlDatabaseCompatibilityGetDescriptionAttributeType(arg *MssqlDatabaseCompatibilityGetDescriptionAttributeType, val MssqlDatabaseCompatibilityGetDescriptionRetType) { +func setDatabaseGetcompatibilityGetDescriptionAttributeType(arg *DatabaseGetcompatibilityGetDescriptionAttributeType, val DatabaseGetcompatibilityGetDescriptionRetType) { *arg = &val } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MssqlDatabaseCompatibilityGetDescriptionArgType = string +type DatabaseGetcompatibilityGetDescriptionArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MssqlDatabaseCompatibilityGetDescriptionRetType = string +type DatabaseGetcompatibilityGetDescriptionRetType = string -// MssqlDatabaseCompatibility struct for MssqlDatabaseCompatibility +// DatabaseGetcompatibility struct for DatabaseGetcompatibility // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type MssqlDatabaseCompatibility struct { - CompatibilityLevel MssqlDatabaseCompatibilityGetCompatibilityLevelAttributeType `json:"compatibility_level,omitempty"` - Description MssqlDatabaseCompatibilityGetDescriptionAttributeType `json:"description,omitempty"` +type DatabaseGetcompatibility struct { + // Can be cast to int32 without loss of precision. + CompatibilityLevel DatabaseGetcompatibilityGetCompatibilityLevelAttributeType `json:"compatibility_level,omitempty"` + Description DatabaseGetcompatibilityGetDescriptionAttributeType `json:"description,omitempty"` } -// NewMssqlDatabaseCompatibility instantiates a new MssqlDatabaseCompatibility object +// NewDatabaseGetcompatibility instantiates a new DatabaseGetcompatibility 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 NewMssqlDatabaseCompatibility() *MssqlDatabaseCompatibility { - this := MssqlDatabaseCompatibility{} +func NewDatabaseGetcompatibility() *DatabaseGetcompatibility { + this := DatabaseGetcompatibility{} return &this } -// NewMssqlDatabaseCompatibilityWithDefaults instantiates a new MssqlDatabaseCompatibility object +// NewDatabaseGetcompatibilityWithDefaults instantiates a new DatabaseGetcompatibility 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 NewMssqlDatabaseCompatibilityWithDefaults() *MssqlDatabaseCompatibility { - this := MssqlDatabaseCompatibility{} +func NewDatabaseGetcompatibilityWithDefaults() *DatabaseGetcompatibility { + this := DatabaseGetcompatibility{} return &this } // GetCompatibilityLevel returns the CompatibilityLevel 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 *MssqlDatabaseCompatibility) GetCompatibilityLevel() (res MssqlDatabaseCompatibilityGetCompatibilityLevelRetType) { +func (o *DatabaseGetcompatibility) GetCompatibilityLevel() (res DatabaseGetcompatibilityGetCompatibilityLevelRetType) { res, _ = o.GetCompatibilityLevelOk() return } @@ -108,26 +109,26 @@ func (o *MssqlDatabaseCompatibility) GetCompatibilityLevel() (res MssqlDatabaseC // GetCompatibilityLevelOk returns a tuple with the CompatibilityLevel 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 *MssqlDatabaseCompatibility) GetCompatibilityLevelOk() (ret MssqlDatabaseCompatibilityGetCompatibilityLevelRetType, ok bool) { - return getMssqlDatabaseCompatibilityGetCompatibilityLevelAttributeTypeOk(o.CompatibilityLevel) +func (o *DatabaseGetcompatibility) GetCompatibilityLevelOk() (ret DatabaseGetcompatibilityGetCompatibilityLevelRetType, ok bool) { + return getDatabaseGetcompatibilityGetCompatibilityLevelAttributeTypeOk(o.CompatibilityLevel) } // HasCompatibilityLevel 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 *MssqlDatabaseCompatibility) HasCompatibilityLevel() bool { +func (o *DatabaseGetcompatibility) HasCompatibilityLevel() bool { _, ok := o.GetCompatibilityLevelOk() return ok } // SetCompatibilityLevel gets a reference to the given int64 and assigns it to the CompatibilityLevel field. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *MssqlDatabaseCompatibility) SetCompatibilityLevel(v MssqlDatabaseCompatibilityGetCompatibilityLevelRetType) { - setMssqlDatabaseCompatibilityGetCompatibilityLevelAttributeType(&o.CompatibilityLevel, v) +func (o *DatabaseGetcompatibility) SetCompatibilityLevel(v DatabaseGetcompatibilityGetCompatibilityLevelRetType) { + setDatabaseGetcompatibilityGetCompatibilityLevelAttributeType(&o.CompatibilityLevel, v) } // GetDescription returns the Description field value if set, zero value otherwise. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *MssqlDatabaseCompatibility) GetDescription() (res MssqlDatabaseCompatibilityGetDescriptionRetType) { +func (o *DatabaseGetcompatibility) GetDescription() (res DatabaseGetcompatibilityGetDescriptionRetType) { res, _ = o.GetDescriptionOk() return } @@ -135,75 +136,75 @@ func (o *MssqlDatabaseCompatibility) GetDescription() (res MssqlDatabaseCompatib // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *MssqlDatabaseCompatibility) GetDescriptionOk() (ret MssqlDatabaseCompatibilityGetDescriptionRetType, ok bool) { - return getMssqlDatabaseCompatibilityGetDescriptionAttributeTypeOk(o.Description) +func (o *DatabaseGetcompatibility) GetDescriptionOk() (ret DatabaseGetcompatibilityGetDescriptionRetType, ok bool) { + return getDatabaseGetcompatibilityGetDescriptionAttributeTypeOk(o.Description) } // HasDescription returns a boolean if a field has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *MssqlDatabaseCompatibility) HasDescription() bool { +func (o *DatabaseGetcompatibility) HasDescription() bool { _, ok := o.GetDescriptionOk() return ok } // SetDescription gets a reference to the given string and assigns it to the Description field. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *MssqlDatabaseCompatibility) SetDescription(v MssqlDatabaseCompatibilityGetDescriptionRetType) { - setMssqlDatabaseCompatibilityGetDescriptionAttributeType(&o.Description, v) +func (o *DatabaseGetcompatibility) SetDescription(v DatabaseGetcompatibilityGetDescriptionRetType) { + setDatabaseGetcompatibilityGetDescriptionAttributeType(&o.Description, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o MssqlDatabaseCompatibility) ToMap() (map[string]interface{}, error) { +func (o DatabaseGetcompatibility) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getMssqlDatabaseCompatibilityGetCompatibilityLevelAttributeTypeOk(o.CompatibilityLevel); ok { + if val, ok := getDatabaseGetcompatibilityGetCompatibilityLevelAttributeTypeOk(o.CompatibilityLevel); ok { toSerialize["CompatibilityLevel"] = val } - if val, ok := getMssqlDatabaseCompatibilityGetDescriptionAttributeTypeOk(o.Description); ok { + if val, ok := getDatabaseGetcompatibilityGetDescriptionAttributeTypeOk(o.Description); ok { toSerialize["Description"] = val } return toSerialize, nil } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableMssqlDatabaseCompatibility struct { - value *MssqlDatabaseCompatibility +type NullableDatabaseGetcompatibility struct { + value *DatabaseGetcompatibility isSet bool } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableMssqlDatabaseCompatibility) Get() *MssqlDatabaseCompatibility { +func (v NullableDatabaseGetcompatibility) Get() *DatabaseGetcompatibility { return v.value } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableMssqlDatabaseCompatibility) Set(val *MssqlDatabaseCompatibility) { +func (v *NullableDatabaseGetcompatibility) Set(val *DatabaseGetcompatibility) { 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 NullableMssqlDatabaseCompatibility) IsSet() bool { +func (v NullableDatabaseGetcompatibility) 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 *NullableMssqlDatabaseCompatibility) Unset() { +func (v *NullableDatabaseGetcompatibility) 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 NewNullableMssqlDatabaseCompatibility(val *MssqlDatabaseCompatibility) *NullableMssqlDatabaseCompatibility { - return &NullableMssqlDatabaseCompatibility{value: val, isSet: true} +func NewNullableDatabaseGetcompatibility(val *DatabaseGetcompatibility) *NullableDatabaseGetcompatibility { + return &NullableDatabaseGetcompatibility{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 NullableMssqlDatabaseCompatibility) MarshalJSON() ([]byte, error) { +func (v NullableDatabaseGetcompatibility) 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 *NullableMssqlDatabaseCompatibility) UnmarshalJSON(src []byte) error { +func (v *NullableDatabaseGetcompatibility) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/sqlserverflex/model_database_getcompatibility_test.go b/services/sqlserverflex/model_database_getcompatibility_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_database_getcompatibility_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_database_options.go b/services/sqlserverflex/model_database_options.go deleted file mode 100644 index ae779defa..000000000 --- a/services/sqlserverflex/model_database_options.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package sqlserverflex - -import ( - "encoding/json" -) - -// checks if the DatabaseOptions type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DatabaseOptions{} - -/* - types and functions for collationName -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseOptionsGetCollationNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDatabaseOptionsGetCollationNameAttributeTypeOk(arg DatabaseOptionsGetCollationNameAttributeType) (ret DatabaseOptionsGetCollationNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDatabaseOptionsGetCollationNameAttributeType(arg *DatabaseOptionsGetCollationNameAttributeType, val DatabaseOptionsGetCollationNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseOptionsGetCollationNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseOptionsGetCollationNameRetType = string - -/* - types and functions for compatibilityLevel -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseOptionsGetCompatibilityLevelAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseOptionsGetCompatibilityLevelArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseOptionsGetCompatibilityLevelRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDatabaseOptionsGetCompatibilityLevelAttributeTypeOk(arg DatabaseOptionsGetCompatibilityLevelAttributeType) (ret DatabaseOptionsGetCompatibilityLevelRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDatabaseOptionsGetCompatibilityLevelAttributeType(arg *DatabaseOptionsGetCompatibilityLevelAttributeType, val DatabaseOptionsGetCompatibilityLevelRetType) { - *arg = &val -} - -/* - types and functions for owner -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseOptionsGetOwnerAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDatabaseOptionsGetOwnerAttributeTypeOk(arg DatabaseOptionsGetOwnerAttributeType) (ret DatabaseOptionsGetOwnerRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDatabaseOptionsGetOwnerAttributeType(arg *DatabaseOptionsGetOwnerAttributeType, val DatabaseOptionsGetOwnerRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseOptionsGetOwnerArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseOptionsGetOwnerRetType = string - -// DatabaseOptions struct for DatabaseOptions -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseOptions struct { - // Name of the collation of the database - CollationName DatabaseOptionsGetCollationNameAttributeType `json:"collationName,omitempty"` - // CompatibilityLevel of the Database. - CompatibilityLevel DatabaseOptionsGetCompatibilityLevelAttributeType `json:"compatibilityLevel,omitempty"` - // Name of the owner of the database. - Owner DatabaseOptionsGetOwnerAttributeType `json:"owner,omitempty"` -} - -// NewDatabaseOptions instantiates a new DatabaseOptions 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 NewDatabaseOptions() *DatabaseOptions { - this := DatabaseOptions{} - return &this -} - -// NewDatabaseOptionsWithDefaults instantiates a new DatabaseOptions 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 NewDatabaseOptionsWithDefaults() *DatabaseOptions { - this := DatabaseOptions{} - return &this -} - -// GetCollationName returns the CollationName 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 *DatabaseOptions) GetCollationName() (res DatabaseOptionsGetCollationNameRetType) { - res, _ = o.GetCollationNameOk() - return -} - -// GetCollationNameOk returns a tuple with the CollationName 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 *DatabaseOptions) GetCollationNameOk() (ret DatabaseOptionsGetCollationNameRetType, ok bool) { - return getDatabaseOptionsGetCollationNameAttributeTypeOk(o.CollationName) -} - -// HasCollationName 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 *DatabaseOptions) HasCollationName() bool { - _, ok := o.GetCollationNameOk() - return ok -} - -// SetCollationName gets a reference to the given string and assigns it to the CollationName field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DatabaseOptions) SetCollationName(v DatabaseOptionsGetCollationNameRetType) { - setDatabaseOptionsGetCollationNameAttributeType(&o.CollationName, v) -} - -// GetCompatibilityLevel returns the CompatibilityLevel 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 *DatabaseOptions) GetCompatibilityLevel() (res DatabaseOptionsGetCompatibilityLevelRetType) { - res, _ = o.GetCompatibilityLevelOk() - return -} - -// GetCompatibilityLevelOk returns a tuple with the CompatibilityLevel 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 *DatabaseOptions) GetCompatibilityLevelOk() (ret DatabaseOptionsGetCompatibilityLevelRetType, ok bool) { - return getDatabaseOptionsGetCompatibilityLevelAttributeTypeOk(o.CompatibilityLevel) -} - -// HasCompatibilityLevel 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 *DatabaseOptions) HasCompatibilityLevel() bool { - _, ok := o.GetCompatibilityLevelOk() - return ok -} - -// SetCompatibilityLevel gets a reference to the given int64 and assigns it to the CompatibilityLevel field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DatabaseOptions) SetCompatibilityLevel(v DatabaseOptionsGetCompatibilityLevelRetType) { - setDatabaseOptionsGetCompatibilityLevelAttributeType(&o.CompatibilityLevel, v) -} - -// GetOwner returns the Owner 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 *DatabaseOptions) GetOwner() (res DatabaseOptionsGetOwnerRetType) { - res, _ = o.GetOwnerOk() - return -} - -// GetOwnerOk returns a tuple with the Owner 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 *DatabaseOptions) GetOwnerOk() (ret DatabaseOptionsGetOwnerRetType, ok bool) { - return getDatabaseOptionsGetOwnerAttributeTypeOk(o.Owner) -} - -// HasOwner 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 *DatabaseOptions) HasOwner() bool { - _, ok := o.GetOwnerOk() - return ok -} - -// SetOwner gets a reference to the given string and assigns it to the Owner field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DatabaseOptions) SetOwner(v DatabaseOptionsGetOwnerRetType) { - setDatabaseOptionsGetOwnerAttributeType(&o.Owner, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o DatabaseOptions) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getDatabaseOptionsGetCollationNameAttributeTypeOk(o.CollationName); ok { - toSerialize["CollationName"] = val - } - if val, ok := getDatabaseOptionsGetCompatibilityLevelAttributeTypeOk(o.CompatibilityLevel); ok { - toSerialize["CompatibilityLevel"] = val - } - if val, ok := getDatabaseOptionsGetOwnerAttributeTypeOk(o.Owner); ok { - toSerialize["Owner"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableDatabaseOptions struct { - value *DatabaseOptions - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDatabaseOptions) Get() *DatabaseOptions { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDatabaseOptions) Set(val *DatabaseOptions) { - 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 NullableDatabaseOptions) 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 *NullableDatabaseOptions) 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 NewNullableDatabaseOptions(val *DatabaseOptions) *NullableDatabaseOptions { - return &NullableDatabaseOptions{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 NullableDatabaseOptions) 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 *NullableDatabaseOptions) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/sqlserverflex/model_database_options_test.go b/services/sqlserverflex/model_database_options_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_database_options_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_host.go b/services/sqlserverflex/model_database_roles.go similarity index 58% rename from services/sqlserverflex/model_host.go rename to services/sqlserverflex/model_database_roles.go index 09378fcae..0c1cad98c 100644 --- a/services/sqlserverflex/model_host.go +++ b/services/sqlserverflex/model_database_roles.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,25 +15,19 @@ import ( "encoding/json" ) -// checks if the Host type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Host{} +// checks if the DatabaseRoles type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatabaseRoles{} /* - types and functions for hostMetrics + types and functions for name */ -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HostGetHostMetricsAttributeType = *[]HostMetric - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HostGetHostMetricsArgType = []HostMetric - +// isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HostGetHostMetricsRetType = []HostMetric +type DatabaseRolesGetNameAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getHostGetHostMetricsAttributeTypeOk(arg HostGetHostMetricsAttributeType) (ret HostGetHostMetricsRetType, ok bool) { +func getDatabaseRolesGetNameAttributeTypeOk(arg DatabaseRolesGetNameAttributeType) (ret DatabaseRolesGetNameRetType, ok bool) { if arg == nil { return ret, false } @@ -41,20 +35,32 @@ func getHostGetHostMetricsAttributeTypeOk(arg HostGetHostMetricsAttributeType) ( } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setHostGetHostMetricsAttributeType(arg *HostGetHostMetricsAttributeType, val HostGetHostMetricsRetType) { +func setDatabaseRolesGetNameAttributeType(arg *DatabaseRolesGetNameAttributeType, val DatabaseRolesGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DatabaseRolesGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DatabaseRolesGetNameRetType = string + /* - types and functions for id + types and functions for roles */ -// isNotNullableString +// isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DatabaseRolesGetRolesAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DatabaseRolesGetRolesArgType = []string + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HostGetIdAttributeType = *string +type DatabaseRolesGetRolesRetType = []string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getHostGetIdAttributeTypeOk(arg HostGetIdAttributeType) (ret HostGetIdRetType, ok bool) { +func getDatabaseRolesGetRolesAttributeTypeOk(arg DatabaseRolesGetRolesAttributeType) (ret DatabaseRolesGetRolesRetType, ok bool) { if arg == nil { return ret, false } @@ -62,148 +68,137 @@ func getHostGetIdAttributeTypeOk(arg HostGetIdAttributeType) (ret HostGetIdRetTy } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setHostGetIdAttributeType(arg *HostGetIdAttributeType, val HostGetIdRetType) { +func setDatabaseRolesGetRolesAttributeType(arg *DatabaseRolesGetRolesAttributeType, val DatabaseRolesGetRolesRetType) { *arg = &val } +// DatabaseRoles The name and the roles for a database for a user. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HostGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HostGetIdRetType = string +type DatabaseRoles struct { + // The name of the database. + // REQUIRED + Name DatabaseRolesGetNameAttributeType `json:"name" required:"true"` + // The name and the roles for a database + // REQUIRED + Roles DatabaseRolesGetRolesAttributeType `json:"roles" required:"true"` +} -// Host struct for Host // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Host struct { - HostMetrics HostGetHostMetricsAttributeType `json:"hostMetrics,omitempty"` - Id HostGetIdAttributeType `json:"id,omitempty"` -} +type _DatabaseRoles DatabaseRoles -// NewHost instantiates a new Host object +// NewDatabaseRoles instantiates a new DatabaseRoles 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 NewHost() *Host { - this := Host{} +func NewDatabaseRoles(name DatabaseRolesGetNameArgType, roles DatabaseRolesGetRolesArgType) *DatabaseRoles { + this := DatabaseRoles{} + setDatabaseRolesGetNameAttributeType(&this.Name, name) + setDatabaseRolesGetRolesAttributeType(&this.Roles, roles) return &this } -// NewHostWithDefaults instantiates a new Host object +// NewDatabaseRolesWithDefaults instantiates a new DatabaseRoles 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 NewHostWithDefaults() *Host { - this := Host{} +func NewDatabaseRolesWithDefaults() *DatabaseRoles { + this := DatabaseRoles{} return &this } -// GetHostMetrics returns the HostMetrics field value if set, zero value otherwise. +// GetName returns the Name field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Host) GetHostMetrics() (res HostGetHostMetricsRetType) { - res, _ = o.GetHostMetricsOk() - return +func (o *DatabaseRoles) GetName() (ret DatabaseRolesGetNameRetType) { + ret, _ = o.GetNameOk() + return ret } -// GetHostMetricsOk returns a tuple with the HostMetrics field value if set, nil otherwise +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Host) GetHostMetricsOk() (ret HostGetHostMetricsRetType, ok bool) { - return getHostGetHostMetricsAttributeTypeOk(o.HostMetrics) +func (o *DatabaseRoles) GetNameOk() (ret DatabaseRolesGetNameRetType, ok bool) { + return getDatabaseRolesGetNameAttributeTypeOk(o.Name) } -// HasHostMetrics returns a boolean if a field has been set. +// SetName sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Host) HasHostMetrics() bool { - _, ok := o.GetHostMetricsOk() - return ok +func (o *DatabaseRoles) SetName(v DatabaseRolesGetNameRetType) { + setDatabaseRolesGetNameAttributeType(&o.Name, v) } -// SetHostMetrics gets a reference to the given []HostMetric and assigns it to the HostMetrics field. +// GetRoles returns the Roles field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Host) SetHostMetrics(v HostGetHostMetricsRetType) { - setHostGetHostMetricsAttributeType(&o.HostMetrics, v) +func (o *DatabaseRoles) GetRoles() (ret DatabaseRolesGetRolesRetType) { + ret, _ = o.GetRolesOk() + return ret } -// GetId returns the Id 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 *Host) GetId() (res HostGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// GetRolesOk returns a tuple with the Roles 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 *Host) GetIdOk() (ret HostGetIdRetType, ok bool) { - return getHostGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *Host) HasId() bool { - _, ok := o.GetIdOk() - return ok +func (o *DatabaseRoles) GetRolesOk() (ret DatabaseRolesGetRolesRetType, ok bool) { + return getDatabaseRolesGetRolesAttributeTypeOk(o.Roles) } -// SetId gets a reference to the given string and assigns it to the Id field. +// SetRoles sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Host) SetId(v HostGetIdRetType) { - setHostGetIdAttributeType(&o.Id, v) +func (o *DatabaseRoles) SetRoles(v DatabaseRolesGetRolesRetType) { + setDatabaseRolesGetRolesAttributeType(&o.Roles, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Host) ToMap() (map[string]interface{}, error) { +func (o DatabaseRoles) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getHostGetHostMetricsAttributeTypeOk(o.HostMetrics); ok { - toSerialize["HostMetrics"] = val + if val, ok := getDatabaseRolesGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } - if val, ok := getHostGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val + if val, ok := getDatabaseRolesGetRolesAttributeTypeOk(o.Roles); ok { + toSerialize["Roles"] = val } return toSerialize, nil } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableHost struct { - value *Host +type NullableDatabaseRoles struct { + value *DatabaseRoles isSet bool } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableHost) Get() *Host { +func (v NullableDatabaseRoles) Get() *DatabaseRoles { return v.value } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableHost) Set(val *Host) { +func (v *NullableDatabaseRoles) Set(val *DatabaseRoles) { 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 NullableHost) IsSet() bool { +func (v NullableDatabaseRoles) 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 *NullableHost) Unset() { +func (v *NullableDatabaseRoles) 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 NewNullableHost(val *Host) *NullableHost { - return &NullableHost{value: val, isSet: true} +func NewNullableDatabaseRoles(val *DatabaseRoles) *NullableDatabaseRoles { + return &NullableDatabaseRoles{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 NullableHost) MarshalJSON() ([]byte, error) { +func (v NullableDatabaseRoles) 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 *NullableHost) UnmarshalJSON(src []byte) error { +func (v *NullableDatabaseRoles) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/sqlserverflex/model_database_roles_test.go b/services/sqlserverflex/model_database_roles_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_database_roles_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_database_sort.go b/services/sqlserverflex/model_database_sort.go new file mode 100644 index 000000000..cae6f319b --- /dev/null +++ b/services/sqlserverflex/model_database_sort.go @@ -0,0 +1,156 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" + "fmt" +) + +// DatabaseSort the model 'DatabaseSort' +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type DatabaseSort string + +// List of database.sort +const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + DATABASESORT_CREATED_AT_DESC DatabaseSort = "created_at.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + DATABASESORT_CREATED_AT_ASC DatabaseSort = "created_at.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + DATABASESORT_DATABASE_ID_DESC DatabaseSort = "database_id.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + DATABASESORT_DATABASE_ID_ASC DatabaseSort = "database_id.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + DATABASESORT_DATABASE_NAME_DESC DatabaseSort = "database_name.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + DATABASESORT_DATABASE_NAME_ASC DatabaseSort = "database_name.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + DATABASESORT_DATABASE_OWNER_DESC DatabaseSort = "database_owner.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + DATABASESORT_DATABASE_OWNER_ASC DatabaseSort = "database_owner.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + DATABASESORT_INDEX_ASC DatabaseSort = "index.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + DATABASESORT_INDEX_DESC DatabaseSort = "index.desc" +) + +// All allowed values of DatabaseSort enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +var AllowedDatabaseSortEnumValues = []DatabaseSort{ + "created_at.desc", + "created_at.asc", + "database_id.desc", + "database_id.asc", + "database_name.desc", + "database_name.asc", + "database_owner.desc", + "database_owner.asc", + "index.asc", + "index.desc", +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *DatabaseSort) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue string + if value == zeroValue { + return nil + } + enumTypeValue := DatabaseSort(value) + for _, existing := range AllowedDatabaseSortEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid DatabaseSort", value) +} + +// NewDatabaseSortFromValue returns a pointer to a valid DatabaseSort +// 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 NewDatabaseSortFromValue(v string) (*DatabaseSort, error) { + ev := DatabaseSort(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for DatabaseSort: valid values are %v", v, AllowedDatabaseSortEnumValues) + } +} + +// 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 DatabaseSort) IsValid() bool { + for _, existing := range AllowedDatabaseSortEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to database.sort value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v DatabaseSort) Ptr() *DatabaseSort { + return &v +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableDatabaseSort struct { + value *DatabaseSort + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableDatabaseSort) Get() *DatabaseSort { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableDatabaseSort) Set(val *DatabaseSort) { + 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 NullableDatabaseSort) 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 *NullableDatabaseSort) 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 NewNullableDatabaseSort(val *DatabaseSort) *NullableDatabaseSort { + return &NullableDatabaseSort{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 NullableDatabaseSort) 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 *NullableDatabaseSort) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_database_sort_test.go b/services/sqlserverflex/model_database_sort_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_database_sort_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_database_test.go b/services/sqlserverflex/model_database_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_database_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_flavor.go b/services/sqlserverflex/model_error.go similarity index 54% rename from services/sqlserverflex/model_flavor.go rename to services/sqlserverflex/model_error.go index b2847f706..48dd5d5e9 100644 --- a/services/sqlserverflex/model_flavor.go +++ b/services/sqlserverflex/model_error.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,25 +15,25 @@ import ( "encoding/json" ) -// checks if the Flavor type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Flavor{} +// checks if the Error type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Error{} /* - types and functions for cpu + types and functions for code */ // isInteger // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetCpuAttributeType = *int64 +type ErrorGetCodeAttributeType = *int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetCpuArgType = int64 +type ErrorGetCodeArgType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetCpuRetType = int64 +type ErrorGetCodeRetType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getFlavorGetCpuAttributeTypeOk(arg FlavorGetCpuAttributeType) (ret FlavorGetCpuRetType, ok bool) { +func getErrorGetCodeAttributeTypeOk(arg ErrorGetCodeAttributeType) (ret ErrorGetCodeRetType, ok bool) { if arg == nil { return ret, false } @@ -41,20 +41,20 @@ func getFlavorGetCpuAttributeTypeOk(arg FlavorGetCpuAttributeType) (ret FlavorGe } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setFlavorGetCpuAttributeType(arg *FlavorGetCpuAttributeType, val FlavorGetCpuRetType) { +func setErrorGetCodeAttributeType(arg *ErrorGetCodeAttributeType, val ErrorGetCodeRetType) { *arg = &val } /* - types and functions for description + types and functions for message */ // isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetDescriptionAttributeType = *string +type ErrorGetMessageAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getFlavorGetDescriptionAttributeTypeOk(arg FlavorGetDescriptionAttributeType) (ret FlavorGetDescriptionRetType, ok bool) { +func getErrorGetMessageAttributeTypeOk(arg ErrorGetMessageAttributeType) (ret ErrorGetMessageRetType, ok bool) { if arg == nil { return ret, false } @@ -62,26 +62,26 @@ func getFlavorGetDescriptionAttributeTypeOk(arg FlavorGetDescriptionAttributeTyp } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setFlavorGetDescriptionAttributeType(arg *FlavorGetDescriptionAttributeType, val FlavorGetDescriptionRetType) { +func setErrorGetMessageAttributeType(arg *ErrorGetMessageAttributeType, val ErrorGetMessageRetType) { *arg = &val } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetDescriptionArgType = string +type ErrorGetMessageArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetDescriptionRetType = string +type ErrorGetMessageRetType = string /* - types and functions for id + types and functions for traceId */ // isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetIdAttributeType = *string +type ErrorGetTraceIdAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getFlavorGetIdAttributeTypeOk(arg FlavorGetIdAttributeType) (ret FlavorGetIdRetType, ok bool) { +func getErrorGetTraceIdAttributeTypeOk(arg ErrorGetTraceIdAttributeType) (ret ErrorGetTraceIdRetType, ok bool) { if arg == nil { return ret, false } @@ -89,32 +89,26 @@ func getFlavorGetIdAttributeTypeOk(arg FlavorGetIdAttributeType) (ret FlavorGetI } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setFlavorGetIdAttributeType(arg *FlavorGetIdAttributeType, val FlavorGetIdRetType) { +func setErrorGetTraceIdAttributeType(arg *ErrorGetTraceIdAttributeType, val ErrorGetTraceIdRetType) { *arg = &val } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetIdArgType = string +type ErrorGetTraceIdArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetIdRetType = string +type ErrorGetTraceIdRetType = string /* - types and functions for memory + types and functions for type */ -// isInteger -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetMemoryAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetMemoryArgType = int64 - +// isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type FlavorGetMemoryRetType = int64 +type ErrorGetTypeAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getFlavorGetMemoryAttributeTypeOk(arg FlavorGetMemoryAttributeType) (ret FlavorGetMemoryRetType, ok bool) { +func getErrorGetTypeAttributeTypeOk(arg ErrorGetTypeAttributeType) (ret ErrorGetTypeRetType, ok bool) { if arg == nil { return ret, false } @@ -122,206 +116,198 @@ func getFlavorGetMemoryAttributeTypeOk(arg FlavorGetMemoryAttributeType) (ret Fl } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setFlavorGetMemoryAttributeType(arg *FlavorGetMemoryAttributeType, val FlavorGetMemoryRetType) { +func setErrorGetTypeAttributeType(arg *ErrorGetTypeAttributeType, val ErrorGetTypeRetType) { *arg = &val } -// Flavor struct for Flavor // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Flavor struct { - // Can be cast to int32 without loss of precision. - Cpu FlavorGetCpuAttributeType `json:"cpu,omitempty"` - Description FlavorGetDescriptionAttributeType `json:"description,omitempty"` - Id FlavorGetIdAttributeType `json:"id,omitempty"` +type ErrorGetTypeArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ErrorGetTypeRetType = string + +// Error struct for Error +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type Error struct { + // The http error code of the error. // Can be cast to int32 without loss of precision. - Memory FlavorGetMemoryAttributeType `json:"memory,omitempty"` + // REQUIRED + Code ErrorGetCodeAttributeType `json:"code" required:"true"` + // More detailed information about the error. + // REQUIRED + Message ErrorGetMessageAttributeType `json:"message" required:"true"` + // The trace id of the request. + // REQUIRED + TraceId ErrorGetTraceIdAttributeType `json:"traceId" required:"true"` + // Describes in which state the api was when the error happened. + // REQUIRED + Type ErrorGetTypeAttributeType `json:"type" required:"true"` } -// NewFlavor instantiates a new Flavor object +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _Error Error + +// NewError instantiates a new Error 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 NewFlavor() *Flavor { - this := Flavor{} +func NewError(code ErrorGetCodeArgType, message ErrorGetMessageArgType, traceId ErrorGetTraceIdArgType, types ErrorGetTypeArgType) *Error { + this := Error{} + setErrorGetCodeAttributeType(&this.Code, code) + setErrorGetMessageAttributeType(&this.Message, message) + setErrorGetTraceIdAttributeType(&this.TraceId, traceId) + setErrorGetTypeAttributeType(&this.Type, types) return &this } -// NewFlavorWithDefaults instantiates a new Flavor object +// NewErrorWithDefaults instantiates a new Error 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 NewFlavorWithDefaults() *Flavor { - this := Flavor{} +func NewErrorWithDefaults() *Error { + this := Error{} return &this } -// GetCpu returns the Cpu field value if set, zero value otherwise. +// GetCode returns the Code field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Flavor) GetCpu() (res FlavorGetCpuRetType) { - res, _ = o.GetCpuOk() - return +func (o *Error) GetCode() (ret ErrorGetCodeRetType) { + ret, _ = o.GetCodeOk() + return ret } -// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// GetCodeOk returns a tuple with the Code 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 *Flavor) GetCpuOk() (ret FlavorGetCpuRetType, ok bool) { - return getFlavorGetCpuAttributeTypeOk(o.Cpu) +func (o *Error) GetCodeOk() (ret ErrorGetCodeRetType, ok bool) { + return getErrorGetCodeAttributeTypeOk(o.Code) } -// HasCpu returns a boolean if a field has been set. +// SetCode sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Flavor) HasCpu() bool { - _, ok := o.GetCpuOk() - return ok +func (o *Error) SetCode(v ErrorGetCodeRetType) { + setErrorGetCodeAttributeType(&o.Code, v) } -// SetCpu gets a reference to the given int64 and assigns it to the Cpu field. +// GetMessage returns the Message field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Flavor) SetCpu(v FlavorGetCpuRetType) { - setFlavorGetCpuAttributeType(&o.Cpu, v) +func (o *Error) GetMessage() (ret ErrorGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret } -// GetDescription returns the Description field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Flavor) GetDescription() (res FlavorGetDescriptionRetType) { - res, _ = o.GetDescriptionOk() - return -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// GetMessageOk returns a tuple with the Message field value // and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Flavor) GetDescriptionOk() (ret FlavorGetDescriptionRetType, ok bool) { - return getFlavorGetDescriptionAttributeTypeOk(o.Description) -} - -// HasDescription returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Flavor) HasDescription() bool { - _, ok := o.GetDescriptionOk() - return ok +func (o *Error) GetMessageOk() (ret ErrorGetMessageRetType, ok bool) { + return getErrorGetMessageAttributeTypeOk(o.Message) } -// SetDescription gets a reference to the given string and assigns it to the Description field. +// SetMessage sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Flavor) SetDescription(v FlavorGetDescriptionRetType) { - setFlavorGetDescriptionAttributeType(&o.Description, v) +func (o *Error) SetMessage(v ErrorGetMessageRetType) { + setErrorGetMessageAttributeType(&o.Message, v) } -// GetId returns the Id field value if set, zero value otherwise. +// GetTraceId returns the TraceId field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Flavor) GetId() (res FlavorGetIdRetType) { - res, _ = o.GetIdOk() - return +func (o *Error) GetTraceId() (ret ErrorGetTraceIdRetType) { + ret, _ = o.GetTraceIdOk() + return ret } -// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// GetTraceIdOk returns a tuple with the TraceId 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 *Flavor) GetIdOk() (ret FlavorGetIdRetType, ok bool) { - return getFlavorGetIdAttributeTypeOk(o.Id) +func (o *Error) GetTraceIdOk() (ret ErrorGetTraceIdRetType, ok bool) { + return getErrorGetTraceIdAttributeTypeOk(o.TraceId) } -// HasId returns a boolean if a field has been set. +// SetTraceId sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Flavor) HasId() bool { - _, ok := o.GetIdOk() - return ok +func (o *Error) SetTraceId(v ErrorGetTraceIdRetType) { + setErrorGetTraceIdAttributeType(&o.TraceId, v) } -// SetId gets a reference to the given string and assigns it to the Id field. +// GetType returns the Type field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Flavor) SetId(v FlavorGetIdRetType) { - setFlavorGetIdAttributeType(&o.Id, v) +func (o *Error) GetType() (ret ErrorGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret } -// GetMemory returns the Memory 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 *Flavor) GetMemory() (res FlavorGetMemoryRetType) { - res, _ = o.GetMemoryOk() - return -} - -// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Flavor) GetMemoryOk() (ret FlavorGetMemoryRetType, ok bool) { - return getFlavorGetMemoryAttributeTypeOk(o.Memory) -} - -// HasMemory 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 *Flavor) HasMemory() bool { - _, ok := o.GetMemoryOk() - return ok +func (o *Error) GetTypeOk() (ret ErrorGetTypeRetType, ok bool) { + return getErrorGetTypeAttributeTypeOk(o.Type) } -// SetMemory gets a reference to the given int64 and assigns it to the Memory field. +// SetType sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Flavor) SetMemory(v FlavorGetMemoryRetType) { - setFlavorGetMemoryAttributeType(&o.Memory, v) +func (o *Error) SetType(v ErrorGetTypeRetType) { + setErrorGetTypeAttributeType(&o.Type, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Flavor) ToMap() (map[string]interface{}, error) { +func (o Error) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getFlavorGetCpuAttributeTypeOk(o.Cpu); ok { - toSerialize["Cpu"] = val + if val, ok := getErrorGetCodeAttributeTypeOk(o.Code); ok { + toSerialize["Code"] = val } - if val, ok := getFlavorGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val + if val, ok := getErrorGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val } - if val, ok := getFlavorGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val + if val, ok := getErrorGetTraceIdAttributeTypeOk(o.TraceId); ok { + toSerialize["TraceId"] = val } - if val, ok := getFlavorGetMemoryAttributeTypeOk(o.Memory); ok { - toSerialize["Memory"] = val + if val, ok := getErrorGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val } return toSerialize, nil } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableFlavor struct { - value *Flavor +type NullableError struct { + value *Error isSet bool } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableFlavor) Get() *Flavor { +func (v NullableError) Get() *Error { return v.value } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableFlavor) Set(val *Flavor) { +func (v *NullableError) Set(val *Error) { 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 NullableFlavor) IsSet() bool { +func (v NullableError) 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 *NullableFlavor) Unset() { +func (v *NullableError) 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 NewNullableFlavor(val *Flavor) *NullableFlavor { - return &NullableFlavor{value: val, isSet: true} +func NewNullableError(val *Error) *NullableError { + return &NullableError{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 NullableFlavor) MarshalJSON() ([]byte, error) { +func (v NullableError) 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 *NullableFlavor) UnmarshalJSON(src []byte) error { +func (v *NullableError) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/sqlserverflex/model_error_test.go b/services/sqlserverflex/model_error_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_error_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_external_s3.go b/services/sqlserverflex/model_external_s3.go new file mode 100644 index 000000000..7338dbb19 --- /dev/null +++ b/services/sqlserverflex/model_external_s3.go @@ -0,0 +1,312 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" +) + +// checks if the ExternalS3 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExternalS3{} + +/* + types and functions for s3_access_key +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ExternalS3GetS3AccessKeyAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getExternalS3GetS3AccessKeyAttributeTypeOk(arg ExternalS3GetS3AccessKeyAttributeType) (ret ExternalS3GetS3AccessKeyRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setExternalS3GetS3AccessKeyAttributeType(arg *ExternalS3GetS3AccessKeyAttributeType, val ExternalS3GetS3AccessKeyRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ExternalS3GetS3AccessKeyArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ExternalS3GetS3AccessKeyRetType = string + +/* + types and functions for s3_access_secret +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ExternalS3GetS3AccessSecretAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getExternalS3GetS3AccessSecretAttributeTypeOk(arg ExternalS3GetS3AccessSecretAttributeType) (ret ExternalS3GetS3AccessSecretRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setExternalS3GetS3AccessSecretAttributeType(arg *ExternalS3GetS3AccessSecretAttributeType, val ExternalS3GetS3AccessSecretRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ExternalS3GetS3AccessSecretArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ExternalS3GetS3AccessSecretRetType = string + +/* + types and functions for s3_bucket +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ExternalS3GetS3BucketAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getExternalS3GetS3BucketAttributeTypeOk(arg ExternalS3GetS3BucketAttributeType) (ret ExternalS3GetS3BucketRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setExternalS3GetS3BucketAttributeType(arg *ExternalS3GetS3BucketAttributeType, val ExternalS3GetS3BucketRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ExternalS3GetS3BucketArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ExternalS3GetS3BucketRetType = string + +/* + types and functions for s3_files +*/ + +// isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ExternalS3GetS3FilesAttributeType = *[]S3fileInfo + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ExternalS3GetS3FilesArgType = []S3fileInfo + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ExternalS3GetS3FilesRetType = []S3fileInfo + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getExternalS3GetS3FilesAttributeTypeOk(arg ExternalS3GetS3FilesAttributeType) (ret ExternalS3GetS3FilesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setExternalS3GetS3FilesAttributeType(arg *ExternalS3GetS3FilesAttributeType, val ExternalS3GetS3FilesRetType) { + *arg = &val +} + +// ExternalS3 The external S3 information +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ExternalS3 struct { + // The s3 access key id + // REQUIRED + S3AccessKey ExternalS3GetS3AccessKeyAttributeType `json:"s3_access_key" required:"true"` + // The s3 access secret + // REQUIRED + S3AccessSecret ExternalS3GetS3AccessSecretAttributeType `json:"s3_access_secret" required:"true"` + // The s3 bucket address + // REQUIRED + S3Bucket ExternalS3GetS3BucketAttributeType `json:"s3_bucket" required:"true"` + // The backup files from which the database should be restored + // REQUIRED + S3Files ExternalS3GetS3FilesAttributeType `json:"s3_files" required:"true"` +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ExternalS3 ExternalS3 + +// NewExternalS3 instantiates a new ExternalS3 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 NewExternalS3(s3AccessKey ExternalS3GetS3AccessKeyArgType, s3AccessSecret ExternalS3GetS3AccessSecretArgType, s3Bucket ExternalS3GetS3BucketArgType, s3Files ExternalS3GetS3FilesArgType) *ExternalS3 { + this := ExternalS3{} + setExternalS3GetS3AccessKeyAttributeType(&this.S3AccessKey, s3AccessKey) + setExternalS3GetS3AccessSecretAttributeType(&this.S3AccessSecret, s3AccessSecret) + setExternalS3GetS3BucketAttributeType(&this.S3Bucket, s3Bucket) + setExternalS3GetS3FilesAttributeType(&this.S3Files, s3Files) + return &this +} + +// NewExternalS3WithDefaults instantiates a new ExternalS3 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 NewExternalS3WithDefaults() *ExternalS3 { + this := ExternalS3{} + return &this +} + +// GetS3AccessKey returns the S3AccessKey field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ExternalS3) GetS3AccessKey() (ret ExternalS3GetS3AccessKeyRetType) { + ret, _ = o.GetS3AccessKeyOk() + return ret +} + +// GetS3AccessKeyOk returns a tuple with the S3AccessKey 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 *ExternalS3) GetS3AccessKeyOk() (ret ExternalS3GetS3AccessKeyRetType, ok bool) { + return getExternalS3GetS3AccessKeyAttributeTypeOk(o.S3AccessKey) +} + +// SetS3AccessKey sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ExternalS3) SetS3AccessKey(v ExternalS3GetS3AccessKeyRetType) { + setExternalS3GetS3AccessKeyAttributeType(&o.S3AccessKey, v) +} + +// GetS3AccessSecret returns the S3AccessSecret field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ExternalS3) GetS3AccessSecret() (ret ExternalS3GetS3AccessSecretRetType) { + ret, _ = o.GetS3AccessSecretOk() + return ret +} + +// GetS3AccessSecretOk returns a tuple with the S3AccessSecret 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 *ExternalS3) GetS3AccessSecretOk() (ret ExternalS3GetS3AccessSecretRetType, ok bool) { + return getExternalS3GetS3AccessSecretAttributeTypeOk(o.S3AccessSecret) +} + +// SetS3AccessSecret sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ExternalS3) SetS3AccessSecret(v ExternalS3GetS3AccessSecretRetType) { + setExternalS3GetS3AccessSecretAttributeType(&o.S3AccessSecret, v) +} + +// GetS3Bucket returns the S3Bucket field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ExternalS3) GetS3Bucket() (ret ExternalS3GetS3BucketRetType) { + ret, _ = o.GetS3BucketOk() + return ret +} + +// GetS3BucketOk returns a tuple with the S3Bucket 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 *ExternalS3) GetS3BucketOk() (ret ExternalS3GetS3BucketRetType, ok bool) { + return getExternalS3GetS3BucketAttributeTypeOk(o.S3Bucket) +} + +// SetS3Bucket sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ExternalS3) SetS3Bucket(v ExternalS3GetS3BucketRetType) { + setExternalS3GetS3BucketAttributeType(&o.S3Bucket, v) +} + +// GetS3Files returns the S3Files field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ExternalS3) GetS3Files() (ret ExternalS3GetS3FilesRetType) { + ret, _ = o.GetS3FilesOk() + return ret +} + +// GetS3FilesOk returns a tuple with the S3Files 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 *ExternalS3) GetS3FilesOk() (ret ExternalS3GetS3FilesRetType, ok bool) { + return getExternalS3GetS3FilesAttributeTypeOk(o.S3Files) +} + +// SetS3Files sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ExternalS3) SetS3Files(v ExternalS3GetS3FilesRetType) { + setExternalS3GetS3FilesAttributeType(&o.S3Files, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o ExternalS3) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getExternalS3GetS3AccessKeyAttributeTypeOk(o.S3AccessKey); ok { + toSerialize["S3AccessKey"] = val + } + if val, ok := getExternalS3GetS3AccessSecretAttributeTypeOk(o.S3AccessSecret); ok { + toSerialize["S3AccessSecret"] = val + } + if val, ok := getExternalS3GetS3BucketAttributeTypeOk(o.S3Bucket); ok { + toSerialize["S3Bucket"] = val + } + if val, ok := getExternalS3GetS3FilesAttributeTypeOk(o.S3Files); ok { + toSerialize["S3Files"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableExternalS3 struct { + value *ExternalS3 + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableExternalS3) Get() *ExternalS3 { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableExternalS3) Set(val *ExternalS3) { + 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 NullableExternalS3) 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 *NullableExternalS3) 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 NewNullableExternalS3(val *ExternalS3) *NullableExternalS3 { + return &NullableExternalS3{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 NullableExternalS3) 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 *NullableExternalS3) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_external_s3_test.go b/services/sqlserverflex/model_external_s3_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_external_s3_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_flavor_sort.go b/services/sqlserverflex/model_flavor_sort.go new file mode 100644 index 000000000..cf20512d9 --- /dev/null +++ b/services/sqlserverflex/model_flavor_sort.go @@ -0,0 +1,180 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" + "fmt" +) + +// FlavorSort the model 'FlavorSort' +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type FlavorSort string + +// List of flavor.sort +const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + FLAVORSORT_INDEX_DESC FlavorSort = "index.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + FLAVORSORT_INDEX_ASC FlavorSort = "index.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + FLAVORSORT_CPU_DESC FlavorSort = "cpu.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + FLAVORSORT_CPU_ASC FlavorSort = "cpu.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + FLAVORSORT_FLAVOR_DESCRIPTION_ASC FlavorSort = "flavor_description.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + FLAVORSORT_FLAVOR_DESCRIPTION_DESC FlavorSort = "flavor_description.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + FLAVORSORT_ID_DESC FlavorSort = "id.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + FLAVORSORT_ID_ASC FlavorSort = "id.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + FLAVORSORT_SIZE_MAX_DESC FlavorSort = "size_max.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + FLAVORSORT_SIZE_MAX_ASC FlavorSort = "size_max.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + FLAVORSORT_RAM_DESC FlavorSort = "ram.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + FLAVORSORT_RAM_ASC FlavorSort = "ram.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + FLAVORSORT_SIZE_MIN_DESC FlavorSort = "size_min.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + FLAVORSORT_SIZE_MIN_ASC FlavorSort = "size_min.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + FLAVORSORT_STORAGE_CLASS_ASC FlavorSort = "storage_class.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + FLAVORSORT_STORAGE_CLASS_DESC FlavorSort = "storage_class.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + FLAVORSORT_NODE_TYPE_ASC FlavorSort = "node_type.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + FLAVORSORT_NODE_TYPE_DESC FlavorSort = "node_type.desc" +) + +// All allowed values of FlavorSort enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +var AllowedFlavorSortEnumValues = []FlavorSort{ + "index.desc", + "index.asc", + "cpu.desc", + "cpu.asc", + "flavor_description.asc", + "flavor_description.desc", + "id.desc", + "id.asc", + "size_max.desc", + "size_max.asc", + "ram.desc", + "ram.asc", + "size_min.desc", + "size_min.asc", + "storage_class.asc", + "storage_class.desc", + "node_type.asc", + "node_type.desc", +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *FlavorSort) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue string + if value == zeroValue { + return nil + } + enumTypeValue := FlavorSort(value) + for _, existing := range AllowedFlavorSortEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid FlavorSort", value) +} + +// NewFlavorSortFromValue returns a pointer to a valid FlavorSort +// 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 NewFlavorSortFromValue(v string) (*FlavorSort, error) { + ev := FlavorSort(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for FlavorSort: valid values are %v", v, AllowedFlavorSortEnumValues) + } +} + +// 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 FlavorSort) IsValid() bool { + for _, existing := range AllowedFlavorSortEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to flavor.sort value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v FlavorSort) Ptr() *FlavorSort { + return &v +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableFlavorSort struct { + value *FlavorSort + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableFlavorSort) Get() *FlavorSort { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableFlavorSort) Set(val *FlavorSort) { + 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 NullableFlavorSort) 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 *NullableFlavorSort) 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 NewNullableFlavorSort(val *FlavorSort) *NullableFlavorSort { + return &NullableFlavorSort{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 NullableFlavorSort) 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 *NullableFlavorSort) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_flavor_sort_test.go b/services/sqlserverflex/model_flavor_sort_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_flavor_sort_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_flavor_storage_classes_storage_class.go b/services/sqlserverflex/model_flavor_storage_classes_storage_class.go new file mode 100644 index 000000000..9e6200873 --- /dev/null +++ b/services/sqlserverflex/model_flavor_storage_classes_storage_class.go @@ -0,0 +1,257 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" +) + +// checks if the FlavorStorageClassesStorageClass type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FlavorStorageClassesStorageClass{} + +/* + types and functions for class +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type FlavorStorageClassesStorageClassGetClassAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getFlavorStorageClassesStorageClassGetClassAttributeTypeOk(arg FlavorStorageClassesStorageClassGetClassAttributeType) (ret FlavorStorageClassesStorageClassGetClassRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setFlavorStorageClassesStorageClassGetClassAttributeType(arg *FlavorStorageClassesStorageClassGetClassAttributeType, val FlavorStorageClassesStorageClassGetClassRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type FlavorStorageClassesStorageClassGetClassArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type FlavorStorageClassesStorageClassGetClassRetType = string + +/* + types and functions for maxIoPerSec +*/ + +// isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type FlavorStorageClassesStorageClassGetMaxIoPerSecAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type FlavorStorageClassesStorageClassGetMaxIoPerSecArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type FlavorStorageClassesStorageClassGetMaxIoPerSecRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getFlavorStorageClassesStorageClassGetMaxIoPerSecAttributeTypeOk(arg FlavorStorageClassesStorageClassGetMaxIoPerSecAttributeType) (ret FlavorStorageClassesStorageClassGetMaxIoPerSecRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setFlavorStorageClassesStorageClassGetMaxIoPerSecAttributeType(arg *FlavorStorageClassesStorageClassGetMaxIoPerSecAttributeType, val FlavorStorageClassesStorageClassGetMaxIoPerSecRetType) { + *arg = &val +} + +/* + types and functions for maxThroughInMb +*/ + +// isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type FlavorStorageClassesStorageClassGetMaxThroughInMbAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type FlavorStorageClassesStorageClassGetMaxThroughInMbArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type FlavorStorageClassesStorageClassGetMaxThroughInMbRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getFlavorStorageClassesStorageClassGetMaxThroughInMbAttributeTypeOk(arg FlavorStorageClassesStorageClassGetMaxThroughInMbAttributeType) (ret FlavorStorageClassesStorageClassGetMaxThroughInMbRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setFlavorStorageClassesStorageClassGetMaxThroughInMbAttributeType(arg *FlavorStorageClassesStorageClassGetMaxThroughInMbAttributeType, val FlavorStorageClassesStorageClassGetMaxThroughInMbRetType) { + *arg = &val +} + +// FlavorStorageClassesStorageClass a storageClass defines how efficient the storage can work +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type FlavorStorageClassesStorageClass struct { + // REQUIRED + Class FlavorStorageClassesStorageClassGetClassAttributeType `json:"class" required:"true"` + // Can be cast to int32 without loss of precision. + // REQUIRED + MaxIoPerSec FlavorStorageClassesStorageClassGetMaxIoPerSecAttributeType `json:"maxIoPerSec" required:"true"` + // Can be cast to int32 without loss of precision. + // REQUIRED + MaxThroughInMb FlavorStorageClassesStorageClassGetMaxThroughInMbAttributeType `json:"maxThroughInMb" required:"true"` +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _FlavorStorageClassesStorageClass FlavorStorageClassesStorageClass + +// NewFlavorStorageClassesStorageClass instantiates a new FlavorStorageClassesStorageClass 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 NewFlavorStorageClassesStorageClass(class FlavorStorageClassesStorageClassGetClassArgType, maxIoPerSec FlavorStorageClassesStorageClassGetMaxIoPerSecArgType, maxThroughInMb FlavorStorageClassesStorageClassGetMaxThroughInMbArgType) *FlavorStorageClassesStorageClass { + this := FlavorStorageClassesStorageClass{} + setFlavorStorageClassesStorageClassGetClassAttributeType(&this.Class, class) + setFlavorStorageClassesStorageClassGetMaxIoPerSecAttributeType(&this.MaxIoPerSec, maxIoPerSec) + setFlavorStorageClassesStorageClassGetMaxThroughInMbAttributeType(&this.MaxThroughInMb, maxThroughInMb) + return &this +} + +// NewFlavorStorageClassesStorageClassWithDefaults instantiates a new FlavorStorageClassesStorageClass 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 NewFlavorStorageClassesStorageClassWithDefaults() *FlavorStorageClassesStorageClass { + this := FlavorStorageClassesStorageClass{} + return &this +} + +// GetClass returns the Class field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *FlavorStorageClassesStorageClass) GetClass() (ret FlavorStorageClassesStorageClassGetClassRetType) { + ret, _ = o.GetClassOk() + return ret +} + +// GetClassOk returns a tuple with the Class 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 *FlavorStorageClassesStorageClass) GetClassOk() (ret FlavorStorageClassesStorageClassGetClassRetType, ok bool) { + return getFlavorStorageClassesStorageClassGetClassAttributeTypeOk(o.Class) +} + +// SetClass sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *FlavorStorageClassesStorageClass) SetClass(v FlavorStorageClassesStorageClassGetClassRetType) { + setFlavorStorageClassesStorageClassGetClassAttributeType(&o.Class, v) +} + +// GetMaxIoPerSec returns the MaxIoPerSec field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *FlavorStorageClassesStorageClass) GetMaxIoPerSec() (ret FlavorStorageClassesStorageClassGetMaxIoPerSecRetType) { + ret, _ = o.GetMaxIoPerSecOk() + return ret +} + +// GetMaxIoPerSecOk returns a tuple with the MaxIoPerSec 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 *FlavorStorageClassesStorageClass) GetMaxIoPerSecOk() (ret FlavorStorageClassesStorageClassGetMaxIoPerSecRetType, ok bool) { + return getFlavorStorageClassesStorageClassGetMaxIoPerSecAttributeTypeOk(o.MaxIoPerSec) +} + +// SetMaxIoPerSec sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *FlavorStorageClassesStorageClass) SetMaxIoPerSec(v FlavorStorageClassesStorageClassGetMaxIoPerSecRetType) { + setFlavorStorageClassesStorageClassGetMaxIoPerSecAttributeType(&o.MaxIoPerSec, v) +} + +// GetMaxThroughInMb returns the MaxThroughInMb field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *FlavorStorageClassesStorageClass) GetMaxThroughInMb() (ret FlavorStorageClassesStorageClassGetMaxThroughInMbRetType) { + ret, _ = o.GetMaxThroughInMbOk() + return ret +} + +// GetMaxThroughInMbOk returns a tuple with the MaxThroughInMb 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 *FlavorStorageClassesStorageClass) GetMaxThroughInMbOk() (ret FlavorStorageClassesStorageClassGetMaxThroughInMbRetType, ok bool) { + return getFlavorStorageClassesStorageClassGetMaxThroughInMbAttributeTypeOk(o.MaxThroughInMb) +} + +// SetMaxThroughInMb sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *FlavorStorageClassesStorageClass) SetMaxThroughInMb(v FlavorStorageClassesStorageClassGetMaxThroughInMbRetType) { + setFlavorStorageClassesStorageClassGetMaxThroughInMbAttributeType(&o.MaxThroughInMb, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o FlavorStorageClassesStorageClass) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getFlavorStorageClassesStorageClassGetClassAttributeTypeOk(o.Class); ok { + toSerialize["Class"] = val + } + if val, ok := getFlavorStorageClassesStorageClassGetMaxIoPerSecAttributeTypeOk(o.MaxIoPerSec); ok { + toSerialize["MaxIoPerSec"] = val + } + if val, ok := getFlavorStorageClassesStorageClassGetMaxThroughInMbAttributeTypeOk(o.MaxThroughInMb); ok { + toSerialize["MaxThroughInMb"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableFlavorStorageClassesStorageClass struct { + value *FlavorStorageClassesStorageClass + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableFlavorStorageClassesStorageClass) Get() *FlavorStorageClassesStorageClass { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableFlavorStorageClassesStorageClass) Set(val *FlavorStorageClassesStorageClass) { + 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 NullableFlavorStorageClassesStorageClass) 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 *NullableFlavorStorageClassesStorageClass) 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 NewNullableFlavorStorageClassesStorageClass(val *FlavorStorageClassesStorageClass) *NullableFlavorStorageClassesStorageClass { + return &NullableFlavorStorageClassesStorageClass{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 NullableFlavorStorageClassesStorageClass) 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 *NullableFlavorStorageClassesStorageClass) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_flavor_storage_classes_storage_class_test.go b/services/sqlserverflex/model_flavor_storage_classes_storage_class_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_flavor_storage_classes_storage_class_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_data_point.go b/services/sqlserverflex/model_flavor_storage_range.go similarity index 55% rename from services/sqlserverflex/model_data_point.go rename to services/sqlserverflex/model_flavor_storage_range.go index 415ee80e1..c920776e9 100644 --- a/services/sqlserverflex/model_data_point.go +++ b/services/sqlserverflex/model_flavor_storage_range.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,19 +15,25 @@ import ( "encoding/json" ) -// checks if the DataPoint type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DataPoint{} +// checks if the FlavorStorageRange type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FlavorStorageRange{} /* - types and functions for timestamp + types and functions for max */ -// isNotNullableString +// isInteger // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DataPointGetTimestampAttributeType = *string +type FlavorStorageRangeGetMaxAttributeType = *int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDataPointGetTimestampAttributeTypeOk(arg DataPointGetTimestampAttributeType) (ret DataPointGetTimestampRetType, ok bool) { +type FlavorStorageRangeGetMaxArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type FlavorStorageRangeGetMaxRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getFlavorStorageRangeGetMaxAttributeTypeOk(arg FlavorStorageRangeGetMaxAttributeType) (ret FlavorStorageRangeGetMaxRetType, ok bool) { if arg == nil { return ret, false } @@ -35,32 +41,26 @@ func getDataPointGetTimestampAttributeTypeOk(arg DataPointGetTimestampAttributeT } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDataPointGetTimestampAttributeType(arg *DataPointGetTimestampAttributeType, val DataPointGetTimestampRetType) { +func setFlavorStorageRangeGetMaxAttributeType(arg *FlavorStorageRangeGetMaxAttributeType, val FlavorStorageRangeGetMaxRetType) { *arg = &val } -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DataPointGetTimestampArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DataPointGetTimestampRetType = string - /* - types and functions for value + types and functions for min */ -// isNumber +// isInteger // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DataPointGetValueAttributeType = *float64 +type FlavorStorageRangeGetMinAttributeType = *int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DataPointGetValueArgType = float64 +type FlavorStorageRangeGetMinArgType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DataPointGetValueRetType = float64 +type FlavorStorageRangeGetMinRetType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDataPointGetValueAttributeTypeOk(arg DataPointGetValueAttributeType) (ret DataPointGetValueRetType, ok bool) { +func getFlavorStorageRangeGetMinAttributeTypeOk(arg FlavorStorageRangeGetMinAttributeType) (ret FlavorStorageRangeGetMinRetType, ok bool) { if arg == nil { return ret, false } @@ -68,142 +68,139 @@ func getDataPointGetValueAttributeTypeOk(arg DataPointGetValueAttributeType) (re } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDataPointGetValueAttributeType(arg *DataPointGetValueAttributeType, val DataPointGetValueRetType) { +func setFlavorStorageRangeGetMinAttributeType(arg *FlavorStorageRangeGetMinAttributeType, val FlavorStorageRangeGetMinRetType) { *arg = &val } -// DataPoint struct for DataPoint +// FlavorStorageRange range of maximum and minimum storage which can be ordered for the flavor in Gigabyte. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DataPoint struct { - Timestamp DataPointGetTimestampAttributeType `json:"timestamp,omitempty"` - Value DataPointGetValueAttributeType `json:"value,omitempty"` +type FlavorStorageRange struct { + // maximum storage which can be ordered for the flavor in Gigabyte. + // Can be cast to int32 without loss of precision. + // REQUIRED + Max FlavorStorageRangeGetMaxAttributeType `json:"max" required:"true"` + // minimum storage which is required to order in Gigabyte. + // Can be cast to int32 without loss of precision. + // REQUIRED + Min FlavorStorageRangeGetMinAttributeType `json:"min" required:"true"` } -// NewDataPoint instantiates a new DataPoint object +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _FlavorStorageRange FlavorStorageRange + +// NewFlavorStorageRange instantiates a new FlavorStorageRange 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 NewDataPoint() *DataPoint { - this := DataPoint{} +func NewFlavorStorageRange(max FlavorStorageRangeGetMaxArgType, min FlavorStorageRangeGetMinArgType) *FlavorStorageRange { + this := FlavorStorageRange{} + setFlavorStorageRangeGetMaxAttributeType(&this.Max, max) + setFlavorStorageRangeGetMinAttributeType(&this.Min, min) return &this } -// NewDataPointWithDefaults instantiates a new DataPoint object +// NewFlavorStorageRangeWithDefaults instantiates a new FlavorStorageRange 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 NewDataPointWithDefaults() *DataPoint { - this := DataPoint{} +func NewFlavorStorageRangeWithDefaults() *FlavorStorageRange { + this := FlavorStorageRange{} return &this } -// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +// GetMax returns the Max field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DataPoint) GetTimestamp() (res DataPointGetTimestampRetType) { - res, _ = o.GetTimestampOk() - return +func (o *FlavorStorageRange) GetMax() (ret FlavorStorageRangeGetMaxRetType) { + ret, _ = o.GetMaxOk() + return ret } -// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// GetMaxOk returns a tuple with the Max 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 *DataPoint) GetTimestampOk() (ret DataPointGetTimestampRetType, ok bool) { - return getDataPointGetTimestampAttributeTypeOk(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 *DataPoint) HasTimestamp() bool { - _, ok := o.GetTimestampOk() - return ok +func (o *FlavorStorageRange) GetMaxOk() (ret FlavorStorageRangeGetMaxRetType, ok bool) { + return getFlavorStorageRangeGetMaxAttributeTypeOk(o.Max) } -// SetTimestamp gets a reference to the given string and assigns it to the Timestamp field. +// SetMax sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DataPoint) SetTimestamp(v DataPointGetTimestampRetType) { - setDataPointGetTimestampAttributeType(&o.Timestamp, v) +func (o *FlavorStorageRange) SetMax(v FlavorStorageRangeGetMaxRetType) { + setFlavorStorageRangeGetMaxAttributeType(&o.Max, v) } -// GetValue returns the Value field value if set, zero value otherwise. +// GetMin returns the Min field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DataPoint) GetValue() (res DataPointGetValueRetType) { - res, _ = o.GetValueOk() - return +func (o *FlavorStorageRange) GetMin() (ret FlavorStorageRangeGetMinRetType) { + ret, _ = o.GetMinOk() + return ret } -// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// GetMinOk returns a tuple with the Min 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 *DataPoint) GetValueOk() (ret DataPointGetValueRetType, ok bool) { - return getDataPointGetValueAttributeTypeOk(o.Value) -} - -// HasValue 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 *DataPoint) HasValue() bool { - _, ok := o.GetValueOk() - return ok +func (o *FlavorStorageRange) GetMinOk() (ret FlavorStorageRangeGetMinRetType, ok bool) { + return getFlavorStorageRangeGetMinAttributeTypeOk(o.Min) } -// SetValue gets a reference to the given float64 and assigns it to the Value field. +// SetMin sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *DataPoint) SetValue(v DataPointGetValueRetType) { - setDataPointGetValueAttributeType(&o.Value, v) +func (o *FlavorStorageRange) SetMin(v FlavorStorageRangeGetMinRetType) { + setFlavorStorageRangeGetMinAttributeType(&o.Min, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o DataPoint) ToMap() (map[string]interface{}, error) { +func (o FlavorStorageRange) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getDataPointGetTimestampAttributeTypeOk(o.Timestamp); ok { - toSerialize["Timestamp"] = val + if val, ok := getFlavorStorageRangeGetMaxAttributeTypeOk(o.Max); ok { + toSerialize["Max"] = val } - if val, ok := getDataPointGetValueAttributeTypeOk(o.Value); ok { - toSerialize["Value"] = val + if val, ok := getFlavorStorageRangeGetMinAttributeTypeOk(o.Min); ok { + toSerialize["Min"] = val } return toSerialize, nil } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableDataPoint struct { - value *DataPoint +type NullableFlavorStorageRange struct { + value *FlavorStorageRange isSet bool } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDataPoint) Get() *DataPoint { +func (v NullableFlavorStorageRange) Get() *FlavorStorageRange { return v.value } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDataPoint) Set(val *DataPoint) { +func (v *NullableFlavorStorageRange) Set(val *FlavorStorageRange) { 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 NullableDataPoint) IsSet() bool { +func (v NullableFlavorStorageRange) 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 *NullableDataPoint) Unset() { +func (v *NullableFlavorStorageRange) 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 NewNullableDataPoint(val *DataPoint) *NullableDataPoint { - return &NullableDataPoint{value: val, isSet: true} +func NewNullableFlavorStorageRange(val *FlavorStorageRange) *NullableFlavorStorageRange { + return &NullableFlavorStorageRange{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 NullableDataPoint) MarshalJSON() ([]byte, error) { +func (v NullableFlavorStorageRange) 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 *NullableDataPoint) UnmarshalJSON(src []byte) error { +func (v *NullableFlavorStorageRange) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/sqlserverflex/model_flavor_storage_range_test.go b/services/sqlserverflex/model_flavor_storage_range_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_flavor_storage_range_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_flavor_test.go b/services/sqlserverflex/model_flavor_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_flavor_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_get_backup_response.go b/services/sqlserverflex/model_get_backup_response.go index fe1df8979..c37c8ea4a 100644 --- a/services/sqlserverflex/model_get_backup_response.go +++ b/services/sqlserverflex/model_get_backup_response.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,15 +19,15 @@ import ( var _ MappedNullable = &GetBackupResponse{} /* - types and functions for endTime + types and functions for completionTime */ // isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetBackupResponseGetEndTimeAttributeType = *string +type GetBackupResponseGetCompletionTimeAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetBackupResponseGetEndTimeAttributeTypeOk(arg GetBackupResponseGetEndTimeAttributeType) (ret GetBackupResponseGetEndTimeRetType, ok bool) { +func getGetBackupResponseGetCompletionTimeAttributeTypeOk(arg GetBackupResponseGetCompletionTimeAttributeType) (ret GetBackupResponseGetCompletionTimeRetType, ok bool) { if arg == nil { return ret, false } @@ -35,50 +35,29 @@ func getGetBackupResponseGetEndTimeAttributeTypeOk(arg GetBackupResponseGetEndTi } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetBackupResponseGetEndTimeAttributeType(arg *GetBackupResponseGetEndTimeAttributeType, val GetBackupResponseGetEndTimeRetType) { +func setGetBackupResponseGetCompletionTimeAttributeType(arg *GetBackupResponseGetCompletionTimeAttributeType, val GetBackupResponseGetCompletionTimeRetType) { *arg = &val } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetBackupResponseGetEndTimeArgType = string +type GetBackupResponseGetCompletionTimeArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetBackupResponseGetEndTimeRetType = string +type GetBackupResponseGetCompletionTimeRetType = string /* - types and functions for error + types and functions for id */ -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetBackupResponseGetErrorAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetBackupResponseGetErrorAttributeTypeOk(arg GetBackupResponseGetErrorAttributeType) (ret GetBackupResponseGetErrorRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetBackupResponseGetErrorAttributeType(arg *GetBackupResponseGetErrorAttributeType, val GetBackupResponseGetErrorRetType) { - *arg = &val -} - +// isLong // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetBackupResponseGetErrorArgType = string +type GetBackupResponseGetIdAttributeType = *int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetBackupResponseGetErrorRetType = string - -/* - types and functions for id -*/ +type GetBackupResponseGetIdArgType = int64 -// isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetBackupResponseGetIdAttributeType = *string +type GetBackupResponseGetIdRetType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetBackupResponseGetIdAttributeTypeOk(arg GetBackupResponseGetIdAttributeType) (ret GetBackupResponseGetIdRetType, ok bool) { @@ -93,39 +72,6 @@ func setGetBackupResponseGetIdAttributeType(arg *GetBackupResponseGetIdAttribute *arg = &val } -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetBackupResponseGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetBackupResponseGetIdRetType = string - -/* - types and functions for labels -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetBackupResponseGetLabelsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetBackupResponseGetLabelsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetBackupResponseGetLabelsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetBackupResponseGetLabelsAttributeTypeOk(arg GetBackupResponseGetLabelsAttributeType) (ret GetBackupResponseGetLabelsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetBackupResponseGetLabelsAttributeType(arg *GetBackupResponseGetLabelsAttributeType, val GetBackupResponseGetLabelsRetType) { - *arg = &val -} - /* types and functions for name */ @@ -154,21 +100,15 @@ type GetBackupResponseGetNameArgType = string type GetBackupResponseGetNameRetType = string /* - types and functions for options + types and functions for retainedUntil */ -// isContainer -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetBackupResponseGetOptionsAttributeType = *map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetBackupResponseGetOptionsArgType = map[string]string - +// isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetBackupResponseGetOptionsRetType = map[string]string +type GetBackupResponseGetRetainedUntilAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetBackupResponseGetOptionsAttributeTypeOk(arg GetBackupResponseGetOptionsAttributeType) (ret GetBackupResponseGetOptionsRetType, ok bool) { +func getGetBackupResponseGetRetainedUntilAttributeTypeOk(arg GetBackupResponseGetRetainedUntilAttributeType) (ret GetBackupResponseGetRetainedUntilRetType, ok bool) { if arg == nil { return ret, false } @@ -176,10 +116,16 @@ func getGetBackupResponseGetOptionsAttributeTypeOk(arg GetBackupResponseGetOptio } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetBackupResponseGetOptionsAttributeType(arg *GetBackupResponseGetOptionsAttributeType, val GetBackupResponseGetOptionsRetType) { +func setGetBackupResponseGetRetainedUntilAttributeType(arg *GetBackupResponseGetRetainedUntilAttributeType, val GetBackupResponseGetRetainedUntilRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetBackupResponseGetRetainedUntilArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetBackupResponseGetRetainedUntilRetType = string + /* types and functions for size */ @@ -208,15 +154,15 @@ func setGetBackupResponseGetSizeAttributeType(arg *GetBackupResponseGetSizeAttri } /* - types and functions for startTime + types and functions for type */ // isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetBackupResponseGetStartTimeAttributeType = *string +type GetBackupResponseGetTypeAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetBackupResponseGetStartTimeAttributeTypeOk(arg GetBackupResponseGetStartTimeAttributeType) (ret GetBackupResponseGetStartTimeRetType, ok bool) { +func getGetBackupResponseGetTypeAttributeTypeOk(arg GetBackupResponseGetTypeAttributeType) (ret GetBackupResponseGetTypeRetType, ok bool) { if arg == nil { return ret, false } @@ -224,44 +170,55 @@ func getGetBackupResponseGetStartTimeAttributeTypeOk(arg GetBackupResponseGetSta } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetBackupResponseGetStartTimeAttributeType(arg *GetBackupResponseGetStartTimeAttributeType, val GetBackupResponseGetStartTimeRetType) { +func setGetBackupResponseGetTypeAttributeType(arg *GetBackupResponseGetTypeAttributeType, val GetBackupResponseGetTypeRetType) { *arg = &val } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetBackupResponseGetStartTimeArgType = string +type GetBackupResponseGetTypeArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetBackupResponseGetStartTimeRetType = string +type GetBackupResponseGetTypeRetType = string // GetBackupResponse struct for GetBackupResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetBackupResponse struct { - // Backup end time represents local server time - EndTime GetBackupResponseGetEndTimeAttributeType `json:"endTime,omitempty"` - // Backup error - Error GetBackupResponseGetErrorAttributeType `json:"error,omitempty"` - // Backup id - Id GetBackupResponseGetIdAttributeType `json:"id,omitempty"` - // Backup labels - Labels GetBackupResponseGetLabelsAttributeType `json:"labels,omitempty"` - // Backup name - Name GetBackupResponseGetNameAttributeType `json:"name,omitempty"` - // Backup specific options - Options GetBackupResponseGetOptionsAttributeType `json:"options,omitempty"` - // Backup size in byte - Size GetBackupResponseGetSizeAttributeType `json:"size,omitempty"` - // Backup start time represents local server time - StartTime GetBackupResponseGetStartTimeAttributeType `json:"startTime,omitempty"` -} + // The time when the backup was completed in RFC3339 format. + // REQUIRED + CompletionTime GetBackupResponseGetCompletionTimeAttributeType `json:"completionTime" required:"true"` + // The ID of the backup. + // REQUIRED + Id GetBackupResponseGetIdAttributeType `json:"id" required:"true"` + // The name of the backup. + // REQUIRED + Name GetBackupResponseGetNameAttributeType `json:"name" required:"true"` + // The time until the backup will be retained. + // REQUIRED + RetainedUntil GetBackupResponseGetRetainedUntilAttributeType `json:"retainedUntil" required:"true"` + // The size of the backup in bytes. + // REQUIRED + Size GetBackupResponseGetSizeAttributeType `json:"size" required:"true"` + // The type of the backup, which can be automated or manual triggered. + // REQUIRED + Type GetBackupResponseGetTypeAttributeType `json:"type" required:"true"` +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _GetBackupResponse GetBackupResponse // NewGetBackupResponse instantiates a new GetBackupResponse 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 NewGetBackupResponse() *GetBackupResponse { +func NewGetBackupResponse(completionTime GetBackupResponseGetCompletionTimeArgType, id GetBackupResponseGetIdArgType, name GetBackupResponseGetNameArgType, retainedUntil GetBackupResponseGetRetainedUntilArgType, size GetBackupResponseGetSizeArgType, types GetBackupResponseGetTypeArgType) *GetBackupResponse { this := GetBackupResponse{} + setGetBackupResponseGetCompletionTimeAttributeType(&this.CompletionTime, completionTime) + setGetBackupResponseGetIdAttributeType(&this.Id, id) + setGetBackupResponseGetNameAttributeType(&this.Name, name) + setGetBackupResponseGetRetainedUntilAttributeType(&this.RetainedUntil, retainedUntil) + setGetBackupResponseGetSizeAttributeType(&this.Size, size) + setGetBackupResponseGetTypeAttributeType(&this.Type, types) return &this } @@ -274,248 +231,146 @@ func NewGetBackupResponseWithDefaults() *GetBackupResponse { return &this } -// GetEndTime returns the EndTime field value if set, zero value otherwise. +// GetCompletionTime returns the CompletionTime field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetBackupResponse) GetEndTime() (res GetBackupResponseGetEndTimeRetType) { - res, _ = o.GetEndTimeOk() - return +func (o *GetBackupResponse) GetCompletionTime() (ret GetBackupResponseGetCompletionTimeRetType) { + ret, _ = o.GetCompletionTimeOk() + return ret } -// GetEndTimeOk returns a tuple with the EndTime field value if set, nil otherwise +// GetCompletionTimeOk returns a tuple with the CompletionTime 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 *GetBackupResponse) GetEndTimeOk() (ret GetBackupResponseGetEndTimeRetType, ok bool) { - return getGetBackupResponseGetEndTimeAttributeTypeOk(o.EndTime) -} - -// HasEndTime 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 *GetBackupResponse) HasEndTime() bool { - _, ok := o.GetEndTimeOk() - return ok +func (o *GetBackupResponse) GetCompletionTimeOk() (ret GetBackupResponseGetCompletionTimeRetType, ok bool) { + return getGetBackupResponseGetCompletionTimeAttributeTypeOk(o.CompletionTime) } -// SetEndTime gets a reference to the given string and assigns it to the EndTime field. +// SetCompletionTime sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetBackupResponse) SetEndTime(v GetBackupResponseGetEndTimeRetType) { - setGetBackupResponseGetEndTimeAttributeType(&o.EndTime, v) +func (o *GetBackupResponse) SetCompletionTime(v GetBackupResponseGetCompletionTimeRetType) { + setGetBackupResponseGetCompletionTimeAttributeType(&o.CompletionTime, v) } -// GetError returns the Error field value if set, zero value otherwise. +// 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 *GetBackupResponse) GetError() (res GetBackupResponseGetErrorRetType) { - res, _ = o.GetErrorOk() - return +func (o *GetBackupResponse) GetId() (ret GetBackupResponseGetIdRetType) { + ret, _ = o.GetIdOk() + return ret } -// GetErrorOk returns a tuple with the Error 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 *GetBackupResponse) GetErrorOk() (ret GetBackupResponseGetErrorRetType, ok bool) { - return getGetBackupResponseGetErrorAttributeTypeOk(o.Error) -} - -// HasError 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 *GetBackupResponse) HasError() bool { - _, ok := o.GetErrorOk() - return ok -} - -// SetError gets a reference to the given string and assigns it to the Error field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetBackupResponse) SetError(v GetBackupResponseGetErrorRetType) { - setGetBackupResponseGetErrorAttributeType(&o.Error, v) -} - -// GetId returns the Id 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 *GetBackupResponse) GetId() (res GetBackupResponseGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// 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 *GetBackupResponse) GetIdOk() (ret GetBackupResponseGetIdRetType, ok bool) { return getGetBackupResponseGetIdAttributeTypeOk(o.Id) } -// HasId 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 *GetBackupResponse) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. +// 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 *GetBackupResponse) SetId(v GetBackupResponseGetIdRetType) { setGetBackupResponseGetIdAttributeType(&o.Id, v) } -// GetLabels returns the Labels field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetBackupResponse) GetLabels() (res GetBackupResponseGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. +// GetName returns the Name field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetBackupResponse) GetLabelsOk() (ret GetBackupResponseGetLabelsRetType, ok bool) { - return getGetBackupResponseGetLabelsAttributeTypeOk(o.Labels) +func (o *GetBackupResponse) GetName() (ret GetBackupResponseGetNameRetType) { + ret, _ = o.GetNameOk() + return ret } -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetBackupResponse) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok -} - -// SetLabels gets a reference to the given []string and assigns it to the Labels field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetBackupResponse) SetLabels(v GetBackupResponseGetLabelsRetType) { - setGetBackupResponseGetLabelsAttributeType(&o.Labels, v) -} - -// GetName returns the Name 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 *GetBackupResponse) GetName() (res GetBackupResponseGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetBackupResponse) GetNameOk() (ret GetBackupResponseGetNameRetType, ok bool) { return getGetBackupResponseGetNameAttributeTypeOk(o.Name) } -// HasName 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 *GetBackupResponse) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. +// SetName sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetBackupResponse) SetName(v GetBackupResponseGetNameRetType) { setGetBackupResponseGetNameAttributeType(&o.Name, v) } -// GetOptions returns the Options field value if set, zero value otherwise. +// GetRetainedUntil returns the RetainedUntil field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetBackupResponse) GetOptions() (res GetBackupResponseGetOptionsRetType) { - res, _ = o.GetOptionsOk() - return +func (o *GetBackupResponse) GetRetainedUntil() (ret GetBackupResponseGetRetainedUntilRetType) { + ret, _ = o.GetRetainedUntilOk() + return ret } -// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// GetRetainedUntilOk returns a tuple with the RetainedUntil 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 *GetBackupResponse) GetOptionsOk() (ret GetBackupResponseGetOptionsRetType, ok bool) { - return getGetBackupResponseGetOptionsAttributeTypeOk(o.Options) -} - -// HasOptions 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 *GetBackupResponse) HasOptions() bool { - _, ok := o.GetOptionsOk() - return ok +func (o *GetBackupResponse) GetRetainedUntilOk() (ret GetBackupResponseGetRetainedUntilRetType, ok bool) { + return getGetBackupResponseGetRetainedUntilAttributeTypeOk(o.RetainedUntil) } -// SetOptions gets a reference to the given map[string]string and assigns it to the Options field. +// SetRetainedUntil sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetBackupResponse) SetOptions(v GetBackupResponseGetOptionsRetType) { - setGetBackupResponseGetOptionsAttributeType(&o.Options, v) +func (o *GetBackupResponse) SetRetainedUntil(v GetBackupResponseGetRetainedUntilRetType) { + setGetBackupResponseGetRetainedUntilAttributeType(&o.RetainedUntil, v) } -// GetSize returns the Size field value if set, zero value otherwise. +// GetSize returns the Size field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetBackupResponse) GetSize() (res GetBackupResponseGetSizeRetType) { - res, _ = o.GetSizeOk() - return +func (o *GetBackupResponse) GetSize() (ret GetBackupResponseGetSizeRetType) { + ret, _ = o.GetSizeOk() + return ret } -// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// GetSizeOk returns a tuple with the Size field value // and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetBackupResponse) GetSizeOk() (ret GetBackupResponseGetSizeRetType, ok bool) { return getGetBackupResponseGetSizeAttributeTypeOk(o.Size) } -// HasSize 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 *GetBackupResponse) HasSize() bool { - _, ok := o.GetSizeOk() - return ok -} - -// SetSize gets a reference to the given int64 and assigns it to the Size field. +// SetSize sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetBackupResponse) SetSize(v GetBackupResponseGetSizeRetType) { setGetBackupResponseGetSizeAttributeType(&o.Size, v) } -// GetStartTime returns the StartTime field value if set, zero value otherwise. +// GetType returns the Type field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetBackupResponse) GetStartTime() (res GetBackupResponseGetStartTimeRetType) { - res, _ = o.GetStartTimeOk() - return +func (o *GetBackupResponse) GetType() (ret GetBackupResponseGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret } -// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetBackupResponse) GetStartTimeOk() (ret GetBackupResponseGetStartTimeRetType, ok bool) { - return getGetBackupResponseGetStartTimeAttributeTypeOk(o.StartTime) -} - -// HasStartTime 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 *GetBackupResponse) HasStartTime() bool { - _, ok := o.GetStartTimeOk() - return ok +func (o *GetBackupResponse) GetTypeOk() (ret GetBackupResponseGetTypeRetType, ok bool) { + return getGetBackupResponseGetTypeAttributeTypeOk(o.Type) } -// SetStartTime gets a reference to the given string and assigns it to the StartTime field. +// SetType sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetBackupResponse) SetStartTime(v GetBackupResponseGetStartTimeRetType) { - setGetBackupResponseGetStartTimeAttributeType(&o.StartTime, v) +func (o *GetBackupResponse) SetType(v GetBackupResponseGetTypeRetType) { + setGetBackupResponseGetTypeAttributeType(&o.Type, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o GetBackupResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getGetBackupResponseGetEndTimeAttributeTypeOk(o.EndTime); ok { - toSerialize["EndTime"] = val - } - if val, ok := getGetBackupResponseGetErrorAttributeTypeOk(o.Error); ok { - toSerialize["Error"] = val + if val, ok := getGetBackupResponseGetCompletionTimeAttributeTypeOk(o.CompletionTime); ok { + toSerialize["CompletionTime"] = val } if val, ok := getGetBackupResponseGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } - if val, ok := getGetBackupResponseGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val - } if val, ok := getGetBackupResponseGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } - if val, ok := getGetBackupResponseGetOptionsAttributeTypeOk(o.Options); ok { - toSerialize["Options"] = val + if val, ok := getGetBackupResponseGetRetainedUntilAttributeTypeOk(o.RetainedUntil); ok { + toSerialize["RetainedUntil"] = val } if val, ok := getGetBackupResponseGetSizeAttributeTypeOk(o.Size); ok { toSerialize["Size"] = val } - if val, ok := getGetBackupResponseGetStartTimeAttributeTypeOk(o.StartTime); ok { - toSerialize["StartTime"] = val + if val, ok := getGetBackupResponseGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val } return toSerialize, nil } diff --git a/services/sqlserverflex/model_get_backup_response_test.go b/services/sqlserverflex/model_get_backup_response_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_get_backup_response_test.go +++ b/services/sqlserverflex/model_get_backup_response_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_get_database_response.go b/services/sqlserverflex/model_get_database_response.go index 1e5f5d531..2f735cd0c 100644 --- a/services/sqlserverflex/model_get_database_response.go +++ b/services/sqlserverflex/model_get_database_response.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,21 +19,75 @@ import ( var _ MappedNullable = &GetDatabaseResponse{} /* - types and functions for database + types and functions for collationName */ -// isModel +// isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetDatabaseResponseGetDatabaseAttributeType = *SingleDatabase +type GetDatabaseResponseGetCollationNameAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetDatabaseResponseGetDatabaseArgType = SingleDatabase +func getGetDatabaseResponseGetCollationNameAttributeTypeOk(arg GetDatabaseResponseGetCollationNameAttributeType) (ret GetDatabaseResponseGetCollationNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetDatabaseResponseGetCollationNameAttributeType(arg *GetDatabaseResponseGetCollationNameAttributeType, val GetDatabaseResponseGetCollationNameRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetDatabaseResponseGetCollationNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetDatabaseResponseGetCollationNameRetType = string + +/* + types and functions for compatibilityLevel +*/ + +// isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetDatabaseResponseGetCompatibilityLevelAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetDatabaseResponseGetCompatibilityLevelArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetDatabaseResponseGetCompatibilityLevelRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetDatabaseResponseGetCompatibilityLevelAttributeTypeOk(arg GetDatabaseResponseGetCompatibilityLevelAttributeType) (ret GetDatabaseResponseGetCompatibilityLevelRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetDatabaseResponseGetCompatibilityLevelAttributeType(arg *GetDatabaseResponseGetCompatibilityLevelAttributeType, val GetDatabaseResponseGetCompatibilityLevelRetType) { + *arg = &val +} + +/* + types and functions for id +*/ + +// isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetDatabaseResponseGetIdAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetDatabaseResponseGetIdArgType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetDatabaseResponseGetDatabaseRetType = SingleDatabase +type GetDatabaseResponseGetIdRetType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetDatabaseResponseGetDatabaseAttributeTypeOk(arg GetDatabaseResponseGetDatabaseAttributeType) (ret GetDatabaseResponseGetDatabaseRetType, ok bool) { +func getGetDatabaseResponseGetIdAttributeTypeOk(arg GetDatabaseResponseGetIdAttributeType) (ret GetDatabaseResponseGetIdRetType, ok bool) { if arg == nil { return ret, false } @@ -41,23 +95,100 @@ func getGetDatabaseResponseGetDatabaseAttributeTypeOk(arg GetDatabaseResponseGet } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetDatabaseResponseGetDatabaseAttributeType(arg *GetDatabaseResponseGetDatabaseAttributeType, val GetDatabaseResponseGetDatabaseRetType) { +func setGetDatabaseResponseGetIdAttributeType(arg *GetDatabaseResponseGetIdAttributeType, val GetDatabaseResponseGetIdRetType) { *arg = &val } +/* + types and functions for name +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetDatabaseResponseGetNameAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetDatabaseResponseGetNameAttributeTypeOk(arg GetDatabaseResponseGetNameAttributeType) (ret GetDatabaseResponseGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetDatabaseResponseGetNameAttributeType(arg *GetDatabaseResponseGetNameAttributeType, val GetDatabaseResponseGetNameRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetDatabaseResponseGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetDatabaseResponseGetNameRetType = string + +/* + types and functions for owner +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetDatabaseResponseGetOwnerAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetDatabaseResponseGetOwnerAttributeTypeOk(arg GetDatabaseResponseGetOwnerAttributeType) (ret GetDatabaseResponseGetOwnerRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetDatabaseResponseGetOwnerAttributeType(arg *GetDatabaseResponseGetOwnerAttributeType, val GetDatabaseResponseGetOwnerRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetDatabaseResponseGetOwnerArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetDatabaseResponseGetOwnerRetType = string + // GetDatabaseResponse struct for GetDatabaseResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetDatabaseResponse struct { - Database GetDatabaseResponseGetDatabaseAttributeType `json:"database,omitempty"` + // The collation of the database. This database collation should match the *collation_name* of one of the collations given by the **Get database collation list** endpoint. + // REQUIRED + CollationName GetDatabaseResponseGetCollationNameAttributeType `json:"collationName" required:"true"` + // CompatibilityLevel of the Database. + // Can be cast to int32 without loss of precision. + // REQUIRED + CompatibilityLevel GetDatabaseResponseGetCompatibilityLevelAttributeType `json:"compatibilityLevel" required:"true"` + // The id of the database. + // REQUIRED + Id GetDatabaseResponseGetIdAttributeType `json:"id" required:"true"` + // The name of the database. + // REQUIRED + Name GetDatabaseResponseGetNameAttributeType `json:"name" required:"true"` + // The owner of the database. + // REQUIRED + Owner GetDatabaseResponseGetOwnerAttributeType `json:"owner" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _GetDatabaseResponse GetDatabaseResponse + // NewGetDatabaseResponse instantiates a new GetDatabaseResponse 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 NewGetDatabaseResponse() *GetDatabaseResponse { +func NewGetDatabaseResponse(collationName GetDatabaseResponseGetCollationNameArgType, compatibilityLevel GetDatabaseResponseGetCompatibilityLevelArgType, id GetDatabaseResponseGetIdArgType, name GetDatabaseResponseGetNameArgType, owner GetDatabaseResponseGetOwnerArgType) *GetDatabaseResponse { this := GetDatabaseResponse{} + setGetDatabaseResponseGetCollationNameAttributeType(&this.CollationName, collationName) + setGetDatabaseResponseGetCompatibilityLevelAttributeType(&this.CompatibilityLevel, compatibilityLevel) + setGetDatabaseResponseGetIdAttributeType(&this.Id, id) + setGetDatabaseResponseGetNameAttributeType(&this.Name, name) + setGetDatabaseResponseGetOwnerAttributeType(&this.Owner, owner) return &this } @@ -70,38 +201,123 @@ func NewGetDatabaseResponseWithDefaults() *GetDatabaseResponse { return &this } -// GetDatabase returns the Database field value if set, zero value otherwise. +// GetCollationName returns the CollationName field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetDatabaseResponse) GetDatabase() (res GetDatabaseResponseGetDatabaseRetType) { - res, _ = o.GetDatabaseOk() - return +func (o *GetDatabaseResponse) GetCollationName() (ret GetDatabaseResponseGetCollationNameRetType) { + ret, _ = o.GetCollationNameOk() + return ret } -// GetDatabaseOk returns a tuple with the Database field value if set, nil otherwise +// GetCollationNameOk returns a tuple with the CollationName 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 *GetDatabaseResponse) GetDatabaseOk() (ret GetDatabaseResponseGetDatabaseRetType, ok bool) { - return getGetDatabaseResponseGetDatabaseAttributeTypeOk(o.Database) +func (o *GetDatabaseResponse) GetCollationNameOk() (ret GetDatabaseResponseGetCollationNameRetType, ok bool) { + return getGetDatabaseResponseGetCollationNameAttributeTypeOk(o.CollationName) } -// HasDatabase returns a boolean if a field has been set. +// SetCollationName sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetDatabaseResponse) HasDatabase() bool { - _, ok := o.GetDatabaseOk() - return ok +func (o *GetDatabaseResponse) SetCollationName(v GetDatabaseResponseGetCollationNameRetType) { + setGetDatabaseResponseGetCollationNameAttributeType(&o.CollationName, v) } -// SetDatabase gets a reference to the given SingleDatabase and assigns it to the Database field. +// GetCompatibilityLevel returns the CompatibilityLevel field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetDatabaseResponse) GetCompatibilityLevel() (ret GetDatabaseResponseGetCompatibilityLevelRetType) { + ret, _ = o.GetCompatibilityLevelOk() + return ret +} + +// GetCompatibilityLevelOk returns a tuple with the CompatibilityLevel 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 *GetDatabaseResponse) SetDatabase(v GetDatabaseResponseGetDatabaseRetType) { - setGetDatabaseResponseGetDatabaseAttributeType(&o.Database, v) +func (o *GetDatabaseResponse) GetCompatibilityLevelOk() (ret GetDatabaseResponseGetCompatibilityLevelRetType, ok bool) { + return getGetDatabaseResponseGetCompatibilityLevelAttributeTypeOk(o.CompatibilityLevel) +} + +// SetCompatibilityLevel sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetDatabaseResponse) SetCompatibilityLevel(v GetDatabaseResponseGetCompatibilityLevelRetType) { + setGetDatabaseResponseGetCompatibilityLevelAttributeType(&o.CompatibilityLevel, 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 *GetDatabaseResponse) GetId() (ret GetDatabaseResponseGetIdRetType) { + ret, _ = o.GetIdOk() + return ret +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetDatabaseResponse) GetIdOk() (ret GetDatabaseResponseGetIdRetType, ok bool) { + return getGetDatabaseResponseGetIdAttributeTypeOk(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 *GetDatabaseResponse) SetId(v GetDatabaseResponseGetIdRetType) { + setGetDatabaseResponseGetIdAttributeType(&o.Id, v) +} + +// GetName returns the Name field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetDatabaseResponse) GetName() (ret GetDatabaseResponseGetNameRetType) { + ret, _ = o.GetNameOk() + return ret +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetDatabaseResponse) GetNameOk() (ret GetDatabaseResponseGetNameRetType, ok bool) { + return getGetDatabaseResponseGetNameAttributeTypeOk(o.Name) +} + +// SetName sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetDatabaseResponse) SetName(v GetDatabaseResponseGetNameRetType) { + setGetDatabaseResponseGetNameAttributeType(&o.Name, v) +} + +// GetOwner returns the Owner field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetDatabaseResponse) GetOwner() (ret GetDatabaseResponseGetOwnerRetType) { + ret, _ = o.GetOwnerOk() + return ret +} + +// GetOwnerOk returns a tuple with the Owner 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 *GetDatabaseResponse) GetOwnerOk() (ret GetDatabaseResponseGetOwnerRetType, ok bool) { + return getGetDatabaseResponseGetOwnerAttributeTypeOk(o.Owner) +} + +// SetOwner sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetDatabaseResponse) SetOwner(v GetDatabaseResponseGetOwnerRetType) { + setGetDatabaseResponseGetOwnerAttributeType(&o.Owner, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o GetDatabaseResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getGetDatabaseResponseGetDatabaseAttributeTypeOk(o.Database); ok { - toSerialize["Database"] = val + if val, ok := getGetDatabaseResponseGetCollationNameAttributeTypeOk(o.CollationName); ok { + toSerialize["CollationName"] = val + } + if val, ok := getGetDatabaseResponseGetCompatibilityLevelAttributeTypeOk(o.CompatibilityLevel); ok { + toSerialize["CompatibilityLevel"] = val + } + if val, ok := getGetDatabaseResponseGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getGetDatabaseResponseGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getGetDatabaseResponseGetOwnerAttributeTypeOk(o.Owner); ok { + toSerialize["Owner"] = val } return toSerialize, nil } diff --git a/services/sqlserverflex/model_get_database_response_test.go b/services/sqlserverflex/model_get_database_response_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_get_database_response_test.go +++ b/services/sqlserverflex/model_get_database_response_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_get_instance_response.go b/services/sqlserverflex/model_get_instance_response.go index 28b6e3d2b..c91f8a906 100644 --- a/services/sqlserverflex/model_get_instance_response.go +++ b/services/sqlserverflex/model_get_instance_response.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,21 +19,345 @@ import ( var _ MappedNullable = &GetInstanceResponse{} /* - types and functions for item + types and functions for backupSchedule +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetBackupScheduleAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetInstanceResponseGetBackupScheduleAttributeTypeOk(arg GetInstanceResponseGetBackupScheduleAttributeType) (ret GetInstanceResponseGetBackupScheduleRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetInstanceResponseGetBackupScheduleAttributeType(arg *GetInstanceResponseGetBackupScheduleAttributeType, val GetInstanceResponseGetBackupScheduleRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetBackupScheduleArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetBackupScheduleRetType = string + +/* + types and functions for edition +*/ + +// isEnumRef +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetEditionAttributeType = *InstanceEdition + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetEditionArgType = InstanceEdition + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetEditionRetType = InstanceEdition + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetInstanceResponseGetEditionAttributeTypeOk(arg GetInstanceResponseGetEditionAttributeType) (ret GetInstanceResponseGetEditionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetInstanceResponseGetEditionAttributeType(arg *GetInstanceResponseGetEditionAttributeType, val GetInstanceResponseGetEditionRetType) { + *arg = &val +} + +/* + types and functions for encryption +*/ + +// isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetEncryptionAttributeType = *InstanceEncryption + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetEncryptionArgType = InstanceEncryption + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetEncryptionRetType = InstanceEncryption + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetInstanceResponseGetEncryptionAttributeTypeOk(arg GetInstanceResponseGetEncryptionAttributeType) (ret GetInstanceResponseGetEncryptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetInstanceResponseGetEncryptionAttributeType(arg *GetInstanceResponseGetEncryptionAttributeType, val GetInstanceResponseGetEncryptionRetType) { + *arg = &val +} + +/* + types and functions for flavorId +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetFlavorIdAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetInstanceResponseGetFlavorIdAttributeTypeOk(arg GetInstanceResponseGetFlavorIdAttributeType) (ret GetInstanceResponseGetFlavorIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetInstanceResponseGetFlavorIdAttributeType(arg *GetInstanceResponseGetFlavorIdAttributeType, val GetInstanceResponseGetFlavorIdRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetFlavorIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetFlavorIdRetType = string + +/* + types and functions for id +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetIdAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetInstanceResponseGetIdAttributeTypeOk(arg GetInstanceResponseGetIdAttributeType) (ret GetInstanceResponseGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetInstanceResponseGetIdAttributeType(arg *GetInstanceResponseGetIdAttributeType, val GetInstanceResponseGetIdRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetIdRetType = string + +/* + types and functions for isDeletable +*/ + +// isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponsegetIsDeletableAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponsegetIsDeletableArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponsegetIsDeletableRetType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetInstanceResponsegetIsDeletableAttributeTypeOk(arg GetInstanceResponsegetIsDeletableAttributeType) (ret GetInstanceResponsegetIsDeletableRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetInstanceResponsegetIsDeletableAttributeType(arg *GetInstanceResponsegetIsDeletableAttributeType, val GetInstanceResponsegetIsDeletableRetType) { + *arg = &val +} + +/* + types and functions for labels +*/ + +// isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetLabelsRetType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetInstanceResponseGetLabelsAttributeTypeOk(arg GetInstanceResponseGetLabelsAttributeType) (ret GetInstanceResponseGetLabelsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetInstanceResponseGetLabelsAttributeType(arg *GetInstanceResponseGetLabelsAttributeType, val GetInstanceResponseGetLabelsRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetNameAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetInstanceResponseGetNameAttributeTypeOk(arg GetInstanceResponseGetNameAttributeType) (ret GetInstanceResponseGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetInstanceResponseGetNameAttributeType(arg *GetInstanceResponseGetNameAttributeType, val GetInstanceResponseGetNameRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetNameRetType = string + +/* + types and functions for network +*/ + +// isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetNetworkAttributeType = *InstanceNetwork + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetNetworkArgType = InstanceNetwork + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetNetworkRetType = InstanceNetwork + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetInstanceResponseGetNetworkAttributeTypeOk(arg GetInstanceResponseGetNetworkAttributeType) (ret GetInstanceResponseGetNetworkRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetInstanceResponseGetNetworkAttributeType(arg *GetInstanceResponseGetNetworkAttributeType, val GetInstanceResponseGetNetworkRetType) { + *arg = &val +} + +/* + types and functions for replicas +*/ + +// isEnumRef +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetReplicasAttributeType = *Replicas + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetReplicasArgType = Replicas + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetReplicasRetType = Replicas + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetInstanceResponseGetReplicasAttributeTypeOk(arg GetInstanceResponseGetReplicasAttributeType) (ret GetInstanceResponseGetReplicasRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetInstanceResponseGetReplicasAttributeType(arg *GetInstanceResponseGetReplicasAttributeType, val GetInstanceResponseGetReplicasRetType) { + *arg = &val +} + +/* + types and functions for retentionDays +*/ + +// isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetRetentionDaysAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetRetentionDaysArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetRetentionDaysRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetInstanceResponseGetRetentionDaysAttributeTypeOk(arg GetInstanceResponseGetRetentionDaysAttributeType) (ret GetInstanceResponseGetRetentionDaysRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetInstanceResponseGetRetentionDaysAttributeType(arg *GetInstanceResponseGetRetentionDaysAttributeType, val GetInstanceResponseGetRetentionDaysRetType) { + *arg = &val +} + +/* + types and functions for state +*/ + +// isEnumRef +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetStateAttributeType = *State + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetStateArgType = State + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetStateRetType = State + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetInstanceResponseGetStateAttributeTypeOk(arg GetInstanceResponseGetStateAttributeType) (ret GetInstanceResponseGetStateRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetInstanceResponseGetStateAttributeType(arg *GetInstanceResponseGetStateAttributeType, val GetInstanceResponseGetStateRetType) { + *arg = &val +} + +/* + types and functions for storage */ // isModel // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetInstanceResponseGetItemAttributeType = *Instance +type GetInstanceResponseGetStorageAttributeType = *Storage // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetInstanceResponseGetItemArgType = Instance +type GetInstanceResponseGetStorageArgType = Storage // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetInstanceResponseGetItemRetType = Instance +type GetInstanceResponseGetStorageRetType = Storage // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetInstanceResponseGetItemAttributeTypeOk(arg GetInstanceResponseGetItemAttributeType) (ret GetInstanceResponseGetItemRetType, ok bool) { +func getGetInstanceResponseGetStorageAttributeTypeOk(arg GetInstanceResponseGetStorageAttributeType) (ret GetInstanceResponseGetStorageRetType, ok bool) { if arg == nil { return ret, false } @@ -41,23 +365,98 @@ func getGetInstanceResponseGetItemAttributeTypeOk(arg GetInstanceResponseGetItem } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetInstanceResponseGetItemAttributeType(arg *GetInstanceResponseGetItemAttributeType, val GetInstanceResponseGetItemRetType) { +func setGetInstanceResponseGetStorageAttributeType(arg *GetInstanceResponseGetStorageAttributeType, val GetInstanceResponseGetStorageRetType) { + *arg = &val +} + +/* + types and functions for version +*/ + +// isEnumRef +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetVersionAttributeType = *InstanceVersion + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetVersionArgType = InstanceVersion + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetInstanceResponseGetVersionRetType = InstanceVersion + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetInstanceResponseGetVersionAttributeTypeOk(arg GetInstanceResponseGetVersionAttributeType) (ret GetInstanceResponseGetVersionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetInstanceResponseGetVersionAttributeType(arg *GetInstanceResponseGetVersionAttributeType, val GetInstanceResponseGetVersionRetType) { *arg = &val } // GetInstanceResponse struct for GetInstanceResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetInstanceResponse struct { - Item GetInstanceResponseGetItemAttributeType `json:"item,omitempty"` + // The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule. + // REQUIRED + BackupSchedule GetInstanceResponseGetBackupScheduleAttributeType `json:"backupSchedule" required:"true"` + // REQUIRED + Edition GetInstanceResponseGetEditionAttributeType `json:"edition" required:"true"` + Encryption GetInstanceResponseGetEncryptionAttributeType `json:"encryption,omitempty"` + // The id of the instance flavor. + // REQUIRED + FlavorId GetInstanceResponseGetFlavorIdAttributeType `json:"flavorId" required:"true"` + // The ID of the instance. + // REQUIRED + Id GetInstanceResponseGetIdAttributeType `json:"id" required:"true"` + // Whether the instance can be deleted or not. + // REQUIRED + IsDeletable GetInstanceResponsegetIsDeletableAttributeType `json:"isDeletable" required:"true"` + // A dictionary of user-defined key-value pairs used to categorize or organize the resource. **Rules for Keys:** * Must be between 1 and 63 characters long. * Must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$` * **Restriction:** The prefix `stackit-` is strictly reserved and cannot be used. **Rules for Values:** * Must be between 0 (empty string) and 63 characters long. * If not empty, must begin and end with an alphanumeric character. * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$` + Labels GetInstanceResponseGetLabelsAttributeType `json:"labels,omitempty"` + // The name of the instance. + // REQUIRED + Name GetInstanceResponseGetNameAttributeType `json:"name" required:"true"` + // REQUIRED + Network GetInstanceResponseGetNetworkAttributeType `json:"network" required:"true"` + // REQUIRED + Replicas GetInstanceResponseGetReplicasAttributeType `json:"replicas" required:"true"` + // The days for how long the backup files should be stored before cleaned up. 30 to 90 + // Can be cast to int32 without loss of precision. + // REQUIRED + RetentionDays GetInstanceResponseGetRetentionDaysAttributeType `json:"retentionDays" required:"true"` + // REQUIRED + State GetInstanceResponseGetStateAttributeType `json:"state" required:"true"` + // REQUIRED + Storage GetInstanceResponseGetStorageAttributeType `json:"storage" required:"true"` + // REQUIRED + Version GetInstanceResponseGetVersionAttributeType `json:"version" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _GetInstanceResponse GetInstanceResponse + // NewGetInstanceResponse instantiates a new GetInstanceResponse 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 NewGetInstanceResponse() *GetInstanceResponse { +func NewGetInstanceResponse(backupSchedule GetInstanceResponseGetBackupScheduleArgType, edition GetInstanceResponseGetEditionArgType, flavorId GetInstanceResponseGetFlavorIdArgType, id GetInstanceResponseGetIdArgType, isDeletable GetInstanceResponsegetIsDeletableArgType, name GetInstanceResponseGetNameArgType, network GetInstanceResponseGetNetworkArgType, replicas GetInstanceResponseGetReplicasArgType, retentionDays GetInstanceResponseGetRetentionDaysArgType, state GetInstanceResponseGetStateArgType, storage GetInstanceResponseGetStorageArgType, version GetInstanceResponseGetVersionArgType) *GetInstanceResponse { this := GetInstanceResponse{} + setGetInstanceResponseGetBackupScheduleAttributeType(&this.BackupSchedule, backupSchedule) + setGetInstanceResponseGetEditionAttributeType(&this.Edition, edition) + setGetInstanceResponseGetFlavorIdAttributeType(&this.FlavorId, flavorId) + setGetInstanceResponseGetIdAttributeType(&this.Id, id) + setGetInstanceResponsegetIsDeletableAttributeType(&this.IsDeletable, isDeletable) + setGetInstanceResponseGetNameAttributeType(&this.Name, name) + setGetInstanceResponseGetNetworkAttributeType(&this.Network, network) + setGetInstanceResponseGetReplicasAttributeType(&this.Replicas, replicas) + setGetInstanceResponseGetRetentionDaysAttributeType(&this.RetentionDays, retentionDays) + setGetInstanceResponseGetStateAttributeType(&this.State, state) + setGetInstanceResponseGetStorageAttributeType(&this.Storage, storage) + setGetInstanceResponseGetVersionAttributeType(&this.Version, version) return &this } @@ -70,38 +469,344 @@ func NewGetInstanceResponseWithDefaults() *GetInstanceResponse { return &this } -// GetItem returns the Item field value if set, zero value otherwise. +// GetBackupSchedule returns the BackupSchedule field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) GetBackupSchedule() (ret GetInstanceResponseGetBackupScheduleRetType) { + ret, _ = o.GetBackupScheduleOk() + return ret +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule 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 *GetInstanceResponse) GetBackupScheduleOk() (ret GetInstanceResponseGetBackupScheduleRetType, ok bool) { + return getGetInstanceResponseGetBackupScheduleAttributeTypeOk(o.BackupSchedule) +} + +// SetBackupSchedule sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) SetBackupSchedule(v GetInstanceResponseGetBackupScheduleRetType) { + setGetInstanceResponseGetBackupScheduleAttributeType(&o.BackupSchedule, v) +} + +// GetEdition returns the Edition field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) GetEdition() (ret GetInstanceResponseGetEditionRetType) { + ret, _ = o.GetEditionOk() + return ret +} + +// GetEditionOk returns a tuple with the Edition 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 *GetInstanceResponse) GetEditionOk() (ret GetInstanceResponseGetEditionRetType, ok bool) { + return getGetInstanceResponseGetEditionAttributeTypeOk(o.Edition) +} + +// SetEdition sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) SetEdition(v GetInstanceResponseGetEditionRetType) { + setGetInstanceResponseGetEditionAttributeType(&o.Edition, v) +} + +// GetEncryption returns the Encryption 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 *GetInstanceResponse) GetEncryption() (res GetInstanceResponseGetEncryptionRetType) { + res, _ = o.GetEncryptionOk() + return +} + +// GetEncryptionOk returns a tuple with the Encryption 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 *GetInstanceResponse) GetEncryptionOk() (ret GetInstanceResponseGetEncryptionRetType, ok bool) { + return getGetInstanceResponseGetEncryptionAttributeTypeOk(o.Encryption) +} + +// HasEncryption 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 *GetInstanceResponse) HasEncryption() bool { + _, ok := o.GetEncryptionOk() + return ok +} + +// SetEncryption gets a reference to the given InstanceEncryption and assigns it to the Encryption field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) SetEncryption(v GetInstanceResponseGetEncryptionRetType) { + setGetInstanceResponseGetEncryptionAttributeType(&o.Encryption, v) +} + +// GetFlavorId returns the FlavorId field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) GetFlavorId() (ret GetInstanceResponseGetFlavorIdRetType) { + ret, _ = o.GetFlavorIdOk() + return ret +} + +// GetFlavorIdOk returns a tuple with the FlavorId 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 *GetInstanceResponse) GetFlavorIdOk() (ret GetInstanceResponseGetFlavorIdRetType, ok bool) { + return getGetInstanceResponseGetFlavorIdAttributeTypeOk(o.FlavorId) +} + +// SetFlavorId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) SetFlavorId(v GetInstanceResponseGetFlavorIdRetType) { + setGetInstanceResponseGetFlavorIdAttributeType(&o.FlavorId, 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 *GetInstanceResponse) GetItem() (res GetInstanceResponseGetItemRetType) { - res, _ = o.GetItemOk() +func (o *GetInstanceResponse) GetId() (ret GetInstanceResponseGetIdRetType) { + ret, _ = o.GetIdOk() + return ret +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) GetIdOk() (ret GetInstanceResponseGetIdRetType, ok bool) { + return getGetInstanceResponseGetIdAttributeTypeOk(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 *GetInstanceResponse) SetId(v GetInstanceResponseGetIdRetType) { + setGetInstanceResponseGetIdAttributeType(&o.Id, v) +} + +// GetIsDeletable returns the IsDeletable field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) GetIsDeletable() (ret GetInstanceResponsegetIsDeletableRetType) { + ret, _ = o.GetIsDeletableOk() + return ret +} + +// GetIsDeletableOk returns a tuple with the IsDeletable 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 *GetInstanceResponse) GetIsDeletableOk() (ret GetInstanceResponsegetIsDeletableRetType, ok bool) { + return getGetInstanceResponsegetIsDeletableAttributeTypeOk(o.IsDeletable) +} + +// SetIsDeletable sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) SetIsDeletable(v GetInstanceResponsegetIsDeletableRetType) { + setGetInstanceResponsegetIsDeletableAttributeType(&o.IsDeletable, v) +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) GetLabels() (res GetInstanceResponseGetLabelsRetType) { + res, _ = o.GetLabelsOk() return } -// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetInstanceResponse) GetItemOk() (ret GetInstanceResponseGetItemRetType, ok bool) { - return getGetInstanceResponseGetItemAttributeTypeOk(o.Item) +func (o *GetInstanceResponse) GetLabelsOk() (ret GetInstanceResponseGetLabelsRetType, ok bool) { + return getGetInstanceResponseGetLabelsAttributeTypeOk(o.Labels) } -// HasItem returns a boolean if a field has been set. +// HasLabels returns a boolean if a field has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetInstanceResponse) HasItem() bool { - _, ok := o.GetItemOk() +func (o *GetInstanceResponse) HasLabels() bool { + _, ok := o.GetLabelsOk() return ok } -// SetItem gets a reference to the given Instance and assigns it to the Item field. +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) SetLabels(v GetInstanceResponseGetLabelsRetType) { + setGetInstanceResponseGetLabelsAttributeType(&o.Labels, v) +} + +// GetName returns the Name field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) GetName() (ret GetInstanceResponseGetNameRetType) { + ret, _ = o.GetNameOk() + return ret +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) GetNameOk() (ret GetInstanceResponseGetNameRetType, ok bool) { + return getGetInstanceResponseGetNameAttributeTypeOk(o.Name) +} + +// SetName sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) SetName(v GetInstanceResponseGetNameRetType) { + setGetInstanceResponseGetNameAttributeType(&o.Name, v) +} + +// GetNetwork returns the Network field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) GetNetwork() (ret GetInstanceResponseGetNetworkRetType) { + ret, _ = o.GetNetworkOk() + return ret +} + +// GetNetworkOk returns a tuple with the Network 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 *GetInstanceResponse) GetNetworkOk() (ret GetInstanceResponseGetNetworkRetType, ok bool) { + return getGetInstanceResponseGetNetworkAttributeTypeOk(o.Network) +} + +// SetNetwork sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetInstanceResponse) SetItem(v GetInstanceResponseGetItemRetType) { - setGetInstanceResponseGetItemAttributeType(&o.Item, v) +func (o *GetInstanceResponse) SetNetwork(v GetInstanceResponseGetNetworkRetType) { + setGetInstanceResponseGetNetworkAttributeType(&o.Network, v) +} + +// GetReplicas returns the Replicas field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) GetReplicas() (ret GetInstanceResponseGetReplicasRetType) { + ret, _ = o.GetReplicasOk() + return ret +} + +// GetReplicasOk returns a tuple with the Replicas 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 *GetInstanceResponse) GetReplicasOk() (ret GetInstanceResponseGetReplicasRetType, ok bool) { + return getGetInstanceResponseGetReplicasAttributeTypeOk(o.Replicas) +} + +// SetReplicas sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) SetReplicas(v GetInstanceResponseGetReplicasRetType) { + setGetInstanceResponseGetReplicasAttributeType(&o.Replicas, v) +} + +// GetRetentionDays returns the RetentionDays field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) GetRetentionDays() (ret GetInstanceResponseGetRetentionDaysRetType) { + ret, _ = o.GetRetentionDaysOk() + return ret +} + +// GetRetentionDaysOk returns a tuple with the RetentionDays 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 *GetInstanceResponse) GetRetentionDaysOk() (ret GetInstanceResponseGetRetentionDaysRetType, ok bool) { + return getGetInstanceResponseGetRetentionDaysAttributeTypeOk(o.RetentionDays) +} + +// SetRetentionDays sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) SetRetentionDays(v GetInstanceResponseGetRetentionDaysRetType) { + setGetInstanceResponseGetRetentionDaysAttributeType(&o.RetentionDays, v) +} + +// GetState returns the State field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) GetState() (ret GetInstanceResponseGetStateRetType) { + ret, _ = o.GetStateOk() + return ret +} + +// GetStateOk returns a tuple with the State 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 *GetInstanceResponse) GetStateOk() (ret GetInstanceResponseGetStateRetType, ok bool) { + return getGetInstanceResponseGetStateAttributeTypeOk(o.State) +} + +// SetState sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) SetState(v GetInstanceResponseGetStateRetType) { + setGetInstanceResponseGetStateAttributeType(&o.State, v) +} + +// GetStorage returns the Storage field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) GetStorage() (ret GetInstanceResponseGetStorageRetType) { + ret, _ = o.GetStorageOk() + return ret +} + +// GetStorageOk returns a tuple with the Storage 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 *GetInstanceResponse) GetStorageOk() (ret GetInstanceResponseGetStorageRetType, ok bool) { + return getGetInstanceResponseGetStorageAttributeTypeOk(o.Storage) +} + +// SetStorage sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) SetStorage(v GetInstanceResponseGetStorageRetType) { + setGetInstanceResponseGetStorageAttributeType(&o.Storage, v) +} + +// GetVersion returns the Version field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) GetVersion() (ret GetInstanceResponseGetVersionRetType) { + ret, _ = o.GetVersionOk() + return ret +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) GetVersionOk() (ret GetInstanceResponseGetVersionRetType, ok bool) { + return getGetInstanceResponseGetVersionAttributeTypeOk(o.Version) +} + +// SetVersion sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetInstanceResponse) SetVersion(v GetInstanceResponseGetVersionRetType) { + setGetInstanceResponseGetVersionAttributeType(&o.Version, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o GetInstanceResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getGetInstanceResponseGetItemAttributeTypeOk(o.Item); ok { - toSerialize["Item"] = val + if val, ok := getGetInstanceResponseGetBackupScheduleAttributeTypeOk(o.BackupSchedule); ok { + toSerialize["BackupSchedule"] = val + } + if val, ok := getGetInstanceResponseGetEditionAttributeTypeOk(o.Edition); ok { + toSerialize["Edition"] = val + } + if val, ok := getGetInstanceResponseGetEncryptionAttributeTypeOk(o.Encryption); ok { + toSerialize["Encryption"] = val + } + if val, ok := getGetInstanceResponseGetFlavorIdAttributeTypeOk(o.FlavorId); ok { + toSerialize["FlavorId"] = val + } + if val, ok := getGetInstanceResponseGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getGetInstanceResponsegetIsDeletableAttributeTypeOk(o.IsDeletable); ok { + toSerialize["IsDeletable"] = val + } + if val, ok := getGetInstanceResponseGetLabelsAttributeTypeOk(o.Labels); ok { + toSerialize["Labels"] = val + } + if val, ok := getGetInstanceResponseGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getGetInstanceResponseGetNetworkAttributeTypeOk(o.Network); ok { + toSerialize["Network"] = val + } + if val, ok := getGetInstanceResponseGetReplicasAttributeTypeOk(o.Replicas); ok { + toSerialize["Replicas"] = val + } + if val, ok := getGetInstanceResponseGetRetentionDaysAttributeTypeOk(o.RetentionDays); ok { + toSerialize["RetentionDays"] = val + } + if val, ok := getGetInstanceResponseGetStateAttributeTypeOk(o.State); ok { + toSerialize["State"] = val + } + if val, ok := getGetInstanceResponseGetStorageAttributeTypeOk(o.Storage); ok { + toSerialize["Storage"] = val + } + if val, ok := getGetInstanceResponseGetVersionAttributeTypeOk(o.Version); ok { + toSerialize["Version"] = val } return toSerialize, nil } diff --git a/services/sqlserverflex/model_get_instance_response_test.go b/services/sqlserverflex/model_get_instance_response_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_get_instance_response_test.go +++ b/services/sqlserverflex/model_get_instance_response_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_get_user_response.go b/services/sqlserverflex/model_get_user_response.go index 551ff6c2b..d1ebf7bec 100644 --- a/services/sqlserverflex/model_get_user_response.go +++ b/services/sqlserverflex/model_get_user_response.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,21 +19,42 @@ import ( var _ MappedNullable = &GetUserResponse{} /* - types and functions for item + types and functions for default_database */ -// isModel +// isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetUserResponseGetItemAttributeType = *UserResponseUser +type GetUserResponseGetDefaultDatabaseAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetUserResponseGetItemArgType = UserResponseUser +func getGetUserResponseGetDefaultDatabaseAttributeTypeOk(arg GetUserResponseGetDefaultDatabaseAttributeType) (ret GetUserResponseGetDefaultDatabaseRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetUserResponseGetDefaultDatabaseAttributeType(arg *GetUserResponseGetDefaultDatabaseAttributeType, val GetUserResponseGetDefaultDatabaseRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetUserResponseGetDefaultDatabaseArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetUserResponseGetDefaultDatabaseRetType = string + +/* + types and functions for host +*/ +// isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type GetUserResponseGetItemRetType = UserResponseUser +type GetUserResponseGetHostAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getGetUserResponseGetItemAttributeTypeOk(arg GetUserResponseGetItemAttributeType) (ret GetUserResponseGetItemRetType, ok bool) { +func getGetUserResponseGetHostAttributeTypeOk(arg GetUserResponseGetHostAttributeType) (ret GetUserResponseGetHostRetType, ok bool) { if arg == nil { return ret, false } @@ -41,23 +62,195 @@ func getGetUserResponseGetItemAttributeTypeOk(arg GetUserResponseGetItemAttribut } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setGetUserResponseGetItemAttributeType(arg *GetUserResponseGetItemAttributeType, val GetUserResponseGetItemRetType) { +func setGetUserResponseGetHostAttributeType(arg *GetUserResponseGetHostAttributeType, val GetUserResponseGetHostRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetUserResponseGetHostArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetUserResponseGetHostRetType = string + +/* + types and functions for id +*/ + +// isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetUserResponseGetIdAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetUserResponseGetIdArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetUserResponseGetIdRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetUserResponseGetIdAttributeTypeOk(arg GetUserResponseGetIdAttributeType) (ret GetUserResponseGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetUserResponseGetIdAttributeType(arg *GetUserResponseGetIdAttributeType, val GetUserResponseGetIdRetType) { + *arg = &val +} + +/* + types and functions for port +*/ + +// isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetUserResponseGetPortAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetUserResponseGetPortArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetUserResponseGetPortRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetUserResponseGetPortAttributeTypeOk(arg GetUserResponseGetPortAttributeType) (ret GetUserResponseGetPortRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetUserResponseGetPortAttributeType(arg *GetUserResponseGetPortAttributeType, val GetUserResponseGetPortRetType) { + *arg = &val +} + +/* + types and functions for roles +*/ + +// isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetUserResponseGetRolesAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetUserResponseGetRolesArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetUserResponseGetRolesRetType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetUserResponseGetRolesAttributeTypeOk(arg GetUserResponseGetRolesAttributeType) (ret GetUserResponseGetRolesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetUserResponseGetRolesAttributeType(arg *GetUserResponseGetRolesAttributeType, val GetUserResponseGetRolesRetType) { + *arg = &val +} + +/* + types and functions for status +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetUserResponseGetStatusAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetUserResponseGetStatusAttributeTypeOk(arg GetUserResponseGetStatusAttributeType) (ret GetUserResponseGetStatusRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetUserResponseGetStatusAttributeType(arg *GetUserResponseGetStatusAttributeType, val GetUserResponseGetStatusRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetUserResponseGetStatusArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetUserResponseGetStatusRetType = string + +/* + types and functions for username +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetUserResponseGetUsernameAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getGetUserResponseGetUsernameAttributeTypeOk(arg GetUserResponseGetUsernameAttributeType) (ret GetUserResponseGetUsernameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setGetUserResponseGetUsernameAttributeType(arg *GetUserResponseGetUsernameAttributeType, val GetUserResponseGetUsernameRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetUserResponseGetUsernameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type GetUserResponseGetUsernameRetType = string + // GetUserResponse struct for GetUserResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetUserResponse struct { - Item GetUserResponseGetItemAttributeType `json:"item,omitempty"` + // The default database for a user of the instance. + // REQUIRED + DefaultDatabase GetUserResponseGetDefaultDatabaseAttributeType `json:"default_database" required:"true"` + // The host of the instance in which the user belongs to. + // REQUIRED + Host GetUserResponseGetHostAttributeType `json:"host" required:"true"` + // The ID of the user. + // REQUIRED + Id GetUserResponseGetIdAttributeType `json:"id" required:"true"` + // The port of the instance in which the user belongs to. + // Can be cast to int32 without loss of precision. + // REQUIRED + Port GetUserResponseGetPortAttributeType `json:"port" required:"true"` + // A list of user roles. + // REQUIRED + Roles GetUserResponseGetRolesAttributeType `json:"roles" required:"true"` + // The current status of the user. + // REQUIRED + Status GetUserResponseGetStatusAttributeType `json:"status" required:"true"` + // The name of the user. + // REQUIRED + Username GetUserResponseGetUsernameAttributeType `json:"username" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _GetUserResponse GetUserResponse + // NewGetUserResponse instantiates a new GetUserResponse 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 NewGetUserResponse() *GetUserResponse { +func NewGetUserResponse(defaultDatabase GetUserResponseGetDefaultDatabaseArgType, host GetUserResponseGetHostArgType, id GetUserResponseGetIdArgType, port GetUserResponseGetPortArgType, roles GetUserResponseGetRolesArgType, status GetUserResponseGetStatusArgType, username GetUserResponseGetUsernameArgType) *GetUserResponse { this := GetUserResponse{} + setGetUserResponseGetDefaultDatabaseAttributeType(&this.DefaultDatabase, defaultDatabase) + setGetUserResponseGetHostAttributeType(&this.Host, host) + setGetUserResponseGetIdAttributeType(&this.Id, id) + setGetUserResponseGetPortAttributeType(&this.Port, port) + setGetUserResponseGetRolesAttributeType(&this.Roles, roles) + setGetUserResponseGetStatusAttributeType(&this.Status, status) + setGetUserResponseGetUsernameAttributeType(&this.Username, username) return &this } @@ -70,38 +263,169 @@ func NewGetUserResponseWithDefaults() *GetUserResponse { return &this } -// GetItem returns the Item field value if set, zero value otherwise. +// GetDefaultDatabase returns the DefaultDatabase field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetUserResponse) GetDefaultDatabase() (ret GetUserResponseGetDefaultDatabaseRetType) { + ret, _ = o.GetDefaultDatabaseOk() + return ret +} + +// GetDefaultDatabaseOk returns a tuple with the DefaultDatabase 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 *GetUserResponse) GetDefaultDatabaseOk() (ret GetUserResponseGetDefaultDatabaseRetType, ok bool) { + return getGetUserResponseGetDefaultDatabaseAttributeTypeOk(o.DefaultDatabase) +} + +// SetDefaultDatabase sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetUserResponse) SetDefaultDatabase(v GetUserResponseGetDefaultDatabaseRetType) { + setGetUserResponseGetDefaultDatabaseAttributeType(&o.DefaultDatabase, v) +} + +// GetHost returns the Host field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetUserResponse) GetHost() (ret GetUserResponseGetHostRetType) { + ret, _ = o.GetHostOk() + return ret +} + +// GetHostOk returns a tuple with the Host field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetUserResponse) GetHostOk() (ret GetUserResponseGetHostRetType, ok bool) { + return getGetUserResponseGetHostAttributeTypeOk(o.Host) +} + +// SetHost sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetUserResponse) GetItem() (res GetUserResponseGetItemRetType) { - res, _ = o.GetItemOk() - return +func (o *GetUserResponse) SetHost(v GetUserResponseGetHostRetType) { + setGetUserResponseGetHostAttributeType(&o.Host, v) } -// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// 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 *GetUserResponse) GetId() (ret GetUserResponseGetIdRetType) { + ret, _ = o.GetIdOk() + return ret +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetUserResponse) GetIdOk() (ret GetUserResponseGetIdRetType, ok bool) { + return getGetUserResponseGetIdAttributeTypeOk(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 *GetUserResponse) SetId(v GetUserResponseGetIdRetType) { + setGetUserResponseGetIdAttributeType(&o.Id, v) +} + +// GetPort returns the Port field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetUserResponse) GetPort() (ret GetUserResponseGetPortRetType) { + ret, _ = o.GetPortOk() + return ret +} + +// GetPortOk returns a tuple with the Port 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 *GetUserResponse) GetPortOk() (ret GetUserResponseGetPortRetType, ok bool) { + return getGetUserResponseGetPortAttributeTypeOk(o.Port) +} + +// SetPort sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetUserResponse) SetPort(v GetUserResponseGetPortRetType) { + setGetUserResponseGetPortAttributeType(&o.Port, v) +} + +// GetRoles returns the Roles field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetUserResponse) GetRoles() (ret GetUserResponseGetRolesRetType) { + ret, _ = o.GetRolesOk() + return ret +} + +// GetRolesOk returns a tuple with the Roles 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 *GetUserResponse) GetItemOk() (ret GetUserResponseGetItemRetType, ok bool) { - return getGetUserResponseGetItemAttributeTypeOk(o.Item) +func (o *GetUserResponse) GetRolesOk() (ret GetUserResponseGetRolesRetType, ok bool) { + return getGetUserResponseGetRolesAttributeTypeOk(o.Roles) } -// HasItem returns a boolean if a field has been set. +// SetRoles sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetUserResponse) HasItem() bool { - _, ok := o.GetItemOk() - return ok +func (o *GetUserResponse) SetRoles(v GetUserResponseGetRolesRetType) { + setGetUserResponseGetRolesAttributeType(&o.Roles, v) } -// SetItem gets a reference to the given UserResponseUser and assigns it to the Item field. +// GetStatus returns the Status field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *GetUserResponse) SetItem(v GetUserResponseGetItemRetType) { - setGetUserResponseGetItemAttributeType(&o.Item, v) +func (o *GetUserResponse) GetStatus() (ret GetUserResponseGetStatusRetType) { + ret, _ = o.GetStatusOk() + return ret +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetUserResponse) GetStatusOk() (ret GetUserResponseGetStatusRetType, ok bool) { + return getGetUserResponseGetStatusAttributeTypeOk(o.Status) +} + +// SetStatus sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetUserResponse) SetStatus(v GetUserResponseGetStatusRetType) { + setGetUserResponseGetStatusAttributeType(&o.Status, v) +} + +// GetUsername returns the Username field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetUserResponse) GetUsername() (ret GetUserResponseGetUsernameRetType) { + ret, _ = o.GetUsernameOk() + return ret +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetUserResponse) GetUsernameOk() (ret GetUserResponseGetUsernameRetType, ok bool) { + return getGetUserResponseGetUsernameAttributeTypeOk(o.Username) +} + +// SetUsername sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *GetUserResponse) SetUsername(v GetUserResponseGetUsernameRetType) { + setGetUserResponseGetUsernameAttributeType(&o.Username, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o GetUserResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getGetUserResponseGetItemAttributeTypeOk(o.Item); ok { - toSerialize["Item"] = val + if val, ok := getGetUserResponseGetDefaultDatabaseAttributeTypeOk(o.DefaultDatabase); ok { + toSerialize["DefaultDatabase"] = val + } + if val, ok := getGetUserResponseGetHostAttributeTypeOk(o.Host); ok { + toSerialize["Host"] = val + } + if val, ok := getGetUserResponseGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getGetUserResponseGetPortAttributeTypeOk(o.Port); ok { + toSerialize["Port"] = val + } + if val, ok := getGetUserResponseGetRolesAttributeTypeOk(o.Roles); ok { + toSerialize["Roles"] = val + } + if val, ok := getGetUserResponseGetStatusAttributeTypeOk(o.Status); ok { + toSerialize["Status"] = val + } + if val, ok := getGetUserResponseGetUsernameAttributeTypeOk(o.Username); ok { + toSerialize["Username"] = val } return toSerialize, nil } diff --git a/services/sqlserverflex/model_get_user_response_test.go b/services/sqlserverflex/model_get_user_response_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_get_user_response_test.go +++ b/services/sqlserverflex/model_get_user_response_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_host_metric.go b/services/sqlserverflex/model_host_metric.go deleted file mode 100644 index 5bfb61b31..000000000 --- a/services/sqlserverflex/model_host_metric.go +++ /dev/null @@ -1,267 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package sqlserverflex - -import ( - "encoding/json" -) - -// checks if the HostMetric type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HostMetric{} - -/* - types and functions for datapoints -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HostMetricGetDatapointsAttributeType = *[]DataPoint - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HostMetricGetDatapointsArgType = []DataPoint - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HostMetricGetDatapointsRetType = []DataPoint - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getHostMetricGetDatapointsAttributeTypeOk(arg HostMetricGetDatapointsAttributeType) (ret HostMetricGetDatapointsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setHostMetricGetDatapointsAttributeType(arg *HostMetricGetDatapointsAttributeType, val HostMetricGetDatapointsRetType) { - *arg = &val -} - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HostMetricGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getHostMetricGetNameAttributeTypeOk(arg HostMetricGetNameAttributeType) (ret HostMetricGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setHostMetricGetNameAttributeType(arg *HostMetricGetNameAttributeType, val HostMetricGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HostMetricGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HostMetricGetNameRetType = string - -/* - types and functions for units -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HostMetricGetUnitsAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getHostMetricGetUnitsAttributeTypeOk(arg HostMetricGetUnitsAttributeType) (ret HostMetricGetUnitsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setHostMetricGetUnitsAttributeType(arg *HostMetricGetUnitsAttributeType, val HostMetricGetUnitsRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HostMetricGetUnitsArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HostMetricGetUnitsRetType = string - -// HostMetric struct for HostMetric -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type HostMetric struct { - Datapoints HostMetricGetDatapointsAttributeType `json:"datapoints,omitempty"` - Name HostMetricGetNameAttributeType `json:"name,omitempty"` - Units HostMetricGetUnitsAttributeType `json:"units,omitempty"` -} - -// NewHostMetric instantiates a new HostMetric 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 NewHostMetric() *HostMetric { - this := HostMetric{} - return &this -} - -// NewHostMetricWithDefaults instantiates a new HostMetric 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 NewHostMetricWithDefaults() *HostMetric { - this := HostMetric{} - return &this -} - -// GetDatapoints returns the Datapoints 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 *HostMetric) GetDatapoints() (res HostMetricGetDatapointsRetType) { - res, _ = o.GetDatapointsOk() - return -} - -// GetDatapointsOk returns a tuple with the Datapoints 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 *HostMetric) GetDatapointsOk() (ret HostMetricGetDatapointsRetType, ok bool) { - return getHostMetricGetDatapointsAttributeTypeOk(o.Datapoints) -} - -// HasDatapoints 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 *HostMetric) HasDatapoints() bool { - _, ok := o.GetDatapointsOk() - return ok -} - -// SetDatapoints gets a reference to the given []DataPoint and assigns it to the Datapoints field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HostMetric) SetDatapoints(v HostMetricGetDatapointsRetType) { - setHostMetricGetDatapointsAttributeType(&o.Datapoints, v) -} - -// GetName returns the Name 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 *HostMetric) GetName() (res HostMetricGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *HostMetric) GetNameOk() (ret HostMetricGetNameRetType, ok bool) { - return getHostMetricGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *HostMetric) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HostMetric) SetName(v HostMetricGetNameRetType) { - setHostMetricGetNameAttributeType(&o.Name, v) -} - -// GetUnits returns the Units 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 *HostMetric) GetUnits() (res HostMetricGetUnitsRetType) { - res, _ = o.GetUnitsOk() - return -} - -// GetUnitsOk returns a tuple with the Units 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 *HostMetric) GetUnitsOk() (ret HostMetricGetUnitsRetType, ok bool) { - return getHostMetricGetUnitsAttributeTypeOk(o.Units) -} - -// HasUnits 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 *HostMetric) HasUnits() bool { - _, ok := o.GetUnitsOk() - return ok -} - -// SetUnits gets a reference to the given string and assigns it to the Units field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *HostMetric) SetUnits(v HostMetricGetUnitsRetType) { - setHostMetricGetUnitsAttributeType(&o.Units, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o HostMetric) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getHostMetricGetDatapointsAttributeTypeOk(o.Datapoints); ok { - toSerialize["Datapoints"] = val - } - if val, ok := getHostMetricGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getHostMetricGetUnitsAttributeTypeOk(o.Units); ok { - toSerialize["Units"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableHostMetric struct { - value *HostMetric - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableHostMetric) Get() *HostMetric { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableHostMetric) Set(val *HostMetric) { - 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 NullableHostMetric) 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 *NullableHostMetric) 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 NewNullableHostMetric(val *HostMetric) *NullableHostMetric { - return &NullableHostMetric{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 NullableHostMetric) 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 *NullableHostMetric) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/sqlserverflex/model_host_metric_test.go b/services/sqlserverflex/model_host_metric_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_host_metric_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_host_test.go b/services/sqlserverflex/model_host_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_host_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_instance.go b/services/sqlserverflex/model_instance.go deleted file mode 100644 index 1d6957920..000000000 --- a/services/sqlserverflex/model_instance.go +++ /dev/null @@ -1,674 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package sqlserverflex - -import ( - "encoding/json" -) - -// checks if the Instance type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Instance{} - -/* - types and functions for acl -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetAclAttributeType = *ACL - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetAclArgType = ACL - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetAclRetType = ACL - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceGetAclAttributeTypeOk(arg InstanceGetAclAttributeType) (ret InstanceGetAclRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceGetAclAttributeType(arg *InstanceGetAclAttributeType, val InstanceGetAclRetType) { - *arg = &val -} - -/* - types and functions for backupSchedule -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetBackupScheduleAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceGetBackupScheduleAttributeTypeOk(arg InstanceGetBackupScheduleAttributeType) (ret InstanceGetBackupScheduleRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceGetBackupScheduleAttributeType(arg *InstanceGetBackupScheduleAttributeType, val InstanceGetBackupScheduleRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetBackupScheduleArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetBackupScheduleRetType = string - -/* - types and functions for flavor -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetFlavorAttributeType = *Flavor - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetFlavorArgType = Flavor - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetFlavorRetType = Flavor - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceGetFlavorAttributeTypeOk(arg InstanceGetFlavorAttributeType) (ret InstanceGetFlavorRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceGetFlavorAttributeType(arg *InstanceGetFlavorAttributeType, val InstanceGetFlavorRetType) { - *arg = &val -} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceGetIdAttributeTypeOk(arg InstanceGetIdAttributeType) (ret InstanceGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceGetIdAttributeType(arg *InstanceGetIdAttributeType, val InstanceGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetIdRetType = string - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceGetNameAttributeTypeOk(arg InstanceGetNameAttributeType) (ret InstanceGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceGetNameAttributeType(arg *InstanceGetNameAttributeType, val InstanceGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetNameRetType = string - -/* - types and functions for options -*/ - -// isContainer -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetOptionsAttributeType = *map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetOptionsArgType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetOptionsRetType = map[string]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceGetOptionsAttributeTypeOk(arg InstanceGetOptionsAttributeType) (ret InstanceGetOptionsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceGetOptionsAttributeType(arg *InstanceGetOptionsAttributeType, val InstanceGetOptionsRetType) { - *arg = &val -} - -/* - types and functions for replicas -*/ - -// isInteger -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetReplicasAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetReplicasArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetReplicasRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceGetReplicasAttributeTypeOk(arg InstanceGetReplicasAttributeType) (ret InstanceGetReplicasRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceGetReplicasAttributeType(arg *InstanceGetReplicasAttributeType, val InstanceGetReplicasRetType) { - *arg = &val -} - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceGetStatusAttributeTypeOk(arg InstanceGetStatusAttributeType) (ret InstanceGetStatusRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceGetStatusAttributeType(arg *InstanceGetStatusAttributeType, val InstanceGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetStatusRetType = string - -/* - types and functions for storage -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetStorageAttributeType = *Storage - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetStorageArgType = Storage - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetStorageRetType = Storage - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceGetStorageAttributeTypeOk(arg InstanceGetStorageAttributeType) (ret InstanceGetStorageRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceGetStorageAttributeType(arg *InstanceGetStorageAttributeType, val InstanceGetStorageRetType) { - *arg = &val -} - -/* - types and functions for version -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetVersionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceGetVersionAttributeTypeOk(arg InstanceGetVersionAttributeType) (ret InstanceGetVersionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceGetVersionAttributeType(arg *InstanceGetVersionAttributeType, val InstanceGetVersionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetVersionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceGetVersionRetType = string - -// Instance struct for Instance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Instance struct { - Acl InstanceGetAclAttributeType `json:"acl,omitempty"` - BackupSchedule InstanceGetBackupScheduleAttributeType `json:"backupSchedule,omitempty"` - Flavor InstanceGetFlavorAttributeType `json:"flavor,omitempty"` - Id InstanceGetIdAttributeType `json:"id,omitempty"` - Name InstanceGetNameAttributeType `json:"name,omitempty"` - Options InstanceGetOptionsAttributeType `json:"options,omitempty"` - // Can be cast to int32 without loss of precision. - Replicas InstanceGetReplicasAttributeType `json:"replicas,omitempty"` - Status InstanceGetStatusAttributeType `json:"status,omitempty"` - Storage InstanceGetStorageAttributeType `json:"storage,omitempty"` - Version InstanceGetVersionAttributeType `json:"version,omitempty"` -} - -// NewInstance instantiates a new Instance 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 NewInstance() *Instance { - this := Instance{} - return &this -} - -// NewInstanceWithDefaults instantiates a new Instance 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 NewInstanceWithDefaults() *Instance { - this := Instance{} - return &this -} - -// GetAcl returns the Acl 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 *Instance) GetAcl() (res InstanceGetAclRetType) { - res, _ = o.GetAclOk() - return -} - -// GetAclOk returns a tuple with the Acl 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 *Instance) GetAclOk() (ret InstanceGetAclRetType, ok bool) { - return getInstanceGetAclAttributeTypeOk(o.Acl) -} - -// HasAcl 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 *Instance) HasAcl() bool { - _, ok := o.GetAclOk() - return ok -} - -// SetAcl gets a reference to the given ACL and assigns it to the Acl field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) SetAcl(v InstanceGetAclRetType) { - setInstanceGetAclAttributeType(&o.Acl, v) -} - -// GetBackupSchedule returns the BackupSchedule 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 *Instance) GetBackupSchedule() (res InstanceGetBackupScheduleRetType) { - res, _ = o.GetBackupScheduleOk() - return -} - -// GetBackupScheduleOk returns a tuple with the BackupSchedule 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 *Instance) GetBackupScheduleOk() (ret InstanceGetBackupScheduleRetType, ok bool) { - return getInstanceGetBackupScheduleAttributeTypeOk(o.BackupSchedule) -} - -// HasBackupSchedule 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 *Instance) HasBackupSchedule() bool { - _, ok := o.GetBackupScheduleOk() - return ok -} - -// SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) SetBackupSchedule(v InstanceGetBackupScheduleRetType) { - setInstanceGetBackupScheduleAttributeType(&o.BackupSchedule, v) -} - -// GetFlavor returns the Flavor 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 *Instance) GetFlavor() (res InstanceGetFlavorRetType) { - res, _ = o.GetFlavorOk() - return -} - -// GetFlavorOk returns a tuple with the Flavor 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 *Instance) GetFlavorOk() (ret InstanceGetFlavorRetType, ok bool) { - return getInstanceGetFlavorAttributeTypeOk(o.Flavor) -} - -// HasFlavor 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 *Instance) HasFlavor() bool { - _, ok := o.GetFlavorOk() - return ok -} - -// SetFlavor gets a reference to the given Flavor and assigns it to the Flavor field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) SetFlavor(v InstanceGetFlavorRetType) { - setInstanceGetFlavorAttributeType(&o.Flavor, v) -} - -// GetId returns the Id 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 *Instance) GetId() (res InstanceGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *Instance) GetIdOk() (ret InstanceGetIdRetType, ok bool) { - return getInstanceGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *Instance) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) SetId(v InstanceGetIdRetType) { - setInstanceGetIdAttributeType(&o.Id, v) -} - -// GetName returns the Name 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 *Instance) GetName() (res InstanceGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *Instance) GetNameOk() (ret InstanceGetNameRetType, ok bool) { - return getInstanceGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *Instance) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) SetName(v InstanceGetNameRetType) { - setInstanceGetNameAttributeType(&o.Name, v) -} - -// GetOptions returns the Options 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 *Instance) GetOptions() (res InstanceGetOptionsRetType) { - res, _ = o.GetOptionsOk() - return -} - -// GetOptionsOk returns a tuple with the Options 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 *Instance) GetOptionsOk() (ret InstanceGetOptionsRetType, ok bool) { - return getInstanceGetOptionsAttributeTypeOk(o.Options) -} - -// HasOptions 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 *Instance) HasOptions() bool { - _, ok := o.GetOptionsOk() - return ok -} - -// SetOptions gets a reference to the given map[string]string and assigns it to the Options field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) SetOptions(v InstanceGetOptionsRetType) { - setInstanceGetOptionsAttributeType(&o.Options, v) -} - -// GetReplicas returns the Replicas 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 *Instance) GetReplicas() (res InstanceGetReplicasRetType) { - res, _ = o.GetReplicasOk() - return -} - -// GetReplicasOk returns a tuple with the Replicas 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 *Instance) GetReplicasOk() (ret InstanceGetReplicasRetType, ok bool) { - return getInstanceGetReplicasAttributeTypeOk(o.Replicas) -} - -// HasReplicas 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 *Instance) HasReplicas() bool { - _, ok := o.GetReplicasOk() - return ok -} - -// SetReplicas gets a reference to the given int64 and assigns it to the Replicas field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) SetReplicas(v InstanceGetReplicasRetType) { - setInstanceGetReplicasAttributeType(&o.Replicas, 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 *Instance) GetStatus() (res InstanceGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) GetStatusOk() (ret InstanceGetStatusRetType, ok bool) { - return getInstanceGetStatusAttributeTypeOk(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 *Instance) HasStatus() bool { - _, ok := o.GetStatusOk() - return ok -} - -// SetStatus gets a reference to the given string 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 *Instance) SetStatus(v InstanceGetStatusRetType) { - setInstanceGetStatusAttributeType(&o.Status, v) -} - -// GetStorage returns the Storage 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 *Instance) GetStorage() (res InstanceGetStorageRetType) { - res, _ = o.GetStorageOk() - return -} - -// GetStorageOk returns a tuple with the Storage 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 *Instance) GetStorageOk() (ret InstanceGetStorageRetType, ok bool) { - return getInstanceGetStorageAttributeTypeOk(o.Storage) -} - -// HasStorage 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 *Instance) HasStorage() bool { - _, ok := o.GetStorageOk() - return ok -} - -// SetStorage gets a reference to the given Storage and assigns it to the Storage field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) SetStorage(v InstanceGetStorageRetType) { - setInstanceGetStorageAttributeType(&o.Storage, v) -} - -// GetVersion returns the Version 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 *Instance) GetVersion() (res InstanceGetVersionRetType) { - res, _ = o.GetVersionOk() - return -} - -// GetVersionOk returns a tuple with the Version 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 *Instance) GetVersionOk() (ret InstanceGetVersionRetType, ok bool) { - return getInstanceGetVersionAttributeTypeOk(o.Version) -} - -// HasVersion 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 *Instance) HasVersion() bool { - _, ok := o.GetVersionOk() - return ok -} - -// SetVersion gets a reference to the given string and assigns it to the Version field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Instance) SetVersion(v InstanceGetVersionRetType) { - setInstanceGetVersionAttributeType(&o.Version, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Instance) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getInstanceGetAclAttributeTypeOk(o.Acl); ok { - toSerialize["Acl"] = val - } - if val, ok := getInstanceGetBackupScheduleAttributeTypeOk(o.BackupSchedule); ok { - toSerialize["BackupSchedule"] = val - } - if val, ok := getInstanceGetFlavorAttributeTypeOk(o.Flavor); ok { - toSerialize["Flavor"] = val - } - if val, ok := getInstanceGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getInstanceGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getInstanceGetOptionsAttributeTypeOk(o.Options); ok { - toSerialize["Options"] = val - } - if val, ok := getInstanceGetReplicasAttributeTypeOk(o.Replicas); ok { - toSerialize["Replicas"] = val - } - if val, ok := getInstanceGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - if val, ok := getInstanceGetStorageAttributeTypeOk(o.Storage); ok { - toSerialize["Storage"] = val - } - if val, ok := getInstanceGetVersionAttributeTypeOk(o.Version); ok { - toSerialize["Version"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableInstance struct { - value *Instance - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInstance) Get() *Instance { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInstance) Set(val *Instance) { - 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 NullableInstance) 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 *NullableInstance) 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 NewNullableInstance(val *Instance) *NullableInstance { - return &NullableInstance{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 NullableInstance) 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 *NullableInstance) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/sqlserverflex/model_instance_documentation_acl.go b/services/sqlserverflex/model_instance_documentation_acl.go deleted file mode 100644 index 7704ac6dc..000000000 --- a/services/sqlserverflex/model_instance_documentation_acl.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package sqlserverflex - -import ( - "encoding/json" -) - -// checks if the InstanceDocumentationACL type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InstanceDocumentationACL{} - -/* - types and functions for items -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceDocumentationACLGetItemsAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceDocumentationACLGetItemsArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceDocumentationACLGetItemsRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceDocumentationACLGetItemsAttributeTypeOk(arg InstanceDocumentationACLGetItemsAttributeType) (ret InstanceDocumentationACLGetItemsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceDocumentationACLGetItemsAttributeType(arg *InstanceDocumentationACLGetItemsAttributeType, val InstanceDocumentationACLGetItemsRetType) { - *arg = &val -} - -// InstanceDocumentationACL struct for InstanceDocumentationACL -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceDocumentationACL struct { - // a simple list with IP addresses with CIDR. - Items InstanceDocumentationACLGetItemsAttributeType `json:"items,omitempty"` -} - -// NewInstanceDocumentationACL instantiates a new InstanceDocumentationACL 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 NewInstanceDocumentationACL() *InstanceDocumentationACL { - this := InstanceDocumentationACL{} - return &this -} - -// NewInstanceDocumentationACLWithDefaults instantiates a new InstanceDocumentationACL 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 NewInstanceDocumentationACLWithDefaults() *InstanceDocumentationACL { - this := InstanceDocumentationACL{} - return &this -} - -// 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 *InstanceDocumentationACL) GetItems() (res InstanceDocumentationACLGetItemsRetType) { - res, _ = o.GetItemsOk() - return -} - -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceDocumentationACL) GetItemsOk() (ret InstanceDocumentationACLGetItemsRetType, ok bool) { - return getInstanceDocumentationACLGetItemsAttributeTypeOk(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 *InstanceDocumentationACL) HasItems() bool { - _, ok := o.GetItemsOk() - return ok -} - -// SetItems gets a reference to the given []string 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 *InstanceDocumentationACL) SetItems(v InstanceDocumentationACLGetItemsRetType) { - setInstanceDocumentationACLGetItemsAttributeType(&o.Items, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o InstanceDocumentationACL) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getInstanceDocumentationACLGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableInstanceDocumentationACL struct { - value *InstanceDocumentationACL - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInstanceDocumentationACL) Get() *InstanceDocumentationACL { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInstanceDocumentationACL) Set(val *InstanceDocumentationACL) { - 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 NullableInstanceDocumentationACL) 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 *NullableInstanceDocumentationACL) 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 NewNullableInstanceDocumentationACL(val *InstanceDocumentationACL) *NullableInstanceDocumentationACL { - return &NullableInstanceDocumentationACL{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 NullableInstanceDocumentationACL) 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 *NullableInstanceDocumentationACL) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/sqlserverflex/model_instance_documentation_acl_test.go b/services/sqlserverflex/model_instance_documentation_acl_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_instance_documentation_acl_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_instance_documentation_options.go b/services/sqlserverflex/model_instance_documentation_options.go deleted file mode 100644 index cc807af1e..000000000 --- a/services/sqlserverflex/model_instance_documentation_options.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package sqlserverflex - -import ( - "encoding/json" -) - -// checks if the InstanceDocumentationOptions type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InstanceDocumentationOptions{} - -/* - types and functions for edition -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceDocumentationOptionsGetEditionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceDocumentationOptionsGetEditionAttributeTypeOk(arg InstanceDocumentationOptionsGetEditionAttributeType) (ret InstanceDocumentationOptionsGetEditionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceDocumentationOptionsGetEditionAttributeType(arg *InstanceDocumentationOptionsGetEditionAttributeType, val InstanceDocumentationOptionsGetEditionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceDocumentationOptionsGetEditionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceDocumentationOptionsGetEditionRetType = string - -/* - types and functions for retentionDays -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceDocumentationOptionsGetRetentionDaysAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceDocumentationOptionsGetRetentionDaysAttributeTypeOk(arg InstanceDocumentationOptionsGetRetentionDaysAttributeType) (ret InstanceDocumentationOptionsGetRetentionDaysRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceDocumentationOptionsGetRetentionDaysAttributeType(arg *InstanceDocumentationOptionsGetRetentionDaysAttributeType, val InstanceDocumentationOptionsGetRetentionDaysRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceDocumentationOptionsGetRetentionDaysArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceDocumentationOptionsGetRetentionDaysRetType = string - -// InstanceDocumentationOptions struct for InstanceDocumentationOptions -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceDocumentationOptions struct { - // Edition of the MSSQL server instance - Edition InstanceDocumentationOptionsGetEditionAttributeType `json:"edition,omitempty"` - // The days for how long the backup files should be stored before cleaned up. 30 to 365 - RetentionDays InstanceDocumentationOptionsGetRetentionDaysAttributeType `json:"retentionDays,omitempty"` -} - -// NewInstanceDocumentationOptions instantiates a new InstanceDocumentationOptions 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 NewInstanceDocumentationOptions() *InstanceDocumentationOptions { - this := InstanceDocumentationOptions{} - return &this -} - -// NewInstanceDocumentationOptionsWithDefaults instantiates a new InstanceDocumentationOptions 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 NewInstanceDocumentationOptionsWithDefaults() *InstanceDocumentationOptions { - this := InstanceDocumentationOptions{} - var edition string = "developer" - this.Edition = &edition - var retentionDays string = "32" - this.RetentionDays = &retentionDays - return &this -} - -// GetEdition returns the Edition 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 *InstanceDocumentationOptions) GetEdition() (res InstanceDocumentationOptionsGetEditionRetType) { - res, _ = o.GetEditionOk() - return -} - -// GetEditionOk returns a tuple with the Edition 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 *InstanceDocumentationOptions) GetEditionOk() (ret InstanceDocumentationOptionsGetEditionRetType, ok bool) { - return getInstanceDocumentationOptionsGetEditionAttributeTypeOk(o.Edition) -} - -// HasEdition 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 *InstanceDocumentationOptions) HasEdition() bool { - _, ok := o.GetEditionOk() - return ok -} - -// SetEdition gets a reference to the given string and assigns it to the Edition field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceDocumentationOptions) SetEdition(v InstanceDocumentationOptionsGetEditionRetType) { - setInstanceDocumentationOptionsGetEditionAttributeType(&o.Edition, v) -} - -// GetRetentionDays returns the RetentionDays 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 *InstanceDocumentationOptions) GetRetentionDays() (res InstanceDocumentationOptionsGetRetentionDaysRetType) { - res, _ = o.GetRetentionDaysOk() - return -} - -// GetRetentionDaysOk returns a tuple with the RetentionDays 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 *InstanceDocumentationOptions) GetRetentionDaysOk() (ret InstanceDocumentationOptionsGetRetentionDaysRetType, ok bool) { - return getInstanceDocumentationOptionsGetRetentionDaysAttributeTypeOk(o.RetentionDays) -} - -// HasRetentionDays 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 *InstanceDocumentationOptions) HasRetentionDays() bool { - _, ok := o.GetRetentionDaysOk() - return ok -} - -// SetRetentionDays gets a reference to the given string and assigns it to the RetentionDays field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceDocumentationOptions) SetRetentionDays(v InstanceDocumentationOptionsGetRetentionDaysRetType) { - setInstanceDocumentationOptionsGetRetentionDaysAttributeType(&o.RetentionDays, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o InstanceDocumentationOptions) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getInstanceDocumentationOptionsGetEditionAttributeTypeOk(o.Edition); ok { - toSerialize["Edition"] = val - } - if val, ok := getInstanceDocumentationOptionsGetRetentionDaysAttributeTypeOk(o.RetentionDays); ok { - toSerialize["RetentionDays"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableInstanceDocumentationOptions struct { - value *InstanceDocumentationOptions - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInstanceDocumentationOptions) Get() *InstanceDocumentationOptions { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInstanceDocumentationOptions) Set(val *InstanceDocumentationOptions) { - 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 NullableInstanceDocumentationOptions) 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 *NullableInstanceDocumentationOptions) 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 NewNullableInstanceDocumentationOptions(val *InstanceDocumentationOptions) *NullableInstanceDocumentationOptions { - return &NullableInstanceDocumentationOptions{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 NullableInstanceDocumentationOptions) 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 *NullableInstanceDocumentationOptions) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/sqlserverflex/model_instance_documentation_options_test.go b/services/sqlserverflex/model_instance_documentation_options_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_instance_documentation_options_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_instance_documentation_storage.go b/services/sqlserverflex/model_instance_documentation_storage.go deleted file mode 100644 index 039ef8a15..000000000 --- a/services/sqlserverflex/model_instance_documentation_storage.go +++ /dev/null @@ -1,213 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package sqlserverflex - -import ( - "encoding/json" -) - -// checks if the InstanceDocumentationStorage type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InstanceDocumentationStorage{} - -/* - types and functions for class -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceDocumentationStorageGetClassAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceDocumentationStorageGetClassAttributeTypeOk(arg InstanceDocumentationStorageGetClassAttributeType) (ret InstanceDocumentationStorageGetClassRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceDocumentationStorageGetClassAttributeType(arg *InstanceDocumentationStorageGetClassAttributeType, val InstanceDocumentationStorageGetClassRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceDocumentationStorageGetClassArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceDocumentationStorageGetClassRetType = string - -/* - types and functions for size -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceDocumentationStorageGetSizeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceDocumentationStorageGetSizeArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceDocumentationStorageGetSizeRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceDocumentationStorageGetSizeAttributeTypeOk(arg InstanceDocumentationStorageGetSizeAttributeType) (ret InstanceDocumentationStorageGetSizeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceDocumentationStorageGetSizeAttributeType(arg *InstanceDocumentationStorageGetSizeAttributeType, val InstanceDocumentationStorageGetSizeRetType) { - *arg = &val -} - -// InstanceDocumentationStorage struct for InstanceDocumentationStorage -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceDocumentationStorage struct { - // Class of the instance. - Class InstanceDocumentationStorageGetClassAttributeType `json:"class,omitempty"` - // Size of the instance storage in GB - Size InstanceDocumentationStorageGetSizeAttributeType `json:"size,omitempty"` -} - -// NewInstanceDocumentationStorage instantiates a new InstanceDocumentationStorage 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 NewInstanceDocumentationStorage() *InstanceDocumentationStorage { - this := InstanceDocumentationStorage{} - return &this -} - -// NewInstanceDocumentationStorageWithDefaults instantiates a new InstanceDocumentationStorage 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 NewInstanceDocumentationStorageWithDefaults() *InstanceDocumentationStorage { - this := InstanceDocumentationStorage{} - var class string = "premium-perf12-stackit" - this.Class = &class - return &this -} - -// GetClass returns the Class 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 *InstanceDocumentationStorage) GetClass() (res InstanceDocumentationStorageGetClassRetType) { - res, _ = o.GetClassOk() - return -} - -// GetClassOk returns a tuple with the Class 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 *InstanceDocumentationStorage) GetClassOk() (ret InstanceDocumentationStorageGetClassRetType, ok bool) { - return getInstanceDocumentationStorageGetClassAttributeTypeOk(o.Class) -} - -// HasClass 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 *InstanceDocumentationStorage) HasClass() bool { - _, ok := o.GetClassOk() - return ok -} - -// SetClass gets a reference to the given string and assigns it to the Class field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceDocumentationStorage) SetClass(v InstanceDocumentationStorageGetClassRetType) { - setInstanceDocumentationStorageGetClassAttributeType(&o.Class, v) -} - -// GetSize returns the Size 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 *InstanceDocumentationStorage) GetSize() (res InstanceDocumentationStorageGetSizeRetType) { - res, _ = o.GetSizeOk() - return -} - -// GetSizeOk returns a tuple with the Size 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 *InstanceDocumentationStorage) GetSizeOk() (ret InstanceDocumentationStorageGetSizeRetType, ok bool) { - return getInstanceDocumentationStorageGetSizeAttributeTypeOk(o.Size) -} - -// HasSize 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 *InstanceDocumentationStorage) HasSize() bool { - _, ok := o.GetSizeOk() - return ok -} - -// SetSize gets a reference to the given int64 and assigns it to the Size field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceDocumentationStorage) SetSize(v InstanceDocumentationStorageGetSizeRetType) { - setInstanceDocumentationStorageGetSizeAttributeType(&o.Size, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o InstanceDocumentationStorage) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getInstanceDocumentationStorageGetClassAttributeTypeOk(o.Class); ok { - toSerialize["Class"] = val - } - if val, ok := getInstanceDocumentationStorageGetSizeAttributeTypeOk(o.Size); ok { - toSerialize["Size"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableInstanceDocumentationStorage struct { - value *InstanceDocumentationStorage - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInstanceDocumentationStorage) Get() *InstanceDocumentationStorage { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInstanceDocumentationStorage) Set(val *InstanceDocumentationStorage) { - 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 NullableInstanceDocumentationStorage) 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 *NullableInstanceDocumentationStorage) 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 NewNullableInstanceDocumentationStorage(val *InstanceDocumentationStorage) *NullableInstanceDocumentationStorage { - return &NullableInstanceDocumentationStorage{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 NullableInstanceDocumentationStorage) 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 *NullableInstanceDocumentationStorage) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/sqlserverflex/model_instance_documentation_storage_test.go b/services/sqlserverflex/model_instance_documentation_storage_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_instance_documentation_storage_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_instance_edition.go b/services/sqlserverflex/model_instance_edition.go new file mode 100644 index 000000000..e6d983cb8 --- /dev/null +++ b/services/sqlserverflex/model_instance_edition.go @@ -0,0 +1,135 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" + "fmt" +) + +// InstanceEdition Edition of the MSSQL server instance +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceEdition string + +// List of instance.edition +const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCEEDITION_STANDARD InstanceEdition = "Standard" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCEEDITION_ENTERPRISE_CORE InstanceEdition = "EnterpriseCore" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCEEDITION_DEVELOPER InstanceEdition = "developer" +) + +// All allowed values of InstanceEdition enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +var AllowedInstanceEditionEnumValues = []InstanceEdition{ + "Standard", + "EnterpriseCore", + "developer", +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *InstanceEdition) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue string + if value == zeroValue { + return nil + } + enumTypeValue := InstanceEdition(value) + for _, existing := range AllowedInstanceEditionEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid InstanceEdition", value) +} + +// NewInstanceEditionFromValue returns a pointer to a valid InstanceEdition +// 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 NewInstanceEditionFromValue(v string) (*InstanceEdition, error) { + ev := InstanceEdition(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for InstanceEdition: valid values are %v", v, AllowedInstanceEditionEnumValues) + } +} + +// 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 InstanceEdition) IsValid() bool { + for _, existing := range AllowedInstanceEditionEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to instance.edition value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v InstanceEdition) Ptr() *InstanceEdition { + return &v +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableInstanceEdition struct { + value *InstanceEdition + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableInstanceEdition) Get() *InstanceEdition { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableInstanceEdition) Set(val *InstanceEdition) { + 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 NullableInstanceEdition) 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 *NullableInstanceEdition) 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 NewNullableInstanceEdition(val *InstanceEdition) *NullableInstanceEdition { + return &NullableInstanceEdition{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 NullableInstanceEdition) 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 *NullableInstanceEdition) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_instance_edition_test.go b/services/sqlserverflex/model_instance_edition_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_instance_edition_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_instance_encryption.go b/services/sqlserverflex/model_instance_encryption.go new file mode 100644 index 000000000..9b5ff21c7 --- /dev/null +++ b/services/sqlserverflex/model_instance_encryption.go @@ -0,0 +1,311 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" +) + +// checks if the InstanceEncryption type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceEncryption{} + +/* + types and functions for kekKeyId +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceEncryptionGetKekKeyIdAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getInstanceEncryptionGetKekKeyIdAttributeTypeOk(arg InstanceEncryptionGetKekKeyIdAttributeType) (ret InstanceEncryptionGetKekKeyIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setInstanceEncryptionGetKekKeyIdAttributeType(arg *InstanceEncryptionGetKekKeyIdAttributeType, val InstanceEncryptionGetKekKeyIdRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceEncryptionGetKekKeyIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceEncryptionGetKekKeyIdRetType = string + +/* + types and functions for kekKeyRingId +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceEncryptionGetKekKeyRingIdAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getInstanceEncryptionGetKekKeyRingIdAttributeTypeOk(arg InstanceEncryptionGetKekKeyRingIdAttributeType) (ret InstanceEncryptionGetKekKeyRingIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setInstanceEncryptionGetKekKeyRingIdAttributeType(arg *InstanceEncryptionGetKekKeyRingIdAttributeType, val InstanceEncryptionGetKekKeyRingIdRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceEncryptionGetKekKeyRingIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceEncryptionGetKekKeyRingIdRetType = string + +/* + types and functions for kekKeyVersion +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceEncryptionGetKekKeyVersionAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getInstanceEncryptionGetKekKeyVersionAttributeTypeOk(arg InstanceEncryptionGetKekKeyVersionAttributeType) (ret InstanceEncryptionGetKekKeyVersionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setInstanceEncryptionGetKekKeyVersionAttributeType(arg *InstanceEncryptionGetKekKeyVersionAttributeType, val InstanceEncryptionGetKekKeyVersionRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceEncryptionGetKekKeyVersionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceEncryptionGetKekKeyVersionRetType = string + +/* + types and functions for serviceAccount +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceEncryptionGetServiceAccountAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getInstanceEncryptionGetServiceAccountAttributeTypeOk(arg InstanceEncryptionGetServiceAccountAttributeType) (ret InstanceEncryptionGetServiceAccountRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setInstanceEncryptionGetServiceAccountAttributeType(arg *InstanceEncryptionGetServiceAccountAttributeType, val InstanceEncryptionGetServiceAccountRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceEncryptionGetServiceAccountArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceEncryptionGetServiceAccountRetType = string + +// InstanceEncryption this defines which key to use for storage encryption +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceEncryption struct { + // The key identifier + // REQUIRED + KekKeyId InstanceEncryptionGetKekKeyIdAttributeType `json:"kekKeyId" required:"true"` + // The keyring identifier + // REQUIRED + KekKeyRingId InstanceEncryptionGetKekKeyRingIdAttributeType `json:"kekKeyRingId" required:"true"` + // The key version + // REQUIRED + KekKeyVersion InstanceEncryptionGetKekKeyVersionAttributeType `json:"kekKeyVersion" required:"true"` + // REQUIRED + ServiceAccount InstanceEncryptionGetServiceAccountAttributeType `json:"serviceAccount" required:"true"` +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _InstanceEncryption InstanceEncryption + +// NewInstanceEncryption instantiates a new InstanceEncryption 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 NewInstanceEncryption(kekKeyId InstanceEncryptionGetKekKeyIdArgType, kekKeyRingId InstanceEncryptionGetKekKeyRingIdArgType, kekKeyVersion InstanceEncryptionGetKekKeyVersionArgType, serviceAccount InstanceEncryptionGetServiceAccountArgType) *InstanceEncryption { + this := InstanceEncryption{} + setInstanceEncryptionGetKekKeyIdAttributeType(&this.KekKeyId, kekKeyId) + setInstanceEncryptionGetKekKeyRingIdAttributeType(&this.KekKeyRingId, kekKeyRingId) + setInstanceEncryptionGetKekKeyVersionAttributeType(&this.KekKeyVersion, kekKeyVersion) + setInstanceEncryptionGetServiceAccountAttributeType(&this.ServiceAccount, serviceAccount) + return &this +} + +// NewInstanceEncryptionWithDefaults instantiates a new InstanceEncryption 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 NewInstanceEncryptionWithDefaults() *InstanceEncryption { + this := InstanceEncryption{} + return &this +} + +// GetKekKeyId returns the KekKeyId field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *InstanceEncryption) GetKekKeyId() (ret InstanceEncryptionGetKekKeyIdRetType) { + ret, _ = o.GetKekKeyIdOk() + return ret +} + +// GetKekKeyIdOk returns a tuple with the KekKeyId 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 *InstanceEncryption) GetKekKeyIdOk() (ret InstanceEncryptionGetKekKeyIdRetType, ok bool) { + return getInstanceEncryptionGetKekKeyIdAttributeTypeOk(o.KekKeyId) +} + +// SetKekKeyId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *InstanceEncryption) SetKekKeyId(v InstanceEncryptionGetKekKeyIdRetType) { + setInstanceEncryptionGetKekKeyIdAttributeType(&o.KekKeyId, v) +} + +// GetKekKeyRingId returns the KekKeyRingId field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *InstanceEncryption) GetKekKeyRingId() (ret InstanceEncryptionGetKekKeyRingIdRetType) { + ret, _ = o.GetKekKeyRingIdOk() + return ret +} + +// GetKekKeyRingIdOk returns a tuple with the KekKeyRingId 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 *InstanceEncryption) GetKekKeyRingIdOk() (ret InstanceEncryptionGetKekKeyRingIdRetType, ok bool) { + return getInstanceEncryptionGetKekKeyRingIdAttributeTypeOk(o.KekKeyRingId) +} + +// SetKekKeyRingId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *InstanceEncryption) SetKekKeyRingId(v InstanceEncryptionGetKekKeyRingIdRetType) { + setInstanceEncryptionGetKekKeyRingIdAttributeType(&o.KekKeyRingId, v) +} + +// GetKekKeyVersion returns the KekKeyVersion field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *InstanceEncryption) GetKekKeyVersion() (ret InstanceEncryptionGetKekKeyVersionRetType) { + ret, _ = o.GetKekKeyVersionOk() + return ret +} + +// GetKekKeyVersionOk returns a tuple with the KekKeyVersion 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 *InstanceEncryption) GetKekKeyVersionOk() (ret InstanceEncryptionGetKekKeyVersionRetType, ok bool) { + return getInstanceEncryptionGetKekKeyVersionAttributeTypeOk(o.KekKeyVersion) +} + +// SetKekKeyVersion sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *InstanceEncryption) SetKekKeyVersion(v InstanceEncryptionGetKekKeyVersionRetType) { + setInstanceEncryptionGetKekKeyVersionAttributeType(&o.KekKeyVersion, v) +} + +// GetServiceAccount returns the ServiceAccount field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *InstanceEncryption) GetServiceAccount() (ret InstanceEncryptionGetServiceAccountRetType) { + ret, _ = o.GetServiceAccountOk() + return ret +} + +// GetServiceAccountOk returns a tuple with the ServiceAccount 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 *InstanceEncryption) GetServiceAccountOk() (ret InstanceEncryptionGetServiceAccountRetType, ok bool) { + return getInstanceEncryptionGetServiceAccountAttributeTypeOk(o.ServiceAccount) +} + +// SetServiceAccount sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *InstanceEncryption) SetServiceAccount(v InstanceEncryptionGetServiceAccountRetType) { + setInstanceEncryptionGetServiceAccountAttributeType(&o.ServiceAccount, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o InstanceEncryption) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getInstanceEncryptionGetKekKeyIdAttributeTypeOk(o.KekKeyId); ok { + toSerialize["KekKeyId"] = val + } + if val, ok := getInstanceEncryptionGetKekKeyRingIdAttributeTypeOk(o.KekKeyRingId); ok { + toSerialize["KekKeyRingId"] = val + } + if val, ok := getInstanceEncryptionGetKekKeyVersionAttributeTypeOk(o.KekKeyVersion); ok { + toSerialize["KekKeyVersion"] = val + } + if val, ok := getInstanceEncryptionGetServiceAccountAttributeTypeOk(o.ServiceAccount); ok { + toSerialize["ServiceAccount"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableInstanceEncryption struct { + value *InstanceEncryption + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableInstanceEncryption) Get() *InstanceEncryption { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableInstanceEncryption) Set(val *InstanceEncryption) { + 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 NullableInstanceEncryption) 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 *NullableInstanceEncryption) 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 NewNullableInstanceEncryption(val *InstanceEncryption) *NullableInstanceEncryption { + return &NullableInstanceEncryption{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 NullableInstanceEncryption) 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 *NullableInstanceEncryption) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_instance_encryption_test.go b/services/sqlserverflex/model_instance_encryption_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_instance_encryption_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_instance_error_test.go b/services/sqlserverflex/model_instance_error_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_instance_error_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_instance_flavor_entry.go b/services/sqlserverflex/model_instance_flavor_entry.go deleted file mode 100644 index 8c3bb9eb9..000000000 --- a/services/sqlserverflex/model_instance_flavor_entry.go +++ /dev/null @@ -1,385 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package sqlserverflex - -import ( - "encoding/json" -) - -// checks if the InstanceFlavorEntry type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InstanceFlavorEntry{} - -/* - types and functions for categories -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceFlavorEntryGetCategoriesAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceFlavorEntryGetCategoriesAttributeTypeOk(arg InstanceFlavorEntryGetCategoriesAttributeType) (ret InstanceFlavorEntryGetCategoriesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceFlavorEntryGetCategoriesAttributeType(arg *InstanceFlavorEntryGetCategoriesAttributeType, val InstanceFlavorEntryGetCategoriesRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceFlavorEntryGetCategoriesArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceFlavorEntryGetCategoriesRetType = string - -/* - types and functions for cpu -*/ - -// isInteger -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceFlavorEntryGetCpuAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceFlavorEntryGetCpuArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceFlavorEntryGetCpuRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceFlavorEntryGetCpuAttributeTypeOk(arg InstanceFlavorEntryGetCpuAttributeType) (ret InstanceFlavorEntryGetCpuRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceFlavorEntryGetCpuAttributeType(arg *InstanceFlavorEntryGetCpuAttributeType, val InstanceFlavorEntryGetCpuRetType) { - *arg = &val -} - -/* - types and functions for description -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceFlavorEntryGetDescriptionAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceFlavorEntryGetDescriptionAttributeTypeOk(arg InstanceFlavorEntryGetDescriptionAttributeType) (ret InstanceFlavorEntryGetDescriptionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceFlavorEntryGetDescriptionAttributeType(arg *InstanceFlavorEntryGetDescriptionAttributeType, val InstanceFlavorEntryGetDescriptionRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceFlavorEntryGetDescriptionArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceFlavorEntryGetDescriptionRetType = string - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceFlavorEntryGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceFlavorEntryGetIdAttributeTypeOk(arg InstanceFlavorEntryGetIdAttributeType) (ret InstanceFlavorEntryGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceFlavorEntryGetIdAttributeType(arg *InstanceFlavorEntryGetIdAttributeType, val InstanceFlavorEntryGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceFlavorEntryGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceFlavorEntryGetIdRetType = string - -/* - types and functions for memory -*/ - -// isInteger -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceFlavorEntryGetMemoryAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceFlavorEntryGetMemoryArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceFlavorEntryGetMemoryRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceFlavorEntryGetMemoryAttributeTypeOk(arg InstanceFlavorEntryGetMemoryAttributeType) (ret InstanceFlavorEntryGetMemoryRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceFlavorEntryGetMemoryAttributeType(arg *InstanceFlavorEntryGetMemoryAttributeType, val InstanceFlavorEntryGetMemoryRetType) { - *arg = &val -} - -// InstanceFlavorEntry struct for InstanceFlavorEntry -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceFlavorEntry struct { - Categories InstanceFlavorEntryGetCategoriesAttributeType `json:"categories,omitempty"` - // Can be cast to int32 without loss of precision. - Cpu InstanceFlavorEntryGetCpuAttributeType `json:"cpu,omitempty"` - Description InstanceFlavorEntryGetDescriptionAttributeType `json:"description,omitempty"` - Id InstanceFlavorEntryGetIdAttributeType `json:"id,omitempty"` - // Can be cast to int32 without loss of precision. - Memory InstanceFlavorEntryGetMemoryAttributeType `json:"memory,omitempty"` -} - -// NewInstanceFlavorEntry instantiates a new InstanceFlavorEntry 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 NewInstanceFlavorEntry() *InstanceFlavorEntry { - this := InstanceFlavorEntry{} - return &this -} - -// NewInstanceFlavorEntryWithDefaults instantiates a new InstanceFlavorEntry 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 NewInstanceFlavorEntryWithDefaults() *InstanceFlavorEntry { - this := InstanceFlavorEntry{} - return &this -} - -// GetCategories returns the Categories 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 *InstanceFlavorEntry) GetCategories() (res InstanceFlavorEntryGetCategoriesRetType) { - res, _ = o.GetCategoriesOk() - return -} - -// GetCategoriesOk returns a tuple with the Categories 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 *InstanceFlavorEntry) GetCategoriesOk() (ret InstanceFlavorEntryGetCategoriesRetType, ok bool) { - return getInstanceFlavorEntryGetCategoriesAttributeTypeOk(o.Categories) -} - -// HasCategories 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 *InstanceFlavorEntry) HasCategories() bool { - _, ok := o.GetCategoriesOk() - return ok -} - -// SetCategories gets a reference to the given string and assigns it to the Categories field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceFlavorEntry) SetCategories(v InstanceFlavorEntryGetCategoriesRetType) { - setInstanceFlavorEntryGetCategoriesAttributeType(&o.Categories, v) -} - -// GetCpu returns the Cpu 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 *InstanceFlavorEntry) GetCpu() (res InstanceFlavorEntryGetCpuRetType) { - res, _ = o.GetCpuOk() - return -} - -// GetCpuOk returns a tuple with the Cpu 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 *InstanceFlavorEntry) GetCpuOk() (ret InstanceFlavorEntryGetCpuRetType, ok bool) { - return getInstanceFlavorEntryGetCpuAttributeTypeOk(o.Cpu) -} - -// HasCpu 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 *InstanceFlavorEntry) HasCpu() bool { - _, ok := o.GetCpuOk() - return ok -} - -// SetCpu gets a reference to the given int64 and assigns it to the Cpu field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceFlavorEntry) SetCpu(v InstanceFlavorEntryGetCpuRetType) { - setInstanceFlavorEntryGetCpuAttributeType(&o.Cpu, v) -} - -// GetDescription returns the Description field value if set, zero value otherwise. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceFlavorEntry) GetDescription() (res InstanceFlavorEntryGetDescriptionRetType) { - res, _ = o.GetDescriptionOk() - return -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceFlavorEntry) GetDescriptionOk() (ret InstanceFlavorEntryGetDescriptionRetType, ok bool) { - return getInstanceFlavorEntryGetDescriptionAttributeTypeOk(o.Description) -} - -// HasDescription returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceFlavorEntry) HasDescription() bool { - _, ok := o.GetDescriptionOk() - return ok -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceFlavorEntry) SetDescription(v InstanceFlavorEntryGetDescriptionRetType) { - setInstanceFlavorEntryGetDescriptionAttributeType(&o.Description, v) -} - -// GetId returns the Id 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 *InstanceFlavorEntry) GetId() (res InstanceFlavorEntryGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *InstanceFlavorEntry) GetIdOk() (ret InstanceFlavorEntryGetIdRetType, ok bool) { - return getInstanceFlavorEntryGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *InstanceFlavorEntry) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceFlavorEntry) SetId(v InstanceFlavorEntryGetIdRetType) { - setInstanceFlavorEntryGetIdAttributeType(&o.Id, v) -} - -// GetMemory returns the Memory 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 *InstanceFlavorEntry) GetMemory() (res InstanceFlavorEntryGetMemoryRetType) { - res, _ = o.GetMemoryOk() - return -} - -// GetMemoryOk returns a tuple with the Memory 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 *InstanceFlavorEntry) GetMemoryOk() (ret InstanceFlavorEntryGetMemoryRetType, ok bool) { - return getInstanceFlavorEntryGetMemoryAttributeTypeOk(o.Memory) -} - -// HasMemory 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 *InstanceFlavorEntry) HasMemory() bool { - _, ok := o.GetMemoryOk() - return ok -} - -// SetMemory gets a reference to the given int64 and assigns it to the Memory field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceFlavorEntry) SetMemory(v InstanceFlavorEntryGetMemoryRetType) { - setInstanceFlavorEntryGetMemoryAttributeType(&o.Memory, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o InstanceFlavorEntry) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getInstanceFlavorEntryGetCategoriesAttributeTypeOk(o.Categories); ok { - toSerialize["Categories"] = val - } - if val, ok := getInstanceFlavorEntryGetCpuAttributeTypeOk(o.Cpu); ok { - toSerialize["Cpu"] = val - } - if val, ok := getInstanceFlavorEntryGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getInstanceFlavorEntryGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getInstanceFlavorEntryGetMemoryAttributeTypeOk(o.Memory); ok { - toSerialize["Memory"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableInstanceFlavorEntry struct { - value *InstanceFlavorEntry - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInstanceFlavorEntry) Get() *InstanceFlavorEntry { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInstanceFlavorEntry) Set(val *InstanceFlavorEntry) { - 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 NullableInstanceFlavorEntry) 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 *NullableInstanceFlavorEntry) 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 NewNullableInstanceFlavorEntry(val *InstanceFlavorEntry) *NullableInstanceFlavorEntry { - return &NullableInstanceFlavorEntry{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 NullableInstanceFlavorEntry) 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 *NullableInstanceFlavorEntry) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/sqlserverflex/model_instance_flavor_entry_test.go b/services/sqlserverflex/model_instance_flavor_entry_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_instance_flavor_entry_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_instance_list_instance.go b/services/sqlserverflex/model_instance_list_instance.go deleted file mode 100644 index 5c882c779..000000000 --- a/services/sqlserverflex/model_instance_list_instance.go +++ /dev/null @@ -1,267 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package sqlserverflex - -import ( - "encoding/json" -) - -// checks if the InstanceListInstance type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InstanceListInstance{} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceListInstanceGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceListInstanceGetIdAttributeTypeOk(arg InstanceListInstanceGetIdAttributeType) (ret InstanceListInstanceGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceListInstanceGetIdAttributeType(arg *InstanceListInstanceGetIdAttributeType, val InstanceListInstanceGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceListInstanceGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceListInstanceGetIdRetType = string - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceListInstanceGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceListInstanceGetNameAttributeTypeOk(arg InstanceListInstanceGetNameAttributeType) (ret InstanceListInstanceGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceListInstanceGetNameAttributeType(arg *InstanceListInstanceGetNameAttributeType, val InstanceListInstanceGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceListInstanceGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceListInstanceGetNameRetType = string - -/* - types and functions for status -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceListInstanceGetStatusAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceListInstanceGetStatusAttributeTypeOk(arg InstanceListInstanceGetStatusAttributeType) (ret InstanceListInstanceGetStatusRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceListInstanceGetStatusAttributeType(arg *InstanceListInstanceGetStatusAttributeType, val InstanceListInstanceGetStatusRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceListInstanceGetStatusArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceListInstanceGetStatusRetType = string - -// InstanceListInstance struct for InstanceListInstance -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceListInstance struct { - Id InstanceListInstanceGetIdAttributeType `json:"id,omitempty"` - Name InstanceListInstanceGetNameAttributeType `json:"name,omitempty"` - Status InstanceListInstanceGetStatusAttributeType `json:"status,omitempty"` -} - -// NewInstanceListInstance instantiates a new InstanceListInstance 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 NewInstanceListInstance() *InstanceListInstance { - this := InstanceListInstance{} - return &this -} - -// NewInstanceListInstanceWithDefaults instantiates a new InstanceListInstance 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 NewInstanceListInstanceWithDefaults() *InstanceListInstance { - this := InstanceListInstance{} - return &this -} - -// GetId returns the Id 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 *InstanceListInstance) GetId() (res InstanceListInstanceGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *InstanceListInstance) GetIdOk() (ret InstanceListInstanceGetIdRetType, ok bool) { - return getInstanceListInstanceGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *InstanceListInstance) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceListInstance) SetId(v InstanceListInstanceGetIdRetType) { - setInstanceListInstanceGetIdAttributeType(&o.Id, v) -} - -// GetName returns the Name 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 *InstanceListInstance) GetName() (res InstanceListInstanceGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *InstanceListInstance) GetNameOk() (ret InstanceListInstanceGetNameRetType, ok bool) { - return getInstanceListInstanceGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *InstanceListInstance) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceListInstance) SetName(v InstanceListInstanceGetNameRetType) { - setInstanceListInstanceGetNameAttributeType(&o.Name, 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 *InstanceListInstance) GetStatus() (res InstanceListInstanceGetStatusRetType) { - res, _ = o.GetStatusOk() - return -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceListInstance) GetStatusOk() (ret InstanceListInstanceGetStatusRetType, ok bool) { - return getInstanceListInstanceGetStatusAttributeTypeOk(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 *InstanceListInstance) HasStatus() bool { - _, ok := o.GetStatusOk() - return ok -} - -// SetStatus gets a reference to the given string 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 *InstanceListInstance) SetStatus(v InstanceListInstanceGetStatusRetType) { - setInstanceListInstanceGetStatusAttributeType(&o.Status, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o InstanceListInstance) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getInstanceListInstanceGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getInstanceListInstanceGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getInstanceListInstanceGetStatusAttributeTypeOk(o.Status); ok { - toSerialize["Status"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableInstanceListInstance struct { - value *InstanceListInstance - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInstanceListInstance) Get() *InstanceListInstance { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInstanceListInstance) Set(val *InstanceListInstance) { - 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 NullableInstanceListInstance) 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 *NullableInstanceListInstance) 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 NewNullableInstanceListInstance(val *InstanceListInstance) *NullableInstanceListInstance { - return &NullableInstanceListInstance{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 NullableInstanceListInstance) 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 *NullableInstanceListInstance) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/sqlserverflex/model_instance_list_instance_test.go b/services/sqlserverflex/model_instance_list_instance_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_instance_list_instance_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_instance_list_user_test.go b/services/sqlserverflex/model_instance_list_user_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_instance_list_user_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_instance_network.go b/services/sqlserverflex/model_instance_network.go new file mode 100644 index 000000000..292b3c651 --- /dev/null +++ b/services/sqlserverflex/model_instance_network.go @@ -0,0 +1,328 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" +) + +// checks if the InstanceNetwork type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceNetwork{} + +/* + types and functions for accessScope +*/ + +// isEnumRef +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceNetworkGetAccessScopeAttributeType = *InstanceNetworkAccessScope + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceNetworkGetAccessScopeArgType = InstanceNetworkAccessScope + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceNetworkGetAccessScopeRetType = InstanceNetworkAccessScope + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getInstanceNetworkGetAccessScopeAttributeTypeOk(arg InstanceNetworkGetAccessScopeAttributeType) (ret InstanceNetworkGetAccessScopeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setInstanceNetworkGetAccessScopeAttributeType(arg *InstanceNetworkGetAccessScopeAttributeType, val InstanceNetworkGetAccessScopeRetType) { + *arg = &val +} + +/* + types and functions for acl +*/ + +// isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceNetworkGetAclAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceNetworkGetAclArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceNetworkGetAclRetType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getInstanceNetworkGetAclAttributeTypeOk(arg InstanceNetworkGetAclAttributeType) (ret InstanceNetworkGetAclRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setInstanceNetworkGetAclAttributeType(arg *InstanceNetworkGetAclAttributeType, val InstanceNetworkGetAclRetType) { + *arg = &val +} + +/* + types and functions for instanceAddress +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceNetworkGetInstanceAddressAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getInstanceNetworkGetInstanceAddressAttributeTypeOk(arg InstanceNetworkGetInstanceAddressAttributeType) (ret InstanceNetworkGetInstanceAddressRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setInstanceNetworkGetInstanceAddressAttributeType(arg *InstanceNetworkGetInstanceAddressAttributeType, val InstanceNetworkGetInstanceAddressRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceNetworkGetInstanceAddressArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceNetworkGetInstanceAddressRetType = string + +/* + types and functions for routerAddress +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceNetworkGetRouterAddressAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getInstanceNetworkGetRouterAddressAttributeTypeOk(arg InstanceNetworkGetRouterAddressAttributeType) (ret InstanceNetworkGetRouterAddressRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setInstanceNetworkGetRouterAddressAttributeType(arg *InstanceNetworkGetRouterAddressAttributeType, val InstanceNetworkGetRouterAddressRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceNetworkGetRouterAddressArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceNetworkGetRouterAddressRetType = string + +// InstanceNetwork The access configuration of the instance +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceNetwork struct { + AccessScope InstanceNetworkGetAccessScopeAttributeType `json:"accessScope,omitempty"` + // List of IPV4 cidr. + Acl InstanceNetworkGetAclAttributeType `json:"acl,omitempty"` + InstanceAddress InstanceNetworkGetInstanceAddressAttributeType `json:"instanceAddress,omitempty"` + RouterAddress InstanceNetworkGetRouterAddressAttributeType `json:"routerAddress,omitempty"` +} + +// NewInstanceNetwork instantiates a new InstanceNetwork 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 NewInstanceNetwork() *InstanceNetwork { + this := InstanceNetwork{} + return &this +} + +// NewInstanceNetworkWithDefaults instantiates a new InstanceNetwork 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 NewInstanceNetworkWithDefaults() *InstanceNetwork { + this := InstanceNetwork{} + var accessScope InstanceNetworkAccessScope = INSTANCENETWORKACCESSSCOPE_PUBLIC + this.AccessScope = &accessScope + return &this +} + +// GetAccessScope returns the AccessScope 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 *InstanceNetwork) GetAccessScope() (res InstanceNetworkGetAccessScopeRetType) { + res, _ = o.GetAccessScopeOk() + return +} + +// GetAccessScopeOk returns a tuple with the AccessScope 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 *InstanceNetwork) GetAccessScopeOk() (ret InstanceNetworkGetAccessScopeRetType, ok bool) { + return getInstanceNetworkGetAccessScopeAttributeTypeOk(o.AccessScope) +} + +// HasAccessScope 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 *InstanceNetwork) HasAccessScope() bool { + _, ok := o.GetAccessScopeOk() + return ok +} + +// SetAccessScope gets a reference to the given InstanceNetworkAccessScope and assigns it to the AccessScope field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *InstanceNetwork) SetAccessScope(v InstanceNetworkGetAccessScopeRetType) { + setInstanceNetworkGetAccessScopeAttributeType(&o.AccessScope, v) +} + +// GetAcl returns the Acl 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 *InstanceNetwork) GetAcl() (res InstanceNetworkGetAclRetType) { + res, _ = o.GetAclOk() + return +} + +// GetAclOk returns a tuple with the Acl 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 *InstanceNetwork) GetAclOk() (ret InstanceNetworkGetAclRetType, ok bool) { + return getInstanceNetworkGetAclAttributeTypeOk(o.Acl) +} + +// HasAcl 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 *InstanceNetwork) HasAcl() bool { + _, ok := o.GetAclOk() + return ok +} + +// SetAcl gets a reference to the given []string and assigns it to the Acl field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *InstanceNetwork) SetAcl(v InstanceNetworkGetAclRetType) { + setInstanceNetworkGetAclAttributeType(&o.Acl, v) +} + +// GetInstanceAddress returns the InstanceAddress 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 *InstanceNetwork) GetInstanceAddress() (res InstanceNetworkGetInstanceAddressRetType) { + res, _ = o.GetInstanceAddressOk() + return +} + +// GetInstanceAddressOk returns a tuple with the InstanceAddress 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 *InstanceNetwork) GetInstanceAddressOk() (ret InstanceNetworkGetInstanceAddressRetType, ok bool) { + return getInstanceNetworkGetInstanceAddressAttributeTypeOk(o.InstanceAddress) +} + +// HasInstanceAddress 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 *InstanceNetwork) HasInstanceAddress() bool { + _, ok := o.GetInstanceAddressOk() + return ok +} + +// SetInstanceAddress gets a reference to the given string and assigns it to the InstanceAddress field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *InstanceNetwork) SetInstanceAddress(v InstanceNetworkGetInstanceAddressRetType) { + setInstanceNetworkGetInstanceAddressAttributeType(&o.InstanceAddress, v) +} + +// GetRouterAddress returns the RouterAddress 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 *InstanceNetwork) GetRouterAddress() (res InstanceNetworkGetRouterAddressRetType) { + res, _ = o.GetRouterAddressOk() + return +} + +// GetRouterAddressOk returns a tuple with the RouterAddress 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 *InstanceNetwork) GetRouterAddressOk() (ret InstanceNetworkGetRouterAddressRetType, ok bool) { + return getInstanceNetworkGetRouterAddressAttributeTypeOk(o.RouterAddress) +} + +// HasRouterAddress 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 *InstanceNetwork) HasRouterAddress() bool { + _, ok := o.GetRouterAddressOk() + return ok +} + +// SetRouterAddress gets a reference to the given string and assigns it to the RouterAddress field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *InstanceNetwork) SetRouterAddress(v InstanceNetworkGetRouterAddressRetType) { + setInstanceNetworkGetRouterAddressAttributeType(&o.RouterAddress, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o InstanceNetwork) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getInstanceNetworkGetAccessScopeAttributeTypeOk(o.AccessScope); ok { + toSerialize["AccessScope"] = val + } + if val, ok := getInstanceNetworkGetAclAttributeTypeOk(o.Acl); ok { + toSerialize["Acl"] = val + } + if val, ok := getInstanceNetworkGetInstanceAddressAttributeTypeOk(o.InstanceAddress); ok { + toSerialize["InstanceAddress"] = val + } + if val, ok := getInstanceNetworkGetRouterAddressAttributeTypeOk(o.RouterAddress); ok { + toSerialize["RouterAddress"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableInstanceNetwork struct { + value *InstanceNetwork + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableInstanceNetwork) Get() *InstanceNetwork { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableInstanceNetwork) Set(val *InstanceNetwork) { + 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 NullableInstanceNetwork) 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 *NullableInstanceNetwork) 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 NewNullableInstanceNetwork(val *InstanceNetwork) *NullableInstanceNetwork { + return &NullableInstanceNetwork{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 NullableInstanceNetwork) 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 *NullableInstanceNetwork) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_instance_network_access_scope.go b/services/sqlserverflex/model_instance_network_access_scope.go new file mode 100644 index 000000000..129c32f43 --- /dev/null +++ b/services/sqlserverflex/model_instance_network_access_scope.go @@ -0,0 +1,132 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" + "fmt" +) + +// InstanceNetworkAccessScope The network access scope of the instance ⚠️ **Note:** This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceNetworkAccessScope string + +// List of instance.network.accessScope +const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCENETWORKACCESSSCOPE_PUBLIC InstanceNetworkAccessScope = "PUBLIC" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCENETWORKACCESSSCOPE_SNA InstanceNetworkAccessScope = "SNA" +) + +// All allowed values of InstanceNetworkAccessScope enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +var AllowedInstanceNetworkAccessScopeEnumValues = []InstanceNetworkAccessScope{ + "PUBLIC", + "SNA", +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *InstanceNetworkAccessScope) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue string + if value == zeroValue { + return nil + } + enumTypeValue := InstanceNetworkAccessScope(value) + for _, existing := range AllowedInstanceNetworkAccessScopeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid InstanceNetworkAccessScope", value) +} + +// NewInstanceNetworkAccessScopeFromValue returns a pointer to a valid InstanceNetworkAccessScope +// 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 NewInstanceNetworkAccessScopeFromValue(v string) (*InstanceNetworkAccessScope, error) { + ev := InstanceNetworkAccessScope(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for InstanceNetworkAccessScope: valid values are %v", v, AllowedInstanceNetworkAccessScopeEnumValues) + } +} + +// 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 InstanceNetworkAccessScope) IsValid() bool { + for _, existing := range AllowedInstanceNetworkAccessScopeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to instance.network.accessScope value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v InstanceNetworkAccessScope) Ptr() *InstanceNetworkAccessScope { + return &v +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableInstanceNetworkAccessScope struct { + value *InstanceNetworkAccessScope + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableInstanceNetworkAccessScope) Get() *InstanceNetworkAccessScope { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableInstanceNetworkAccessScope) Set(val *InstanceNetworkAccessScope) { + 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 NullableInstanceNetworkAccessScope) 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 *NullableInstanceNetworkAccessScope) 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 NewNullableInstanceNetworkAccessScope(val *InstanceNetworkAccessScope) *NullableInstanceNetworkAccessScope { + return &NullableInstanceNetworkAccessScope{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 NullableInstanceNetworkAccessScope) 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 *NullableInstanceNetworkAccessScope) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_instance_network_access_scope_test.go b/services/sqlserverflex/model_instance_network_access_scope_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_instance_network_access_scope_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_instance_network_test.go b/services/sqlserverflex/model_instance_network_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_instance_network_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_instance_sort.go b/services/sqlserverflex/model_instance_sort.go new file mode 100644 index 000000000..37e83389a --- /dev/null +++ b/services/sqlserverflex/model_instance_sort.go @@ -0,0 +1,156 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" + "fmt" +) + +// InstanceSort the model 'InstanceSort' +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceSort string + +// List of instance.sort +const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCESORT_INDEX_DESC InstanceSort = "index.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCESORT_INDEX_ASC InstanceSort = "index.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCESORT_ID_DESC InstanceSort = "id.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCESORT_ID_ASC InstanceSort = "id.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCESORT_IS_DELETABLE_DESC InstanceSort = "is_deletable.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCESORT_IS_DELETABLE_ASC InstanceSort = "is_deletable.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCESORT_NAME_ASC InstanceSort = "name.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCESORT_NAME_DESC InstanceSort = "name.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCESORT_STATE_ASC InstanceSort = "state.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCESORT_STATE_DESC InstanceSort = "state.desc" +) + +// All allowed values of InstanceSort enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +var AllowedInstanceSortEnumValues = []InstanceSort{ + "index.desc", + "index.asc", + "id.desc", + "id.asc", + "is_deletable.desc", + "is_deletable.asc", + "name.asc", + "name.desc", + "state.asc", + "state.desc", +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *InstanceSort) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue string + if value == zeroValue { + return nil + } + enumTypeValue := InstanceSort(value) + for _, existing := range AllowedInstanceSortEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid InstanceSort", value) +} + +// NewInstanceSortFromValue returns a pointer to a valid InstanceSort +// 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 NewInstanceSortFromValue(v string) (*InstanceSort, error) { + ev := InstanceSort(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for InstanceSort: valid values are %v", v, AllowedInstanceSortEnumValues) + } +} + +// 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 InstanceSort) IsValid() bool { + for _, existing := range AllowedInstanceSortEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to instance.sort value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v InstanceSort) Ptr() *InstanceSort { + return &v +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableInstanceSort struct { + value *InstanceSort + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableInstanceSort) Get() *InstanceSort { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableInstanceSort) Set(val *InstanceSort) { + 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 NullableInstanceSort) 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 *NullableInstanceSort) 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 NewNullableInstanceSort(val *InstanceSort) *NullableInstanceSort { + return &NullableInstanceSort{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 NullableInstanceSort) 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 *NullableInstanceSort) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_instance_sort_test.go b/services/sqlserverflex/model_instance_sort_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_instance_sort_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_instance_test.go b/services/sqlserverflex/model_instance_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_instance_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_instance_version.go b/services/sqlserverflex/model_instance_version.go new file mode 100644 index 000000000..176a79ad5 --- /dev/null +++ b/services/sqlserverflex/model_instance_version.go @@ -0,0 +1,129 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" + "fmt" +) + +// InstanceVersion The sqlserver version used for the instance. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceVersion string + +// List of instance.version +const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCEVERSION__2022 InstanceVersion = "2022" +) + +// All allowed values of InstanceVersion enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +var AllowedInstanceVersionEnumValues = []InstanceVersion{ + "2022", +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *InstanceVersion) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue string + if value == zeroValue { + return nil + } + enumTypeValue := InstanceVersion(value) + for _, existing := range AllowedInstanceVersionEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid InstanceVersion", value) +} + +// NewInstanceVersionFromValue returns a pointer to a valid InstanceVersion +// 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 NewInstanceVersionFromValue(v string) (*InstanceVersion, error) { + ev := InstanceVersion(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for InstanceVersion: valid values are %v", v, AllowedInstanceVersionEnumValues) + } +} + +// 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 InstanceVersion) IsValid() bool { + for _, existing := range AllowedInstanceVersionEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to instance.version value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v InstanceVersion) Ptr() *InstanceVersion { + return &v +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableInstanceVersion struct { + value *InstanceVersion + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableInstanceVersion) Get() *InstanceVersion { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableInstanceVersion) Set(val *InstanceVersion) { + 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 NullableInstanceVersion) 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 *NullableInstanceVersion) 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 NewNullableInstanceVersion(val *InstanceVersion) *NullableInstanceVersion { + return &NullableInstanceVersion{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 NullableInstanceVersion) 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 *NullableInstanceVersion) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_instance_version_opt.go b/services/sqlserverflex/model_instance_version_opt.go new file mode 100644 index 000000000..353c81d2a --- /dev/null +++ b/services/sqlserverflex/model_instance_version_opt.go @@ -0,0 +1,129 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" + "fmt" +) + +// InstanceVersionOpt the model 'InstanceVersionOpt' +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type InstanceVersionOpt string + +// List of instance.version.opt +const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCEVERSIONOPT__2022 InstanceVersionOpt = "2022" +) + +// All allowed values of InstanceVersionOpt enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +var AllowedInstanceVersionOptEnumValues = []InstanceVersionOpt{ + "2022", +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *InstanceVersionOpt) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue string + if value == zeroValue { + return nil + } + enumTypeValue := InstanceVersionOpt(value) + for _, existing := range AllowedInstanceVersionOptEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid InstanceVersionOpt", value) +} + +// NewInstanceVersionOptFromValue returns a pointer to a valid InstanceVersionOpt +// 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 NewInstanceVersionOptFromValue(v string) (*InstanceVersionOpt, error) { + ev := InstanceVersionOpt(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for InstanceVersionOpt: valid values are %v", v, AllowedInstanceVersionOptEnumValues) + } +} + +// 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 InstanceVersionOpt) IsValid() bool { + for _, existing := range AllowedInstanceVersionOptEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to instance.version.opt value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v InstanceVersionOpt) Ptr() *InstanceVersionOpt { + return &v +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableInstanceVersionOpt struct { + value *InstanceVersionOpt + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableInstanceVersionOpt) Get() *InstanceVersionOpt { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableInstanceVersionOpt) Set(val *InstanceVersionOpt) { + 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 NullableInstanceVersionOpt) 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 *NullableInstanceVersionOpt) 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 NewNullableInstanceVersionOpt(val *InstanceVersionOpt) *NullableInstanceVersionOpt { + return &NullableInstanceVersionOpt{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 NullableInstanceVersionOpt) 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 *NullableInstanceVersionOpt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_instance_version_opt_test.go b/services/sqlserverflex/model_instance_version_opt_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_instance_version_opt_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_instance_version_test.go b/services/sqlserverflex/model_instance_version_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_instance_version_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_list_backup.go b/services/sqlserverflex/model_list_backup.go new file mode 100644 index 000000000..51db4b9e7 --- /dev/null +++ b/services/sqlserverflex/model_list_backup.go @@ -0,0 +1,420 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" +) + +// checks if the ListBackup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListBackup{} + +/* + types and functions for completionTime +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackupGetCompletionTimeAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getListBackupGetCompletionTimeAttributeTypeOk(arg ListBackupGetCompletionTimeAttributeType) (ret ListBackupGetCompletionTimeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setListBackupGetCompletionTimeAttributeType(arg *ListBackupGetCompletionTimeAttributeType, val ListBackupGetCompletionTimeRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackupGetCompletionTimeArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackupGetCompletionTimeRetType = string + +/* + types and functions for id +*/ + +// isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackupGetIdAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackupGetIdArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackupGetIdRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getListBackupGetIdAttributeTypeOk(arg ListBackupGetIdAttributeType) (ret ListBackupGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setListBackupGetIdAttributeType(arg *ListBackupGetIdAttributeType, val ListBackupGetIdRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackupGetNameAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getListBackupGetNameAttributeTypeOk(arg ListBackupGetNameAttributeType) (ret ListBackupGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setListBackupGetNameAttributeType(arg *ListBackupGetNameAttributeType, val ListBackupGetNameRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackupGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackupGetNameRetType = string + +/* + types and functions for retainedUntil +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackupGetRetainedUntilAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getListBackupGetRetainedUntilAttributeTypeOk(arg ListBackupGetRetainedUntilAttributeType) (ret ListBackupGetRetainedUntilRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setListBackupGetRetainedUntilAttributeType(arg *ListBackupGetRetainedUntilAttributeType, val ListBackupGetRetainedUntilRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackupGetRetainedUntilArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackupGetRetainedUntilRetType = string + +/* + types and functions for size +*/ + +// isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackupGetSizeAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackupGetSizeArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackupGetSizeRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getListBackupGetSizeAttributeTypeOk(arg ListBackupGetSizeAttributeType) (ret ListBackupGetSizeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setListBackupGetSizeAttributeType(arg *ListBackupGetSizeAttributeType, val ListBackupGetSizeRetType) { + *arg = &val +} + +/* + types and functions for type +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackupGetTypeAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getListBackupGetTypeAttributeTypeOk(arg ListBackupGetTypeAttributeType) (ret ListBackupGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setListBackupGetTypeAttributeType(arg *ListBackupGetTypeAttributeType, val ListBackupGetTypeRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackupGetTypeArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackupGetTypeRetType = string + +// ListBackup struct for ListBackup +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackup struct { + // The time when the backup was completed in RFC3339 format. + // REQUIRED + CompletionTime ListBackupGetCompletionTimeAttributeType `json:"completionTime" required:"true"` + // The ID of the backup. + // REQUIRED + Id ListBackupGetIdAttributeType `json:"id" required:"true"` + // The name of the backup. + // REQUIRED + Name ListBackupGetNameAttributeType `json:"name" required:"true"` + // The time until the backup will be retained. + // REQUIRED + RetainedUntil ListBackupGetRetainedUntilAttributeType `json:"retainedUntil" required:"true"` + // The size of the backup in bytes. + // REQUIRED + Size ListBackupGetSizeAttributeType `json:"size" required:"true"` + // The type of the backup, which can be automated or manual triggered. + // REQUIRED + Type ListBackupGetTypeAttributeType `json:"type" required:"true"` +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ListBackup ListBackup + +// NewListBackup instantiates a new ListBackup 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 NewListBackup(completionTime ListBackupGetCompletionTimeArgType, id ListBackupGetIdArgType, name ListBackupGetNameArgType, retainedUntil ListBackupGetRetainedUntilArgType, size ListBackupGetSizeArgType, types ListBackupGetTypeArgType) *ListBackup { + this := ListBackup{} + setListBackupGetCompletionTimeAttributeType(&this.CompletionTime, completionTime) + setListBackupGetIdAttributeType(&this.Id, id) + setListBackupGetNameAttributeType(&this.Name, name) + setListBackupGetRetainedUntilAttributeType(&this.RetainedUntil, retainedUntil) + setListBackupGetSizeAttributeType(&this.Size, size) + setListBackupGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewListBackupWithDefaults instantiates a new ListBackup 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 NewListBackupWithDefaults() *ListBackup { + this := ListBackup{} + return &this +} + +// GetCompletionTime returns the CompletionTime field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListBackup) GetCompletionTime() (ret ListBackupGetCompletionTimeRetType) { + ret, _ = o.GetCompletionTimeOk() + return ret +} + +// GetCompletionTimeOk returns a tuple with the CompletionTime 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 *ListBackup) GetCompletionTimeOk() (ret ListBackupGetCompletionTimeRetType, ok bool) { + return getListBackupGetCompletionTimeAttributeTypeOk(o.CompletionTime) +} + +// SetCompletionTime sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListBackup) SetCompletionTime(v ListBackupGetCompletionTimeRetType) { + setListBackupGetCompletionTimeAttributeType(&o.CompletionTime, 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 *ListBackup) GetId() (ret ListBackupGetIdRetType) { + ret, _ = o.GetIdOk() + return ret +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListBackup) GetIdOk() (ret ListBackupGetIdRetType, ok bool) { + return getListBackupGetIdAttributeTypeOk(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 *ListBackup) SetId(v ListBackupGetIdRetType) { + setListBackupGetIdAttributeType(&o.Id, v) +} + +// GetName returns the Name field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListBackup) GetName() (ret ListBackupGetNameRetType) { + ret, _ = o.GetNameOk() + return ret +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListBackup) GetNameOk() (ret ListBackupGetNameRetType, ok bool) { + return getListBackupGetNameAttributeTypeOk(o.Name) +} + +// SetName sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListBackup) SetName(v ListBackupGetNameRetType) { + setListBackupGetNameAttributeType(&o.Name, v) +} + +// GetRetainedUntil returns the RetainedUntil field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListBackup) GetRetainedUntil() (ret ListBackupGetRetainedUntilRetType) { + ret, _ = o.GetRetainedUntilOk() + return ret +} + +// GetRetainedUntilOk returns a tuple with the RetainedUntil 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 *ListBackup) GetRetainedUntilOk() (ret ListBackupGetRetainedUntilRetType, ok bool) { + return getListBackupGetRetainedUntilAttributeTypeOk(o.RetainedUntil) +} + +// SetRetainedUntil sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListBackup) SetRetainedUntil(v ListBackupGetRetainedUntilRetType) { + setListBackupGetRetainedUntilAttributeType(&o.RetainedUntil, v) +} + +// GetSize returns the Size field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListBackup) GetSize() (ret ListBackupGetSizeRetType) { + ret, _ = o.GetSizeOk() + return ret +} + +// GetSizeOk returns a tuple with the Size field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListBackup) GetSizeOk() (ret ListBackupGetSizeRetType, ok bool) { + return getListBackupGetSizeAttributeTypeOk(o.Size) +} + +// SetSize sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListBackup) SetSize(v ListBackupGetSizeRetType) { + setListBackupGetSizeAttributeType(&o.Size, v) +} + +// GetType returns the Type field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListBackup) GetType() (ret ListBackupGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListBackup) GetTypeOk() (ret ListBackupGetTypeRetType, ok bool) { + return getListBackupGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListBackup) SetType(v ListBackupGetTypeRetType) { + setListBackupGetTypeAttributeType(&o.Type, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o ListBackup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getListBackupGetCompletionTimeAttributeTypeOk(o.CompletionTime); ok { + toSerialize["CompletionTime"] = val + } + if val, ok := getListBackupGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getListBackupGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getListBackupGetRetainedUntilAttributeTypeOk(o.RetainedUntil); ok { + toSerialize["RetainedUntil"] = val + } + if val, ok := getListBackupGetSizeAttributeTypeOk(o.Size); ok { + toSerialize["Size"] = val + } + if val, ok := getListBackupGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableListBackup struct { + value *ListBackup + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableListBackup) Get() *ListBackup { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableListBackup) Set(val *ListBackup) { + 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 NullableListBackup) 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 *NullableListBackup) 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 NewNullableListBackup(val *ListBackup) *NullableListBackup { + return &NullableListBackup{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 NullableListBackup) 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 *NullableListBackup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_list_users_response.go b/services/sqlserverflex/model_list_backup_response.go similarity index 53% rename from services/sqlserverflex/model_list_users_response.go rename to services/sqlserverflex/model_list_backup_response.go index b3ea6ebff..ca04ca501 100644 --- a/services/sqlserverflex/model_list_users_response.go +++ b/services/sqlserverflex/model_list_backup_response.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,25 +15,25 @@ import ( "encoding/json" ) -// checks if the ListUsersResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListUsersResponse{} +// checks if the ListBackupResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListBackupResponse{} /* - types and functions for count + types and functions for backups */ -// isLong +// isArray // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListUsersResponseGetCountAttributeType = *int64 +type ListBackupResponseGetBackupsAttributeType = *[]ListBackupsResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListUsersResponseGetCountArgType = int64 +type ListBackupResponseGetBackupsArgType = []ListBackupsResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListUsersResponseGetCountRetType = int64 +type ListBackupResponseGetBackupsRetType = []ListBackupsResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListUsersResponseGetCountAttributeTypeOk(arg ListUsersResponseGetCountAttributeType) (ret ListUsersResponseGetCountRetType, ok bool) { +func getListBackupResponseGetBackupsAttributeTypeOk(arg ListBackupResponseGetBackupsAttributeType) (ret ListBackupResponseGetBackupsRetType, ok bool) { if arg == nil { return ret, false } @@ -41,26 +41,26 @@ func getListUsersResponseGetCountAttributeTypeOk(arg ListUsersResponseGetCountAt } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListUsersResponseGetCountAttributeType(arg *ListUsersResponseGetCountAttributeType, val ListUsersResponseGetCountRetType) { +func setListBackupResponseGetBackupsAttributeType(arg *ListBackupResponseGetBackupsAttributeType, val ListBackupResponseGetBackupsRetType) { *arg = &val } /* - types and functions for items + types and functions for pagination */ -// isArray +// isModel // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListUsersResponseGetItemsAttributeType = *[]InstanceListUser +type ListBackupResponseGetPaginationAttributeType = *Pagination // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListUsersResponseGetItemsArgType = []InstanceListUser +type ListBackupResponseGetPaginationArgType = Pagination // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListUsersResponseGetItemsRetType = []InstanceListUser +type ListBackupResponseGetPaginationRetType = Pagination // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListUsersResponseGetItemsAttributeTypeOk(arg ListUsersResponseGetItemsAttributeType) (ret ListUsersResponseGetItemsRetType, ok bool) { +func getListBackupResponseGetPaginationAttributeTypeOk(arg ListBackupResponseGetPaginationAttributeType) (ret ListBackupResponseGetPaginationRetType, ok bool) { if arg == nil { return ret, false } @@ -68,142 +68,136 @@ func getListUsersResponseGetItemsAttributeTypeOk(arg ListUsersResponseGetItemsAt } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListUsersResponseGetItemsAttributeType(arg *ListUsersResponseGetItemsAttributeType, val ListUsersResponseGetItemsRetType) { +func setListBackupResponseGetPaginationAttributeType(arg *ListBackupResponseGetPaginationAttributeType, val ListBackupResponseGetPaginationRetType) { *arg = &val } -// ListUsersResponse struct for ListUsersResponse +// ListBackupResponse struct for ListBackupResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListUsersResponse struct { - Count ListUsersResponseGetCountAttributeType `json:"count,omitempty"` - Items ListUsersResponseGetItemsAttributeType `json:"items,omitempty"` +type ListBackupResponse struct { + // The list containing the information about the backups. + // REQUIRED + Backups ListBackupResponseGetBackupsAttributeType `json:"backups" required:"true"` + // REQUIRED + Pagination ListBackupResponseGetPaginationAttributeType `json:"pagination" required:"true"` } -// NewListUsersResponse instantiates a new ListUsersResponse object +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ListBackupResponse ListBackupResponse + +// NewListBackupResponse instantiates a new ListBackupResponse 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 NewListUsersResponse() *ListUsersResponse { - this := ListUsersResponse{} +func NewListBackupResponse(backups ListBackupResponseGetBackupsArgType, pagination ListBackupResponseGetPaginationArgType) *ListBackupResponse { + this := ListBackupResponse{} + setListBackupResponseGetBackupsAttributeType(&this.Backups, backups) + setListBackupResponseGetPaginationAttributeType(&this.Pagination, pagination) return &this } -// NewListUsersResponseWithDefaults instantiates a new ListUsersResponse object +// NewListBackupResponseWithDefaults instantiates a new ListBackupResponse 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 NewListUsersResponseWithDefaults() *ListUsersResponse { - this := ListUsersResponse{} +func NewListBackupResponseWithDefaults() *ListBackupResponse { + this := ListBackupResponse{} return &this } -// GetCount returns the Count field value if set, zero value otherwise. +// GetBackups returns the Backups field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListUsersResponse) GetCount() (res ListUsersResponseGetCountRetType) { - res, _ = o.GetCountOk() - return +func (o *ListBackupResponse) GetBackups() (ret ListBackupResponseGetBackupsRetType) { + ret, _ = o.GetBackupsOk() + return ret } -// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// GetBackupsOk returns a tuple with the Backups 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 *ListUsersResponse) GetCountOk() (ret ListUsersResponseGetCountRetType, ok bool) { - return getListUsersResponseGetCountAttributeTypeOk(o.Count) -} - -// HasCount 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 *ListUsersResponse) HasCount() bool { - _, ok := o.GetCountOk() - return ok +func (o *ListBackupResponse) GetBackupsOk() (ret ListBackupResponseGetBackupsRetType, ok bool) { + return getListBackupResponseGetBackupsAttributeTypeOk(o.Backups) } -// SetCount gets a reference to the given int64 and assigns it to the Count field. +// SetBackups sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListUsersResponse) SetCount(v ListUsersResponseGetCountRetType) { - setListUsersResponseGetCountAttributeType(&o.Count, v) +func (o *ListBackupResponse) SetBackups(v ListBackupResponseGetBackupsRetType) { + setListBackupResponseGetBackupsAttributeType(&o.Backups, v) } -// GetItems returns the Items field value if set, zero value otherwise. +// GetPagination returns the Pagination field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListUsersResponse) GetItems() (res ListUsersResponseGetItemsRetType) { - res, _ = o.GetItemsOk() - return +func (o *ListBackupResponse) GetPagination() (ret ListBackupResponseGetPaginationRetType) { + ret, _ = o.GetPaginationOk() + return ret } -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// GetPaginationOk returns a tuple with the Pagination 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 *ListUsersResponse) GetItemsOk() (ret ListUsersResponseGetItemsRetType, ok bool) { - return getListUsersResponseGetItemsAttributeTypeOk(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 *ListUsersResponse) HasItems() bool { - _, ok := o.GetItemsOk() - return ok +func (o *ListBackupResponse) GetPaginationOk() (ret ListBackupResponseGetPaginationRetType, ok bool) { + return getListBackupResponseGetPaginationAttributeTypeOk(o.Pagination) } -// SetItems gets a reference to the given []InstanceListUser and assigns it to the Items field. +// SetPagination sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListUsersResponse) SetItems(v ListUsersResponseGetItemsRetType) { - setListUsersResponseGetItemsAttributeType(&o.Items, v) +func (o *ListBackupResponse) SetPagination(v ListBackupResponseGetPaginationRetType) { + setListBackupResponseGetPaginationAttributeType(&o.Pagination, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ListUsersResponse) ToMap() (map[string]interface{}, error) { +func (o ListBackupResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getListUsersResponseGetCountAttributeTypeOk(o.Count); ok { - toSerialize["Count"] = val + if val, ok := getListBackupResponseGetBackupsAttributeTypeOk(o.Backups); ok { + toSerialize["Backups"] = val } - if val, ok := getListUsersResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val + if val, ok := getListBackupResponseGetPaginationAttributeTypeOk(o.Pagination); ok { + toSerialize["Pagination"] = val } return toSerialize, nil } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableListUsersResponse struct { - value *ListUsersResponse +type NullableListBackupResponse struct { + value *ListBackupResponse isSet bool } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableListUsersResponse) Get() *ListUsersResponse { +func (v NullableListBackupResponse) Get() *ListBackupResponse { return v.value } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableListUsersResponse) Set(val *ListUsersResponse) { +func (v *NullableListBackupResponse) Set(val *ListBackupResponse) { 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 NullableListUsersResponse) IsSet() bool { +func (v NullableListBackupResponse) 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 *NullableListUsersResponse) Unset() { +func (v *NullableListBackupResponse) 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 NewNullableListUsersResponse(val *ListUsersResponse) *NullableListUsersResponse { - return &NullableListUsersResponse{value: val, isSet: true} +func NewNullableListBackupResponse(val *ListBackupResponse) *NullableListBackupResponse { + return &NullableListBackupResponse{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 NullableListUsersResponse) MarshalJSON() ([]byte, error) { +func (v NullableListBackupResponse) 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 *NullableListUsersResponse) UnmarshalJSON(src []byte) error { +func (v *NullableListBackupResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/sqlserverflex/model_list_backup_response_test.go b/services/sqlserverflex/model_list_backup_response_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_list_backup_response_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_list_backup_test.go b/services/sqlserverflex/model_list_backup_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_list_backup_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_list_backups_response.go b/services/sqlserverflex/model_list_backups_response.go index eb35dec72..c29e2ec5a 100644 --- a/services/sqlserverflex/model_list_backups_response.go +++ b/services/sqlserverflex/model_list_backups_response.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,21 +19,21 @@ import ( var _ MappedNullable = &ListBackupsResponse{} /* - types and functions for databases + types and functions for backups */ // isArray // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListBackupsResponseGetDatabasesAttributeType = *[]BackupListBackupsResponseGrouped +type ListBackupsResponseGetBackupsAttributeType = *[]ListBackup // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListBackupsResponseGetDatabasesArgType = []BackupListBackupsResponseGrouped +type ListBackupsResponseGetBackupsArgType = []ListBackup // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListBackupsResponseGetDatabasesRetType = []BackupListBackupsResponseGrouped +type ListBackupsResponseGetBackupsRetType = []ListBackup // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListBackupsResponseGetDatabasesAttributeTypeOk(arg ListBackupsResponseGetDatabasesAttributeType) (ret ListBackupsResponseGetDatabasesRetType, ok bool) { +func getListBackupsResponseGetBackupsAttributeTypeOk(arg ListBackupsResponseGetBackupsAttributeType) (ret ListBackupsResponseGetBackupsRetType, ok bool) { if arg == nil { return ret, false } @@ -41,23 +41,60 @@ func getListBackupsResponseGetDatabasesAttributeTypeOk(arg ListBackupsResponseGe } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListBackupsResponseGetDatabasesAttributeType(arg *ListBackupsResponseGetDatabasesAttributeType, val ListBackupsResponseGetDatabasesRetType) { +func setListBackupsResponseGetBackupsAttributeType(arg *ListBackupsResponseGetBackupsAttributeType, val ListBackupsResponseGetBackupsRetType) { *arg = &val } +/* + types and functions for databaseName +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackupsResponseGetDatabaseNameAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getListBackupsResponseGetDatabaseNameAttributeTypeOk(arg ListBackupsResponseGetDatabaseNameAttributeType) (ret ListBackupsResponseGetDatabaseNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setListBackupsResponseGetDatabaseNameAttributeType(arg *ListBackupsResponseGetDatabaseNameAttributeType, val ListBackupsResponseGetDatabaseNameRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackupsResponseGetDatabaseNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListBackupsResponseGetDatabaseNameRetType = string + // ListBackupsResponse struct for ListBackupsResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListBackupsResponse struct { - Databases ListBackupsResponseGetDatabasesAttributeType `json:"databases,omitempty"` + // List of the backups beloning to that database + // REQUIRED + Backups ListBackupsResponseGetBackupsAttributeType `json:"backups" required:"true"` + // Name of the database the backups belong to + // REQUIRED + DatabaseName ListBackupsResponseGetDatabaseNameAttributeType `json:"databaseName" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ListBackupsResponse ListBackupsResponse + // NewListBackupsResponse instantiates a new ListBackupsResponse 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 NewListBackupsResponse() *ListBackupsResponse { +func NewListBackupsResponse(backups ListBackupsResponseGetBackupsArgType, databaseName ListBackupsResponseGetDatabaseNameArgType) *ListBackupsResponse { this := ListBackupsResponse{} + setListBackupsResponseGetBackupsAttributeType(&this.Backups, backups) + setListBackupsResponseGetDatabaseNameAttributeType(&this.DatabaseName, databaseName) return &this } @@ -70,38 +107,54 @@ func NewListBackupsResponseWithDefaults() *ListBackupsResponse { return &this } -// GetDatabases returns the Databases field value if set, zero value otherwise. +// GetBackups returns the Backups field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListBackupsResponse) GetDatabases() (res ListBackupsResponseGetDatabasesRetType) { - res, _ = o.GetDatabasesOk() - return +func (o *ListBackupsResponse) GetBackups() (ret ListBackupsResponseGetBackupsRetType) { + ret, _ = o.GetBackupsOk() + return ret } -// GetDatabasesOk returns a tuple with the Databases field value if set, nil otherwise +// GetBackupsOk returns a tuple with the Backups 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 *ListBackupsResponse) GetDatabasesOk() (ret ListBackupsResponseGetDatabasesRetType, ok bool) { - return getListBackupsResponseGetDatabasesAttributeTypeOk(o.Databases) +func (o *ListBackupsResponse) GetBackupsOk() (ret ListBackupsResponseGetBackupsRetType, ok bool) { + return getListBackupsResponseGetBackupsAttributeTypeOk(o.Backups) } -// HasDatabases returns a boolean if a field has been set. +// SetBackups sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListBackupsResponse) HasDatabases() bool { - _, ok := o.GetDatabasesOk() - return ok +func (o *ListBackupsResponse) SetBackups(v ListBackupsResponseGetBackupsRetType) { + setListBackupsResponseGetBackupsAttributeType(&o.Backups, v) } -// SetDatabases gets a reference to the given []BackupListBackupsResponseGrouped and assigns it to the Databases field. +// GetDatabaseName returns the DatabaseName field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListBackupsResponse) SetDatabases(v ListBackupsResponseGetDatabasesRetType) { - setListBackupsResponseGetDatabasesAttributeType(&o.Databases, v) +func (o *ListBackupsResponse) GetDatabaseName() (ret ListBackupsResponseGetDatabaseNameRetType) { + ret, _ = o.GetDatabaseNameOk() + return ret +} + +// GetDatabaseNameOk returns a tuple with the DatabaseName 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 *ListBackupsResponse) GetDatabaseNameOk() (ret ListBackupsResponseGetDatabaseNameRetType, ok bool) { + return getListBackupsResponseGetDatabaseNameAttributeTypeOk(o.DatabaseName) +} + +// SetDatabaseName sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListBackupsResponse) SetDatabaseName(v ListBackupsResponseGetDatabaseNameRetType) { + setListBackupsResponseGetDatabaseNameAttributeType(&o.DatabaseName, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListBackupsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getListBackupsResponseGetDatabasesAttributeTypeOk(o.Databases); ok { - toSerialize["Databases"] = val + if val, ok := getListBackupsResponseGetBackupsAttributeTypeOk(o.Backups); ok { + toSerialize["Backups"] = val + } + if val, ok := getListBackupsResponseGetDatabaseNameAttributeTypeOk(o.DatabaseName); ok { + toSerialize["DatabaseName"] = val } return toSerialize, nil } diff --git a/services/sqlserverflex/model_list_backups_response_test.go b/services/sqlserverflex/model_list_backups_response_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_list_backups_response_test.go +++ b/services/sqlserverflex/model_list_backups_response_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_list_collations_response.go b/services/sqlserverflex/model_list_collations_response.go index 82d48cf8e..db574aa99 100644 --- a/services/sqlserverflex/model_list_collations_response.go +++ b/services/sqlserverflex/model_list_collations_response.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -24,13 +24,13 @@ var _ MappedNullable = &ListCollationsResponse{} // isArray // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListCollationsResponseGetCollationsAttributeType = *[]MssqlDatabaseCollation +type ListCollationsResponseGetCollationsAttributeType = *[]DatabaseGetcollation // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListCollationsResponseGetCollationsArgType = []MssqlDatabaseCollation +type ListCollationsResponseGetCollationsArgType = []DatabaseGetcollation // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListCollationsResponseGetCollationsRetType = []MssqlDatabaseCollation +type ListCollationsResponseGetCollationsRetType = []DatabaseGetcollation // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListCollationsResponseGetCollationsAttributeTypeOk(arg ListCollationsResponseGetCollationsAttributeType) (ret ListCollationsResponseGetCollationsRetType, ok bool) { @@ -48,16 +48,22 @@ func setListCollationsResponseGetCollationsAttributeType(arg *ListCollationsResp // ListCollationsResponse struct for ListCollationsResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListCollationsResponse struct { - Collations ListCollationsResponseGetCollationsAttributeType `json:"collations,omitempty"` + // List of collations available for the instance. + // REQUIRED + Collations ListCollationsResponseGetCollationsAttributeType `json:"collations" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ListCollationsResponse ListCollationsResponse + // NewListCollationsResponse instantiates a new ListCollationsResponse 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 NewListCollationsResponse() *ListCollationsResponse { +func NewListCollationsResponse(collations ListCollationsResponseGetCollationsArgType) *ListCollationsResponse { this := ListCollationsResponse{} + setListCollationsResponseGetCollationsAttributeType(&this.Collations, collations) return &this } @@ -70,28 +76,21 @@ func NewListCollationsResponseWithDefaults() *ListCollationsResponse { return &this } -// GetCollations returns the Collations field value if set, zero value otherwise. +// GetCollations returns the Collations field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListCollationsResponse) GetCollations() (res ListCollationsResponseGetCollationsRetType) { - res, _ = o.GetCollationsOk() - return +func (o *ListCollationsResponse) GetCollations() (ret ListCollationsResponseGetCollationsRetType) { + ret, _ = o.GetCollationsOk() + return ret } -// GetCollationsOk returns a tuple with the Collations field value if set, nil otherwise +// GetCollationsOk returns a tuple with the Collations 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 *ListCollationsResponse) GetCollationsOk() (ret ListCollationsResponseGetCollationsRetType, ok bool) { return getListCollationsResponseGetCollationsAttributeTypeOk(o.Collations) } -// HasCollations 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 *ListCollationsResponse) HasCollations() bool { - _, ok := o.GetCollationsOk() - return ok -} - -// SetCollations gets a reference to the given []MssqlDatabaseCollation and assigns it to the Collations field. +// SetCollations sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListCollationsResponse) SetCollations(v ListCollationsResponseGetCollationsRetType) { setListCollationsResponseGetCollationsAttributeType(&o.Collations, v) diff --git a/services/sqlserverflex/model_list_collations_response_test.go b/services/sqlserverflex/model_list_collations_response_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_list_collations_response_test.go +++ b/services/sqlserverflex/model_list_collations_response_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_list_compatibility_response.go b/services/sqlserverflex/model_list_compatibility_response.go index 7d72ffb4b..78aafb507 100644 --- a/services/sqlserverflex/model_list_compatibility_response.go +++ b/services/sqlserverflex/model_list_compatibility_response.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -24,13 +24,13 @@ var _ MappedNullable = &ListCompatibilityResponse{} // isArray // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListCompatibilityResponseGetCompatibilitiesAttributeType = *[]MssqlDatabaseCompatibility +type ListCompatibilityResponseGetCompatibilitiesAttributeType = *[]DatabaseGetcompatibility // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListCompatibilityResponseGetCompatibilitiesArgType = []MssqlDatabaseCompatibility +type ListCompatibilityResponseGetCompatibilitiesArgType = []DatabaseGetcompatibility // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListCompatibilityResponseGetCompatibilitiesRetType = []MssqlDatabaseCompatibility +type ListCompatibilityResponseGetCompatibilitiesRetType = []DatabaseGetcompatibility // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListCompatibilityResponseGetCompatibilitiesAttributeTypeOk(arg ListCompatibilityResponseGetCompatibilitiesAttributeType) (ret ListCompatibilityResponseGetCompatibilitiesRetType, ok bool) { @@ -48,16 +48,22 @@ func setListCompatibilityResponseGetCompatibilitiesAttributeType(arg *ListCompat // ListCompatibilityResponse struct for ListCompatibilityResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListCompatibilityResponse struct { - Compatibilities ListCompatibilityResponseGetCompatibilitiesAttributeType `json:"compatibilities,omitempty"` + // List of compatibilities available for a d + // REQUIRED + Compatibilities ListCompatibilityResponseGetCompatibilitiesAttributeType `json:"compatibilities" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ListCompatibilityResponse ListCompatibilityResponse + // NewListCompatibilityResponse instantiates a new ListCompatibilityResponse 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 NewListCompatibilityResponse() *ListCompatibilityResponse { +func NewListCompatibilityResponse(compatibilities ListCompatibilityResponseGetCompatibilitiesArgType) *ListCompatibilityResponse { this := ListCompatibilityResponse{} + setListCompatibilityResponseGetCompatibilitiesAttributeType(&this.Compatibilities, compatibilities) return &this } @@ -70,28 +76,21 @@ func NewListCompatibilityResponseWithDefaults() *ListCompatibilityResponse { return &this } -// GetCompatibilities returns the Compatibilities field value if set, zero value otherwise. +// GetCompatibilities returns the Compatibilities field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListCompatibilityResponse) GetCompatibilities() (res ListCompatibilityResponseGetCompatibilitiesRetType) { - res, _ = o.GetCompatibilitiesOk() - return +func (o *ListCompatibilityResponse) GetCompatibilities() (ret ListCompatibilityResponseGetCompatibilitiesRetType) { + ret, _ = o.GetCompatibilitiesOk() + return ret } -// GetCompatibilitiesOk returns a tuple with the Compatibilities field value if set, nil otherwise +// GetCompatibilitiesOk returns a tuple with the Compatibilities 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 *ListCompatibilityResponse) GetCompatibilitiesOk() (ret ListCompatibilityResponseGetCompatibilitiesRetType, ok bool) { return getListCompatibilityResponseGetCompatibilitiesAttributeTypeOk(o.Compatibilities) } -// HasCompatibilities 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 *ListCompatibilityResponse) HasCompatibilities() bool { - _, ok := o.GetCompatibilitiesOk() - return ok -} - -// SetCompatibilities gets a reference to the given []MssqlDatabaseCompatibility and assigns it to the Compatibilities field. +// SetCompatibilities sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListCompatibilityResponse) SetCompatibilities(v ListCompatibilityResponseGetCompatibilitiesRetType) { setListCompatibilityResponseGetCompatibilitiesAttributeType(&o.Compatibilities, v) diff --git a/services/sqlserverflex/model_list_compatibility_response_test.go b/services/sqlserverflex/model_list_compatibility_response_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_list_compatibility_response_test.go +++ b/services/sqlserverflex/model_list_compatibility_response_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_create_instance_payload_acl.go b/services/sqlserverflex/model_list_current_running_restore_jobs.go similarity index 50% rename from services/sqlserverflex/model_create_instance_payload_acl.go rename to services/sqlserverflex/model_list_current_running_restore_jobs.go index ac868304d..4fb48aca0 100644 --- a/services/sqlserverflex/model_create_instance_payload_acl.go +++ b/services/sqlserverflex/model_list_current_running_restore_jobs.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,25 +15,25 @@ import ( "encoding/json" ) -// checks if the CreateInstancePayloadAcl type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateInstancePayloadAcl{} +// checks if the ListCurrentRunningRestoreJobs type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListCurrentRunningRestoreJobs{} /* - types and functions for items + types and functions for runningRestores */ // isArray // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadAclGetItemsAttributeType = *[]string +type ListCurrentRunningRestoreJobsGetRunningRestoresAttributeType = *[]BackupRunningRestore // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadAclGetItemsArgType = []string +type ListCurrentRunningRestoreJobsGetRunningRestoresArgType = []BackupRunningRestore // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadAclGetItemsRetType = []string +type ListCurrentRunningRestoreJobsGetRunningRestoresRetType = []BackupRunningRestore // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getCreateInstancePayloadAclGetItemsAttributeTypeOk(arg CreateInstancePayloadAclGetItemsAttributeType) (ret CreateInstancePayloadAclGetItemsRetType, ok bool) { +func getListCurrentRunningRestoreJobsGetRunningRestoresAttributeTypeOk(arg ListCurrentRunningRestoreJobsGetRunningRestoresAttributeType) (ret ListCurrentRunningRestoreJobsGetRunningRestoresRetType, ok bool) { if arg == nil { return ret, false } @@ -41,112 +41,110 @@ func getCreateInstancePayloadAclGetItemsAttributeTypeOk(arg CreateInstancePayloa } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setCreateInstancePayloadAclGetItemsAttributeType(arg *CreateInstancePayloadAclGetItemsAttributeType, val CreateInstancePayloadAclGetItemsRetType) { +func setListCurrentRunningRestoreJobsGetRunningRestoresAttributeType(arg *ListCurrentRunningRestoreJobsGetRunningRestoresAttributeType, val ListCurrentRunningRestoreJobsGetRunningRestoresRetType) { *arg = &val } -// CreateInstancePayloadAcl ACL is the Access Control List defining the IP ranges allowed to connect to the database +// ListCurrentRunningRestoreJobs struct for ListCurrentRunningRestoreJobs // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type CreateInstancePayloadAcl struct { - // a simple list with IP addresses with CIDR. - Items CreateInstancePayloadAclGetItemsAttributeType `json:"items,omitempty"` +type ListCurrentRunningRestoreJobs struct { + // List of the currently running Restore jobs + // REQUIRED + RunningRestores ListCurrentRunningRestoreJobsGetRunningRestoresAttributeType `json:"runningRestores" required:"true"` } -// NewCreateInstancePayloadAcl instantiates a new CreateInstancePayloadAcl object +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ListCurrentRunningRestoreJobs ListCurrentRunningRestoreJobs + +// NewListCurrentRunningRestoreJobs instantiates a new ListCurrentRunningRestoreJobs 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 NewCreateInstancePayloadAcl() *CreateInstancePayloadAcl { - this := CreateInstancePayloadAcl{} +func NewListCurrentRunningRestoreJobs(runningRestores ListCurrentRunningRestoreJobsGetRunningRestoresArgType) *ListCurrentRunningRestoreJobs { + this := ListCurrentRunningRestoreJobs{} + setListCurrentRunningRestoreJobsGetRunningRestoresAttributeType(&this.RunningRestores, runningRestores) return &this } -// NewCreateInstancePayloadAclWithDefaults instantiates a new CreateInstancePayloadAcl object +// NewListCurrentRunningRestoreJobsWithDefaults instantiates a new ListCurrentRunningRestoreJobs 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 NewCreateInstancePayloadAclWithDefaults() *CreateInstancePayloadAcl { - this := CreateInstancePayloadAcl{} +func NewListCurrentRunningRestoreJobsWithDefaults() *ListCurrentRunningRestoreJobs { + this := ListCurrentRunningRestoreJobs{} return &this } -// GetItems returns the Items field value if set, zero value otherwise. +// GetRunningRestores returns the RunningRestores field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayloadAcl) GetItems() (res CreateInstancePayloadAclGetItemsRetType) { - res, _ = o.GetItemsOk() - return +func (o *ListCurrentRunningRestoreJobs) GetRunningRestores() (ret ListCurrentRunningRestoreJobsGetRunningRestoresRetType) { + ret, _ = o.GetRunningRestoresOk() + return ret } -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// GetRunningRestoresOk returns a tuple with the RunningRestores 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 *CreateInstancePayloadAcl) GetItemsOk() (ret CreateInstancePayloadAclGetItemsRetType, ok bool) { - return getCreateInstancePayloadAclGetItemsAttributeTypeOk(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 *CreateInstancePayloadAcl) HasItems() bool { - _, ok := o.GetItemsOk() - return ok +func (o *ListCurrentRunningRestoreJobs) GetRunningRestoresOk() (ret ListCurrentRunningRestoreJobsGetRunningRestoresRetType, ok bool) { + return getListCurrentRunningRestoreJobsGetRunningRestoresAttributeTypeOk(o.RunningRestores) } -// SetItems gets a reference to the given []string and assigns it to the Items field. +// SetRunningRestores sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *CreateInstancePayloadAcl) SetItems(v CreateInstancePayloadAclGetItemsRetType) { - setCreateInstancePayloadAclGetItemsAttributeType(&o.Items, v) +func (o *ListCurrentRunningRestoreJobs) SetRunningRestores(v ListCurrentRunningRestoreJobsGetRunningRestoresRetType) { + setListCurrentRunningRestoreJobsGetRunningRestoresAttributeType(&o.RunningRestores, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o CreateInstancePayloadAcl) ToMap() (map[string]interface{}, error) { +func (o ListCurrentRunningRestoreJobs) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getCreateInstancePayloadAclGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val + if val, ok := getListCurrentRunningRestoreJobsGetRunningRestoresAttributeTypeOk(o.RunningRestores); ok { + toSerialize["RunningRestores"] = val } return toSerialize, nil } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableCreateInstancePayloadAcl struct { - value *CreateInstancePayloadAcl +type NullableListCurrentRunningRestoreJobs struct { + value *ListCurrentRunningRestoreJobs isSet bool } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableCreateInstancePayloadAcl) Get() *CreateInstancePayloadAcl { +func (v NullableListCurrentRunningRestoreJobs) Get() *ListCurrentRunningRestoreJobs { return v.value } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableCreateInstancePayloadAcl) Set(val *CreateInstancePayloadAcl) { +func (v *NullableListCurrentRunningRestoreJobs) Set(val *ListCurrentRunningRestoreJobs) { 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 NullableCreateInstancePayloadAcl) IsSet() bool { +func (v NullableListCurrentRunningRestoreJobs) 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 *NullableCreateInstancePayloadAcl) Unset() { +func (v *NullableListCurrentRunningRestoreJobs) 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 NewNullableCreateInstancePayloadAcl(val *CreateInstancePayloadAcl) *NullableCreateInstancePayloadAcl { - return &NullableCreateInstancePayloadAcl{value: val, isSet: true} +func NewNullableListCurrentRunningRestoreJobs(val *ListCurrentRunningRestoreJobs) *NullableListCurrentRunningRestoreJobs { + return &NullableListCurrentRunningRestoreJobs{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 NullableCreateInstancePayloadAcl) MarshalJSON() ([]byte, error) { +func (v NullableListCurrentRunningRestoreJobs) 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 *NullableCreateInstancePayloadAcl) UnmarshalJSON(src []byte) error { +func (v *NullableListCurrentRunningRestoreJobs) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/sqlserverflex/model_list_current_running_restore_jobs_test.go b/services/sqlserverflex/model_list_current_running_restore_jobs_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_list_current_running_restore_jobs_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_instance_error.go b/services/sqlserverflex/model_list_database.go similarity index 50% rename from services/sqlserverflex/model_instance_error.go rename to services/sqlserverflex/model_list_database.go index 131139408..1667fcc82 100644 --- a/services/sqlserverflex/model_instance_error.go +++ b/services/sqlserverflex/model_list_database.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,25 +15,19 @@ import ( "encoding/json" ) -// checks if the InstanceError type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InstanceError{} +// checks if the ListDatabase type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListDatabase{} /* - types and functions for code + types and functions for created */ -// isInteger -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceErrorGetCodeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceErrorGetCodeArgType = int64 - +// isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceErrorGetCodeRetType = int64 +type ListDatabaseGetCreatedAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceErrorGetCodeAttributeTypeOk(arg InstanceErrorGetCodeAttributeType) (ret InstanceErrorGetCodeRetType, ok bool) { +func getListDatabaseGetCreatedAttributeTypeOk(arg ListDatabaseGetCreatedAttributeType) (ret ListDatabaseGetCreatedRetType, ok bool) { if arg == nil { return ret, false } @@ -41,26 +35,32 @@ func getInstanceErrorGetCodeAttributeTypeOk(arg InstanceErrorGetCodeAttributeTyp } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceErrorGetCodeAttributeType(arg *InstanceErrorGetCodeAttributeType, val InstanceErrorGetCodeRetType) { +func setListDatabaseGetCreatedAttributeType(arg *ListDatabaseGetCreatedAttributeType, val ListDatabaseGetCreatedRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListDatabaseGetCreatedArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListDatabaseGetCreatedRetType = string + /* - types and functions for fields + types and functions for id */ -// isContainer +// isLong // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceErrorGetFieldsAttributeType = *map[string][]string +type ListDatabaseGetIdAttributeType = *int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceErrorGetFieldsArgType = map[string][]string +type ListDatabaseGetIdArgType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceErrorGetFieldsRetType = map[string][]string +type ListDatabaseGetIdRetType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceErrorGetFieldsAttributeTypeOk(arg InstanceErrorGetFieldsAttributeType) (ret InstanceErrorGetFieldsRetType, ok bool) { +func getListDatabaseGetIdAttributeTypeOk(arg ListDatabaseGetIdAttributeType) (ret ListDatabaseGetIdRetType, ok bool) { if arg == nil { return ret, false } @@ -68,20 +68,20 @@ func getInstanceErrorGetFieldsAttributeTypeOk(arg InstanceErrorGetFieldsAttribut } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceErrorGetFieldsAttributeType(arg *InstanceErrorGetFieldsAttributeType, val InstanceErrorGetFieldsRetType) { +func setListDatabaseGetIdAttributeType(arg *ListDatabaseGetIdAttributeType, val ListDatabaseGetIdRetType) { *arg = &val } /* - types and functions for message + types and functions for name */ // isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceErrorGetMessageAttributeType = *string +type ListDatabaseGetNameAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceErrorGetMessageAttributeTypeOk(arg InstanceErrorGetMessageAttributeType) (ret InstanceErrorGetMessageRetType, ok bool) { +func getListDatabaseGetNameAttributeTypeOk(arg ListDatabaseGetNameAttributeType) (ret ListDatabaseGetNameRetType, ok bool) { if arg == nil { return ret, false } @@ -89,32 +89,26 @@ func getInstanceErrorGetMessageAttributeTypeOk(arg InstanceErrorGetMessageAttrib } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceErrorGetMessageAttributeType(arg *InstanceErrorGetMessageAttributeType, val InstanceErrorGetMessageRetType) { +func setListDatabaseGetNameAttributeType(arg *ListDatabaseGetNameAttributeType, val ListDatabaseGetNameRetType) { *arg = &val } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceErrorGetMessageArgType = string +type ListDatabaseGetNameArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceErrorGetMessageRetType = string +type ListDatabaseGetNameRetType = string /* - types and functions for type + types and functions for owner */ -// isEnumRef -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceErrorGetTypeAttributeType = *Type - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceErrorGetTypeArgType = Type - +// isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceErrorGetTypeRetType = Type +type ListDatabaseGetOwnerAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceErrorGetTypeAttributeTypeOk(arg InstanceErrorGetTypeAttributeType) (ret InstanceErrorGetTypeRetType, ok bool) { +func getListDatabaseGetOwnerAttributeTypeOk(arg ListDatabaseGetOwnerAttributeType) (ret ListDatabaseGetOwnerRetType, ok bool) { if arg == nil { return ret, false } @@ -122,205 +116,197 @@ func getInstanceErrorGetTypeAttributeTypeOk(arg InstanceErrorGetTypeAttributeTyp } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceErrorGetTypeAttributeType(arg *InstanceErrorGetTypeAttributeType, val InstanceErrorGetTypeRetType) { +func setListDatabaseGetOwnerAttributeType(arg *ListDatabaseGetOwnerAttributeType, val ListDatabaseGetOwnerRetType) { *arg = &val } -// InstanceError struct for InstanceError // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceError struct { - // Can be cast to int32 without loss of precision. - Code InstanceErrorGetCodeAttributeType `json:"code,omitempty"` - Fields InstanceErrorGetFieldsAttributeType `json:"fields,omitempty"` - Message InstanceErrorGetMessageAttributeType `json:"message,omitempty"` - Type InstanceErrorGetTypeAttributeType `json:"type,omitempty"` +type ListDatabaseGetOwnerArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListDatabaseGetOwnerRetType = string + +// ListDatabase struct for ListDatabase +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListDatabase struct { + // The date when the database was created in RFC3339 format. + // REQUIRED + Created ListDatabaseGetCreatedAttributeType `json:"created" required:"true"` + // The id of the database. + // REQUIRED + Id ListDatabaseGetIdAttributeType `json:"id" required:"true"` + // The name of the database. + // REQUIRED + Name ListDatabaseGetNameAttributeType `json:"name" required:"true"` + // The owner of the database. + // REQUIRED + Owner ListDatabaseGetOwnerAttributeType `json:"owner" required:"true"` } -// NewInstanceError instantiates a new InstanceError object +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ListDatabase ListDatabase + +// NewListDatabase instantiates a new ListDatabase 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 NewInstanceError() *InstanceError { - this := InstanceError{} +func NewListDatabase(created ListDatabaseGetCreatedArgType, id ListDatabaseGetIdArgType, name ListDatabaseGetNameArgType, owner ListDatabaseGetOwnerArgType) *ListDatabase { + this := ListDatabase{} + setListDatabaseGetCreatedAttributeType(&this.Created, created) + setListDatabaseGetIdAttributeType(&this.Id, id) + setListDatabaseGetNameAttributeType(&this.Name, name) + setListDatabaseGetOwnerAttributeType(&this.Owner, owner) return &this } -// NewInstanceErrorWithDefaults instantiates a new InstanceError object +// NewListDatabaseWithDefaults instantiates a new ListDatabase 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 NewInstanceErrorWithDefaults() *InstanceError { - this := InstanceError{} +func NewListDatabaseWithDefaults() *ListDatabase { + this := ListDatabase{} return &this } -// GetCode returns the Code field value if set, zero value otherwise. +// GetCreated returns the Created field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceError) GetCode() (res InstanceErrorGetCodeRetType) { - res, _ = o.GetCodeOk() - return +func (o *ListDatabase) GetCreated() (ret ListDatabaseGetCreatedRetType) { + ret, _ = o.GetCreatedOk() + return ret } -// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// GetCreatedOk returns a tuple with the Created 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 *InstanceError) GetCodeOk() (ret InstanceErrorGetCodeRetType, ok bool) { - return getInstanceErrorGetCodeAttributeTypeOk(o.Code) +func (o *ListDatabase) GetCreatedOk() (ret ListDatabaseGetCreatedRetType, ok bool) { + return getListDatabaseGetCreatedAttributeTypeOk(o.Created) } -// HasCode returns a boolean if a field has been set. +// SetCreated sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceError) HasCode() bool { - _, ok := o.GetCodeOk() - return ok +func (o *ListDatabase) SetCreated(v ListDatabaseGetCreatedRetType) { + setListDatabaseGetCreatedAttributeType(&o.Created, v) } -// SetCode gets a reference to the given int64 and assigns it to the Code field. +// 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 *InstanceError) SetCode(v InstanceErrorGetCodeRetType) { - setInstanceErrorGetCodeAttributeType(&o.Code, v) +func (o *ListDatabase) GetId() (ret ListDatabaseGetIdRetType) { + ret, _ = o.GetIdOk() + return ret } -// GetFields returns the Fields 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 *InstanceError) GetFields() (res InstanceErrorGetFieldsRetType) { - res, _ = o.GetFieldsOk() - return -} - -// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise +// 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 *InstanceError) GetFieldsOk() (ret InstanceErrorGetFieldsRetType, ok bool) { - return getInstanceErrorGetFieldsAttributeTypeOk(o.Fields) -} - -// HasFields 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 *InstanceError) HasFields() bool { - _, ok := o.GetFieldsOk() - return ok +func (o *ListDatabase) GetIdOk() (ret ListDatabaseGetIdRetType, ok bool) { + return getListDatabaseGetIdAttributeTypeOk(o.Id) } -// SetFields gets a reference to the given map[string][]string and assigns it to the Fields field. +// 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 *InstanceError) SetFields(v InstanceErrorGetFieldsRetType) { - setInstanceErrorGetFieldsAttributeType(&o.Fields, v) +func (o *ListDatabase) SetId(v ListDatabaseGetIdRetType) { + setListDatabaseGetIdAttributeType(&o.Id, v) } -// GetMessage returns the Message field value if set, zero value otherwise. +// GetName returns the Name field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceError) GetMessage() (res InstanceErrorGetMessageRetType) { - res, _ = o.GetMessageOk() - return +func (o *ListDatabase) GetName() (ret ListDatabaseGetNameRetType) { + ret, _ = o.GetNameOk() + return ret } -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceError) GetMessageOk() (ret InstanceErrorGetMessageRetType, ok bool) { - return getInstanceErrorGetMessageAttributeTypeOk(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 *InstanceError) HasMessage() bool { - _, ok := o.GetMessageOk() - return ok +func (o *ListDatabase) GetNameOk() (ret ListDatabaseGetNameRetType, ok bool) { + return getListDatabaseGetNameAttributeTypeOk(o.Name) } -// SetMessage gets a reference to the given string and assigns it to the Message field. +// SetName sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceError) SetMessage(v InstanceErrorGetMessageRetType) { - setInstanceErrorGetMessageAttributeType(&o.Message, v) +func (o *ListDatabase) SetName(v ListDatabaseGetNameRetType) { + setListDatabaseGetNameAttributeType(&o.Name, v) } -// GetType returns the Type field value if set, zero value otherwise. +// GetOwner returns the Owner field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceError) GetType() (res InstanceErrorGetTypeRetType) { - res, _ = o.GetTypeOk() - return +func (o *ListDatabase) GetOwner() (ret ListDatabaseGetOwnerRetType) { + ret, _ = o.GetOwnerOk() + return ret } -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// GetOwnerOk returns a tuple with the Owner 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 *InstanceError) GetTypeOk() (ret InstanceErrorGetTypeRetType, ok bool) { - return getInstanceErrorGetTypeAttributeTypeOk(o.Type) -} - -// HasType returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceError) HasType() bool { - _, ok := o.GetTypeOk() - return ok +func (o *ListDatabase) GetOwnerOk() (ret ListDatabaseGetOwnerRetType, ok bool) { + return getListDatabaseGetOwnerAttributeTypeOk(o.Owner) } -// SetType gets a reference to the given Type and assigns it to the Type field. +// SetOwner sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceError) SetType(v InstanceErrorGetTypeRetType) { - setInstanceErrorGetTypeAttributeType(&o.Type, v) +func (o *ListDatabase) SetOwner(v ListDatabaseGetOwnerRetType) { + setListDatabaseGetOwnerAttributeType(&o.Owner, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o InstanceError) ToMap() (map[string]interface{}, error) { +func (o ListDatabase) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getInstanceErrorGetCodeAttributeTypeOk(o.Code); ok { - toSerialize["Code"] = val + if val, ok := getListDatabaseGetCreatedAttributeTypeOk(o.Created); ok { + toSerialize["Created"] = val } - if val, ok := getInstanceErrorGetFieldsAttributeTypeOk(o.Fields); ok { - toSerialize["Fields"] = val + if val, ok := getListDatabaseGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val } - if val, ok := getInstanceErrorGetMessageAttributeTypeOk(o.Message); ok { - toSerialize["Message"] = val + if val, ok := getListDatabaseGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val } - if val, ok := getInstanceErrorGetTypeAttributeTypeOk(o.Type); ok { - toSerialize["Type"] = val + if val, ok := getListDatabaseGetOwnerAttributeTypeOk(o.Owner); ok { + toSerialize["Owner"] = val } return toSerialize, nil } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableInstanceError struct { - value *InstanceError +type NullableListDatabase struct { + value *ListDatabase isSet bool } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInstanceError) Get() *InstanceError { +func (v NullableListDatabase) Get() *ListDatabase { return v.value } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInstanceError) Set(val *InstanceError) { +func (v *NullableListDatabase) Set(val *ListDatabase) { 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 NullableInstanceError) IsSet() bool { +func (v NullableListDatabase) 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 *NullableInstanceError) Unset() { +func (v *NullableListDatabase) 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 NewNullableInstanceError(val *InstanceError) *NullableInstanceError { - return &NullableInstanceError{value: val, isSet: true} +func NewNullableListDatabase(val *ListDatabase) *NullableListDatabase { + return &NullableListDatabase{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 NullableInstanceError) MarshalJSON() ([]byte, error) { +func (v NullableListDatabase) 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 *NullableInstanceError) UnmarshalJSON(src []byte) error { +func (v *NullableListDatabase) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/sqlserverflex/model_list_database_test.go b/services/sqlserverflex/model_list_database_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_list_database_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_list_databases_response.go b/services/sqlserverflex/model_list_databases_response.go index cf8529135..e4eeba1dc 100644 --- a/services/sqlserverflex/model_list_databases_response.go +++ b/services/sqlserverflex/model_list_databases_response.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -24,13 +24,13 @@ var _ MappedNullable = &ListDatabasesResponse{} // isArray // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListDatabasesResponseGetDatabasesAttributeType = *[]Database +type ListDatabasesResponseGetDatabasesAttributeType = *[]ListDatabase // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListDatabasesResponseGetDatabasesArgType = []Database +type ListDatabasesResponseGetDatabasesArgType = []ListDatabase // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListDatabasesResponseGetDatabasesRetType = []Database +type ListDatabasesResponseGetDatabasesRetType = []ListDatabase // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListDatabasesResponseGetDatabasesAttributeTypeOk(arg ListDatabasesResponseGetDatabasesAttributeType) (ret ListDatabasesResponseGetDatabasesRetType, ok bool) { @@ -45,19 +45,55 @@ func setListDatabasesResponseGetDatabasesAttributeType(arg *ListDatabasesRespons *arg = &val } +/* + types and functions for pagination +*/ + +// isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListDatabasesResponseGetPaginationAttributeType = *Pagination + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListDatabasesResponseGetPaginationArgType = Pagination + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListDatabasesResponseGetPaginationRetType = Pagination + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getListDatabasesResponseGetPaginationAttributeTypeOk(arg ListDatabasesResponseGetPaginationAttributeType) (ret ListDatabasesResponseGetPaginationRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setListDatabasesResponseGetPaginationAttributeType(arg *ListDatabasesResponseGetPaginationAttributeType, val ListDatabasesResponseGetPaginationRetType) { + *arg = &val +} + // ListDatabasesResponse struct for ListDatabasesResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListDatabasesResponse struct { - Databases ListDatabasesResponseGetDatabasesAttributeType `json:"databases,omitempty"` + // A list containing all databases for the instance. + // REQUIRED + Databases ListDatabasesResponseGetDatabasesAttributeType `json:"databases" required:"true"` + // REQUIRED + Pagination ListDatabasesResponseGetPaginationAttributeType `json:"pagination" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ListDatabasesResponse ListDatabasesResponse + // NewListDatabasesResponse instantiates a new ListDatabasesResponse 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 NewListDatabasesResponse() *ListDatabasesResponse { +func NewListDatabasesResponse(databases ListDatabasesResponseGetDatabasesArgType, pagination ListDatabasesResponseGetPaginationArgType) *ListDatabasesResponse { this := ListDatabasesResponse{} + setListDatabasesResponseGetDatabasesAttributeType(&this.Databases, databases) + setListDatabasesResponseGetPaginationAttributeType(&this.Pagination, pagination) return &this } @@ -70,31 +106,44 @@ func NewListDatabasesResponseWithDefaults() *ListDatabasesResponse { return &this } -// GetDatabases returns the Databases field value if set, zero value otherwise. +// GetDatabases returns the Databases field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListDatabasesResponse) GetDatabases() (res ListDatabasesResponseGetDatabasesRetType) { - res, _ = o.GetDatabasesOk() - return +func (o *ListDatabasesResponse) GetDatabases() (ret ListDatabasesResponseGetDatabasesRetType) { + ret, _ = o.GetDatabasesOk() + return ret } -// GetDatabasesOk returns a tuple with the Databases field value if set, nil otherwise +// GetDatabasesOk returns a tuple with the Databases 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 *ListDatabasesResponse) GetDatabasesOk() (ret ListDatabasesResponseGetDatabasesRetType, ok bool) { return getListDatabasesResponseGetDatabasesAttributeTypeOk(o.Databases) } -// HasDatabases returns a boolean if a field has been set. +// SetDatabases sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListDatabasesResponse) HasDatabases() bool { - _, ok := o.GetDatabasesOk() - return ok +func (o *ListDatabasesResponse) SetDatabases(v ListDatabasesResponseGetDatabasesRetType) { + setListDatabasesResponseGetDatabasesAttributeType(&o.Databases, v) } -// SetDatabases gets a reference to the given []Database and assigns it to the Databases field. +// GetPagination returns the Pagination field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListDatabasesResponse) SetDatabases(v ListDatabasesResponseGetDatabasesRetType) { - setListDatabasesResponseGetDatabasesAttributeType(&o.Databases, v) +func (o *ListDatabasesResponse) GetPagination() (ret ListDatabasesResponseGetPaginationRetType) { + ret, _ = o.GetPaginationOk() + return ret +} + +// GetPaginationOk returns a tuple with the Pagination 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 *ListDatabasesResponse) GetPaginationOk() (ret ListDatabasesResponseGetPaginationRetType, ok bool) { + return getListDatabasesResponseGetPaginationAttributeTypeOk(o.Pagination) +} + +// SetPagination sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListDatabasesResponse) SetPagination(v ListDatabasesResponseGetPaginationRetType) { + setListDatabasesResponseGetPaginationAttributeType(&o.Pagination, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -103,6 +152,9 @@ func (o ListDatabasesResponse) ToMap() (map[string]interface{}, error) { if val, ok := getListDatabasesResponseGetDatabasesAttributeTypeOk(o.Databases); ok { toSerialize["Databases"] = val } + if val, ok := getListDatabasesResponseGetPaginationAttributeTypeOk(o.Pagination); ok { + toSerialize["Pagination"] = val + } return toSerialize, nil } diff --git a/services/sqlserverflex/model_list_databases_response_test.go b/services/sqlserverflex/model_list_databases_response_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_list_databases_response_test.go +++ b/services/sqlserverflex/model_list_databases_response_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_backup.go b/services/sqlserverflex/model_list_flavors.go similarity index 50% rename from services/sqlserverflex/model_backup.go rename to services/sqlserverflex/model_list_flavors.go index b48ea2778..19f73f5f5 100644 --- a/services/sqlserverflex/model_backup.go +++ b/services/sqlserverflex/model_list_flavors.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,19 +15,25 @@ import ( "encoding/json" ) -// checks if the Backup type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Backup{} +// checks if the ListFlavors type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListFlavors{} /* - types and functions for endTime + types and functions for cpu */ -// isNotNullableString +// isLong // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetEndTimeAttributeType = *string +type ListFlavorsGetCpuAttributeType = *int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupGetEndTimeAttributeTypeOk(arg BackupGetEndTimeAttributeType) (ret BackupGetEndTimeRetType, ok bool) { +type ListFlavorsGetCpuArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListFlavorsGetCpuRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getListFlavorsGetCpuAttributeTypeOk(arg ListFlavorsGetCpuAttributeType) (ret ListFlavorsGetCpuRetType, ok bool) { if arg == nil { return ret, false } @@ -35,26 +41,20 @@ func getBackupGetEndTimeAttributeTypeOk(arg BackupGetEndTimeAttributeType) (ret } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBackupGetEndTimeAttributeType(arg *BackupGetEndTimeAttributeType, val BackupGetEndTimeRetType) { +func setListFlavorsGetCpuAttributeType(arg *ListFlavorsGetCpuAttributeType, val ListFlavorsGetCpuRetType) { *arg = &val } -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetEndTimeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetEndTimeRetType = string - /* - types and functions for error + types and functions for description */ // isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetErrorAttributeType = *string +type ListFlavorsGetDescriptionAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupGetErrorAttributeTypeOk(arg BackupGetErrorAttributeType) (ret BackupGetErrorRetType, ok bool) { +func getListFlavorsGetDescriptionAttributeTypeOk(arg ListFlavorsGetDescriptionAttributeType) (ret ListFlavorsGetDescriptionRetType, ok bool) { if arg == nil { return ret, false } @@ -62,15 +62,15 @@ func getBackupGetErrorAttributeTypeOk(arg BackupGetErrorAttributeType) (ret Back } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBackupGetErrorAttributeType(arg *BackupGetErrorAttributeType, val BackupGetErrorRetType) { +func setListFlavorsGetDescriptionAttributeType(arg *ListFlavorsGetDescriptionAttributeType, val ListFlavorsGetDescriptionRetType) { *arg = &val } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetErrorArgType = string +type ListFlavorsGetDescriptionArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetErrorRetType = string +type ListFlavorsGetDescriptionRetType = string /* types and functions for id @@ -78,10 +78,10 @@ type BackupGetErrorRetType = string // isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetIdAttributeType = *string +type ListFlavorsGetIdAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupGetIdAttributeTypeOk(arg BackupGetIdAttributeType) (ret BackupGetIdRetType, ok bool) { +func getListFlavorsGetIdAttributeTypeOk(arg ListFlavorsGetIdAttributeType) (ret ListFlavorsGetIdRetType, ok bool) { if arg == nil { return ret, false } @@ -89,32 +89,32 @@ func getBackupGetIdAttributeTypeOk(arg BackupGetIdAttributeType) (ret BackupGetI } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBackupGetIdAttributeType(arg *BackupGetIdAttributeType, val BackupGetIdRetType) { +func setListFlavorsGetIdAttributeType(arg *ListFlavorsGetIdAttributeType, val ListFlavorsGetIdRetType) { *arg = &val } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetIdArgType = string +type ListFlavorsGetIdArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetIdRetType = string +type ListFlavorsGetIdRetType = string /* - types and functions for labels + types and functions for maxGB */ -// isArray +// isInteger // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetLabelsAttributeType = *[]string +type ListFlavorsGetMaxGBAttributeType = *int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetLabelsArgType = []string +type ListFlavorsGetMaxGBArgType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetLabelsRetType = []string +type ListFlavorsGetMaxGBRetType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupGetLabelsAttributeTypeOk(arg BackupGetLabelsAttributeType) (ret BackupGetLabelsRetType, ok bool) { +func getListFlavorsGetMaxGBAttributeTypeOk(arg ListFlavorsGetMaxGBAttributeType) (ret ListFlavorsGetMaxGBRetType, ok bool) { if arg == nil { return ret, false } @@ -122,20 +122,26 @@ func getBackupGetLabelsAttributeTypeOk(arg BackupGetLabelsAttributeType) (ret Ba } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBackupGetLabelsAttributeType(arg *BackupGetLabelsAttributeType, val BackupGetLabelsRetType) { +func setListFlavorsGetMaxGBAttributeType(arg *ListFlavorsGetMaxGBAttributeType, val ListFlavorsGetMaxGBRetType) { *arg = &val } /* - types and functions for name + types and functions for memory */ -// isNotNullableString +// isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListFlavorsGetMemoryAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListFlavorsGetMemoryArgType = int64 + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetNameAttributeType = *string +type ListFlavorsGetMemoryRetType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupGetNameAttributeTypeOk(arg BackupGetNameAttributeType) (ret BackupGetNameRetType, ok bool) { +func getListFlavorsGetMemoryAttributeTypeOk(arg ListFlavorsGetMemoryAttributeType) (ret ListFlavorsGetMemoryRetType, ok bool) { if arg == nil { return ret, false } @@ -143,32 +149,26 @@ func getBackupGetNameAttributeTypeOk(arg BackupGetNameAttributeType) (ret Backup } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBackupGetNameAttributeType(arg *BackupGetNameAttributeType, val BackupGetNameRetType) { +func setListFlavorsGetMemoryAttributeType(arg *ListFlavorsGetMemoryAttributeType, val ListFlavorsGetMemoryRetType) { *arg = &val } -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetNameRetType = string - /* - types and functions for options + types and functions for minGB */ -// isContainer +// isInteger // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetOptionsAttributeType = *map[string]string +type ListFlavorsGetMinGBAttributeType = *int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetOptionsArgType = map[string]string +type ListFlavorsGetMinGBArgType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetOptionsRetType = map[string]string +type ListFlavorsGetMinGBRetType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupGetOptionsAttributeTypeOk(arg BackupGetOptionsAttributeType) (ret BackupGetOptionsRetType, ok bool) { +func getListFlavorsGetMinGBAttributeTypeOk(arg ListFlavorsGetMinGBAttributeType) (ret ListFlavorsGetMinGBRetType, ok bool) { if arg == nil { return ret, false } @@ -176,26 +176,20 @@ func getBackupGetOptionsAttributeTypeOk(arg BackupGetOptionsAttributeType) (ret } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBackupGetOptionsAttributeType(arg *BackupGetOptionsAttributeType, val BackupGetOptionsRetType) { +func setListFlavorsGetMinGBAttributeType(arg *ListFlavorsGetMinGBAttributeType, val ListFlavorsGetMinGBRetType) { *arg = &val } /* - types and functions for size + types and functions for nodeType */ -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetSizeAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetSizeArgType = int64 - +// isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetSizeRetType = int64 +type ListFlavorsGetNodeTypeAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupGetSizeAttributeTypeOk(arg BackupGetSizeAttributeType) (ret BackupGetSizeRetType, ok bool) { +func getListFlavorsGetNodeTypeAttributeTypeOk(arg ListFlavorsGetNodeTypeAttributeType) (ret ListFlavorsGetNodeTypeRetType, ok bool) { if arg == nil { return ret, false } @@ -203,20 +197,32 @@ func getBackupGetSizeAttributeTypeOk(arg BackupGetSizeAttributeType) (ret Backup } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBackupGetSizeAttributeType(arg *BackupGetSizeAttributeType, val BackupGetSizeRetType) { +func setListFlavorsGetNodeTypeAttributeType(arg *ListFlavorsGetNodeTypeAttributeType, val ListFlavorsGetNodeTypeRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListFlavorsGetNodeTypeArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListFlavorsGetNodeTypeRetType = string + /* - types and functions for startTime + types and functions for storageClasses */ -// isNotNullableString +// isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListFlavorsGetStorageClassesAttributeType = *[]FlavorStorageClassesStorageClass + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListFlavorsGetStorageClassesArgType = []FlavorStorageClassesStorageClass + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetStartTimeAttributeType = *string +type ListFlavorsGetStorageClassesRetType = []FlavorStorageClassesStorageClass // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getBackupGetStartTimeAttributeTypeOk(arg BackupGetStartTimeAttributeType) (ret BackupGetStartTimeRetType, ok bool) { +func getListFlavorsGetStorageClassesAttributeTypeOk(arg ListFlavorsGetStorageClassesAttributeType) (ret ListFlavorsGetStorageClassesRetType, ok bool) { if arg == nil { return ret, false } @@ -224,334 +230,301 @@ func getBackupGetStartTimeAttributeTypeOk(arg BackupGetStartTimeAttributeType) ( } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setBackupGetStartTimeAttributeType(arg *BackupGetStartTimeAttributeType, val BackupGetStartTimeRetType) { +func setListFlavorsGetStorageClassesAttributeType(arg *ListFlavorsGetStorageClassesAttributeType, val ListFlavorsGetStorageClassesRetType) { *arg = &val } -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetStartTimeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type BackupGetStartTimeRetType = string - -// Backup struct for Backup -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Backup struct { - EndTime BackupGetEndTimeAttributeType `json:"endTime,omitempty"` - Error BackupGetErrorAttributeType `json:"error,omitempty"` - Id BackupGetIdAttributeType `json:"id,omitempty"` - Labels BackupGetLabelsAttributeType `json:"labels,omitempty"` - Name BackupGetNameAttributeType `json:"name,omitempty"` - Options BackupGetOptionsAttributeType `json:"options,omitempty"` - Size BackupGetSizeAttributeType `json:"size,omitempty"` - StartTime BackupGetStartTimeAttributeType `json:"startTime,omitempty"` -} - -// NewBackup instantiates a new Backup object +// ListFlavors The flavor of the instance containing the technical features. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListFlavors struct { + // The cpu count of the instance. + // REQUIRED + Cpu ListFlavorsGetCpuAttributeType `json:"cpu" required:"true"` + // The flavor description. + // REQUIRED + Description ListFlavorsGetDescriptionAttributeType `json:"description" required:"true"` + // The id of the instance flavor. + // REQUIRED + Id ListFlavorsGetIdAttributeType `json:"id" required:"true"` + // maximum storage which can be ordered for the flavor in Gigabyte. + // Can be cast to int32 without loss of precision. + // REQUIRED + MaxGB ListFlavorsGetMaxGBAttributeType `json:"maxGB" required:"true"` + // The memory of the instance in Gibibyte. + // REQUIRED + Memory ListFlavorsGetMemoryAttributeType `json:"memory" required:"true"` + // minimum storage which is required to order in Gigabyte. + // Can be cast to int32 without loss of precision. + // REQUIRED + MinGB ListFlavorsGetMinGBAttributeType `json:"minGB" required:"true"` + // defines the nodeType it can be either single or HA + // REQUIRED + NodeType ListFlavorsGetNodeTypeAttributeType `json:"nodeType" required:"true"` + // maximum storage which can be ordered for the flavor in Gigabyte. + // REQUIRED + StorageClasses ListFlavorsGetStorageClassesAttributeType `json:"storageClasses" required:"true"` +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ListFlavors ListFlavors + +// NewListFlavors instantiates a new ListFlavors 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 NewBackup() *Backup { - this := Backup{} +func NewListFlavors(cpu ListFlavorsGetCpuArgType, description ListFlavorsGetDescriptionArgType, id ListFlavorsGetIdArgType, maxGB ListFlavorsGetMaxGBArgType, memory ListFlavorsGetMemoryArgType, minGB ListFlavorsGetMinGBArgType, nodeType ListFlavorsGetNodeTypeArgType, storageClasses ListFlavorsGetStorageClassesArgType) *ListFlavors { + this := ListFlavors{} + setListFlavorsGetCpuAttributeType(&this.Cpu, cpu) + setListFlavorsGetDescriptionAttributeType(&this.Description, description) + setListFlavorsGetIdAttributeType(&this.Id, id) + setListFlavorsGetMaxGBAttributeType(&this.MaxGB, maxGB) + setListFlavorsGetMemoryAttributeType(&this.Memory, memory) + setListFlavorsGetMinGBAttributeType(&this.MinGB, minGB) + setListFlavorsGetNodeTypeAttributeType(&this.NodeType, nodeType) + setListFlavorsGetStorageClassesAttributeType(&this.StorageClasses, storageClasses) return &this } -// NewBackupWithDefaults instantiates a new Backup object +// NewListFlavorsWithDefaults instantiates a new ListFlavors 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 NewBackupWithDefaults() *Backup { - this := Backup{} +func NewListFlavorsWithDefaults() *ListFlavors { + this := ListFlavors{} return &this } -// GetEndTime returns the EndTime field value if set, zero value otherwise. +// GetCpu returns the Cpu field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) GetEndTime() (res BackupGetEndTimeRetType) { - res, _ = o.GetEndTimeOk() - return +func (o *ListFlavors) GetCpu() (ret ListFlavorsGetCpuRetType) { + ret, _ = o.GetCpuOk() + return ret } -// GetEndTimeOk returns a tuple with the EndTime field value if set, nil otherwise +// GetCpuOk returns a tuple with the Cpu 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 *Backup) GetEndTimeOk() (ret BackupGetEndTimeRetType, ok bool) { - return getBackupGetEndTimeAttributeTypeOk(o.EndTime) -} - -// HasEndTime 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 *Backup) HasEndTime() bool { - _, ok := o.GetEndTimeOk() - return ok +func (o *ListFlavors) GetCpuOk() (ret ListFlavorsGetCpuRetType, ok bool) { + return getListFlavorsGetCpuAttributeTypeOk(o.Cpu) } -// SetEndTime gets a reference to the given string and assigns it to the EndTime field. +// SetCpu sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) SetEndTime(v BackupGetEndTimeRetType) { - setBackupGetEndTimeAttributeType(&o.EndTime, v) +func (o *ListFlavors) SetCpu(v ListFlavorsGetCpuRetType) { + setListFlavorsGetCpuAttributeType(&o.Cpu, v) } -// GetError returns the Error field value if set, zero value otherwise. +// GetDescription returns the Description field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) GetError() (res BackupGetErrorRetType) { - res, _ = o.GetErrorOk() - return +func (o *ListFlavors) GetDescription() (ret ListFlavorsGetDescriptionRetType) { + ret, _ = o.GetDescriptionOk() + return ret } -// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// GetDescriptionOk returns a tuple with the Description field value // and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) GetErrorOk() (ret BackupGetErrorRetType, ok bool) { - return getBackupGetErrorAttributeTypeOk(o.Error) +func (o *ListFlavors) GetDescriptionOk() (ret ListFlavorsGetDescriptionRetType, ok bool) { + return getListFlavorsGetDescriptionAttributeTypeOk(o.Description) } -// HasError returns a boolean if a field has been set. +// SetDescription sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) HasError() bool { - _, ok := o.GetErrorOk() - return ok +func (o *ListFlavors) SetDescription(v ListFlavorsGetDescriptionRetType) { + setListFlavorsGetDescriptionAttributeType(&o.Description, v) } -// SetError gets a reference to the given string and assigns it to the Error field. +// 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 *Backup) SetError(v BackupGetErrorRetType) { - setBackupGetErrorAttributeType(&o.Error, v) +func (o *ListFlavors) GetId() (ret ListFlavorsGetIdRetType) { + ret, _ = o.GetIdOk() + return ret } -// GetId returns the Id 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 *Backup) GetId() (res BackupGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// 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 *Backup) GetIdOk() (ret BackupGetIdRetType, ok bool) { - return getBackupGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *Backup) HasId() bool { - _, ok := o.GetIdOk() - return ok +func (o *ListFlavors) GetIdOk() (ret ListFlavorsGetIdRetType, ok bool) { + return getListFlavorsGetIdAttributeTypeOk(o.Id) } -// SetId gets a reference to the given string and assigns it to the Id field. +// 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 *Backup) SetId(v BackupGetIdRetType) { - setBackupGetIdAttributeType(&o.Id, v) +func (o *ListFlavors) SetId(v ListFlavorsGetIdRetType) { + setListFlavorsGetIdAttributeType(&o.Id, v) } -// GetLabels returns the Labels field value if set, zero value otherwise. +// GetMaxGB returns the MaxGB field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) GetLabels() (res BackupGetLabelsRetType) { - res, _ = o.GetLabelsOk() - return +func (o *ListFlavors) GetMaxGB() (ret ListFlavorsGetMaxGBRetType) { + ret, _ = o.GetMaxGBOk() + return ret } -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// GetMaxGBOk returns a tuple with the MaxGB 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 *Backup) GetLabelsOk() (ret BackupGetLabelsRetType, ok bool) { - return getBackupGetLabelsAttributeTypeOk(o.Labels) -} - -// HasLabels returns a boolean if a field has been set. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) HasLabels() bool { - _, ok := o.GetLabelsOk() - return ok +func (o *ListFlavors) GetMaxGBOk() (ret ListFlavorsGetMaxGBRetType, ok bool) { + return getListFlavorsGetMaxGBAttributeTypeOk(o.MaxGB) } -// SetLabels gets a reference to the given []string and assigns it to the Labels field. +// SetMaxGB sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) SetLabels(v BackupGetLabelsRetType) { - setBackupGetLabelsAttributeType(&o.Labels, v) +func (o *ListFlavors) SetMaxGB(v ListFlavorsGetMaxGBRetType) { + setListFlavorsGetMaxGBAttributeType(&o.MaxGB, v) } -// GetName returns the Name field value if set, zero value otherwise. +// GetMemory returns the Memory field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) GetName() (res BackupGetNameRetType) { - res, _ = o.GetNameOk() - return +func (o *ListFlavors) GetMemory() (ret ListFlavorsGetMemoryRetType) { + ret, _ = o.GetMemoryOk() + return ret } -// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// GetMemoryOk returns a tuple with the Memory 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 *Backup) GetNameOk() (ret BackupGetNameRetType, ok bool) { - return getBackupGetNameAttributeTypeOk(o.Name) +func (o *ListFlavors) GetMemoryOk() (ret ListFlavorsGetMemoryRetType, ok bool) { + return getListFlavorsGetMemoryAttributeTypeOk(o.Memory) } -// HasName returns a boolean if a field has been set. +// SetMemory sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) HasName() bool { - _, ok := o.GetNameOk() - return ok +func (o *ListFlavors) SetMemory(v ListFlavorsGetMemoryRetType) { + setListFlavorsGetMemoryAttributeType(&o.Memory, v) } -// SetName gets a reference to the given string and assigns it to the Name field. +// GetMinGB returns the MinGB field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) SetName(v BackupGetNameRetType) { - setBackupGetNameAttributeType(&o.Name, v) +func (o *ListFlavors) GetMinGB() (ret ListFlavorsGetMinGBRetType) { + ret, _ = o.GetMinGBOk() + return ret } -// GetOptions returns the Options 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 *Backup) GetOptions() (res BackupGetOptionsRetType) { - res, _ = o.GetOptionsOk() - return -} - -// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// GetMinGBOk returns a tuple with the MinGB 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 *Backup) GetOptionsOk() (ret BackupGetOptionsRetType, ok bool) { - return getBackupGetOptionsAttributeTypeOk(o.Options) +func (o *ListFlavors) GetMinGBOk() (ret ListFlavorsGetMinGBRetType, ok bool) { + return getListFlavorsGetMinGBAttributeTypeOk(o.MinGB) } -// HasOptions returns a boolean if a field has been set. +// SetMinGB sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) HasOptions() bool { - _, ok := o.GetOptionsOk() - return ok +func (o *ListFlavors) SetMinGB(v ListFlavorsGetMinGBRetType) { + setListFlavorsGetMinGBAttributeType(&o.MinGB, v) } -// SetOptions gets a reference to the given map[string]string and assigns it to the Options field. +// GetNodeType returns the NodeType field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) SetOptions(v BackupGetOptionsRetType) { - setBackupGetOptionsAttributeType(&o.Options, v) +func (o *ListFlavors) GetNodeType() (ret ListFlavorsGetNodeTypeRetType) { + ret, _ = o.GetNodeTypeOk() + return ret } -// GetSize returns the Size 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 *Backup) GetSize() (res BackupGetSizeRetType) { - res, _ = o.GetSizeOk() - return -} - -// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// GetNodeTypeOk returns a tuple with the NodeType 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 *Backup) GetSizeOk() (ret BackupGetSizeRetType, ok bool) { - return getBackupGetSizeAttributeTypeOk(o.Size) -} - -// HasSize 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 *Backup) HasSize() bool { - _, ok := o.GetSizeOk() - return ok +func (o *ListFlavors) GetNodeTypeOk() (ret ListFlavorsGetNodeTypeRetType, ok bool) { + return getListFlavorsGetNodeTypeAttributeTypeOk(o.NodeType) } -// SetSize gets a reference to the given int64 and assigns it to the Size field. +// SetNodeType sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) SetSize(v BackupGetSizeRetType) { - setBackupGetSizeAttributeType(&o.Size, v) +func (o *ListFlavors) SetNodeType(v ListFlavorsGetNodeTypeRetType) { + setListFlavorsGetNodeTypeAttributeType(&o.NodeType, v) } -// GetStartTime returns the StartTime field value if set, zero value otherwise. +// GetStorageClasses returns the StorageClasses field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) GetStartTime() (res BackupGetStartTimeRetType) { - res, _ = o.GetStartTimeOk() - return +func (o *ListFlavors) GetStorageClasses() (ret ListFlavorsGetStorageClassesRetType) { + ret, _ = o.GetStorageClassesOk() + return ret } -// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise +// GetStorageClassesOk returns a tuple with the StorageClasses 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 *Backup) GetStartTimeOk() (ret BackupGetStartTimeRetType, ok bool) { - return getBackupGetStartTimeAttributeTypeOk(o.StartTime) -} - -// HasStartTime 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 *Backup) HasStartTime() bool { - _, ok := o.GetStartTimeOk() - return ok +func (o *ListFlavors) GetStorageClassesOk() (ret ListFlavorsGetStorageClassesRetType, ok bool) { + return getListFlavorsGetStorageClassesAttributeTypeOk(o.StorageClasses) } -// SetStartTime gets a reference to the given string and assigns it to the StartTime field. +// SetStorageClasses sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Backup) SetStartTime(v BackupGetStartTimeRetType) { - setBackupGetStartTimeAttributeType(&o.StartTime, v) +func (o *ListFlavors) SetStorageClasses(v ListFlavorsGetStorageClassesRetType) { + setListFlavorsGetStorageClassesAttributeType(&o.StorageClasses, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Backup) ToMap() (map[string]interface{}, error) { +func (o ListFlavors) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getBackupGetEndTimeAttributeTypeOk(o.EndTime); ok { - toSerialize["EndTime"] = val + if val, ok := getListFlavorsGetCpuAttributeTypeOk(o.Cpu); ok { + toSerialize["Cpu"] = val } - if val, ok := getBackupGetErrorAttributeTypeOk(o.Error); ok { - toSerialize["Error"] = val + if val, ok := getListFlavorsGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val } - if val, ok := getBackupGetIdAttributeTypeOk(o.Id); ok { + if val, ok := getListFlavorsGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } - if val, ok := getBackupGetLabelsAttributeTypeOk(o.Labels); ok { - toSerialize["Labels"] = val + if val, ok := getListFlavorsGetMaxGBAttributeTypeOk(o.MaxGB); ok { + toSerialize["MaxGB"] = val } - if val, ok := getBackupGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val + if val, ok := getListFlavorsGetMemoryAttributeTypeOk(o.Memory); ok { + toSerialize["Memory"] = val } - if val, ok := getBackupGetOptionsAttributeTypeOk(o.Options); ok { - toSerialize["Options"] = val + if val, ok := getListFlavorsGetMinGBAttributeTypeOk(o.MinGB); ok { + toSerialize["MinGB"] = val } - if val, ok := getBackupGetSizeAttributeTypeOk(o.Size); ok { - toSerialize["Size"] = val + if val, ok := getListFlavorsGetNodeTypeAttributeTypeOk(o.NodeType); ok { + toSerialize["NodeType"] = val } - if val, ok := getBackupGetStartTimeAttributeTypeOk(o.StartTime); ok { - toSerialize["StartTime"] = val + if val, ok := getListFlavorsGetStorageClassesAttributeTypeOk(o.StorageClasses); ok { + toSerialize["StorageClasses"] = val } return toSerialize, nil } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableBackup struct { - value *Backup +type NullableListFlavors struct { + value *ListFlavors isSet bool } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableBackup) Get() *Backup { +func (v NullableListFlavors) Get() *ListFlavors { return v.value } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableBackup) Set(val *Backup) { +func (v *NullableListFlavors) Set(val *ListFlavors) { 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 NullableBackup) IsSet() bool { +func (v NullableListFlavors) 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 *NullableBackup) Unset() { +func (v *NullableListFlavors) 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 NewNullableBackup(val *Backup) *NullableBackup { - return &NullableBackup{value: val, isSet: true} +func NewNullableListFlavors(val *ListFlavors) *NullableListFlavors { + return &NullableListFlavors{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 NullableBackup) MarshalJSON() ([]byte, error) { +func (v NullableListFlavors) 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 *NullableBackup) UnmarshalJSON(src []byte) error { +func (v *NullableListFlavors) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/sqlserverflex/model_list_flavors_response.go b/services/sqlserverflex/model_list_flavors_response.go index e05be1924..6b7948ea1 100644 --- a/services/sqlserverflex/model_list_flavors_response.go +++ b/services/sqlserverflex/model_list_flavors_response.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -24,13 +24,13 @@ var _ MappedNullable = &ListFlavorsResponse{} // isArray // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListFlavorsResponseGetFlavorsAttributeType = *[]InstanceFlavorEntry +type ListFlavorsResponseGetFlavorsAttributeType = *[]ListFlavors // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListFlavorsResponseGetFlavorsArgType = []InstanceFlavorEntry +type ListFlavorsResponseGetFlavorsArgType = []ListFlavors // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListFlavorsResponseGetFlavorsRetType = []InstanceFlavorEntry +type ListFlavorsResponseGetFlavorsRetType = []ListFlavors // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListFlavorsResponseGetFlavorsAttributeTypeOk(arg ListFlavorsResponseGetFlavorsAttributeType) (ret ListFlavorsResponseGetFlavorsRetType, ok bool) { @@ -45,19 +45,55 @@ func setListFlavorsResponseGetFlavorsAttributeType(arg *ListFlavorsResponseGetFl *arg = &val } +/* + types and functions for pagination +*/ + +// isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListFlavorsResponseGetPaginationAttributeType = *Pagination + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListFlavorsResponseGetPaginationArgType = Pagination + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListFlavorsResponseGetPaginationRetType = Pagination + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getListFlavorsResponseGetPaginationAttributeTypeOk(arg ListFlavorsResponseGetPaginationAttributeType) (ret ListFlavorsResponseGetPaginationRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setListFlavorsResponseGetPaginationAttributeType(arg *ListFlavorsResponseGetPaginationAttributeType, val ListFlavorsResponseGetPaginationRetType) { + *arg = &val +} + // ListFlavorsResponse struct for ListFlavorsResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListFlavorsResponse struct { - Flavors ListFlavorsResponseGetFlavorsAttributeType `json:"flavors,omitempty"` + // List of flavors available for the project. + // REQUIRED + Flavors ListFlavorsResponseGetFlavorsAttributeType `json:"flavors" required:"true"` + // REQUIRED + Pagination ListFlavorsResponseGetPaginationAttributeType `json:"pagination" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ListFlavorsResponse ListFlavorsResponse + // NewListFlavorsResponse instantiates a new ListFlavorsResponse 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 NewListFlavorsResponse() *ListFlavorsResponse { +func NewListFlavorsResponse(flavors ListFlavorsResponseGetFlavorsArgType, pagination ListFlavorsResponseGetPaginationArgType) *ListFlavorsResponse { this := ListFlavorsResponse{} + setListFlavorsResponseGetFlavorsAttributeType(&this.Flavors, flavors) + setListFlavorsResponseGetPaginationAttributeType(&this.Pagination, pagination) return &this } @@ -70,31 +106,44 @@ func NewListFlavorsResponseWithDefaults() *ListFlavorsResponse { return &this } -// GetFlavors returns the Flavors field value if set, zero value otherwise. +// GetFlavors returns the Flavors field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListFlavorsResponse) GetFlavors() (res ListFlavorsResponseGetFlavorsRetType) { - res, _ = o.GetFlavorsOk() - return +func (o *ListFlavorsResponse) GetFlavors() (ret ListFlavorsResponseGetFlavorsRetType) { + ret, _ = o.GetFlavorsOk() + return ret } -// GetFlavorsOk returns a tuple with the Flavors field value if set, nil otherwise +// GetFlavorsOk returns a tuple with the Flavors 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 *ListFlavorsResponse) GetFlavorsOk() (ret ListFlavorsResponseGetFlavorsRetType, ok bool) { return getListFlavorsResponseGetFlavorsAttributeTypeOk(o.Flavors) } -// HasFlavors returns a boolean if a field has been set. +// SetFlavors sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListFlavorsResponse) HasFlavors() bool { - _, ok := o.GetFlavorsOk() - return ok +func (o *ListFlavorsResponse) SetFlavors(v ListFlavorsResponseGetFlavorsRetType) { + setListFlavorsResponseGetFlavorsAttributeType(&o.Flavors, v) } -// SetFlavors gets a reference to the given []InstanceFlavorEntry and assigns it to the Flavors field. +// GetPagination returns the Pagination field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListFlavorsResponse) SetFlavors(v ListFlavorsResponseGetFlavorsRetType) { - setListFlavorsResponseGetFlavorsAttributeType(&o.Flavors, v) +func (o *ListFlavorsResponse) GetPagination() (ret ListFlavorsResponseGetPaginationRetType) { + ret, _ = o.GetPaginationOk() + return ret +} + +// GetPaginationOk returns a tuple with the Pagination 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 *ListFlavorsResponse) GetPaginationOk() (ret ListFlavorsResponseGetPaginationRetType, ok bool) { + return getListFlavorsResponseGetPaginationAttributeTypeOk(o.Pagination) +} + +// SetPagination sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListFlavorsResponse) SetPagination(v ListFlavorsResponseGetPaginationRetType) { + setListFlavorsResponseGetPaginationAttributeType(&o.Pagination, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @@ -103,6 +152,9 @@ func (o ListFlavorsResponse) ToMap() (map[string]interface{}, error) { if val, ok := getListFlavorsResponseGetFlavorsAttributeTypeOk(o.Flavors); ok { toSerialize["Flavors"] = val } + if val, ok := getListFlavorsResponseGetPaginationAttributeTypeOk(o.Pagination); ok { + toSerialize["Pagination"] = val + } return toSerialize, nil } diff --git a/services/sqlserverflex/model_list_flavors_response_test.go b/services/sqlserverflex/model_list_flavors_response_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_list_flavors_response_test.go +++ b/services/sqlserverflex/model_list_flavors_response_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_list_flavors_test.go b/services/sqlserverflex/model_list_flavors_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_list_flavors_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_list_instance.go b/services/sqlserverflex/model_list_instance.go new file mode 100644 index 000000000..3bc964b01 --- /dev/null +++ b/services/sqlserverflex/model_list_instance.go @@ -0,0 +1,311 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" +) + +// checks if the ListInstance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListInstance{} + +/* + types and functions for id +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListInstanceGetIdAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getListInstanceGetIdAttributeTypeOk(arg ListInstanceGetIdAttributeType) (ret ListInstanceGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setListInstanceGetIdAttributeType(arg *ListInstanceGetIdAttributeType, val ListInstanceGetIdRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListInstanceGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListInstanceGetIdRetType = string + +/* + types and functions for isDeletable +*/ + +// isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListInstancegetIsDeletableAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListInstancegetIsDeletableArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListInstancegetIsDeletableRetType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getListInstancegetIsDeletableAttributeTypeOk(arg ListInstancegetIsDeletableAttributeType) (ret ListInstancegetIsDeletableRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setListInstancegetIsDeletableAttributeType(arg *ListInstancegetIsDeletableAttributeType, val ListInstancegetIsDeletableRetType) { + *arg = &val +} + +/* + types and functions for name +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListInstanceGetNameAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getListInstanceGetNameAttributeTypeOk(arg ListInstanceGetNameAttributeType) (ret ListInstanceGetNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setListInstanceGetNameAttributeType(arg *ListInstanceGetNameAttributeType, val ListInstanceGetNameRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListInstanceGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListInstanceGetNameRetType = string + +/* + types and functions for state +*/ + +// isEnumRef +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListInstanceGetStateAttributeType = *State + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListInstanceGetStateArgType = State + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListInstanceGetStateRetType = State + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getListInstanceGetStateAttributeTypeOk(arg ListInstanceGetStateAttributeType) (ret ListInstanceGetStateRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setListInstanceGetStateAttributeType(arg *ListInstanceGetStateAttributeType, val ListInstanceGetStateRetType) { + *arg = &val +} + +// ListInstance struct for ListInstance +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListInstance struct { + // The ID of the instance. + // REQUIRED + Id ListInstanceGetIdAttributeType `json:"id" required:"true"` + // Whether the instance can be deleted or not. + // REQUIRED + IsDeletable ListInstancegetIsDeletableAttributeType `json:"isDeletable" required:"true"` + // The name of the instance. + // REQUIRED + Name ListInstanceGetNameAttributeType `json:"name" required:"true"` + // REQUIRED + State ListInstanceGetStateAttributeType `json:"state" required:"true"` +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ListInstance ListInstance + +// NewListInstance instantiates a new ListInstance 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 NewListInstance(id ListInstanceGetIdArgType, isDeletable ListInstancegetIsDeletableArgType, name ListInstanceGetNameArgType, state ListInstanceGetStateArgType) *ListInstance { + this := ListInstance{} + setListInstanceGetIdAttributeType(&this.Id, id) + setListInstancegetIsDeletableAttributeType(&this.IsDeletable, isDeletable) + setListInstanceGetNameAttributeType(&this.Name, name) + setListInstanceGetStateAttributeType(&this.State, state) + return &this +} + +// NewListInstanceWithDefaults instantiates a new ListInstance 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 NewListInstanceWithDefaults() *ListInstance { + this := ListInstance{} + return &this +} + +// GetId returns the Id field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListInstance) GetId() (ret ListInstanceGetIdRetType) { + ret, _ = o.GetIdOk() + return ret +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListInstance) GetIdOk() (ret ListInstanceGetIdRetType, ok bool) { + return getListInstanceGetIdAttributeTypeOk(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 *ListInstance) SetId(v ListInstanceGetIdRetType) { + setListInstanceGetIdAttributeType(&o.Id, v) +} + +// GetIsDeletable returns the IsDeletable field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListInstance) GetIsDeletable() (ret ListInstancegetIsDeletableRetType) { + ret, _ = o.GetIsDeletableOk() + return ret +} + +// GetIsDeletableOk returns a tuple with the IsDeletable 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 *ListInstance) GetIsDeletableOk() (ret ListInstancegetIsDeletableRetType, ok bool) { + return getListInstancegetIsDeletableAttributeTypeOk(o.IsDeletable) +} + +// SetIsDeletable sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListInstance) SetIsDeletable(v ListInstancegetIsDeletableRetType) { + setListInstancegetIsDeletableAttributeType(&o.IsDeletable, v) +} + +// GetName returns the Name field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListInstance) GetName() (ret ListInstanceGetNameRetType) { + ret, _ = o.GetNameOk() + return ret +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListInstance) GetNameOk() (ret ListInstanceGetNameRetType, ok bool) { + return getListInstanceGetNameAttributeTypeOk(o.Name) +} + +// SetName sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListInstance) SetName(v ListInstanceGetNameRetType) { + setListInstanceGetNameAttributeType(&o.Name, v) +} + +// GetState returns the State field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListInstance) GetState() (ret ListInstanceGetStateRetType) { + ret, _ = o.GetStateOk() + return ret +} + +// GetStateOk returns a tuple with the State 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 *ListInstance) GetStateOk() (ret ListInstanceGetStateRetType, ok bool) { + return getListInstanceGetStateAttributeTypeOk(o.State) +} + +// SetState sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListInstance) SetState(v ListInstanceGetStateRetType) { + setListInstanceGetStateAttributeType(&o.State, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o ListInstance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getListInstanceGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getListInstancegetIsDeletableAttributeTypeOk(o.IsDeletable); ok { + toSerialize["IsDeletable"] = val + } + if val, ok := getListInstanceGetNameAttributeTypeOk(o.Name); ok { + toSerialize["Name"] = val + } + if val, ok := getListInstanceGetStateAttributeTypeOk(o.State); ok { + toSerialize["State"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableListInstance struct { + value *ListInstance + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableListInstance) Get() *ListInstance { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableListInstance) Set(val *ListInstance) { + 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 NullableListInstance) 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 *NullableListInstance) 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 NewNullableListInstance(val *ListInstance) *NullableListInstance { + return &NullableListInstance{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 NullableListInstance) 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 *NullableListInstance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_list_instance_test.go b/services/sqlserverflex/model_list_instance_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_list_instance_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_list_instances_response.go b/services/sqlserverflex/model_list_instances_response.go index 279329fdd..3eca8168b 100644 --- a/services/sqlserverflex/model_list_instances_response.go +++ b/services/sqlserverflex/model_list_instances_response.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,21 +19,21 @@ import ( var _ MappedNullable = &ListInstancesResponse{} /* - types and functions for count + types and functions for instances */ -// isLong +// isArray // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListInstancesResponseGetCountAttributeType = *int64 +type ListInstancesResponseGetInstancesAttributeType = *[]ListInstance // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListInstancesResponseGetCountArgType = int64 +type ListInstancesResponseGetInstancesArgType = []ListInstance // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListInstancesResponseGetCountRetType = int64 +type ListInstancesResponseGetInstancesRetType = []ListInstance // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListInstancesResponseGetCountAttributeTypeOk(arg ListInstancesResponseGetCountAttributeType) (ret ListInstancesResponseGetCountRetType, ok bool) { +func getListInstancesResponseGetInstancesAttributeTypeOk(arg ListInstancesResponseGetInstancesAttributeType) (ret ListInstancesResponseGetInstancesRetType, ok bool) { if arg == nil { return ret, false } @@ -41,26 +41,26 @@ func getListInstancesResponseGetCountAttributeTypeOk(arg ListInstancesResponseGe } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListInstancesResponseGetCountAttributeType(arg *ListInstancesResponseGetCountAttributeType, val ListInstancesResponseGetCountRetType) { +func setListInstancesResponseGetInstancesAttributeType(arg *ListInstancesResponseGetInstancesAttributeType, val ListInstancesResponseGetInstancesRetType) { *arg = &val } /* - types and functions for items + types and functions for pagination */ -// isArray +// isModel // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListInstancesResponseGetItemsAttributeType = *[]InstanceListInstance +type ListInstancesResponseGetPaginationAttributeType = *Pagination // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListInstancesResponseGetItemsArgType = []InstanceListInstance +type ListInstancesResponseGetPaginationArgType = Pagination // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListInstancesResponseGetItemsRetType = []InstanceListInstance +type ListInstancesResponseGetPaginationRetType = Pagination // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListInstancesResponseGetItemsAttributeTypeOk(arg ListInstancesResponseGetItemsAttributeType) (ret ListInstancesResponseGetItemsRetType, ok bool) { +func getListInstancesResponseGetPaginationAttributeTypeOk(arg ListInstancesResponseGetPaginationAttributeType) (ret ListInstancesResponseGetPaginationRetType, ok bool) { if arg == nil { return ret, false } @@ -68,24 +68,32 @@ func getListInstancesResponseGetItemsAttributeTypeOk(arg ListInstancesResponseGe } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListInstancesResponseGetItemsAttributeType(arg *ListInstancesResponseGetItemsAttributeType, val ListInstancesResponseGetItemsRetType) { +func setListInstancesResponseGetPaginationAttributeType(arg *ListInstancesResponseGetPaginationAttributeType, val ListInstancesResponseGetPaginationRetType) { *arg = &val } // ListInstancesResponse struct for ListInstancesResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListInstancesResponse struct { - Count ListInstancesResponseGetCountAttributeType `json:"count,omitempty"` - Items ListInstancesResponseGetItemsAttributeType `json:"items,omitempty"` + // List of owned instances and their current status. + // REQUIRED + Instances ListInstancesResponseGetInstancesAttributeType `json:"instances" required:"true"` + // REQUIRED + Pagination ListInstancesResponseGetPaginationAttributeType `json:"pagination" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ListInstancesResponse ListInstancesResponse + // NewListInstancesResponse instantiates a new ListInstancesResponse 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 NewListInstancesResponse() *ListInstancesResponse { +func NewListInstancesResponse(instances ListInstancesResponseGetInstancesArgType, pagination ListInstancesResponseGetPaginationArgType) *ListInstancesResponse { this := ListInstancesResponse{} + setListInstancesResponseGetInstancesAttributeType(&this.Instances, instances) + setListInstancesResponseGetPaginationAttributeType(&this.Pagination, pagination) return &this } @@ -98,68 +106,54 @@ func NewListInstancesResponseWithDefaults() *ListInstancesResponse { return &this } -// GetCount returns the Count field value if set, zero value otherwise. +// GetInstances returns the Instances field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListInstancesResponse) GetCount() (res ListInstancesResponseGetCountRetType) { - res, _ = o.GetCountOk() - return +func (o *ListInstancesResponse) GetInstances() (ret ListInstancesResponseGetInstancesRetType) { + ret, _ = o.GetInstancesOk() + return ret } -// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// GetInstancesOk returns a tuple with the Instances 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 *ListInstancesResponse) GetCountOk() (ret ListInstancesResponseGetCountRetType, ok bool) { - return getListInstancesResponseGetCountAttributeTypeOk(o.Count) -} - -// HasCount 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 *ListInstancesResponse) HasCount() bool { - _, ok := o.GetCountOk() - return ok +func (o *ListInstancesResponse) GetInstancesOk() (ret ListInstancesResponseGetInstancesRetType, ok bool) { + return getListInstancesResponseGetInstancesAttributeTypeOk(o.Instances) } -// SetCount gets a reference to the given int64 and assigns it to the Count field. +// SetInstances sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListInstancesResponse) SetCount(v ListInstancesResponseGetCountRetType) { - setListInstancesResponseGetCountAttributeType(&o.Count, v) +func (o *ListInstancesResponse) SetInstances(v ListInstancesResponseGetInstancesRetType) { + setListInstancesResponseGetInstancesAttributeType(&o.Instances, v) } -// GetItems returns the Items field value if set, zero value otherwise. +// GetPagination returns the Pagination field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListInstancesResponse) GetItems() (res ListInstancesResponseGetItemsRetType) { - res, _ = o.GetItemsOk() - return +func (o *ListInstancesResponse) GetPagination() (ret ListInstancesResponseGetPaginationRetType) { + ret, _ = o.GetPaginationOk() + return ret } -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// GetPaginationOk returns a tuple with the Pagination 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 *ListInstancesResponse) GetItemsOk() (ret ListInstancesResponseGetItemsRetType, ok bool) { - return getListInstancesResponseGetItemsAttributeTypeOk(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 *ListInstancesResponse) HasItems() bool { - _, ok := o.GetItemsOk() - return ok +func (o *ListInstancesResponse) GetPaginationOk() (ret ListInstancesResponseGetPaginationRetType, ok bool) { + return getListInstancesResponseGetPaginationAttributeTypeOk(o.Pagination) } -// SetItems gets a reference to the given []InstanceListInstance and assigns it to the Items field. +// SetPagination sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListInstancesResponse) SetItems(v ListInstancesResponseGetItemsRetType) { - setListInstancesResponseGetItemsAttributeType(&o.Items, v) +func (o *ListInstancesResponse) SetPagination(v ListInstancesResponseGetPaginationRetType) { + setListInstancesResponseGetPaginationAttributeType(&o.Pagination, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListInstancesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getListInstancesResponseGetCountAttributeTypeOk(o.Count); ok { - toSerialize["Count"] = val + if val, ok := getListInstancesResponseGetInstancesAttributeTypeOk(o.Instances); ok { + toSerialize["Instances"] = val } - if val, ok := getListInstancesResponseGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val + if val, ok := getListInstancesResponseGetPaginationAttributeTypeOk(o.Pagination); ok { + toSerialize["Pagination"] = val } return toSerialize, nil } diff --git a/services/sqlserverflex/model_list_instances_response_test.go b/services/sqlserverflex/model_list_instances_response_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_list_instances_response_test.go +++ b/services/sqlserverflex/model_list_instances_response_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_list_metrics_response_test.go b/services/sqlserverflex/model_list_metrics_response_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_list_metrics_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_list_restore_jobs_response_test.go b/services/sqlserverflex/model_list_restore_jobs_response_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_list_restore_jobs_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_list_roles_response.go b/services/sqlserverflex/model_list_roles_response.go index 99018906f..a3d7ae43b 100644 --- a/services/sqlserverflex/model_list_roles_response.go +++ b/services/sqlserverflex/model_list_roles_response.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -48,16 +48,22 @@ func setListRolesResponseGetRolesAttributeType(arg *ListRolesResponseGetRolesAtt // ListRolesResponse struct for ListRolesResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListRolesResponse struct { - Roles ListRolesResponseGetRolesAttributeType `json:"roles,omitempty"` + // List of roles available for an instance. + // REQUIRED + Roles ListRolesResponseGetRolesAttributeType `json:"roles" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ListRolesResponse ListRolesResponse + // NewListRolesResponse instantiates a new ListRolesResponse 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 NewListRolesResponse() *ListRolesResponse { +func NewListRolesResponse(roles ListRolesResponseGetRolesArgType) *ListRolesResponse { this := ListRolesResponse{} + setListRolesResponseGetRolesAttributeType(&this.Roles, roles) return &this } @@ -70,28 +76,21 @@ func NewListRolesResponseWithDefaults() *ListRolesResponse { return &this } -// GetRoles returns the Roles field value if set, zero value otherwise. +// GetRoles returns the Roles field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListRolesResponse) GetRoles() (res ListRolesResponseGetRolesRetType) { - res, _ = o.GetRolesOk() - return +func (o *ListRolesResponse) GetRoles() (ret ListRolesResponseGetRolesRetType) { + ret, _ = o.GetRolesOk() + return ret } -// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// GetRolesOk returns a tuple with the Roles 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 *ListRolesResponse) GetRolesOk() (ret ListRolesResponseGetRolesRetType, ok bool) { return getListRolesResponseGetRolesAttributeTypeOk(o.Roles) } -// HasRoles 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 *ListRolesResponse) HasRoles() bool { - _, ok := o.GetRolesOk() - return ok -} - -// SetRoles gets a reference to the given []string and assigns it to the Roles field. +// SetRoles sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListRolesResponse) SetRoles(v ListRolesResponseGetRolesRetType) { setListRolesResponseGetRolesAttributeType(&o.Roles, v) diff --git a/services/sqlserverflex/model_list_roles_response_test.go b/services/sqlserverflex/model_list_roles_response_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_list_roles_response_test.go +++ b/services/sqlserverflex/model_list_roles_response_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_list_storages_response.go b/services/sqlserverflex/model_list_storages_response.go index 25dd519b6..f4e45c740 100644 --- a/services/sqlserverflex/model_list_storages_response.go +++ b/services/sqlserverflex/model_list_storages_response.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -24,13 +24,13 @@ var _ MappedNullable = &ListStoragesResponse{} // isArray // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListStoragesResponseGetStorageClassesAttributeType = *[]string +type ListStoragesResponseGetStorageClassesAttributeType = *[]FlavorStorageClassesStorageClass // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListStoragesResponseGetStorageClassesArgType = []string +type ListStoragesResponseGetStorageClassesArgType = []FlavorStorageClassesStorageClass // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListStoragesResponseGetStorageClassesRetType = []string +type ListStoragesResponseGetStorageClassesRetType = []FlavorStorageClassesStorageClass // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListStoragesResponseGetStorageClassesAttributeTypeOk(arg ListStoragesResponseGetStorageClassesAttributeType) (ret ListStoragesResponseGetStorageClassesRetType, ok bool) { @@ -51,13 +51,13 @@ func setListStoragesResponseGetStorageClassesAttributeType(arg *ListStoragesResp // isModel // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListStoragesResponseGetStorageRangeAttributeType = *StorageRange +type ListStoragesResponseGetStorageRangeAttributeType = *FlavorStorageRange // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListStoragesResponseGetStorageRangeArgType = StorageRange +type ListStoragesResponseGetStorageRangeArgType = FlavorStorageRange // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListStoragesResponseGetStorageRangeRetType = StorageRange +type ListStoragesResponseGetStorageRangeRetType = FlavorStorageRange // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListStoragesResponseGetStorageRangeAttributeTypeOk(arg ListStoragesResponseGetStorageRangeAttributeType) (ret ListStoragesResponseGetStorageRangeRetType, ok bool) { @@ -75,17 +75,25 @@ func setListStoragesResponseGetStorageRangeAttributeType(arg *ListStoragesRespon // ListStoragesResponse struct for ListStoragesResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListStoragesResponse struct { - StorageClasses ListStoragesResponseGetStorageClassesAttributeType `json:"storageClasses,omitempty"` - StorageRange ListStoragesResponseGetStorageRangeAttributeType `json:"storageRange,omitempty"` + // maximum storage which can be ordered for the flavor in Gigabyte. + // REQUIRED + StorageClasses ListStoragesResponseGetStorageClassesAttributeType `json:"storageClasses" required:"true"` + // REQUIRED + StorageRange ListStoragesResponseGetStorageRangeAttributeType `json:"storageRange" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ListStoragesResponse ListStoragesResponse + // NewListStoragesResponse instantiates a new ListStoragesResponse 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 NewListStoragesResponse() *ListStoragesResponse { +func NewListStoragesResponse(storageClasses ListStoragesResponseGetStorageClassesArgType, storageRange ListStoragesResponseGetStorageRangeArgType) *ListStoragesResponse { this := ListStoragesResponse{} + setListStoragesResponseGetStorageClassesAttributeType(&this.StorageClasses, storageClasses) + setListStoragesResponseGetStorageRangeAttributeType(&this.StorageRange, storageRange) return &this } @@ -98,55 +106,41 @@ func NewListStoragesResponseWithDefaults() *ListStoragesResponse { return &this } -// GetStorageClasses returns the StorageClasses field value if set, zero value otherwise. +// GetStorageClasses returns the StorageClasses field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListStoragesResponse) GetStorageClasses() (res ListStoragesResponseGetStorageClassesRetType) { - res, _ = o.GetStorageClassesOk() - return +func (o *ListStoragesResponse) GetStorageClasses() (ret ListStoragesResponseGetStorageClassesRetType) { + ret, _ = o.GetStorageClassesOk() + return ret } -// GetStorageClassesOk returns a tuple with the StorageClasses field value if set, nil otherwise +// GetStorageClassesOk returns a tuple with the StorageClasses 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 *ListStoragesResponse) GetStorageClassesOk() (ret ListStoragesResponseGetStorageClassesRetType, ok bool) { return getListStoragesResponseGetStorageClassesAttributeTypeOk(o.StorageClasses) } -// HasStorageClasses 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 *ListStoragesResponse) HasStorageClasses() bool { - _, ok := o.GetStorageClassesOk() - return ok -} - -// SetStorageClasses gets a reference to the given []string and assigns it to the StorageClasses field. +// SetStorageClasses sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListStoragesResponse) SetStorageClasses(v ListStoragesResponseGetStorageClassesRetType) { setListStoragesResponseGetStorageClassesAttributeType(&o.StorageClasses, v) } -// GetStorageRange returns the StorageRange field value if set, zero value otherwise. +// GetStorageRange returns the StorageRange field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListStoragesResponse) GetStorageRange() (res ListStoragesResponseGetStorageRangeRetType) { - res, _ = o.GetStorageRangeOk() - return +func (o *ListStoragesResponse) GetStorageRange() (ret ListStoragesResponseGetStorageRangeRetType) { + ret, _ = o.GetStorageRangeOk() + return ret } -// GetStorageRangeOk returns a tuple with the StorageRange field value if set, nil otherwise +// GetStorageRangeOk returns a tuple with the StorageRange 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 *ListStoragesResponse) GetStorageRangeOk() (ret ListStoragesResponseGetStorageRangeRetType, ok bool) { return getListStoragesResponseGetStorageRangeAttributeTypeOk(o.StorageRange) } -// HasStorageRange 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 *ListStoragesResponse) HasStorageRange() bool { - _, ok := o.GetStorageRangeOk() - return ok -} - -// SetStorageRange gets a reference to the given StorageRange and assigns it to the StorageRange field. +// SetStorageRange sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListStoragesResponse) SetStorageRange(v ListStoragesResponseGetStorageRangeRetType) { setListStoragesResponseGetStorageRangeAttributeType(&o.StorageRange, v) diff --git a/services/sqlserverflex/model_list_storages_response_test.go b/services/sqlserverflex/model_list_storages_response_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_list_storages_response_test.go +++ b/services/sqlserverflex/model_list_storages_response_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_database.go b/services/sqlserverflex/model_list_user.go similarity index 55% rename from services/sqlserverflex/model_database.go rename to services/sqlserverflex/model_list_user.go index 651d505f4..d14f9c371 100644 --- a/services/sqlserverflex/model_database.go +++ b/services/sqlserverflex/model_list_user.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,19 +15,25 @@ import ( "encoding/json" ) -// checks if the Database type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Database{} +// checks if the ListUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListUser{} /* types and functions for id */ -// isNotNullableString +// isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListUserGetIdAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListUserGetIdArgType = int64 + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseGetIdAttributeType = *string +type ListUserGetIdRetType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDatabaseGetIdAttributeTypeOk(arg DatabaseGetIdAttributeType) (ret DatabaseGetIdRetType, ok bool) { +func getListUserGetIdAttributeTypeOk(arg ListUserGetIdAttributeType) (ret ListUserGetIdRetType, ok bool) { if arg == nil { return ret, false } @@ -35,26 +41,20 @@ func getDatabaseGetIdAttributeTypeOk(arg DatabaseGetIdAttributeType) (ret Databa } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDatabaseGetIdAttributeType(arg *DatabaseGetIdAttributeType, val DatabaseGetIdRetType) { +func setListUserGetIdAttributeType(arg *ListUserGetIdAttributeType, val ListUserGetIdRetType) { *arg = &val } -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseGetIdRetType = string - /* - types and functions for name + types and functions for status */ // isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseGetNameAttributeType = *string +type ListUserGetStatusAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDatabaseGetNameAttributeTypeOk(arg DatabaseGetNameAttributeType) (ret DatabaseGetNameRetType, ok bool) { +func getListUserGetStatusAttributeTypeOk(arg ListUserGetStatusAttributeType) (ret ListUserGetStatusRetType, ok bool) { if arg == nil { return ret, false } @@ -62,32 +62,26 @@ func getDatabaseGetNameAttributeTypeOk(arg DatabaseGetNameAttributeType) (ret Da } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDatabaseGetNameAttributeType(arg *DatabaseGetNameAttributeType, val DatabaseGetNameRetType) { +func setListUserGetStatusAttributeType(arg *ListUserGetStatusAttributeType, val ListUserGetStatusRetType) { *arg = &val } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseGetNameArgType = string +type ListUserGetStatusArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseGetNameRetType = string +type ListUserGetStatusRetType = string /* - types and functions for options + types and functions for username */ -// isFreeform -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseGetOptionsAttributeType = *map[string]interface{} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseGetOptionsArgType = map[string]interface{} - +// isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type DatabaseGetOptionsRetType = map[string]interface{} +type ListUserGetUsernameAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getDatabaseGetOptionsAttributeTypeOk(arg DatabaseGetOptionsAttributeType) (ret DatabaseGetOptionsRetType, ok bool) { +func getListUserGetUsernameAttributeTypeOk(arg ListUserGetUsernameAttributeType) (ret ListUserGetUsernameRetType, ok bool) { if arg == nil { return ret, false } @@ -95,174 +89,170 @@ func getDatabaseGetOptionsAttributeTypeOk(arg DatabaseGetOptionsAttributeType) ( } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setDatabaseGetOptionsAttributeType(arg *DatabaseGetOptionsAttributeType, val DatabaseGetOptionsRetType) { +func setListUserGetUsernameAttributeType(arg *ListUserGetUsernameAttributeType, val ListUserGetUsernameRetType) { *arg = &val } -// Database struct for Database // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Database struct { - Id DatabaseGetIdAttributeType `json:"id,omitempty"` - Name DatabaseGetNameAttributeType `json:"name,omitempty"` - // Database specific options - Options DatabaseGetOptionsAttributeType `json:"options,omitempty"` +type ListUserGetUsernameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListUserGetUsernameRetType = string + +// ListUser struct for ListUser +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListUser struct { + // The ID of the user. + // REQUIRED + Id ListUserGetIdAttributeType `json:"id" required:"true"` + // The current status of the user. + // REQUIRED + Status ListUserGetStatusAttributeType `json:"status" required:"true"` + // The name of the user. + // REQUIRED + Username ListUserGetUsernameAttributeType `json:"username" required:"true"` } -// NewDatabase instantiates a new Database object +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ListUser ListUser + +// NewListUser instantiates a new ListUser 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 NewDatabase() *Database { - this := Database{} +func NewListUser(id ListUserGetIdArgType, status ListUserGetStatusArgType, username ListUserGetUsernameArgType) *ListUser { + this := ListUser{} + setListUserGetIdAttributeType(&this.Id, id) + setListUserGetStatusAttributeType(&this.Status, status) + setListUserGetUsernameAttributeType(&this.Username, username) return &this } -// NewDatabaseWithDefaults instantiates a new Database object +// NewListUserWithDefaults instantiates a new ListUser 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 NewDatabaseWithDefaults() *Database { - this := Database{} +func NewListUserWithDefaults() *ListUser { + this := ListUser{} return &this } -// GetId returns the Id field value if set, zero value otherwise. +// 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 *Database) GetId() (res DatabaseGetIdRetType) { - res, _ = o.GetIdOk() - return +func (o *ListUser) GetId() (ret ListUserGetIdRetType) { + ret, _ = o.GetIdOk() + return ret } -// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// 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 *Database) GetIdOk() (ret DatabaseGetIdRetType, ok bool) { - return getDatabaseGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *Database) HasId() bool { - _, ok := o.GetIdOk() - return ok +func (o *ListUser) GetIdOk() (ret ListUserGetIdRetType, ok bool) { + return getListUserGetIdAttributeTypeOk(o.Id) } -// SetId gets a reference to the given string and assigns it to the Id field. +// 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 *Database) SetId(v DatabaseGetIdRetType) { - setDatabaseGetIdAttributeType(&o.Id, v) +func (o *ListUser) SetId(v ListUserGetIdRetType) { + setListUserGetIdAttributeType(&o.Id, v) } -// GetName returns the Name field value if set, zero value otherwise. +// GetStatus returns the Status field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Database) GetName() (res DatabaseGetNameRetType) { - res, _ = o.GetNameOk() - return +func (o *ListUser) GetStatus() (ret ListUserGetStatusRetType) { + ret, _ = o.GetStatusOk() + return ret } -// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// GetStatusOk returns a tuple with the Status field value // and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Database) GetNameOk() (ret DatabaseGetNameRetType, ok bool) { - return getDatabaseGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *Database) HasName() bool { - _, ok := o.GetNameOk() - return ok +func (o *ListUser) GetStatusOk() (ret ListUserGetStatusRetType, ok bool) { + return getListUserGetStatusAttributeTypeOk(o.Status) } -// SetName gets a reference to the given string and assigns it to the Name field. +// SetStatus sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Database) SetName(v DatabaseGetNameRetType) { - setDatabaseGetNameAttributeType(&o.Name, v) +func (o *ListUser) SetStatus(v ListUserGetStatusRetType) { + setListUserGetStatusAttributeType(&o.Status, v) } -// GetOptions returns the Options field value if set, zero value otherwise. +// GetUsername returns the Username field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Database) GetOptions() (res DatabaseGetOptionsRetType) { - res, _ = o.GetOptionsOk() - return +func (o *ListUser) GetUsername() (ret ListUserGetUsernameRetType) { + ret, _ = o.GetUsernameOk() + return ret } -// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// GetUsernameOk returns a tuple with the Username field value // and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Database) GetOptionsOk() (ret DatabaseGetOptionsRetType, ok bool) { - return getDatabaseGetOptionsAttributeTypeOk(o.Options) -} - -// HasOptions 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 *Database) HasOptions() bool { - _, ok := o.GetOptionsOk() - return ok +func (o *ListUser) GetUsernameOk() (ret ListUserGetUsernameRetType, ok bool) { + return getListUserGetUsernameAttributeTypeOk(o.Username) } -// SetOptions gets a reference to the given map[string]interface{} and assigns it to the Options field. +// SetUsername sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *Database) SetOptions(v DatabaseGetOptionsRetType) { - setDatabaseGetOptionsAttributeType(&o.Options, v) +func (o *ListUser) SetUsername(v ListUserGetUsernameRetType) { + setListUserGetUsernameAttributeType(&o.Username, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o Database) ToMap() (map[string]interface{}, error) { +func (o ListUser) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getDatabaseGetIdAttributeTypeOk(o.Id); ok { + if val, ok := getListUserGetIdAttributeTypeOk(o.Id); ok { toSerialize["Id"] = val } - if val, ok := getDatabaseGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val + if val, ok := getListUserGetStatusAttributeTypeOk(o.Status); ok { + toSerialize["Status"] = val } - if val, ok := getDatabaseGetOptionsAttributeTypeOk(o.Options); ok { - toSerialize["Options"] = val + if val, ok := getListUserGetUsernameAttributeTypeOk(o.Username); ok { + toSerialize["Username"] = val } return toSerialize, nil } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableDatabase struct { - value *Database +type NullableListUser struct { + value *ListUser isSet bool } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableDatabase) Get() *Database { +func (v NullableListUser) Get() *ListUser { return v.value } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableDatabase) Set(val *Database) { +func (v *NullableListUser) Set(val *ListUser) { 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 NullableDatabase) IsSet() bool { +func (v NullableListUser) 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 *NullableDatabase) Unset() { +func (v *NullableListUser) 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 NewNullableDatabase(val *Database) *NullableDatabase { - return &NullableDatabase{value: val, isSet: true} +func NewNullableListUser(val *ListUser) *NullableListUser { + return &NullableListUser{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 NullableDatabase) MarshalJSON() ([]byte, error) { +func (v NullableListUser) 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 *NullableDatabase) UnmarshalJSON(src []byte) error { +func (v *NullableListUser) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/sqlserverflex/model_list_user_response.go b/services/sqlserverflex/model_list_user_response.go new file mode 100644 index 000000000..9a13a484e --- /dev/null +++ b/services/sqlserverflex/model_list_user_response.go @@ -0,0 +1,203 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" +) + +// checks if the ListUserResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListUserResponse{} + +/* + types and functions for pagination +*/ + +// isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListUserResponseGetPaginationAttributeType = *Pagination + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListUserResponseGetPaginationArgType = Pagination + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListUserResponseGetPaginationRetType = Pagination + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getListUserResponseGetPaginationAttributeTypeOk(arg ListUserResponseGetPaginationAttributeType) (ret ListUserResponseGetPaginationRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setListUserResponseGetPaginationAttributeType(arg *ListUserResponseGetPaginationAttributeType, val ListUserResponseGetPaginationRetType) { + *arg = &val +} + +/* + types and functions for users +*/ + +// isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListUserResponseGetUsersAttributeType = *[]ListUser + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListUserResponseGetUsersArgType = []ListUser + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListUserResponseGetUsersRetType = []ListUser + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getListUserResponseGetUsersAttributeTypeOk(arg ListUserResponseGetUsersAttributeType) (ret ListUserResponseGetUsersRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setListUserResponseGetUsersAttributeType(arg *ListUserResponseGetUsersAttributeType, val ListUserResponseGetUsersRetType) { + *arg = &val +} + +// ListUserResponse struct for ListUserResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ListUserResponse struct { + // REQUIRED + Pagination ListUserResponseGetPaginationAttributeType `json:"pagination" required:"true"` + // List of all users inside an instance + // REQUIRED + Users ListUserResponseGetUsersAttributeType `json:"users" required:"true"` +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ListUserResponse ListUserResponse + +// NewListUserResponse instantiates a new ListUserResponse 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 NewListUserResponse(pagination ListUserResponseGetPaginationArgType, users ListUserResponseGetUsersArgType) *ListUserResponse { + this := ListUserResponse{} + setListUserResponseGetPaginationAttributeType(&this.Pagination, pagination) + setListUserResponseGetUsersAttributeType(&this.Users, users) + return &this +} + +// NewListUserResponseWithDefaults instantiates a new ListUserResponse 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 NewListUserResponseWithDefaults() *ListUserResponse { + this := ListUserResponse{} + return &this +} + +// GetPagination returns the Pagination field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListUserResponse) GetPagination() (ret ListUserResponseGetPaginationRetType) { + ret, _ = o.GetPaginationOk() + return ret +} + +// GetPaginationOk returns a tuple with the Pagination 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 *ListUserResponse) GetPaginationOk() (ret ListUserResponseGetPaginationRetType, ok bool) { + return getListUserResponseGetPaginationAttributeTypeOk(o.Pagination) +} + +// SetPagination sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListUserResponse) SetPagination(v ListUserResponseGetPaginationRetType) { + setListUserResponseGetPaginationAttributeType(&o.Pagination, v) +} + +// GetUsers returns the Users field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListUserResponse) GetUsers() (ret ListUserResponseGetUsersRetType) { + ret, _ = o.GetUsersOk() + return ret +} + +// GetUsersOk returns a tuple with the Users 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 *ListUserResponse) GetUsersOk() (ret ListUserResponseGetUsersRetType, ok bool) { + return getListUserResponseGetUsersAttributeTypeOk(o.Users) +} + +// SetUsers sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ListUserResponse) SetUsers(v ListUserResponseGetUsersRetType) { + setListUserResponseGetUsersAttributeType(&o.Users, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o ListUserResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getListUserResponseGetPaginationAttributeTypeOk(o.Pagination); ok { + toSerialize["Pagination"] = val + } + if val, ok := getListUserResponseGetUsersAttributeTypeOk(o.Users); ok { + toSerialize["Users"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableListUserResponse struct { + value *ListUserResponse + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableListUserResponse) Get() *ListUserResponse { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableListUserResponse) Set(val *ListUserResponse) { + 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 NullableListUserResponse) 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 *NullableListUserResponse) 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 NewNullableListUserResponse(val *ListUserResponse) *NullableListUserResponse { + return &NullableListUserResponse{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 NullableListUserResponse) 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 *NullableListUserResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_list_user_response_test.go b/services/sqlserverflex/model_list_user_response_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_list_user_response_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_list_user_test.go b/services/sqlserverflex/model_list_user_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_list_user_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_list_users_response_test.go b/services/sqlserverflex/model_list_users_response_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_list_users_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_list_versions_response.go b/services/sqlserverflex/model_list_versions_response.go index d0db96eae..2b2c3c3b5 100644 --- a/services/sqlserverflex/model_list_versions_response.go +++ b/services/sqlserverflex/model_list_versions_response.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -24,13 +24,13 @@ var _ MappedNullable = &ListVersionsResponse{} // isArray // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListVersionsResponseGetVersionsAttributeType = *[]string +type ListVersionsResponseGetVersionsAttributeType = *[]Version // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListVersionsResponseGetVersionsArgType = []string +type ListVersionsResponseGetVersionsArgType = []Version // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListVersionsResponseGetVersionsRetType = []string +type ListVersionsResponseGetVersionsRetType = []Version // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListVersionsResponseGetVersionsAttributeTypeOk(arg ListVersionsResponseGetVersionsAttributeType) (ret ListVersionsResponseGetVersionsRetType, ok bool) { @@ -48,16 +48,22 @@ func setListVersionsResponseGetVersionsAttributeType(arg *ListVersionsResponseGe // ListVersionsResponse struct for ListVersionsResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListVersionsResponse struct { - Versions ListVersionsResponseGetVersionsAttributeType `json:"versions,omitempty"` + // A list containing available sqlserver versions. + // REQUIRED + Versions ListVersionsResponseGetVersionsAttributeType `json:"versions" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ListVersionsResponse ListVersionsResponse + // NewListVersionsResponse instantiates a new ListVersionsResponse 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 NewListVersionsResponse() *ListVersionsResponse { +func NewListVersionsResponse(versions ListVersionsResponseGetVersionsArgType) *ListVersionsResponse { this := ListVersionsResponse{} + setListVersionsResponseGetVersionsAttributeType(&this.Versions, versions) return &this } @@ -70,28 +76,21 @@ func NewListVersionsResponseWithDefaults() *ListVersionsResponse { return &this } -// GetVersions returns the Versions field value if set, zero value otherwise. +// GetVersions returns the Versions field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListVersionsResponse) GetVersions() (res ListVersionsResponseGetVersionsRetType) { - res, _ = o.GetVersionsOk() - return +func (o *ListVersionsResponse) GetVersions() (ret ListVersionsResponseGetVersionsRetType) { + ret, _ = o.GetVersionsOk() + return ret } -// GetVersionsOk returns a tuple with the Versions field value if set, nil otherwise +// GetVersionsOk returns a tuple with the Versions 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 *ListVersionsResponse) GetVersionsOk() (ret ListVersionsResponseGetVersionsRetType, ok bool) { return getListVersionsResponseGetVersionsAttributeTypeOk(o.Versions) } -// HasVersions 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 *ListVersionsResponse) HasVersions() bool { - _, ok := o.GetVersionsOk() - return ok -} - -// SetVersions gets a reference to the given []string and assigns it to the Versions field. +// SetVersions sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListVersionsResponse) SetVersions(v ListVersionsResponseGetVersionsRetType) { setListVersionsResponseGetVersionsAttributeType(&o.Versions, v) diff --git a/services/sqlserverflex/model_list_versions_response_test.go b/services/sqlserverflex/model_list_versions_response_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_list_versions_response_test.go +++ b/services/sqlserverflex/model_list_versions_response_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_mssql_database_collation_test.go b/services/sqlserverflex/model_mssql_database_collation_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_mssql_database_collation_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_mssql_database_compatibility_test.go b/services/sqlserverflex/model_mssql_database_compatibility_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_mssql_database_compatibility_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_pagination.go b/services/sqlserverflex/model_pagination.go new file mode 100644 index 000000000..1c0e6382e --- /dev/null +++ b/services/sqlserverflex/model_pagination.go @@ -0,0 +1,361 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" +) + +// checks if the Pagination type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Pagination{} + +/* + types and functions for page +*/ + +// isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PaginationGetPageAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PaginationGetPageArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PaginationGetPageRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getPaginationGetPageAttributeTypeOk(arg PaginationGetPageAttributeType) (ret PaginationGetPageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setPaginationGetPageAttributeType(arg *PaginationGetPageAttributeType, val PaginationGetPageRetType) { + *arg = &val +} + +/* + types and functions for size +*/ + +// isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PaginationGetSizeAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PaginationGetSizeArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PaginationGetSizeRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getPaginationGetSizeAttributeTypeOk(arg PaginationGetSizeAttributeType) (ret PaginationGetSizeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setPaginationGetSizeAttributeType(arg *PaginationGetSizeAttributeType, val PaginationGetSizeRetType) { + *arg = &val +} + +/* + types and functions for sort +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PaginationGetSortAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getPaginationGetSortAttributeTypeOk(arg PaginationGetSortAttributeType) (ret PaginationGetSortRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setPaginationGetSortAttributeType(arg *PaginationGetSortAttributeType, val PaginationGetSortRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PaginationGetSortArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PaginationGetSortRetType = string + +/* + types and functions for totalPages +*/ + +// isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PaginationGetTotalPagesAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PaginationGetTotalPagesArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PaginationGetTotalPagesRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getPaginationGetTotalPagesAttributeTypeOk(arg PaginationGetTotalPagesAttributeType) (ret PaginationGetTotalPagesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setPaginationGetTotalPagesAttributeType(arg *PaginationGetTotalPagesAttributeType, val PaginationGetTotalPagesRetType) { + *arg = &val +} + +/* + types and functions for totalRows +*/ + +// isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PaginationGetTotalRowsAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PaginationGetTotalRowsArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PaginationGetTotalRowsRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getPaginationGetTotalRowsAttributeTypeOk(arg PaginationGetTotalRowsAttributeType) (ret PaginationGetTotalRowsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setPaginationGetTotalRowsAttributeType(arg *PaginationGetTotalRowsAttributeType, val PaginationGetTotalRowsRetType) { + *arg = &val +} + +// Pagination struct for Pagination +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type Pagination struct { + // REQUIRED + Page PaginationGetPageAttributeType `json:"page" required:"true"` + // REQUIRED + Size PaginationGetSizeAttributeType `json:"size" required:"true"` + // REQUIRED + Sort PaginationGetSortAttributeType `json:"sort" required:"true"` + // REQUIRED + TotalPages PaginationGetTotalPagesAttributeType `json:"totalPages" required:"true"` + // REQUIRED + TotalRows PaginationGetTotalRowsAttributeType `json:"totalRows" required:"true"` +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _Pagination Pagination + +// NewPagination instantiates a new Pagination 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 NewPagination(page PaginationGetPageArgType, size PaginationGetSizeArgType, sort PaginationGetSortArgType, totalPages PaginationGetTotalPagesArgType, totalRows PaginationGetTotalRowsArgType) *Pagination { + this := Pagination{} + setPaginationGetPageAttributeType(&this.Page, page) + setPaginationGetSizeAttributeType(&this.Size, size) + setPaginationGetSortAttributeType(&this.Sort, sort) + setPaginationGetTotalPagesAttributeType(&this.TotalPages, totalPages) + setPaginationGetTotalRowsAttributeType(&this.TotalRows, totalRows) + return &this +} + +// NewPaginationWithDefaults instantiates a new Pagination 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 NewPaginationWithDefaults() *Pagination { + this := Pagination{} + return &this +} + +// GetPage returns the Page field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Pagination) GetPage() (ret PaginationGetPageRetType) { + ret, _ = o.GetPageOk() + return ret +} + +// GetPageOk returns a tuple with the Page 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 *Pagination) GetPageOk() (ret PaginationGetPageRetType, ok bool) { + return getPaginationGetPageAttributeTypeOk(o.Page) +} + +// SetPage sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Pagination) SetPage(v PaginationGetPageRetType) { + setPaginationGetPageAttributeType(&o.Page, v) +} + +// GetSize returns the Size field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Pagination) GetSize() (ret PaginationGetSizeRetType) { + ret, _ = o.GetSizeOk() + return ret +} + +// GetSizeOk returns a tuple with the Size field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Pagination) GetSizeOk() (ret PaginationGetSizeRetType, ok bool) { + return getPaginationGetSizeAttributeTypeOk(o.Size) +} + +// SetSize sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Pagination) SetSize(v PaginationGetSizeRetType) { + setPaginationGetSizeAttributeType(&o.Size, v) +} + +// GetSort returns the Sort field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Pagination) GetSort() (ret PaginationGetSortRetType) { + ret, _ = o.GetSortOk() + return ret +} + +// GetSortOk returns a tuple with the Sort 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 *Pagination) GetSortOk() (ret PaginationGetSortRetType, ok bool) { + return getPaginationGetSortAttributeTypeOk(o.Sort) +} + +// SetSort sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Pagination) SetSort(v PaginationGetSortRetType) { + setPaginationGetSortAttributeType(&o.Sort, v) +} + +// GetTotalPages returns the TotalPages field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Pagination) GetTotalPages() (ret PaginationGetTotalPagesRetType) { + ret, _ = o.GetTotalPagesOk() + return ret +} + +// GetTotalPagesOk returns a tuple with the TotalPages 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 *Pagination) GetTotalPagesOk() (ret PaginationGetTotalPagesRetType, ok bool) { + return getPaginationGetTotalPagesAttributeTypeOk(o.TotalPages) +} + +// SetTotalPages sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Pagination) SetTotalPages(v PaginationGetTotalPagesRetType) { + setPaginationGetTotalPagesAttributeType(&o.TotalPages, v) +} + +// GetTotalRows returns the TotalRows field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Pagination) GetTotalRows() (ret PaginationGetTotalRowsRetType) { + ret, _ = o.GetTotalRowsOk() + return ret +} + +// GetTotalRowsOk returns a tuple with the TotalRows 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 *Pagination) GetTotalRowsOk() (ret PaginationGetTotalRowsRetType, ok bool) { + return getPaginationGetTotalRowsAttributeTypeOk(o.TotalRows) +} + +// SetTotalRows sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Pagination) SetTotalRows(v PaginationGetTotalRowsRetType) { + setPaginationGetTotalRowsAttributeType(&o.TotalRows, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o Pagination) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getPaginationGetPageAttributeTypeOk(o.Page); ok { + toSerialize["Page"] = val + } + if val, ok := getPaginationGetSizeAttributeTypeOk(o.Size); ok { + toSerialize["Size"] = val + } + if val, ok := getPaginationGetSortAttributeTypeOk(o.Sort); ok { + toSerialize["Sort"] = val + } + if val, ok := getPaginationGetTotalPagesAttributeTypeOk(o.TotalPages); ok { + toSerialize["TotalPages"] = val + } + if val, ok := getPaginationGetTotalRowsAttributeTypeOk(o.TotalRows); ok { + toSerialize["TotalRows"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullablePagination struct { + value *Pagination + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullablePagination) Get() *Pagination { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullablePagination) Set(val *Pagination) { + 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 NullablePagination) 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 *NullablePagination) 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 NewNullablePagination(val *Pagination) *NullablePagination { + return &NullablePagination{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 NullablePagination) 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 *NullablePagination) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_pagination_test.go b/services/sqlserverflex/model_pagination_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_pagination_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_partial_update_instance_payload.go b/services/sqlserverflex/model_partial_update_instance_payload.go index c7347069e..c74e3334b 100644 --- a/services/sqlserverflex/model_partial_update_instance_payload.go +++ b/services/sqlserverflex/model_partial_update_instance_payload.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -18,33 +18,6 @@ import ( // checks if the PartialUpdateInstancePayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &PartialUpdateInstancePayload{} -/* - types and functions for acl -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateInstancePayloadGetAclAttributeType = *CreateInstancePayloadAcl - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateInstancePayloadGetAclArgType = CreateInstancePayloadAcl - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateInstancePayloadGetAclRetType = CreateInstancePayloadAcl - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPartialUpdateInstancePayloadGetAclAttributeTypeOk(arg PartialUpdateInstancePayloadGetAclAttributeType) (ret PartialUpdateInstancePayloadGetAclRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPartialUpdateInstancePayloadGetAclAttributeType(arg *PartialUpdateInstancePayloadGetAclAttributeType, val PartialUpdateInstancePayloadGetAclRetType) { - *arg = &val -} - /* types and functions for backupSchedule */ @@ -103,15 +76,15 @@ type PartialUpdateInstancePayloadGetFlavorIdRetType = string types and functions for labels */ -// isFreeform +// isContainer // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateInstancePayloadGetLabelsAttributeType = *map[string]interface{} +type PartialUpdateInstancePayloadGetLabelsAttributeType = *map[string]string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateInstancePayloadGetLabelsArgType = map[string]interface{} +type PartialUpdateInstancePayloadGetLabelsArgType = map[string]string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateInstancePayloadGetLabelsRetType = map[string]interface{} +type PartialUpdateInstancePayloadGetLabelsRetType = map[string]string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateInstancePayloadGetLabelsAttributeTypeOk(arg PartialUpdateInstancePayloadGetLabelsAttributeType) (ret PartialUpdateInstancePayloadGetLabelsRetType, ok bool) { @@ -154,15 +127,21 @@ type PartialUpdateInstancePayloadGetNameArgType = string type PartialUpdateInstancePayloadGetNameRetType = string /* - types and functions for version + types and functions for network */ -// isNotNullableString +// isModel // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateInstancePayloadGetVersionAttributeType = *string +type PartialUpdateInstancePayloadGetNetworkAttributeType = *PartialUpdateInstancePayloadNetwork // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getPartialUpdateInstancePayloadGetVersionAttributeTypeOk(arg PartialUpdateInstancePayloadGetVersionAttributeType) (ret PartialUpdateInstancePayloadGetVersionRetType, ok bool) { +type PartialUpdateInstancePayloadGetNetworkArgType = PartialUpdateInstancePayloadNetwork + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PartialUpdateInstancePayloadGetNetworkRetType = PartialUpdateInstancePayloadNetwork + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getPartialUpdateInstancePayloadGetNetworkAttributeTypeOk(arg PartialUpdateInstancePayloadGetNetworkAttributeType) (ret PartialUpdateInstancePayloadGetNetworkRetType, ok bool) { if arg == nil { return ret, false } @@ -170,29 +149,107 @@ func getPartialUpdateInstancePayloadGetVersionAttributeTypeOk(arg PartialUpdateI } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setPartialUpdateInstancePayloadGetVersionAttributeType(arg *PartialUpdateInstancePayloadGetVersionAttributeType, val PartialUpdateInstancePayloadGetVersionRetType) { +func setPartialUpdateInstancePayloadGetNetworkAttributeType(arg *PartialUpdateInstancePayloadGetNetworkAttributeType, val PartialUpdateInstancePayloadGetNetworkRetType) { *arg = &val } +/* + types and functions for retentionDays +*/ + +// isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PartialUpdateInstancePayloadGetRetentionDaysAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PartialUpdateInstancePayloadGetRetentionDaysArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PartialUpdateInstancePayloadGetRetentionDaysRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getPartialUpdateInstancePayloadGetRetentionDaysAttributeTypeOk(arg PartialUpdateInstancePayloadGetRetentionDaysAttributeType) (ret PartialUpdateInstancePayloadGetRetentionDaysRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setPartialUpdateInstancePayloadGetRetentionDaysAttributeType(arg *PartialUpdateInstancePayloadGetRetentionDaysAttributeType, val PartialUpdateInstancePayloadGetRetentionDaysRetType) { + *arg = &val +} + +/* + types and functions for storage +*/ + +// isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PartialUpdateInstancePayloadGetStorageAttributeType = *StorageUpdate + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PartialUpdateInstancePayloadGetStorageArgType = StorageUpdate + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PartialUpdateInstancePayloadGetStorageRetType = StorageUpdate + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getPartialUpdateInstancePayloadGetStorageAttributeTypeOk(arg PartialUpdateInstancePayloadGetStorageAttributeType) (ret PartialUpdateInstancePayloadGetStorageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setPartialUpdateInstancePayloadGetStorageAttributeType(arg *PartialUpdateInstancePayloadGetStorageAttributeType, val PartialUpdateInstancePayloadGetStorageRetType) { + *arg = &val +} + +/* + types and functions for version +*/ + +// isEnumRef +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type PartialUpdateInstancePayloadGetVersionAttributeType = *InstanceVersionOpt + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateInstancePayloadGetVersionArgType = string +type PartialUpdateInstancePayloadGetVersionArgType = InstanceVersionOpt // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type PartialUpdateInstancePayloadGetVersionRetType = string +type PartialUpdateInstancePayloadGetVersionRetType = InstanceVersionOpt + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getPartialUpdateInstancePayloadGetVersionAttributeTypeOk(arg PartialUpdateInstancePayloadGetVersionAttributeType) (ret PartialUpdateInstancePayloadGetVersionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setPartialUpdateInstancePayloadGetVersionAttributeType(arg *PartialUpdateInstancePayloadGetVersionAttributeType, val PartialUpdateInstancePayloadGetVersionRetType) { + *arg = &val +} // PartialUpdateInstancePayload struct for PartialUpdateInstancePayload // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayload struct { - Acl PartialUpdateInstancePayloadGetAclAttributeType `json:"acl,omitempty"` - // Cronjob for the daily full backup if not provided a job will generated between 00:00 and 04:59 + // The schedule on which time the daily backup is being executed. The schedule is written as a cron schedule. BackupSchedule PartialUpdateInstancePayloadGetBackupScheduleAttributeType `json:"backupSchedule,omitempty"` - // Id of the selected flavor + // The id of the instance flavor. FlavorId PartialUpdateInstancePayloadGetFlavorIdAttributeType `json:"flavorId,omitempty"` - Labels PartialUpdateInstancePayloadGetLabelsAttributeType `json:"labels,omitempty"` - // Name of the instance - Name PartialUpdateInstancePayloadGetNameAttributeType `json:"name,omitempty"` - // Version of the MSSQL Server - Version PartialUpdateInstancePayloadGetVersionAttributeType `json:"version,omitempty"` + // A dictionary of user-defined key-value pairs used to categorize or organize the resource. **Rules for Keys:** * Must be between 1 and 63 characters long. * Must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$` * **Restriction:** The prefix `stackit-` is strictly reserved and cannot be used. **Rules for Values:** * Must be between 0 (empty string) and 63 characters long. * If not empty, must begin and end with an alphanumeric character. * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$` + Labels PartialUpdateInstancePayloadGetLabelsAttributeType `json:"labels,omitempty"` + // The name of the instance. + Name PartialUpdateInstancePayloadGetNameAttributeType `json:"name,omitempty"` + Network PartialUpdateInstancePayloadGetNetworkAttributeType `json:"network,omitempty"` + // Can be cast to int32 without loss of precision. + RetentionDays PartialUpdateInstancePayloadGetRetentionDaysAttributeType `json:"retentionDays,omitempty"` + Storage PartialUpdateInstancePayloadGetStorageAttributeType `json:"storage,omitempty"` + Version PartialUpdateInstancePayloadGetVersionAttributeType `json:"version,omitempty"` } // NewPartialUpdateInstancePayload instantiates a new PartialUpdateInstancePayload object @@ -211,38 +268,9 @@ func NewPartialUpdateInstancePayload() *PartialUpdateInstancePayload { // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewPartialUpdateInstancePayloadWithDefaults() *PartialUpdateInstancePayload { this := PartialUpdateInstancePayload{} - var version string = "2022" - this.Version = &version return &this } -// GetAcl returns the Acl 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 *PartialUpdateInstancePayload) GetAcl() (res PartialUpdateInstancePayloadGetAclRetType) { - res, _ = o.GetAclOk() - return -} - -// GetAclOk returns a tuple with the Acl 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 *PartialUpdateInstancePayload) GetAclOk() (ret PartialUpdateInstancePayloadGetAclRetType, ok bool) { - return getPartialUpdateInstancePayloadGetAclAttributeTypeOk(o.Acl) -} - -// HasAcl 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 *PartialUpdateInstancePayload) HasAcl() bool { - _, ok := o.GetAclOk() - return ok -} - -// SetAcl gets a reference to the given CreateInstancePayloadAcl and assigns it to the Acl field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *PartialUpdateInstancePayload) SetAcl(v PartialUpdateInstancePayloadGetAclRetType) { - setPartialUpdateInstancePayloadGetAclAttributeType(&o.Acl, v) -} - // GetBackupSchedule returns the BackupSchedule 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 *PartialUpdateInstancePayload) GetBackupSchedule() (res PartialUpdateInstancePayloadGetBackupScheduleRetType) { @@ -318,7 +346,7 @@ func (o *PartialUpdateInstancePayload) HasLabels() bool { return ok } -// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field. +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateInstancePayload) SetLabels(v PartialUpdateInstancePayloadGetLabelsRetType) { setPartialUpdateInstancePayloadGetLabelsAttributeType(&o.Labels, v) @@ -351,6 +379,87 @@ func (o *PartialUpdateInstancePayload) SetName(v PartialUpdateInstancePayloadGet setPartialUpdateInstancePayloadGetNameAttributeType(&o.Name, v) } +// GetNetwork returns the Network 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 *PartialUpdateInstancePayload) GetNetwork() (res PartialUpdateInstancePayloadGetNetworkRetType) { + res, _ = o.GetNetworkOk() + return +} + +// GetNetworkOk returns a tuple with the Network 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 *PartialUpdateInstancePayload) GetNetworkOk() (ret PartialUpdateInstancePayloadGetNetworkRetType, ok bool) { + return getPartialUpdateInstancePayloadGetNetworkAttributeTypeOk(o.Network) +} + +// HasNetwork 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 *PartialUpdateInstancePayload) HasNetwork() bool { + _, ok := o.GetNetworkOk() + return ok +} + +// SetNetwork gets a reference to the given PartialUpdateInstancePayloadNetwork and assigns it to the Network field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *PartialUpdateInstancePayload) SetNetwork(v PartialUpdateInstancePayloadGetNetworkRetType) { + setPartialUpdateInstancePayloadGetNetworkAttributeType(&o.Network, v) +} + +// GetRetentionDays returns the RetentionDays 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 *PartialUpdateInstancePayload) GetRetentionDays() (res PartialUpdateInstancePayloadGetRetentionDaysRetType) { + res, _ = o.GetRetentionDaysOk() + return +} + +// GetRetentionDaysOk returns a tuple with the RetentionDays 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 *PartialUpdateInstancePayload) GetRetentionDaysOk() (ret PartialUpdateInstancePayloadGetRetentionDaysRetType, ok bool) { + return getPartialUpdateInstancePayloadGetRetentionDaysAttributeTypeOk(o.RetentionDays) +} + +// HasRetentionDays 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 *PartialUpdateInstancePayload) HasRetentionDays() bool { + _, ok := o.GetRetentionDaysOk() + return ok +} + +// SetRetentionDays gets a reference to the given int64 and assigns it to the RetentionDays field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *PartialUpdateInstancePayload) SetRetentionDays(v PartialUpdateInstancePayloadGetRetentionDaysRetType) { + setPartialUpdateInstancePayloadGetRetentionDaysAttributeType(&o.RetentionDays, v) +} + +// GetStorage returns the Storage 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 *PartialUpdateInstancePayload) GetStorage() (res PartialUpdateInstancePayloadGetStorageRetType) { + res, _ = o.GetStorageOk() + return +} + +// GetStorageOk returns a tuple with the Storage 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 *PartialUpdateInstancePayload) GetStorageOk() (ret PartialUpdateInstancePayloadGetStorageRetType, ok bool) { + return getPartialUpdateInstancePayloadGetStorageAttributeTypeOk(o.Storage) +} + +// HasStorage 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 *PartialUpdateInstancePayload) HasStorage() bool { + _, ok := o.GetStorageOk() + return ok +} + +// SetStorage gets a reference to the given StorageUpdate and assigns it to the Storage field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *PartialUpdateInstancePayload) SetStorage(v PartialUpdateInstancePayloadGetStorageRetType) { + setPartialUpdateInstancePayloadGetStorageAttributeType(&o.Storage, v) +} + // GetVersion returns the Version 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 *PartialUpdateInstancePayload) GetVersion() (res PartialUpdateInstancePayloadGetVersionRetType) { @@ -372,7 +481,7 @@ func (o *PartialUpdateInstancePayload) HasVersion() bool { return ok } -// SetVersion gets a reference to the given string and assigns it to the Version field. +// SetVersion gets a reference to the given InstanceVersionOpt and assigns it to the Version field. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateInstancePayload) SetVersion(v PartialUpdateInstancePayloadGetVersionRetType) { setPartialUpdateInstancePayloadGetVersionAttributeType(&o.Version, v) @@ -381,9 +490,6 @@ func (o *PartialUpdateInstancePayload) SetVersion(v PartialUpdateInstancePayload // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o PartialUpdateInstancePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getPartialUpdateInstancePayloadGetAclAttributeTypeOk(o.Acl); ok { - toSerialize["Acl"] = val - } if val, ok := getPartialUpdateInstancePayloadGetBackupScheduleAttributeTypeOk(o.BackupSchedule); ok { toSerialize["BackupSchedule"] = val } @@ -396,6 +502,15 @@ func (o PartialUpdateInstancePayload) ToMap() (map[string]interface{}, error) { if val, ok := getPartialUpdateInstancePayloadGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } + if val, ok := getPartialUpdateInstancePayloadGetNetworkAttributeTypeOk(o.Network); ok { + toSerialize["Network"] = val + } + if val, ok := getPartialUpdateInstancePayloadGetRetentionDaysAttributeTypeOk(o.RetentionDays); ok { + toSerialize["RetentionDays"] = val + } + if val, ok := getPartialUpdateInstancePayloadGetStorageAttributeTypeOk(o.Storage); ok { + toSerialize["Storage"] = val + } if val, ok := getPartialUpdateInstancePayloadGetVersionAttributeTypeOk(o.Version); ok { toSerialize["Version"] = val } diff --git a/services/sqlserverflex/model_list_restore_jobs_response.go b/services/sqlserverflex/model_partial_update_instance_payload_network.go similarity index 52% rename from services/sqlserverflex/model_list_restore_jobs_response.go rename to services/sqlserverflex/model_partial_update_instance_payload_network.go index 0a5fb164f..c60a6c699 100644 --- a/services/sqlserverflex/model_list_restore_jobs_response.go +++ b/services/sqlserverflex/model_partial_update_instance_payload_network.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,25 +15,25 @@ import ( "encoding/json" ) -// checks if the ListRestoreJobsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListRestoreJobsResponse{} +// checks if the PartialUpdateInstancePayloadNetwork type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PartialUpdateInstancePayloadNetwork{} /* - types and functions for runningRestores + types and functions for acl */ // isArray // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListRestoreJobsResponseGetRunningRestoresAttributeType = *[]RestoreRunningRestore +type PartialUpdateInstancePayloadNetworkGetAclAttributeType = *[]string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListRestoreJobsResponseGetRunningRestoresArgType = []RestoreRunningRestore +type PartialUpdateInstancePayloadNetworkGetAclArgType = []string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListRestoreJobsResponseGetRunningRestoresRetType = []RestoreRunningRestore +type PartialUpdateInstancePayloadNetworkGetAclRetType = []string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListRestoreJobsResponseGetRunningRestoresAttributeTypeOk(arg ListRestoreJobsResponseGetRunningRestoresAttributeType) (ret ListRestoreJobsResponseGetRunningRestoresRetType, ok bool) { +func getPartialUpdateInstancePayloadNetworkGetAclAttributeTypeOk(arg PartialUpdateInstancePayloadNetworkGetAclAttributeType) (ret PartialUpdateInstancePayloadNetworkGetAclRetType, ok bool) { if arg == nil { return ret, false } @@ -41,111 +41,112 @@ func getListRestoreJobsResponseGetRunningRestoresAttributeTypeOk(arg ListRestore } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListRestoreJobsResponseGetRunningRestoresAttributeType(arg *ListRestoreJobsResponseGetRunningRestoresAttributeType, val ListRestoreJobsResponseGetRunningRestoresRetType) { +func setPartialUpdateInstancePayloadNetworkGetAclAttributeType(arg *PartialUpdateInstancePayloadNetworkGetAclAttributeType, val PartialUpdateInstancePayloadNetworkGetAclRetType) { *arg = &val } -// ListRestoreJobsResponse struct for ListRestoreJobsResponse +// PartialUpdateInstancePayloadNetwork the network configuration of the instance. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListRestoreJobsResponse struct { - RunningRestores ListRestoreJobsResponseGetRunningRestoresAttributeType `json:"runningRestores,omitempty"` +type PartialUpdateInstancePayloadNetwork struct { + // List of IPV4 cidr. + Acl PartialUpdateInstancePayloadNetworkGetAclAttributeType `json:"acl,omitempty"` } -// NewListRestoreJobsResponse instantiates a new ListRestoreJobsResponse object +// NewPartialUpdateInstancePayloadNetwork instantiates a new PartialUpdateInstancePayloadNetwork 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 NewListRestoreJobsResponse() *ListRestoreJobsResponse { - this := ListRestoreJobsResponse{} +func NewPartialUpdateInstancePayloadNetwork() *PartialUpdateInstancePayloadNetwork { + this := PartialUpdateInstancePayloadNetwork{} return &this } -// NewListRestoreJobsResponseWithDefaults instantiates a new ListRestoreJobsResponse object +// NewPartialUpdateInstancePayloadNetworkWithDefaults instantiates a new PartialUpdateInstancePayloadNetwork 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 NewListRestoreJobsResponseWithDefaults() *ListRestoreJobsResponse { - this := ListRestoreJobsResponse{} +func NewPartialUpdateInstancePayloadNetworkWithDefaults() *PartialUpdateInstancePayloadNetwork { + this := PartialUpdateInstancePayloadNetwork{} return &this } -// GetRunningRestores returns the RunningRestores field value if set, zero value otherwise. +// GetAcl returns the Acl 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 *ListRestoreJobsResponse) GetRunningRestores() (res ListRestoreJobsResponseGetRunningRestoresRetType) { - res, _ = o.GetRunningRestoresOk() +func (o *PartialUpdateInstancePayloadNetwork) GetAcl() (res PartialUpdateInstancePayloadNetworkGetAclRetType) { + res, _ = o.GetAclOk() return } -// GetRunningRestoresOk returns a tuple with the RunningRestores field value if set, nil otherwise +// GetAclOk returns a tuple with the Acl 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 *ListRestoreJobsResponse) GetRunningRestoresOk() (ret ListRestoreJobsResponseGetRunningRestoresRetType, ok bool) { - return getListRestoreJobsResponseGetRunningRestoresAttributeTypeOk(o.RunningRestores) +func (o *PartialUpdateInstancePayloadNetwork) GetAclOk() (ret PartialUpdateInstancePayloadNetworkGetAclRetType, ok bool) { + return getPartialUpdateInstancePayloadNetworkGetAclAttributeTypeOk(o.Acl) } -// HasRunningRestores returns a boolean if a field has been set. +// HasAcl 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 *ListRestoreJobsResponse) HasRunningRestores() bool { - _, ok := o.GetRunningRestoresOk() +func (o *PartialUpdateInstancePayloadNetwork) HasAcl() bool { + _, ok := o.GetAclOk() return ok } -// SetRunningRestores gets a reference to the given []RestoreRunningRestore and assigns it to the RunningRestores field. +// SetAcl gets a reference to the given []string and assigns it to the Acl field. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListRestoreJobsResponse) SetRunningRestores(v ListRestoreJobsResponseGetRunningRestoresRetType) { - setListRestoreJobsResponseGetRunningRestoresAttributeType(&o.RunningRestores, v) +func (o *PartialUpdateInstancePayloadNetwork) SetAcl(v PartialUpdateInstancePayloadNetworkGetAclRetType) { + setPartialUpdateInstancePayloadNetworkGetAclAttributeType(&o.Acl, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ListRestoreJobsResponse) ToMap() (map[string]interface{}, error) { +func (o PartialUpdateInstancePayloadNetwork) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getListRestoreJobsResponseGetRunningRestoresAttributeTypeOk(o.RunningRestores); ok { - toSerialize["RunningRestores"] = val + if val, ok := getPartialUpdateInstancePayloadNetworkGetAclAttributeTypeOk(o.Acl); ok { + toSerialize["Acl"] = val } return toSerialize, nil } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableListRestoreJobsResponse struct { - value *ListRestoreJobsResponse +type NullablePartialUpdateInstancePayloadNetwork struct { + value *PartialUpdateInstancePayloadNetwork isSet bool } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableListRestoreJobsResponse) Get() *ListRestoreJobsResponse { +func (v NullablePartialUpdateInstancePayloadNetwork) Get() *PartialUpdateInstancePayloadNetwork { return v.value } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableListRestoreJobsResponse) Set(val *ListRestoreJobsResponse) { +func (v *NullablePartialUpdateInstancePayloadNetwork) Set(val *PartialUpdateInstancePayloadNetwork) { 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 NullableListRestoreJobsResponse) IsSet() bool { +func (v NullablePartialUpdateInstancePayloadNetwork) 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 *NullableListRestoreJobsResponse) Unset() { +func (v *NullablePartialUpdateInstancePayloadNetwork) 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 NewNullableListRestoreJobsResponse(val *ListRestoreJobsResponse) *NullableListRestoreJobsResponse { - return &NullableListRestoreJobsResponse{value: val, isSet: true} +func NewNullablePartialUpdateInstancePayloadNetwork(val *PartialUpdateInstancePayloadNetwork) *NullablePartialUpdateInstancePayloadNetwork { + return &NullablePartialUpdateInstancePayloadNetwork{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 NullableListRestoreJobsResponse) MarshalJSON() ([]byte, error) { +func (v NullablePartialUpdateInstancePayloadNetwork) 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 *NullableListRestoreJobsResponse) UnmarshalJSON(src []byte) error { +func (v *NullablePartialUpdateInstancePayloadNetwork) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/sqlserverflex/model_partial_update_instance_payload_network_test.go b/services/sqlserverflex/model_partial_update_instance_payload_network_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_partial_update_instance_payload_network_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_partial_update_instance_payload_test.go b/services/sqlserverflex/model_partial_update_instance_payload_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_partial_update_instance_payload_test.go +++ b/services/sqlserverflex/model_partial_update_instance_payload_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_replicas.go b/services/sqlserverflex/model_replicas.go new file mode 100644 index 000000000..92f478ec2 --- /dev/null +++ b/services/sqlserverflex/model_replicas.go @@ -0,0 +1,132 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" + "fmt" +) + +// Replicas How many replicas the instance should have. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type Replicas int32 + +// List of replicas +const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + REPLICAS__1 Replicas = 1 + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + REPLICAS__3 Replicas = 3 +) + +// All allowed values of Replicas enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +var AllowedReplicasEnumValues = []Replicas{ + 1, + 3, +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *Replicas) UnmarshalJSON(src []byte) error { + var value int32 + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue int32 + if value == zeroValue { + return nil + } + enumTypeValue := Replicas(value) + for _, existing := range AllowedReplicasEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid Replicas", value) +} + +// NewReplicasFromValue returns a pointer to a valid Replicas +// 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 NewReplicasFromValue(v int32) (*Replicas, error) { + ev := Replicas(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for Replicas: valid values are %v", v, AllowedReplicasEnumValues) + } +} + +// 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 Replicas) IsValid() bool { + for _, existing := range AllowedReplicasEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to replicas value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v Replicas) Ptr() *Replicas { + return &v +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableReplicas struct { + value *Replicas + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableReplicas) Get() *Replicas { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableReplicas) Set(val *Replicas) { + 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 NullableReplicas) 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 *NullableReplicas) 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 NewNullableReplicas(val *Replicas) *NullableReplicas { + return &NullableReplicas{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 NullableReplicas) 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 *NullableReplicas) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_replicas_test.go b/services/sqlserverflex/model_replicas_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_replicas_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_reset_user_response.go b/services/sqlserverflex/model_reset_user_response.go index 256e8888d..053ced511 100644 --- a/services/sqlserverflex/model_reset_user_response.go +++ b/services/sqlserverflex/model_reset_user_response.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,21 +19,96 @@ import ( var _ MappedNullable = &ResetUserResponse{} /* - types and functions for item + types and functions for password */ -// isModel +// isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ResetUserResponseGetItemAttributeType = *SingleUser +type ResetUserResponseGetPasswordAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ResetUserResponseGetItemArgType = SingleUser +func getResetUserResponseGetPasswordAttributeTypeOk(arg ResetUserResponseGetPasswordAttributeType) (ret ResetUserResponseGetPasswordRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setResetUserResponseGetPasswordAttributeType(arg *ResetUserResponseGetPasswordAttributeType, val ResetUserResponseGetPasswordRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ResetUserResponseGetPasswordArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ResetUserResponseGetPasswordRetType = string + +/* + types and functions for status +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ResetUserResponseGetStatusAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getResetUserResponseGetStatusAttributeTypeOk(arg ResetUserResponseGetStatusAttributeType) (ret ResetUserResponseGetStatusRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setResetUserResponseGetStatusAttributeType(arg *ResetUserResponseGetStatusAttributeType, val ResetUserResponseGetStatusRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ResetUserResponseGetStatusArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ResetUserResponseGetStatusRetType = string + +/* + types and functions for uri +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ResetUserResponseGetUriAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getResetUserResponseGetUriAttributeTypeOk(arg ResetUserResponseGetUriAttributeType) (ret ResetUserResponseGetUriRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setResetUserResponseGetUriAttributeType(arg *ResetUserResponseGetUriAttributeType, val ResetUserResponseGetUriRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ResetUserResponseGetUriArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ResetUserResponseGetUriRetType = string + +/* + types and functions for username +*/ +// isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ResetUserResponseGetItemRetType = SingleUser +type ResetUserResponseGetUsernameAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getResetUserResponseGetItemAttributeTypeOk(arg ResetUserResponseGetItemAttributeType) (ret ResetUserResponseGetItemRetType, ok bool) { +func getResetUserResponseGetUsernameAttributeTypeOk(arg ResetUserResponseGetUsernameAttributeType) (ret ResetUserResponseGetUsernameRetType, ok bool) { if arg == nil { return ret, false } @@ -41,23 +116,47 @@ func getResetUserResponseGetItemAttributeTypeOk(arg ResetUserResponseGetItemAttr } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setResetUserResponseGetItemAttributeType(arg *ResetUserResponseGetItemAttributeType, val ResetUserResponseGetItemRetType) { +func setResetUserResponseGetUsernameAttributeType(arg *ResetUserResponseGetUsernameAttributeType, val ResetUserResponseGetUsernameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ResetUserResponseGetUsernameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ResetUserResponseGetUsernameRetType = string + // ResetUserResponse struct for ResetUserResponse // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResetUserResponse struct { - Item ResetUserResponseGetItemAttributeType `json:"item,omitempty"` + // The password for the user. + // REQUIRED + Password ResetUserResponseGetPasswordAttributeType `json:"password" required:"true"` + // The current status of the user. + // REQUIRED + Status ResetUserResponseGetStatusAttributeType `json:"status" required:"true"` + // The connection string for the user to the instance. + // REQUIRED + Uri ResetUserResponseGetUriAttributeType `json:"uri" required:"true"` + // The name of the user. + // REQUIRED + Username ResetUserResponseGetUsernameAttributeType `json:"username" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ResetUserResponse ResetUserResponse + // NewResetUserResponse instantiates a new ResetUserResponse 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 NewResetUserResponse() *ResetUserResponse { +func NewResetUserResponse(password ResetUserResponseGetPasswordArgType, status ResetUserResponseGetStatusArgType, uri ResetUserResponseGetUriArgType, username ResetUserResponseGetUsernameArgType) *ResetUserResponse { this := ResetUserResponse{} + setResetUserResponseGetPasswordAttributeType(&this.Password, password) + setResetUserResponseGetStatusAttributeType(&this.Status, status) + setResetUserResponseGetUriAttributeType(&this.Uri, uri) + setResetUserResponseGetUsernameAttributeType(&this.Username, username) return &this } @@ -70,38 +169,100 @@ func NewResetUserResponseWithDefaults() *ResetUserResponse { return &this } -// GetItem returns the Item field value if set, zero value otherwise. +// GetPassword returns the Password field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ResetUserResponse) GetPassword() (ret ResetUserResponseGetPasswordRetType) { + ret, _ = o.GetPasswordOk() + return ret +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ResetUserResponse) GetPasswordOk() (ret ResetUserResponseGetPasswordRetType, ok bool) { + return getResetUserResponseGetPasswordAttributeTypeOk(o.Password) +} + +// SetPassword sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ResetUserResponse) GetItem() (res ResetUserResponseGetItemRetType) { - res, _ = o.GetItemOk() - return +func (o *ResetUserResponse) SetPassword(v ResetUserResponseGetPasswordRetType) { + setResetUserResponseGetPasswordAttributeType(&o.Password, v) } -// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// GetStatus returns the Status field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ResetUserResponse) GetStatus() (ret ResetUserResponseGetStatusRetType) { + ret, _ = o.GetStatusOk() + return ret +} + +// GetStatusOk returns a tuple with the Status field value // and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ResetUserResponse) GetItemOk() (ret ResetUserResponseGetItemRetType, ok bool) { - return getResetUserResponseGetItemAttributeTypeOk(o.Item) +func (o *ResetUserResponse) GetStatusOk() (ret ResetUserResponseGetStatusRetType, ok bool) { + return getResetUserResponseGetStatusAttributeTypeOk(o.Status) +} + +// SetStatus sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ResetUserResponse) SetStatus(v ResetUserResponseGetStatusRetType) { + setResetUserResponseGetStatusAttributeType(&o.Status, v) } -// HasItem returns a boolean if a field has been set. +// GetUri returns the Uri field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ResetUserResponse) HasItem() bool { - _, ok := o.GetItemOk() - return ok +func (o *ResetUserResponse) GetUri() (ret ResetUserResponseGetUriRetType) { + ret, _ = o.GetUriOk() + return ret } -// SetItem gets a reference to the given SingleUser and assigns it to the Item field. +// GetUriOk returns a tuple with the Uri 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 *ResetUserResponse) GetUriOk() (ret ResetUserResponseGetUriRetType, ok bool) { + return getResetUserResponseGetUriAttributeTypeOk(o.Uri) +} + +// SetUri sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ResetUserResponse) SetItem(v ResetUserResponseGetItemRetType) { - setResetUserResponseGetItemAttributeType(&o.Item, v) +func (o *ResetUserResponse) SetUri(v ResetUserResponseGetUriRetType) { + setResetUserResponseGetUriAttributeType(&o.Uri, v) +} + +// GetUsername returns the Username field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ResetUserResponse) GetUsername() (ret ResetUserResponseGetUsernameRetType) { + ret, _ = o.GetUsernameOk() + return ret +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ResetUserResponse) GetUsernameOk() (ret ResetUserResponseGetUsernameRetType, ok bool) { + return getResetUserResponseGetUsernameAttributeTypeOk(o.Username) +} + +// SetUsername sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ResetUserResponse) SetUsername(v ResetUserResponseGetUsernameRetType) { + setResetUserResponseGetUsernameAttributeType(&o.Username, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ResetUserResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getResetUserResponseGetItemAttributeTypeOk(o.Item); ok { - toSerialize["Item"] = val + if val, ok := getResetUserResponseGetPasswordAttributeTypeOk(o.Password); ok { + toSerialize["Password"] = val + } + if val, ok := getResetUserResponseGetStatusAttributeTypeOk(o.Status); ok { + toSerialize["Status"] = val + } + if val, ok := getResetUserResponseGetUriAttributeTypeOk(o.Uri); ok { + toSerialize["Uri"] = val + } + if val, ok := getResetUserResponseGetUsernameAttributeTypeOk(o.Username); ok { + toSerialize["Username"] = val } return toSerialize, nil } diff --git a/services/sqlserverflex/model_reset_user_response_test.go b/services/sqlserverflex/model_reset_user_response_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_reset_user_response_test.go +++ b/services/sqlserverflex/model_reset_user_response_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_restore_database_from_backup_payload.go b/services/sqlserverflex/model_restore_database_from_backup_payload.go new file mode 100644 index 000000000..4f39665ec --- /dev/null +++ b/services/sqlserverflex/model_restore_database_from_backup_payload.go @@ -0,0 +1,203 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" +) + +// checks if the RestoreDatabaseFromBackupPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RestoreDatabaseFromBackupPayload{} + +/* + types and functions for database_name +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type RestoreDatabaseFromBackupPayloadGetDatabaseNameAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getRestoreDatabaseFromBackupPayloadGetDatabaseNameAttributeTypeOk(arg RestoreDatabaseFromBackupPayloadGetDatabaseNameAttributeType) (ret RestoreDatabaseFromBackupPayloadGetDatabaseNameRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setRestoreDatabaseFromBackupPayloadGetDatabaseNameAttributeType(arg *RestoreDatabaseFromBackupPayloadGetDatabaseNameAttributeType, val RestoreDatabaseFromBackupPayloadGetDatabaseNameRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type RestoreDatabaseFromBackupPayloadGetDatabaseNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type RestoreDatabaseFromBackupPayloadGetDatabaseNameRetType = string + +/* + types and functions for source +*/ + +// isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type RestoreDatabaseFromBackupPayloadGetSourceAttributeType = *RestoreDatabaseFromBackupPayloadSource + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type RestoreDatabaseFromBackupPayloadGetSourceArgType = RestoreDatabaseFromBackupPayloadSource + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type RestoreDatabaseFromBackupPayloadGetSourceRetType = RestoreDatabaseFromBackupPayloadSource + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getRestoreDatabaseFromBackupPayloadGetSourceAttributeTypeOk(arg RestoreDatabaseFromBackupPayloadGetSourceAttributeType) (ret RestoreDatabaseFromBackupPayloadGetSourceRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setRestoreDatabaseFromBackupPayloadGetSourceAttributeType(arg *RestoreDatabaseFromBackupPayloadGetSourceAttributeType, val RestoreDatabaseFromBackupPayloadGetSourceRetType) { + *arg = &val +} + +// RestoreDatabaseFromBackupPayload Request to restore a database. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type RestoreDatabaseFromBackupPayload struct { + // The name of the database on the instance to be restore. + // REQUIRED + DatabaseName RestoreDatabaseFromBackupPayloadGetDatabaseNameAttributeType `json:"database_name" required:"true"` + // REQUIRED + Source RestoreDatabaseFromBackupPayloadGetSourceAttributeType `json:"source" required:"true"` +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _RestoreDatabaseFromBackupPayload RestoreDatabaseFromBackupPayload + +// NewRestoreDatabaseFromBackupPayload instantiates a new RestoreDatabaseFromBackupPayload 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 NewRestoreDatabaseFromBackupPayload(databaseName RestoreDatabaseFromBackupPayloadGetDatabaseNameArgType, source RestoreDatabaseFromBackupPayloadGetSourceArgType) *RestoreDatabaseFromBackupPayload { + this := RestoreDatabaseFromBackupPayload{} + setRestoreDatabaseFromBackupPayloadGetDatabaseNameAttributeType(&this.DatabaseName, databaseName) + setRestoreDatabaseFromBackupPayloadGetSourceAttributeType(&this.Source, source) + return &this +} + +// NewRestoreDatabaseFromBackupPayloadWithDefaults instantiates a new RestoreDatabaseFromBackupPayload 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 NewRestoreDatabaseFromBackupPayloadWithDefaults() *RestoreDatabaseFromBackupPayload { + this := RestoreDatabaseFromBackupPayload{} + return &this +} + +// GetDatabaseName returns the DatabaseName field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *RestoreDatabaseFromBackupPayload) GetDatabaseName() (ret RestoreDatabaseFromBackupPayloadGetDatabaseNameRetType) { + ret, _ = o.GetDatabaseNameOk() + return ret +} + +// GetDatabaseNameOk returns a tuple with the DatabaseName 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 *RestoreDatabaseFromBackupPayload) GetDatabaseNameOk() (ret RestoreDatabaseFromBackupPayloadGetDatabaseNameRetType, ok bool) { + return getRestoreDatabaseFromBackupPayloadGetDatabaseNameAttributeTypeOk(o.DatabaseName) +} + +// SetDatabaseName sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *RestoreDatabaseFromBackupPayload) SetDatabaseName(v RestoreDatabaseFromBackupPayloadGetDatabaseNameRetType) { + setRestoreDatabaseFromBackupPayloadGetDatabaseNameAttributeType(&o.DatabaseName, v) +} + +// GetSource returns the Source field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *RestoreDatabaseFromBackupPayload) GetSource() (ret RestoreDatabaseFromBackupPayloadGetSourceRetType) { + ret, _ = o.GetSourceOk() + return ret +} + +// GetSourceOk returns a tuple with the Source 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 *RestoreDatabaseFromBackupPayload) GetSourceOk() (ret RestoreDatabaseFromBackupPayloadGetSourceRetType, ok bool) { + return getRestoreDatabaseFromBackupPayloadGetSourceAttributeTypeOk(o.Source) +} + +// SetSource sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *RestoreDatabaseFromBackupPayload) SetSource(v RestoreDatabaseFromBackupPayloadGetSourceRetType) { + setRestoreDatabaseFromBackupPayloadGetSourceAttributeType(&o.Source, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o RestoreDatabaseFromBackupPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getRestoreDatabaseFromBackupPayloadGetDatabaseNameAttributeTypeOk(o.DatabaseName); ok { + toSerialize["DatabaseName"] = val + } + if val, ok := getRestoreDatabaseFromBackupPayloadGetSourceAttributeTypeOk(o.Source); ok { + toSerialize["Source"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableRestoreDatabaseFromBackupPayload struct { + value *RestoreDatabaseFromBackupPayload + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableRestoreDatabaseFromBackupPayload) Get() *RestoreDatabaseFromBackupPayload { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableRestoreDatabaseFromBackupPayload) Set(val *RestoreDatabaseFromBackupPayload) { + 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 NullableRestoreDatabaseFromBackupPayload) 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 *NullableRestoreDatabaseFromBackupPayload) 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 NewNullableRestoreDatabaseFromBackupPayload(val *RestoreDatabaseFromBackupPayload) *NullableRestoreDatabaseFromBackupPayload { + return &NullableRestoreDatabaseFromBackupPayload{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 NullableRestoreDatabaseFromBackupPayload) 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 *NullableRestoreDatabaseFromBackupPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_restore_database_from_backup_payload_source.go b/services/sqlserverflex/model_restore_database_from_backup_payload_source.go new file mode 100644 index 000000000..1acd0d1e6 --- /dev/null +++ b/services/sqlserverflex/model_restore_database_from_backup_payload_source.go @@ -0,0 +1,178 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" + "fmt" +) + +// RestoreDatabaseFromBackupPayloadSource - The source of the restore. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type RestoreDatabaseFromBackupPayloadSource struct { + SourceBackup *SourceBackup + SourceExternalS3 *SourceExternalS3 +} + +// SourceBackupAsRestoreDatabaseFromBackupPayloadSource is a convenience function that returns SourceBackup wrapped in RestoreDatabaseFromBackupPayloadSource +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func SourceBackupAsRestoreDatabaseFromBackupPayloadSource(v *SourceBackup) RestoreDatabaseFromBackupPayloadSource { + return RestoreDatabaseFromBackupPayloadSource{ + SourceBackup: v, + } +} + +// SourceExternalS3AsRestoreDatabaseFromBackupPayloadSource is a convenience function that returns SourceExternalS3 wrapped in RestoreDatabaseFromBackupPayloadSource +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func SourceExternalS3AsRestoreDatabaseFromBackupPayloadSource(v *SourceExternalS3) RestoreDatabaseFromBackupPayloadSource { + return RestoreDatabaseFromBackupPayloadSource{ + SourceExternalS3: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (dst *RestoreDatabaseFromBackupPayloadSource) UnmarshalJSON(data []byte) error { + var err error + // use discriminator value to speed up the lookup + var jsonDict map[string]interface{} + err = newStrictDecoder(data).Decode(&jsonDict) + if err != nil { + return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") + } + + // check if the discriminator value is 'BACKUP' + if jsonDict["type"] == "BACKUP" { + // try to unmarshal JSON data into SourceBackup + err = json.Unmarshal(data, &dst.SourceBackup) + if err == nil { + return nil // data stored in dst.SourceBackup, return on the first match + } else { + dst.SourceBackup = nil + return fmt.Errorf("failed to unmarshal RestoreDatabaseFromBackupPayloadSource as SourceBackup: %s", err.Error()) + } + } + + // check if the discriminator value is 'EXTERNAL_S3' + if jsonDict["type"] == "EXTERNAL_S3" { + // try to unmarshal JSON data into SourceExternalS3 + err = json.Unmarshal(data, &dst.SourceExternalS3) + if err == nil { + return nil // data stored in dst.SourceExternalS3, return on the first match + } else { + dst.SourceExternalS3 = nil + return fmt.Errorf("failed to unmarshal RestoreDatabaseFromBackupPayloadSource as SourceExternalS3: %s", err.Error()) + } + } + + // check if the discriminator value is 'source.backup' + if jsonDict["type"] == "source.backup" { + // try to unmarshal JSON data into SourceBackup + err = json.Unmarshal(data, &dst.SourceBackup) + if err == nil { + return nil // data stored in dst.SourceBackup, return on the first match + } else { + dst.SourceBackup = nil + return fmt.Errorf("failed to unmarshal RestoreDatabaseFromBackupPayloadSource as SourceBackup: %s", err.Error()) + } + } + + // check if the discriminator value is 'source.externalS3' + if jsonDict["type"] == "source.externalS3" { + // try to unmarshal JSON data into SourceExternalS3 + err = json.Unmarshal(data, &dst.SourceExternalS3) + if err == nil { + return nil // data stored in dst.SourceExternalS3, return on the first match + } else { + dst.SourceExternalS3 = nil + return fmt.Errorf("failed to unmarshal RestoreDatabaseFromBackupPayloadSource as SourceExternalS3: %s", err.Error()) + } + } + + return nil +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src RestoreDatabaseFromBackupPayloadSource) MarshalJSON() ([]byte, error) { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + if src.SourceBackup != nil { + return json.Marshal(&src.SourceBackup) + } + + if src.SourceExternalS3 != nil { + return json.Marshal(&src.SourceExternalS3) + } + + return []byte("{}"), nil // no data in oneOf schemas => empty JSON object +} + +// Get the actual instance +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (obj *RestoreDatabaseFromBackupPayloadSource) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.SourceBackup != nil { + return obj.SourceBackup + } + + if obj.SourceExternalS3 != nil { + return obj.SourceExternalS3 + } + + // all schemas are nil + return nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableRestoreDatabaseFromBackupPayloadSource struct { + value *RestoreDatabaseFromBackupPayloadSource + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableRestoreDatabaseFromBackupPayloadSource) Get() *RestoreDatabaseFromBackupPayloadSource { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableRestoreDatabaseFromBackupPayloadSource) Set(val *RestoreDatabaseFromBackupPayloadSource) { + 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 NullableRestoreDatabaseFromBackupPayloadSource) 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 *NullableRestoreDatabaseFromBackupPayloadSource) 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 NewNullableRestoreDatabaseFromBackupPayloadSource(val *RestoreDatabaseFromBackupPayloadSource) *NullableRestoreDatabaseFromBackupPayloadSource { + return &NullableRestoreDatabaseFromBackupPayloadSource{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 NullableRestoreDatabaseFromBackupPayloadSource) 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 *NullableRestoreDatabaseFromBackupPayloadSource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_restore_database_from_backup_payload_source_test.go b/services/sqlserverflex/model_restore_database_from_backup_payload_source_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_restore_database_from_backup_payload_source_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_restore_database_from_backup_payload_test.go b/services/sqlserverflex/model_restore_database_from_backup_payload_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_restore_database_from_backup_payload_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_restore_running_restore.go b/services/sqlserverflex/model_restore_running_restore.go deleted file mode 100644 index 9587c8518..000000000 --- a/services/sqlserverflex/model_restore_running_restore.go +++ /dev/null @@ -1,384 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package sqlserverflex - -import ( - "encoding/json" -) - -// checks if the RestoreRunningRestore type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RestoreRunningRestore{} - -/* - types and functions for command -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RestoreRunningRestoreGetCommandAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRestoreRunningRestoreGetCommandAttributeTypeOk(arg RestoreRunningRestoreGetCommandAttributeType) (ret RestoreRunningRestoreGetCommandRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRestoreRunningRestoreGetCommandAttributeType(arg *RestoreRunningRestoreGetCommandAttributeType, val RestoreRunningRestoreGetCommandRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RestoreRunningRestoreGetCommandArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RestoreRunningRestoreGetCommandRetType = string - -/* - types and functions for database_name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RestoreRunningRestoreGetDatabaseNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRestoreRunningRestoreGetDatabaseNameAttributeTypeOk(arg RestoreRunningRestoreGetDatabaseNameAttributeType) (ret RestoreRunningRestoreGetDatabaseNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRestoreRunningRestoreGetDatabaseNameAttributeType(arg *RestoreRunningRestoreGetDatabaseNameAttributeType, val RestoreRunningRestoreGetDatabaseNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RestoreRunningRestoreGetDatabaseNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RestoreRunningRestoreGetDatabaseNameRetType = string - -/* - types and functions for estimated_completion_time -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RestoreRunningRestoreGetEstimatedCompletionTimeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRestoreRunningRestoreGetEstimatedCompletionTimeAttributeTypeOk(arg RestoreRunningRestoreGetEstimatedCompletionTimeAttributeType) (ret RestoreRunningRestoreGetEstimatedCompletionTimeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRestoreRunningRestoreGetEstimatedCompletionTimeAttributeType(arg *RestoreRunningRestoreGetEstimatedCompletionTimeAttributeType, val RestoreRunningRestoreGetEstimatedCompletionTimeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RestoreRunningRestoreGetEstimatedCompletionTimeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RestoreRunningRestoreGetEstimatedCompletionTimeRetType = string - -/* - types and functions for percent_complete -*/ - -// isInteger -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RestoreRunningRestoreGetPercentCompleteAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RestoreRunningRestoreGetPercentCompleteArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RestoreRunningRestoreGetPercentCompleteRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRestoreRunningRestoreGetPercentCompleteAttributeTypeOk(arg RestoreRunningRestoreGetPercentCompleteAttributeType) (ret RestoreRunningRestoreGetPercentCompleteRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRestoreRunningRestoreGetPercentCompleteAttributeType(arg *RestoreRunningRestoreGetPercentCompleteAttributeType, val RestoreRunningRestoreGetPercentCompleteRetType) { - *arg = &val -} - -/* - types and functions for start_time -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RestoreRunningRestoreGetStartTimeAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getRestoreRunningRestoreGetStartTimeAttributeTypeOk(arg RestoreRunningRestoreGetStartTimeAttributeType) (ret RestoreRunningRestoreGetStartTimeRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setRestoreRunningRestoreGetStartTimeAttributeType(arg *RestoreRunningRestoreGetStartTimeAttributeType, val RestoreRunningRestoreGetStartTimeRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RestoreRunningRestoreGetStartTimeArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RestoreRunningRestoreGetStartTimeRetType = string - -// RestoreRunningRestore struct for RestoreRunningRestore -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type RestoreRunningRestore struct { - Command RestoreRunningRestoreGetCommandAttributeType `json:"command,omitempty"` - DatabaseName RestoreRunningRestoreGetDatabaseNameAttributeType `json:"database_name,omitempty"` - EstimatedCompletionTime RestoreRunningRestoreGetEstimatedCompletionTimeAttributeType `json:"estimated_completion_time,omitempty"` - // Can be cast to int32 without loss of precision. - PercentComplete RestoreRunningRestoreGetPercentCompleteAttributeType `json:"percent_complete,omitempty"` - StartTime RestoreRunningRestoreGetStartTimeAttributeType `json:"start_time,omitempty"` -} - -// NewRestoreRunningRestore instantiates a new RestoreRunningRestore 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 NewRestoreRunningRestore() *RestoreRunningRestore { - this := RestoreRunningRestore{} - return &this -} - -// NewRestoreRunningRestoreWithDefaults instantiates a new RestoreRunningRestore 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 NewRestoreRunningRestoreWithDefaults() *RestoreRunningRestore { - this := RestoreRunningRestore{} - return &this -} - -// GetCommand returns the Command 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 *RestoreRunningRestore) GetCommand() (res RestoreRunningRestoreGetCommandRetType) { - res, _ = o.GetCommandOk() - return -} - -// GetCommandOk returns a tuple with the Command 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 *RestoreRunningRestore) GetCommandOk() (ret RestoreRunningRestoreGetCommandRetType, ok bool) { - return getRestoreRunningRestoreGetCommandAttributeTypeOk(o.Command) -} - -// HasCommand 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 *RestoreRunningRestore) HasCommand() bool { - _, ok := o.GetCommandOk() - return ok -} - -// SetCommand gets a reference to the given string and assigns it to the Command field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RestoreRunningRestore) SetCommand(v RestoreRunningRestoreGetCommandRetType) { - setRestoreRunningRestoreGetCommandAttributeType(&o.Command, v) -} - -// GetDatabaseName returns the DatabaseName 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 *RestoreRunningRestore) GetDatabaseName() (res RestoreRunningRestoreGetDatabaseNameRetType) { - res, _ = o.GetDatabaseNameOk() - return -} - -// GetDatabaseNameOk returns a tuple with the DatabaseName 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 *RestoreRunningRestore) GetDatabaseNameOk() (ret RestoreRunningRestoreGetDatabaseNameRetType, ok bool) { - return getRestoreRunningRestoreGetDatabaseNameAttributeTypeOk(o.DatabaseName) -} - -// HasDatabaseName 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 *RestoreRunningRestore) HasDatabaseName() bool { - _, ok := o.GetDatabaseNameOk() - return ok -} - -// SetDatabaseName gets a reference to the given string and assigns it to the DatabaseName field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RestoreRunningRestore) SetDatabaseName(v RestoreRunningRestoreGetDatabaseNameRetType) { - setRestoreRunningRestoreGetDatabaseNameAttributeType(&o.DatabaseName, v) -} - -// GetEstimatedCompletionTime returns the EstimatedCompletionTime 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 *RestoreRunningRestore) GetEstimatedCompletionTime() (res RestoreRunningRestoreGetEstimatedCompletionTimeRetType) { - res, _ = o.GetEstimatedCompletionTimeOk() - return -} - -// GetEstimatedCompletionTimeOk returns a tuple with the EstimatedCompletionTime 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 *RestoreRunningRestore) GetEstimatedCompletionTimeOk() (ret RestoreRunningRestoreGetEstimatedCompletionTimeRetType, ok bool) { - return getRestoreRunningRestoreGetEstimatedCompletionTimeAttributeTypeOk(o.EstimatedCompletionTime) -} - -// HasEstimatedCompletionTime 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 *RestoreRunningRestore) HasEstimatedCompletionTime() bool { - _, ok := o.GetEstimatedCompletionTimeOk() - return ok -} - -// SetEstimatedCompletionTime gets a reference to the given string and assigns it to the EstimatedCompletionTime field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RestoreRunningRestore) SetEstimatedCompletionTime(v RestoreRunningRestoreGetEstimatedCompletionTimeRetType) { - setRestoreRunningRestoreGetEstimatedCompletionTimeAttributeType(&o.EstimatedCompletionTime, v) -} - -// GetPercentComplete returns the PercentComplete 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 *RestoreRunningRestore) GetPercentComplete() (res RestoreRunningRestoreGetPercentCompleteRetType) { - res, _ = o.GetPercentCompleteOk() - return -} - -// GetPercentCompleteOk returns a tuple with the PercentComplete 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 *RestoreRunningRestore) GetPercentCompleteOk() (ret RestoreRunningRestoreGetPercentCompleteRetType, ok bool) { - return getRestoreRunningRestoreGetPercentCompleteAttributeTypeOk(o.PercentComplete) -} - -// HasPercentComplete 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 *RestoreRunningRestore) HasPercentComplete() bool { - _, ok := o.GetPercentCompleteOk() - return ok -} - -// SetPercentComplete gets a reference to the given int64 and assigns it to the PercentComplete field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RestoreRunningRestore) SetPercentComplete(v RestoreRunningRestoreGetPercentCompleteRetType) { - setRestoreRunningRestoreGetPercentCompleteAttributeType(&o.PercentComplete, v) -} - -// GetStartTime returns the StartTime 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 *RestoreRunningRestore) GetStartTime() (res RestoreRunningRestoreGetStartTimeRetType) { - res, _ = o.GetStartTimeOk() - return -} - -// GetStartTimeOk returns a tuple with the StartTime 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 *RestoreRunningRestore) GetStartTimeOk() (ret RestoreRunningRestoreGetStartTimeRetType, ok bool) { - return getRestoreRunningRestoreGetStartTimeAttributeTypeOk(o.StartTime) -} - -// HasStartTime 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 *RestoreRunningRestore) HasStartTime() bool { - _, ok := o.GetStartTimeOk() - return ok -} - -// SetStartTime gets a reference to the given string and assigns it to the StartTime field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *RestoreRunningRestore) SetStartTime(v RestoreRunningRestoreGetStartTimeRetType) { - setRestoreRunningRestoreGetStartTimeAttributeType(&o.StartTime, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o RestoreRunningRestore) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getRestoreRunningRestoreGetCommandAttributeTypeOk(o.Command); ok { - toSerialize["Command"] = val - } - if val, ok := getRestoreRunningRestoreGetDatabaseNameAttributeTypeOk(o.DatabaseName); ok { - toSerialize["DatabaseName"] = val - } - if val, ok := getRestoreRunningRestoreGetEstimatedCompletionTimeAttributeTypeOk(o.EstimatedCompletionTime); ok { - toSerialize["EstimatedCompletionTime"] = val - } - if val, ok := getRestoreRunningRestoreGetPercentCompleteAttributeTypeOk(o.PercentComplete); ok { - toSerialize["PercentComplete"] = val - } - if val, ok := getRestoreRunningRestoreGetStartTimeAttributeTypeOk(o.StartTime); ok { - toSerialize["StartTime"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableRestoreRunningRestore struct { - value *RestoreRunningRestore - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableRestoreRunningRestore) Get() *RestoreRunningRestore { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableRestoreRunningRestore) Set(val *RestoreRunningRestore) { - 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 NullableRestoreRunningRestore) 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 *NullableRestoreRunningRestore) 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 NewNullableRestoreRunningRestore(val *RestoreRunningRestore) *NullableRestoreRunningRestore { - return &NullableRestoreRunningRestore{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 NullableRestoreRunningRestore) 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 *NullableRestoreRunningRestore) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/sqlserverflex/model_restore_running_restore_test.go b/services/sqlserverflex/model_restore_running_restore_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_restore_running_restore_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_instance_list_user.go b/services/sqlserverflex/model_s3file_info.go similarity index 56% rename from services/sqlserverflex/model_instance_list_user.go rename to services/sqlserverflex/model_s3file_info.go index 0a350940f..6a8f1826c 100644 --- a/services/sqlserverflex/model_instance_list_user.go +++ b/services/sqlserverflex/model_s3file_info.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,19 +15,25 @@ import ( "encoding/json" ) -// checks if the InstanceListUser type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InstanceListUser{} +// checks if the S3fileInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &S3fileInfo{} /* - types and functions for id + types and functions for file_number */ -// isNotNullableString +// isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type S3fileInfoGetFileNumberAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type S3fileInfoGetFileNumberArgType = int64 + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceListUserGetIdAttributeType = *string +type S3fileInfoGetFileNumberRetType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceListUserGetIdAttributeTypeOk(arg InstanceListUserGetIdAttributeType) (ret InstanceListUserGetIdRetType, ok bool) { +func getS3fileInfoGetFileNumberAttributeTypeOk(arg S3fileInfoGetFileNumberAttributeType) (ret S3fileInfoGetFileNumberRetType, ok bool) { if arg == nil { return ret, false } @@ -35,26 +41,20 @@ func getInstanceListUserGetIdAttributeTypeOk(arg InstanceListUserGetIdAttributeT } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceListUserGetIdAttributeType(arg *InstanceListUserGetIdAttributeType, val InstanceListUserGetIdRetType) { +func setS3fileInfoGetFileNumberAttributeType(arg *S3fileInfoGetFileNumberAttributeType, val S3fileInfoGetFileNumberRetType) { *arg = &val } -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceListUserGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceListUserGetIdRetType = string - /* - types and functions for username + types and functions for file_path */ // isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceListUserGetUsernameAttributeType = *string +type S3fileInfoGetFilePathAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getInstanceListUserGetUsernameAttributeTypeOk(arg InstanceListUserGetUsernameAttributeType) (ret InstanceListUserGetUsernameRetType, ok bool) { +func getS3fileInfoGetFilePathAttributeTypeOk(arg S3fileInfoGetFilePathAttributeType) (ret S3fileInfoGetFilePathRetType, ok bool) { if arg == nil { return ret, false } @@ -62,148 +62,151 @@ func getInstanceListUserGetUsernameAttributeTypeOk(arg InstanceListUserGetUserna } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setInstanceListUserGetUsernameAttributeType(arg *InstanceListUserGetUsernameAttributeType, val InstanceListUserGetUsernameRetType) { +func setS3fileInfoGetFilePathAttributeType(arg *S3fileInfoGetFilePathAttributeType, val S3fileInfoGetFilePathRetType) { *arg = &val } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceListUserGetUsernameArgType = string +type S3fileInfoGetFilePathArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceListUserGetUsernameRetType = string +type S3fileInfoGetFilePathRetType = string -// InstanceListUser struct for InstanceListUser +// S3fileInfo struct for S3fileInfo // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type InstanceListUser struct { - Id InstanceListUserGetIdAttributeType `json:"id,omitempty"` - Username InstanceListUserGetUsernameAttributeType `json:"username,omitempty"` +type S3fileInfo struct { + // The sequence number of the file + // Can be cast to int32 without loss of precision. + FileNumber S3fileInfoGetFileNumberAttributeType `json:"file_number,omitempty"` + // The path to the file on the S3 bucket + FilePath S3fileInfoGetFilePathAttributeType `json:"file_path,omitempty"` } -// NewInstanceListUser instantiates a new InstanceListUser object +// NewS3fileInfo instantiates a new S3fileInfo 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 NewInstanceListUser() *InstanceListUser { - this := InstanceListUser{} +func NewS3fileInfo() *S3fileInfo { + this := S3fileInfo{} return &this } -// NewInstanceListUserWithDefaults instantiates a new InstanceListUser object +// NewS3fileInfoWithDefaults instantiates a new S3fileInfo 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 NewInstanceListUserWithDefaults() *InstanceListUser { - this := InstanceListUser{} +func NewS3fileInfoWithDefaults() *S3fileInfo { + this := S3fileInfo{} return &this } -// GetId returns the Id field value if set, zero value otherwise. +// GetFileNumber returns the FileNumber 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 *InstanceListUser) GetId() (res InstanceListUserGetIdRetType) { - res, _ = o.GetIdOk() +func (o *S3fileInfo) GetFileNumber() (res S3fileInfoGetFileNumberRetType) { + res, _ = o.GetFileNumberOk() return } -// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// GetFileNumberOk returns a tuple with the FileNumber 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 *InstanceListUser) GetIdOk() (ret InstanceListUserGetIdRetType, ok bool) { - return getInstanceListUserGetIdAttributeTypeOk(o.Id) +func (o *S3fileInfo) GetFileNumberOk() (ret S3fileInfoGetFileNumberRetType, ok bool) { + return getS3fileInfoGetFileNumberAttributeTypeOk(o.FileNumber) } -// HasId returns a boolean if a field has been set. +// HasFileNumber 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 *InstanceListUser) HasId() bool { - _, ok := o.GetIdOk() +func (o *S3fileInfo) HasFileNumber() bool { + _, ok := o.GetFileNumberOk() return ok } -// SetId gets a reference to the given string and assigns it to the Id field. +// SetFileNumber gets a reference to the given int64 and assigns it to the FileNumber field. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceListUser) SetId(v InstanceListUserGetIdRetType) { - setInstanceListUserGetIdAttributeType(&o.Id, v) +func (o *S3fileInfo) SetFileNumber(v S3fileInfoGetFileNumberRetType) { + setS3fileInfoGetFileNumberAttributeType(&o.FileNumber, v) } -// GetUsername returns the Username field value if set, zero value otherwise. +// GetFilePath returns the FilePath 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 *InstanceListUser) GetUsername() (res InstanceListUserGetUsernameRetType) { - res, _ = o.GetUsernameOk() +func (o *S3fileInfo) GetFilePath() (res S3fileInfoGetFilePathRetType) { + res, _ = o.GetFilePathOk() return } -// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// GetFilePathOk returns a tuple with the FilePath 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 *InstanceListUser) GetUsernameOk() (ret InstanceListUserGetUsernameRetType, ok bool) { - return getInstanceListUserGetUsernameAttributeTypeOk(o.Username) +func (o *S3fileInfo) GetFilePathOk() (ret S3fileInfoGetFilePathRetType, ok bool) { + return getS3fileInfoGetFilePathAttributeTypeOk(o.FilePath) } -// HasUsername returns a boolean if a field has been set. +// HasFilePath 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 *InstanceListUser) HasUsername() bool { - _, ok := o.GetUsernameOk() +func (o *S3fileInfo) HasFilePath() bool { + _, ok := o.GetFilePathOk() return ok } -// SetUsername gets a reference to the given string and assigns it to the Username field. +// SetFilePath gets a reference to the given string and assigns it to the FilePath field. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *InstanceListUser) SetUsername(v InstanceListUserGetUsernameRetType) { - setInstanceListUserGetUsernameAttributeType(&o.Username, v) +func (o *S3fileInfo) SetFilePath(v S3fileInfoGetFilePathRetType) { + setS3fileInfoGetFilePathAttributeType(&o.FilePath, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o InstanceListUser) ToMap() (map[string]interface{}, error) { +func (o S3fileInfo) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getInstanceListUserGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val + if val, ok := getS3fileInfoGetFileNumberAttributeTypeOk(o.FileNumber); ok { + toSerialize["FileNumber"] = val } - if val, ok := getInstanceListUserGetUsernameAttributeTypeOk(o.Username); ok { - toSerialize["Username"] = val + if val, ok := getS3fileInfoGetFilePathAttributeTypeOk(o.FilePath); ok { + toSerialize["FilePath"] = val } return toSerialize, nil } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableInstanceListUser struct { - value *InstanceListUser +type NullableS3fileInfo struct { + value *S3fileInfo isSet bool } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableInstanceListUser) Get() *InstanceListUser { +func (v NullableS3fileInfo) Get() *S3fileInfo { return v.value } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableInstanceListUser) Set(val *InstanceListUser) { +func (v *NullableS3fileInfo) Set(val *S3fileInfo) { 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 NullableInstanceListUser) IsSet() bool { +func (v NullableS3fileInfo) 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 *NullableInstanceListUser) Unset() { +func (v *NullableS3fileInfo) 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 NewNullableInstanceListUser(val *InstanceListUser) *NullableInstanceListUser { - return &NullableInstanceListUser{value: val, isSet: true} +func NewNullableS3fileInfo(val *S3fileInfo) *NullableS3fileInfo { + return &NullableS3fileInfo{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 NullableInstanceListUser) MarshalJSON() ([]byte, error) { +func (v NullableS3fileInfo) 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 *NullableInstanceListUser) UnmarshalJSON(src []byte) error { +func (v *NullableS3fileInfo) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/sqlserverflex/model_s3file_info_test.go b/services/sqlserverflex/model_s3file_info_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_s3file_info_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_single_database.go b/services/sqlserverflex/model_single_database.go deleted file mode 100644 index f356b62c1..000000000 --- a/services/sqlserverflex/model_single_database.go +++ /dev/null @@ -1,269 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package sqlserverflex - -import ( - "encoding/json" -) - -// checks if the SingleDatabase type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SingleDatabase{} - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleDatabaseGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSingleDatabaseGetIdAttributeTypeOk(arg SingleDatabaseGetIdAttributeType) (ret SingleDatabaseGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setSingleDatabaseGetIdAttributeType(arg *SingleDatabaseGetIdAttributeType, val SingleDatabaseGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleDatabaseGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleDatabaseGetIdRetType = string - -/* - types and functions for name -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleDatabaseGetNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSingleDatabaseGetNameAttributeTypeOk(arg SingleDatabaseGetNameAttributeType) (ret SingleDatabaseGetNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setSingleDatabaseGetNameAttributeType(arg *SingleDatabaseGetNameAttributeType, val SingleDatabaseGetNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleDatabaseGetNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleDatabaseGetNameRetType = string - -/* - types and functions for options -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleDatabaseGetOptionsAttributeType = *SingleDatabaseOptions - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleDatabaseGetOptionsArgType = SingleDatabaseOptions - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleDatabaseGetOptionsRetType = SingleDatabaseOptions - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSingleDatabaseGetOptionsAttributeTypeOk(arg SingleDatabaseGetOptionsAttributeType) (ret SingleDatabaseGetOptionsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setSingleDatabaseGetOptionsAttributeType(arg *SingleDatabaseGetOptionsAttributeType, val SingleDatabaseGetOptionsRetType) { - *arg = &val -} - -// SingleDatabase struct for SingleDatabase -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleDatabase struct { - // Database id - Id SingleDatabaseGetIdAttributeType `json:"id,omitempty"` - // Database name - Name SingleDatabaseGetNameAttributeType `json:"name,omitempty"` - Options SingleDatabaseGetOptionsAttributeType `json:"options,omitempty"` -} - -// NewSingleDatabase instantiates a new SingleDatabase 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 NewSingleDatabase() *SingleDatabase { - this := SingleDatabase{} - return &this -} - -// NewSingleDatabaseWithDefaults instantiates a new SingleDatabase 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 NewSingleDatabaseWithDefaults() *SingleDatabase { - this := SingleDatabase{} - return &this -} - -// GetId returns the Id 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 *SingleDatabase) GetId() (res SingleDatabaseGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *SingleDatabase) GetIdOk() (ret SingleDatabaseGetIdRetType, ok bool) { - return getSingleDatabaseGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *SingleDatabase) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SingleDatabase) SetId(v SingleDatabaseGetIdRetType) { - setSingleDatabaseGetIdAttributeType(&o.Id, v) -} - -// GetName returns the Name 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 *SingleDatabase) GetName() (res SingleDatabaseGetNameRetType) { - res, _ = o.GetNameOk() - return -} - -// GetNameOk returns a tuple with the Name 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 *SingleDatabase) GetNameOk() (ret SingleDatabaseGetNameRetType, ok bool) { - return getSingleDatabaseGetNameAttributeTypeOk(o.Name) -} - -// HasName 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 *SingleDatabase) HasName() bool { - _, ok := o.GetNameOk() - return ok -} - -// SetName gets a reference to the given string and assigns it to the Name field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SingleDatabase) SetName(v SingleDatabaseGetNameRetType) { - setSingleDatabaseGetNameAttributeType(&o.Name, v) -} - -// GetOptions returns the Options 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 *SingleDatabase) GetOptions() (res SingleDatabaseGetOptionsRetType) { - res, _ = o.GetOptionsOk() - return -} - -// GetOptionsOk returns a tuple with the Options 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 *SingleDatabase) GetOptionsOk() (ret SingleDatabaseGetOptionsRetType, ok bool) { - return getSingleDatabaseGetOptionsAttributeTypeOk(o.Options) -} - -// HasOptions 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 *SingleDatabase) HasOptions() bool { - _, ok := o.GetOptionsOk() - return ok -} - -// SetOptions gets a reference to the given SingleDatabaseOptions and assigns it to the Options field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SingleDatabase) SetOptions(v SingleDatabaseGetOptionsRetType) { - setSingleDatabaseGetOptionsAttributeType(&o.Options, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o SingleDatabase) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getSingleDatabaseGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getSingleDatabaseGetNameAttributeTypeOk(o.Name); ok { - toSerialize["Name"] = val - } - if val, ok := getSingleDatabaseGetOptionsAttributeTypeOk(o.Options); ok { - toSerialize["Options"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableSingleDatabase struct { - value *SingleDatabase - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableSingleDatabase) Get() *SingleDatabase { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableSingleDatabase) Set(val *SingleDatabase) { - 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 NullableSingleDatabase) 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 *NullableSingleDatabase) 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 NewNullableSingleDatabase(val *SingleDatabase) *NullableSingleDatabase { - return &NullableSingleDatabase{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 NullableSingleDatabase) 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 *NullableSingleDatabase) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/sqlserverflex/model_single_database_options.go b/services/sqlserverflex/model_single_database_options.go deleted file mode 100644 index 0b6a9b301..000000000 --- a/services/sqlserverflex/model_single_database_options.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package sqlserverflex - -import ( - "encoding/json" -) - -// checks if the SingleDatabaseOptions type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SingleDatabaseOptions{} - -/* - types and functions for collationName -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleDatabaseOptionsGetCollationNameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSingleDatabaseOptionsGetCollationNameAttributeTypeOk(arg SingleDatabaseOptionsGetCollationNameAttributeType) (ret SingleDatabaseOptionsGetCollationNameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setSingleDatabaseOptionsGetCollationNameAttributeType(arg *SingleDatabaseOptionsGetCollationNameAttributeType, val SingleDatabaseOptionsGetCollationNameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleDatabaseOptionsGetCollationNameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleDatabaseOptionsGetCollationNameRetType = string - -/* - types and functions for compatibilityLevel -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleDatabaseOptionsGetCompatibilityLevelAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleDatabaseOptionsGetCompatibilityLevelArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleDatabaseOptionsGetCompatibilityLevelRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSingleDatabaseOptionsGetCompatibilityLevelAttributeTypeOk(arg SingleDatabaseOptionsGetCompatibilityLevelAttributeType) (ret SingleDatabaseOptionsGetCompatibilityLevelRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setSingleDatabaseOptionsGetCompatibilityLevelAttributeType(arg *SingleDatabaseOptionsGetCompatibilityLevelAttributeType, val SingleDatabaseOptionsGetCompatibilityLevelRetType) { - *arg = &val -} - -/* - types and functions for owner -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleDatabaseOptionsGetOwnerAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSingleDatabaseOptionsGetOwnerAttributeTypeOk(arg SingleDatabaseOptionsGetOwnerAttributeType) (ret SingleDatabaseOptionsGetOwnerRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setSingleDatabaseOptionsGetOwnerAttributeType(arg *SingleDatabaseOptionsGetOwnerAttributeType, val SingleDatabaseOptionsGetOwnerRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleDatabaseOptionsGetOwnerArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleDatabaseOptionsGetOwnerRetType = string - -// SingleDatabaseOptions Database specific options -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleDatabaseOptions struct { - // Name of the collation of the database - CollationName SingleDatabaseOptionsGetCollationNameAttributeType `json:"collationName,omitempty"` - // CompatibilityLevel of the Database. - CompatibilityLevel SingleDatabaseOptionsGetCompatibilityLevelAttributeType `json:"compatibilityLevel,omitempty"` - // Name of the owner of the database. - Owner SingleDatabaseOptionsGetOwnerAttributeType `json:"owner,omitempty"` -} - -// NewSingleDatabaseOptions instantiates a new SingleDatabaseOptions 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 NewSingleDatabaseOptions() *SingleDatabaseOptions { - this := SingleDatabaseOptions{} - return &this -} - -// NewSingleDatabaseOptionsWithDefaults instantiates a new SingleDatabaseOptions 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 NewSingleDatabaseOptionsWithDefaults() *SingleDatabaseOptions { - this := SingleDatabaseOptions{} - return &this -} - -// GetCollationName returns the CollationName 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 *SingleDatabaseOptions) GetCollationName() (res SingleDatabaseOptionsGetCollationNameRetType) { - res, _ = o.GetCollationNameOk() - return -} - -// GetCollationNameOk returns a tuple with the CollationName 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 *SingleDatabaseOptions) GetCollationNameOk() (ret SingleDatabaseOptionsGetCollationNameRetType, ok bool) { - return getSingleDatabaseOptionsGetCollationNameAttributeTypeOk(o.CollationName) -} - -// HasCollationName 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 *SingleDatabaseOptions) HasCollationName() bool { - _, ok := o.GetCollationNameOk() - return ok -} - -// SetCollationName gets a reference to the given string and assigns it to the CollationName field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SingleDatabaseOptions) SetCollationName(v SingleDatabaseOptionsGetCollationNameRetType) { - setSingleDatabaseOptionsGetCollationNameAttributeType(&o.CollationName, v) -} - -// GetCompatibilityLevel returns the CompatibilityLevel 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 *SingleDatabaseOptions) GetCompatibilityLevel() (res SingleDatabaseOptionsGetCompatibilityLevelRetType) { - res, _ = o.GetCompatibilityLevelOk() - return -} - -// GetCompatibilityLevelOk returns a tuple with the CompatibilityLevel 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 *SingleDatabaseOptions) GetCompatibilityLevelOk() (ret SingleDatabaseOptionsGetCompatibilityLevelRetType, ok bool) { - return getSingleDatabaseOptionsGetCompatibilityLevelAttributeTypeOk(o.CompatibilityLevel) -} - -// HasCompatibilityLevel 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 *SingleDatabaseOptions) HasCompatibilityLevel() bool { - _, ok := o.GetCompatibilityLevelOk() - return ok -} - -// SetCompatibilityLevel gets a reference to the given int64 and assigns it to the CompatibilityLevel field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SingleDatabaseOptions) SetCompatibilityLevel(v SingleDatabaseOptionsGetCompatibilityLevelRetType) { - setSingleDatabaseOptionsGetCompatibilityLevelAttributeType(&o.CompatibilityLevel, v) -} - -// GetOwner returns the Owner 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 *SingleDatabaseOptions) GetOwner() (res SingleDatabaseOptionsGetOwnerRetType) { - res, _ = o.GetOwnerOk() - return -} - -// GetOwnerOk returns a tuple with the Owner 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 *SingleDatabaseOptions) GetOwnerOk() (ret SingleDatabaseOptionsGetOwnerRetType, ok bool) { - return getSingleDatabaseOptionsGetOwnerAttributeTypeOk(o.Owner) -} - -// HasOwner 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 *SingleDatabaseOptions) HasOwner() bool { - _, ok := o.GetOwnerOk() - return ok -} - -// SetOwner gets a reference to the given string and assigns it to the Owner field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SingleDatabaseOptions) SetOwner(v SingleDatabaseOptionsGetOwnerRetType) { - setSingleDatabaseOptionsGetOwnerAttributeType(&o.Owner, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o SingleDatabaseOptions) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getSingleDatabaseOptionsGetCollationNameAttributeTypeOk(o.CollationName); ok { - toSerialize["CollationName"] = val - } - if val, ok := getSingleDatabaseOptionsGetCompatibilityLevelAttributeTypeOk(o.CompatibilityLevel); ok { - toSerialize["CompatibilityLevel"] = val - } - if val, ok := getSingleDatabaseOptionsGetOwnerAttributeTypeOk(o.Owner); ok { - toSerialize["Owner"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableSingleDatabaseOptions struct { - value *SingleDatabaseOptions - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableSingleDatabaseOptions) Get() *SingleDatabaseOptions { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableSingleDatabaseOptions) Set(val *SingleDatabaseOptions) { - 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 NullableSingleDatabaseOptions) 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 *NullableSingleDatabaseOptions) 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 NewNullableSingleDatabaseOptions(val *SingleDatabaseOptions) *NullableSingleDatabaseOptions { - return &NullableSingleDatabaseOptions{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 NullableSingleDatabaseOptions) 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 *NullableSingleDatabaseOptions) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/sqlserverflex/model_single_database_options_test.go b/services/sqlserverflex/model_single_database_options_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_single_database_options_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_single_database_test.go b/services/sqlserverflex/model_single_database_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_single_database_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_single_user.go b/services/sqlserverflex/model_single_user.go deleted file mode 100644 index 2afa35ee3..000000000 --- a/services/sqlserverflex/model_single_user.go +++ /dev/null @@ -1,557 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package sqlserverflex - -import ( - "encoding/json" -) - -// checks if the SingleUser type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SingleUser{} - -/* - types and functions for default_database -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetDefaultDatabaseAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSingleUserGetDefaultDatabaseAttributeTypeOk(arg SingleUserGetDefaultDatabaseAttributeType) (ret SingleUserGetDefaultDatabaseRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setSingleUserGetDefaultDatabaseAttributeType(arg *SingleUserGetDefaultDatabaseAttributeType, val SingleUserGetDefaultDatabaseRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetDefaultDatabaseArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetDefaultDatabaseRetType = string - -/* - types and functions for host -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetHostAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSingleUserGetHostAttributeTypeOk(arg SingleUserGetHostAttributeType) (ret SingleUserGetHostRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setSingleUserGetHostAttributeType(arg *SingleUserGetHostAttributeType, val SingleUserGetHostRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetHostArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetHostRetType = string - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSingleUserGetIdAttributeTypeOk(arg SingleUserGetIdAttributeType) (ret SingleUserGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setSingleUserGetIdAttributeType(arg *SingleUserGetIdAttributeType, val SingleUserGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetIdRetType = string - -/* - types and functions for password -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetPasswordAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSingleUserGetPasswordAttributeTypeOk(arg SingleUserGetPasswordAttributeType) (ret SingleUserGetPasswordRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setSingleUserGetPasswordAttributeType(arg *SingleUserGetPasswordAttributeType, val SingleUserGetPasswordRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetPasswordArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetPasswordRetType = string - -/* - types and functions for port -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetPortAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetPortArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetPortRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSingleUserGetPortAttributeTypeOk(arg SingleUserGetPortAttributeType) (ret SingleUserGetPortRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setSingleUserGetPortAttributeType(arg *SingleUserGetPortAttributeType, val SingleUserGetPortRetType) { - *arg = &val -} - -/* - types and functions for roles -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetRolesAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetRolesArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetRolesRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSingleUserGetRolesAttributeTypeOk(arg SingleUserGetRolesAttributeType) (ret SingleUserGetRolesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setSingleUserGetRolesAttributeType(arg *SingleUserGetRolesAttributeType, val SingleUserGetRolesRetType) { - *arg = &val -} - -/* - types and functions for uri -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetUriAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSingleUserGetUriAttributeTypeOk(arg SingleUserGetUriAttributeType) (ret SingleUserGetUriRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setSingleUserGetUriAttributeType(arg *SingleUserGetUriAttributeType, val SingleUserGetUriRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetUriArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetUriRetType = string - -/* - types and functions for username -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetUsernameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getSingleUserGetUsernameAttributeTypeOk(arg SingleUserGetUsernameAttributeType) (ret SingleUserGetUsernameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setSingleUserGetUsernameAttributeType(arg *SingleUserGetUsernameAttributeType, val SingleUserGetUsernameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetUsernameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUserGetUsernameRetType = string - -// SingleUser struct for SingleUser -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type SingleUser struct { - DefaultDatabase SingleUserGetDefaultDatabaseAttributeType `json:"default_database,omitempty"` - Host SingleUserGetHostAttributeType `json:"host,omitempty"` - Id SingleUserGetIdAttributeType `json:"id,omitempty"` - Password SingleUserGetPasswordAttributeType `json:"password,omitempty"` - Port SingleUserGetPortAttributeType `json:"port,omitempty"` - Roles SingleUserGetRolesAttributeType `json:"roles,omitempty"` - Uri SingleUserGetUriAttributeType `json:"uri,omitempty"` - Username SingleUserGetUsernameAttributeType `json:"username,omitempty"` -} - -// NewSingleUser instantiates a new SingleUser 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 NewSingleUser() *SingleUser { - this := SingleUser{} - return &this -} - -// NewSingleUserWithDefaults instantiates a new SingleUser 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 NewSingleUserWithDefaults() *SingleUser { - this := SingleUser{} - return &this -} - -// GetDefaultDatabase returns the DefaultDatabase 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 *SingleUser) GetDefaultDatabase() (res SingleUserGetDefaultDatabaseRetType) { - res, _ = o.GetDefaultDatabaseOk() - return -} - -// GetDefaultDatabaseOk returns a tuple with the DefaultDatabase 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 *SingleUser) GetDefaultDatabaseOk() (ret SingleUserGetDefaultDatabaseRetType, ok bool) { - return getSingleUserGetDefaultDatabaseAttributeTypeOk(o.DefaultDatabase) -} - -// HasDefaultDatabase 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 *SingleUser) HasDefaultDatabase() bool { - _, ok := o.GetDefaultDatabaseOk() - return ok -} - -// SetDefaultDatabase gets a reference to the given string and assigns it to the DefaultDatabase field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SingleUser) SetDefaultDatabase(v SingleUserGetDefaultDatabaseRetType) { - setSingleUserGetDefaultDatabaseAttributeType(&o.DefaultDatabase, v) -} - -// GetHost returns the Host 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 *SingleUser) GetHost() (res SingleUserGetHostRetType) { - res, _ = o.GetHostOk() - return -} - -// GetHostOk returns a tuple with the Host 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 *SingleUser) GetHostOk() (ret SingleUserGetHostRetType, ok bool) { - return getSingleUserGetHostAttributeTypeOk(o.Host) -} - -// HasHost 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 *SingleUser) HasHost() bool { - _, ok := o.GetHostOk() - return ok -} - -// SetHost gets a reference to the given string and assigns it to the Host field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SingleUser) SetHost(v SingleUserGetHostRetType) { - setSingleUserGetHostAttributeType(&o.Host, v) -} - -// GetId returns the Id 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 *SingleUser) GetId() (res SingleUserGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *SingleUser) GetIdOk() (ret SingleUserGetIdRetType, ok bool) { - return getSingleUserGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *SingleUser) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SingleUser) SetId(v SingleUserGetIdRetType) { - setSingleUserGetIdAttributeType(&o.Id, v) -} - -// GetPassword returns the Password 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 *SingleUser) GetPassword() (res SingleUserGetPasswordRetType) { - res, _ = o.GetPasswordOk() - return -} - -// GetPasswordOk returns a tuple with the Password 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 *SingleUser) GetPasswordOk() (ret SingleUserGetPasswordRetType, ok bool) { - return getSingleUserGetPasswordAttributeTypeOk(o.Password) -} - -// HasPassword 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 *SingleUser) HasPassword() bool { - _, ok := o.GetPasswordOk() - return ok -} - -// SetPassword gets a reference to the given string and assigns it to the Password field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SingleUser) SetPassword(v SingleUserGetPasswordRetType) { - setSingleUserGetPasswordAttributeType(&o.Password, v) -} - -// GetPort returns the Port 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 *SingleUser) GetPort() (res SingleUserGetPortRetType) { - res, _ = o.GetPortOk() - return -} - -// GetPortOk returns a tuple with the Port 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 *SingleUser) GetPortOk() (ret SingleUserGetPortRetType, ok bool) { - return getSingleUserGetPortAttributeTypeOk(o.Port) -} - -// HasPort 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 *SingleUser) HasPort() bool { - _, ok := o.GetPortOk() - return ok -} - -// SetPort gets a reference to the given int64 and assigns it to the Port field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SingleUser) SetPort(v SingleUserGetPortRetType) { - setSingleUserGetPortAttributeType(&o.Port, v) -} - -// GetRoles returns the Roles 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 *SingleUser) GetRoles() (res SingleUserGetRolesRetType) { - res, _ = o.GetRolesOk() - return -} - -// GetRolesOk returns a tuple with the Roles 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 *SingleUser) GetRolesOk() (ret SingleUserGetRolesRetType, ok bool) { - return getSingleUserGetRolesAttributeTypeOk(o.Roles) -} - -// HasRoles 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 *SingleUser) HasRoles() bool { - _, ok := o.GetRolesOk() - return ok -} - -// SetRoles gets a reference to the given []string and assigns it to the Roles field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SingleUser) SetRoles(v SingleUserGetRolesRetType) { - setSingleUserGetRolesAttributeType(&o.Roles, v) -} - -// GetUri returns the Uri 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 *SingleUser) GetUri() (res SingleUserGetUriRetType) { - res, _ = o.GetUriOk() - return -} - -// GetUriOk returns a tuple with the Uri 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 *SingleUser) GetUriOk() (ret SingleUserGetUriRetType, ok bool) { - return getSingleUserGetUriAttributeTypeOk(o.Uri) -} - -// HasUri 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 *SingleUser) HasUri() bool { - _, ok := o.GetUriOk() - return ok -} - -// SetUri gets a reference to the given string and assigns it to the Uri field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SingleUser) SetUri(v SingleUserGetUriRetType) { - setSingleUserGetUriAttributeType(&o.Uri, v) -} - -// GetUsername returns the Username 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 *SingleUser) GetUsername() (res SingleUserGetUsernameRetType) { - res, _ = o.GetUsernameOk() - return -} - -// GetUsernameOk returns a tuple with the Username 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 *SingleUser) GetUsernameOk() (ret SingleUserGetUsernameRetType, ok bool) { - return getSingleUserGetUsernameAttributeTypeOk(o.Username) -} - -// HasUsername 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 *SingleUser) HasUsername() bool { - _, ok := o.GetUsernameOk() - return ok -} - -// SetUsername gets a reference to the given string and assigns it to the Username field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *SingleUser) SetUsername(v SingleUserGetUsernameRetType) { - setSingleUserGetUsernameAttributeType(&o.Username, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o SingleUser) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getSingleUserGetDefaultDatabaseAttributeTypeOk(o.DefaultDatabase); ok { - toSerialize["DefaultDatabase"] = val - } - if val, ok := getSingleUserGetHostAttributeTypeOk(o.Host); ok { - toSerialize["Host"] = val - } - if val, ok := getSingleUserGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getSingleUserGetPasswordAttributeTypeOk(o.Password); ok { - toSerialize["Password"] = val - } - if val, ok := getSingleUserGetPortAttributeTypeOk(o.Port); ok { - toSerialize["Port"] = val - } - if val, ok := getSingleUserGetRolesAttributeTypeOk(o.Roles); ok { - toSerialize["Roles"] = val - } - if val, ok := getSingleUserGetUriAttributeTypeOk(o.Uri); ok { - toSerialize["Uri"] = val - } - if val, ok := getSingleUserGetUsernameAttributeTypeOk(o.Username); ok { - toSerialize["Username"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableSingleUser struct { - value *SingleUser - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableSingleUser) Get() *SingleUser { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableSingleUser) Set(val *SingleUser) { - 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 NullableSingleUser) 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 *NullableSingleUser) 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 NewNullableSingleUser(val *SingleUser) *NullableSingleUser { - return &NullableSingleUser{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 NullableSingleUser) 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 *NullableSingleUser) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/sqlserverflex/model_single_user_test.go b/services/sqlserverflex/model_single_user_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_single_user_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_source_backup.go b/services/sqlserverflex/model_source_backup.go new file mode 100644 index 000000000..3b7fd243f --- /dev/null +++ b/services/sqlserverflex/model_source_backup.go @@ -0,0 +1,267 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" + "fmt" +) + +// checks if the SourceBackup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SourceBackup{} + +/* + types and functions for type +*/ + +// isEnum + +// SourceBackupTypes the model 'SourceBackup' +// value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type SourceBackupTypes string + +// List of Type +const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + SOURCEBACKUPTYPE_BACKUP SourceBackupTypes = "BACKUP" +) + +// All allowed values of SourceBackup enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +var AllowedSourceBackupTypesEnumValues = []SourceBackupTypes{ + "BACKUP", +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *SourceBackupTypes) UnmarshalJSON(src []byte) error { + // use a type alias to prevent infinite recursion during unmarshal, + // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers + type TmpJson SourceBackupTypes + var value TmpJson + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue TmpJson + if value == zeroValue { + return nil + } + enumTypeValue := SourceBackupTypes(value) + for _, existing := range AllowedSourceBackupTypesEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid SourceBackup", value) +} + +// NewSourceBackupTypesFromValue returns a pointer to a valid SourceBackupTypes +// 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 NewSourceBackupTypesFromValue(v SourceBackupTypes) (*SourceBackupTypes, error) { + ev := SourceBackupTypes(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for SourceBackupTypes: valid values are %v", v, AllowedSourceBackupTypesEnumValues) + } +} + +// 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 SourceBackupTypes) IsValid() bool { + for _, existing := range AllowedSourceBackupTypesEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to TypeTypes value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v SourceBackupTypes) Ptr() *SourceBackupTypes { + return &v +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableSourceBackupTypes struct { + value *SourceBackupTypes + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableSourceBackupTypes) Get() *SourceBackupTypes { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableSourceBackupTypes) Set(val *SourceBackupTypes) { + 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 NullableSourceBackupTypes) 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 *NullableSourceBackupTypes) 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 NewNullableSourceBackupTypes(val *SourceBackupTypes) *NullableSourceBackupTypes { + return &NullableSourceBackupTypes{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 NullableSourceBackupTypes) 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 *NullableSourceBackupTypes) 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 SourceBackupGetTypeAttributeType = *SourceBackupTypes + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type SourceBackupGetTypeArgType = SourceBackupTypes + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type SourceBackupGetTypeRetType = SourceBackupTypes + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getSourceBackupGetTypeAttributeTypeOk(arg SourceBackupGetTypeAttributeType) (ret SourceBackupGetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setSourceBackupGetTypeAttributeType(arg *SourceBackupGetTypeAttributeType, val SourceBackupGetTypeRetType) { + *arg = &val +} + +// SourceBackup Restore from an existing managed backup. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type SourceBackup struct { + // REQUIRED + Type SourceBackupGetTypeAttributeType `json:"type" required:"true"` +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _SourceBackup SourceBackup + +// NewSourceBackup instantiates a new SourceBackup 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 NewSourceBackup(types SourceBackupGetTypeArgType) *SourceBackup { + this := SourceBackup{} + setSourceBackupGetTypeAttributeType(&this.Type, types) + return &this +} + +// NewSourceBackupWithDefaults instantiates a new SourceBackup 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 NewSourceBackupWithDefaults() *SourceBackup { + this := SourceBackup{} + return &this +} + +// GetType returns the Type field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *SourceBackup) GetType() (ret SourceBackupGetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *SourceBackup) GetTypeOk() (ret SourceBackupGetTypeRetType, ok bool) { + return getSourceBackupGetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *SourceBackup) SetType(v SourceBackupGetTypeRetType) { + setSourceBackupGetTypeAttributeType(&o.Type, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o SourceBackup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getSourceBackupGetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableSourceBackup struct { + value *SourceBackup + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableSourceBackup) Get() *SourceBackup { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableSourceBackup) Set(val *SourceBackup) { + 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 NullableSourceBackup) 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 *NullableSourceBackup) 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 NewNullableSourceBackup(val *SourceBackup) *NullableSourceBackup { + return &NullableSourceBackup{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 NullableSourceBackup) 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 *NullableSourceBackup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_source_backup_test.go b/services/sqlserverflex/model_source_backup_test.go new file mode 100644 index 000000000..63cb37a21 --- /dev/null +++ b/services/sqlserverflex/model_source_backup_test.go @@ -0,0 +1,51 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex + +import ( + "testing" +) + +// isEnum + +func TestSourceBackupTypes_UnmarshalJSON(t *testing.T) { + type args struct { + src []byte + } + tests := []struct { + name string + args args + wantErr bool + }{ + { + name: `success - possible enum value no. 1`, + args: args{ + src: []byte(`"BACKUP"`), + }, + wantErr: false, + }, + { + name: "fail", + args: args{ + src: []byte("\"FOOBAR\""), + }, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + v := SourceBackupTypes("") + if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { + t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} diff --git a/services/sqlserverflex/model_source_external_s3.go b/services/sqlserverflex/model_source_external_s3.go new file mode 100644 index 000000000..5c96def66 --- /dev/null +++ b/services/sqlserverflex/model_source_external_s3.go @@ -0,0 +1,433 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" + "fmt" +) + +// checks if the SourceExternalS3 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SourceExternalS3{} + +/* + types and functions for database_owner +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type SourceExternalS3GetDatabaseOwnerAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getSourceExternalS3GetDatabaseOwnerAttributeTypeOk(arg SourceExternalS3GetDatabaseOwnerAttributeType) (ret SourceExternalS3GetDatabaseOwnerRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setSourceExternalS3GetDatabaseOwnerAttributeType(arg *SourceExternalS3GetDatabaseOwnerAttributeType, val SourceExternalS3GetDatabaseOwnerRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type SourceExternalS3GetDatabaseOwnerArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type SourceExternalS3GetDatabaseOwnerRetType = string + +/* + types and functions for logging_guid +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type SourceExternalS3GetLoggingGuidAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getSourceExternalS3GetLoggingGuidAttributeTypeOk(arg SourceExternalS3GetLoggingGuidAttributeType) (ret SourceExternalS3GetLoggingGuidRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setSourceExternalS3GetLoggingGuidAttributeType(arg *SourceExternalS3GetLoggingGuidAttributeType, val SourceExternalS3GetLoggingGuidRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type SourceExternalS3GetLoggingGuidArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type SourceExternalS3GetLoggingGuidRetType = string + +/* + types and functions for s3_details +*/ + +// isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type SourceExternalS3GetS3DetailsAttributeType = *ExternalS3 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type SourceExternalS3GetS3DetailsArgType = ExternalS3 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type SourceExternalS3GetS3DetailsRetType = ExternalS3 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getSourceExternalS3GetS3DetailsAttributeTypeOk(arg SourceExternalS3GetS3DetailsAttributeType) (ret SourceExternalS3GetS3DetailsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setSourceExternalS3GetS3DetailsAttributeType(arg *SourceExternalS3GetS3DetailsAttributeType, val SourceExternalS3GetS3DetailsRetType) { + *arg = &val +} + +/* + types and functions for type +*/ + +// isEnum + +// SourceExternalS3Types the model 'SourceExternalS3' +// value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type SourceExternalS3Types string + +// List of Type +const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + SOURCEEXTERNALS3TYPE_EXTERNAL_S3 SourceExternalS3Types = "EXTERNAL_S3" +) + +// All allowed values of SourceExternalS3 enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +var AllowedSourceExternalS3TypesEnumValues = []SourceExternalS3Types{ + "EXTERNAL_S3", +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *SourceExternalS3Types) UnmarshalJSON(src []byte) error { + // use a type alias to prevent infinite recursion during unmarshal, + // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers + type TmpJson SourceExternalS3Types + var value TmpJson + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue TmpJson + if value == zeroValue { + return nil + } + enumTypeValue := SourceExternalS3Types(value) + for _, existing := range AllowedSourceExternalS3TypesEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid SourceExternalS3", value) +} + +// NewSourceExternalS3TypesFromValue returns a pointer to a valid SourceExternalS3Types +// 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 NewSourceExternalS3TypesFromValue(v SourceExternalS3Types) (*SourceExternalS3Types, error) { + ev := SourceExternalS3Types(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for SourceExternalS3Types: valid values are %v", v, AllowedSourceExternalS3TypesEnumValues) + } +} + +// 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 SourceExternalS3Types) IsValid() bool { + for _, existing := range AllowedSourceExternalS3TypesEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to TypeTypes value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v SourceExternalS3Types) Ptr() *SourceExternalS3Types { + return &v +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableSourceExternalS3Types struct { + value *SourceExternalS3Types + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableSourceExternalS3Types) Get() *SourceExternalS3Types { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableSourceExternalS3Types) Set(val *SourceExternalS3Types) { + 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 NullableSourceExternalS3Types) 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 *NullableSourceExternalS3Types) 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 NewNullableSourceExternalS3Types(val *SourceExternalS3Types) *NullableSourceExternalS3Types { + return &NullableSourceExternalS3Types{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 NullableSourceExternalS3Types) 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 *NullableSourceExternalS3Types) 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 SourceExternalS3GetTypeAttributeType = *SourceExternalS3Types + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type SourceExternalS3GetTypeArgType = SourceExternalS3Types + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type SourceExternalS3GetTypeRetType = SourceExternalS3Types + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getSourceExternalS3GetTypeAttributeTypeOk(arg SourceExternalS3GetTypeAttributeType) (ret SourceExternalS3GetTypeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setSourceExternalS3GetTypeAttributeType(arg *SourceExternalS3GetTypeAttributeType, val SourceExternalS3GetTypeRetType) { + *arg = &val +} + +// SourceExternalS3 Restore from an external S3 backup file. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type SourceExternalS3 struct { + // The owner of the database. + // REQUIRED + DatabaseOwner SourceExternalS3GetDatabaseOwnerAttributeType `json:"database_owner" required:"true"` + // Logging guid to have a complete activity log over all sub stored procedures. + LoggingGuid SourceExternalS3GetLoggingGuidAttributeType `json:"logging_guid,omitempty"` + // REQUIRED + S3Details SourceExternalS3GetS3DetailsAttributeType `json:"s3_details" required:"true"` + // REQUIRED + Type SourceExternalS3GetTypeAttributeType `json:"type" required:"true"` +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _SourceExternalS3 SourceExternalS3 + +// NewSourceExternalS3 instantiates a new SourceExternalS3 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 NewSourceExternalS3(databaseOwner SourceExternalS3GetDatabaseOwnerArgType, s3Details SourceExternalS3GetS3DetailsArgType, types SourceExternalS3GetTypeArgType) *SourceExternalS3 { + this := SourceExternalS3{} + setSourceExternalS3GetDatabaseOwnerAttributeType(&this.DatabaseOwner, databaseOwner) + setSourceExternalS3GetS3DetailsAttributeType(&this.S3Details, s3Details) + setSourceExternalS3GetTypeAttributeType(&this.Type, types) + return &this +} + +// NewSourceExternalS3WithDefaults instantiates a new SourceExternalS3 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 NewSourceExternalS3WithDefaults() *SourceExternalS3 { + this := SourceExternalS3{} + return &this +} + +// GetDatabaseOwner returns the DatabaseOwner field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *SourceExternalS3) GetDatabaseOwner() (ret SourceExternalS3GetDatabaseOwnerRetType) { + ret, _ = o.GetDatabaseOwnerOk() + return ret +} + +// GetDatabaseOwnerOk returns a tuple with the DatabaseOwner 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 *SourceExternalS3) GetDatabaseOwnerOk() (ret SourceExternalS3GetDatabaseOwnerRetType, ok bool) { + return getSourceExternalS3GetDatabaseOwnerAttributeTypeOk(o.DatabaseOwner) +} + +// SetDatabaseOwner sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *SourceExternalS3) SetDatabaseOwner(v SourceExternalS3GetDatabaseOwnerRetType) { + setSourceExternalS3GetDatabaseOwnerAttributeType(&o.DatabaseOwner, v) +} + +// GetLoggingGuid returns the LoggingGuid 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 *SourceExternalS3) GetLoggingGuid() (res SourceExternalS3GetLoggingGuidRetType) { + res, _ = o.GetLoggingGuidOk() + return +} + +// GetLoggingGuidOk returns a tuple with the LoggingGuid 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 *SourceExternalS3) GetLoggingGuidOk() (ret SourceExternalS3GetLoggingGuidRetType, ok bool) { + return getSourceExternalS3GetLoggingGuidAttributeTypeOk(o.LoggingGuid) +} + +// HasLoggingGuid 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 *SourceExternalS3) HasLoggingGuid() bool { + _, ok := o.GetLoggingGuidOk() + return ok +} + +// SetLoggingGuid gets a reference to the given string and assigns it to the LoggingGuid field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *SourceExternalS3) SetLoggingGuid(v SourceExternalS3GetLoggingGuidRetType) { + setSourceExternalS3GetLoggingGuidAttributeType(&o.LoggingGuid, v) +} + +// GetS3Details returns the S3Details field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *SourceExternalS3) GetS3Details() (ret SourceExternalS3GetS3DetailsRetType) { + ret, _ = o.GetS3DetailsOk() + return ret +} + +// GetS3DetailsOk returns a tuple with the S3Details 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 *SourceExternalS3) GetS3DetailsOk() (ret SourceExternalS3GetS3DetailsRetType, ok bool) { + return getSourceExternalS3GetS3DetailsAttributeTypeOk(o.S3Details) +} + +// SetS3Details sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *SourceExternalS3) SetS3Details(v SourceExternalS3GetS3DetailsRetType) { + setSourceExternalS3GetS3DetailsAttributeType(&o.S3Details, v) +} + +// GetType returns the Type field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *SourceExternalS3) GetType() (ret SourceExternalS3GetTypeRetType) { + ret, _ = o.GetTypeOk() + return ret +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *SourceExternalS3) GetTypeOk() (ret SourceExternalS3GetTypeRetType, ok bool) { + return getSourceExternalS3GetTypeAttributeTypeOk(o.Type) +} + +// SetType sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *SourceExternalS3) SetType(v SourceExternalS3GetTypeRetType) { + setSourceExternalS3GetTypeAttributeType(&o.Type, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o SourceExternalS3) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getSourceExternalS3GetDatabaseOwnerAttributeTypeOk(o.DatabaseOwner); ok { + toSerialize["DatabaseOwner"] = val + } + if val, ok := getSourceExternalS3GetLoggingGuidAttributeTypeOk(o.LoggingGuid); ok { + toSerialize["LoggingGuid"] = val + } + if val, ok := getSourceExternalS3GetS3DetailsAttributeTypeOk(o.S3Details); ok { + toSerialize["S3Details"] = val + } + if val, ok := getSourceExternalS3GetTypeAttributeTypeOk(o.Type); ok { + toSerialize["Type"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableSourceExternalS3 struct { + value *SourceExternalS3 + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableSourceExternalS3) Get() *SourceExternalS3 { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableSourceExternalS3) Set(val *SourceExternalS3) { + 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 NullableSourceExternalS3) 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 *NullableSourceExternalS3) 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 NewNullableSourceExternalS3(val *SourceExternalS3) *NullableSourceExternalS3 { + return &NullableSourceExternalS3{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 NullableSourceExternalS3) 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 *NullableSourceExternalS3) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_source_external_s3_test.go b/services/sqlserverflex/model_source_external_s3_test.go new file mode 100644 index 000000000..b55ea8a25 --- /dev/null +++ b/services/sqlserverflex/model_source_external_s3_test.go @@ -0,0 +1,51 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex + +import ( + "testing" +) + +// isEnum + +func TestSourceExternalS3Types_UnmarshalJSON(t *testing.T) { + type args struct { + src []byte + } + tests := []struct { + name string + args args + wantErr bool + }{ + { + name: `success - possible enum value no. 1`, + args: args{ + src: []byte(`"EXTERNAL_S3"`), + }, + wantErr: false, + }, + { + name: "fail", + args: args{ + src: []byte("\"FOOBAR\""), + }, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + v := SourceExternalS3Types("") + if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr { + t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} diff --git a/services/sqlserverflex/model_type.go b/services/sqlserverflex/model_state.go similarity index 71% rename from services/sqlserverflex/model_type.go rename to services/sqlserverflex/model_state.go index 01755912e..bcfc67176 100644 --- a/services/sqlserverflex/model_type.go +++ b/services/sqlserverflex/model_state.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,39 +16,39 @@ import ( "fmt" ) -// Type the model 'Type' +// State the model 'State' // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type Type string +type State string -// List of Type +// List of state const ( // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - TYPE_NOT_FOUND Type = "NotFound" + STATE_READY State = "READY" // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - TYPE_CREATE Type = "Create" + STATE_PENDING State = "PENDING" // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - TYPE_READ Type = "Read" + STATE_PROGRESSING State = "PROGRESSING" // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - TYPE_DELETE Type = "Delete" + STATE_FAILURE State = "FAILURE" // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - TYPE_UPDATE Type = "Update" + STATE_UNKNOWN State = "UNKNOWN" // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead - TYPE_VALIDATION Type = "Validation" + STATE_TERMINATING State = "TERMINATING" ) -// All allowed values of Type enum +// All allowed values of State enum // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -var AllowedTypeEnumValues = []Type{ - "NotFound", - "Create", - "Read", - "Delete", - "Update", - "Validation", +var AllowedStateEnumValues = []State{ + "READY", + "PENDING", + "PROGRESSING", + "FAILURE", + "UNKNOWN", + "TERMINATING", } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *Type) UnmarshalJSON(src []byte) error { +func (v *State) UnmarshalJSON(src []byte) error { var value string err := json.Unmarshal(src, &value) if err != nil { @@ -59,33 +59,33 @@ func (v *Type) UnmarshalJSON(src []byte) error { if value == zeroValue { return nil } - enumTypeValue := Type(value) - for _, existing := range AllowedTypeEnumValues { + enumTypeValue := State(value) + for _, existing := range AllowedStateEnumValues { if existing == enumTypeValue { *v = enumTypeValue return nil } } - return fmt.Errorf("%+v is not a valid Type", value) + return fmt.Errorf("%+v is not a valid State", value) } -// NewTypeFromValue returns a pointer to a valid Type +// NewStateFromValue returns a pointer to a valid State // 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 NewTypeFromValue(v string) (*Type, error) { - ev := Type(v) +func NewStateFromValue(v string) (*State, error) { + ev := State(v) if ev.IsValid() { return &ev, nil } else { - return nil, fmt.Errorf("invalid value '%v' for Type: valid values are %v", v, AllowedTypeEnumValues) + return nil, fmt.Errorf("invalid value '%v' for State: valid values are %v", v, AllowedStateEnumValues) } } // 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 Type) IsValid() bool { - for _, existing := range AllowedTypeEnumValues { +func (v State) IsValid() bool { + for _, existing := range AllowedStateEnumValues { if existing == v { return true } @@ -93,52 +93,52 @@ func (v Type) IsValid() bool { return false } -// Ptr returns reference to Type value +// Ptr returns reference to state value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v Type) Ptr() *Type { +func (v State) Ptr() *State { return &v } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableType struct { - value *Type +type NullableState struct { + value *State isSet bool } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableType) Get() *Type { +func (v NullableState) Get() *State { return v.value } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableType) Set(val *Type) { +func (v *NullableState) Set(val *State) { 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 NullableType) IsSet() bool { +func (v NullableState) 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 *NullableType) Unset() { +func (v *NullableState) 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 NewNullableType(val *Type) *NullableType { - return &NullableType{value: val, isSet: true} +func NewNullableState(val *State) *NullableState { + return &NullableState{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 NullableType) MarshalJSON() ([]byte, error) { +func (v NullableState) 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 *NullableType) UnmarshalJSON(src []byte) error { +func (v *NullableState) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/sqlserverflex/model_state_test.go b/services/sqlserverflex/model_state_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_state_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_storage.go b/services/sqlserverflex/model_storage.go index 58118835f..99ab7f502 100644 --- a/services/sqlserverflex/model_storage.go +++ b/services/sqlserverflex/model_storage.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -72,11 +72,13 @@ func setStorageGetSizeAttributeType(arg *StorageGetSizeAttributeType, val Storag *arg = &val } -// Storage struct for Storage +// Storage The object containing information about the storage size and class. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Storage struct { + // The storage class for the storage. Class StorageGetClassAttributeType `json:"class,omitempty"` - Size StorageGetSizeAttributeType `json:"size,omitempty"` + // The storage size in Gigabytes. + Size StorageGetSizeAttributeType `json:"size,omitempty"` } // NewStorage instantiates a new Storage object diff --git a/services/sqlserverflex/model_storage_range.go b/services/sqlserverflex/model_storage_create.go similarity index 57% rename from services/sqlserverflex/model_storage_range.go rename to services/sqlserverflex/model_storage_create.go index 97c28cf71..4f3918920 100644 --- a/services/sqlserverflex/model_storage_range.go +++ b/services/sqlserverflex/model_storage_create.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,25 +15,19 @@ import ( "encoding/json" ) -// checks if the StorageRange type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &StorageRange{} +// checks if the StorageCreate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StorageCreate{} /* - types and functions for max + types and functions for class */ -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StorageRangeGetMaxAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StorageRangeGetMaxArgType = int64 - +// isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StorageRangeGetMaxRetType = int64 +type StorageCreateGetClassAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getStorageRangeGetMaxAttributeTypeOk(arg StorageRangeGetMaxAttributeType) (ret StorageRangeGetMaxRetType, ok bool) { +func getStorageCreateGetClassAttributeTypeOk(arg StorageCreateGetClassAttributeType) (ret StorageCreateGetClassRetType, ok bool) { if arg == nil { return ret, false } @@ -41,26 +35,32 @@ func getStorageRangeGetMaxAttributeTypeOk(arg StorageRangeGetMaxAttributeType) ( } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setStorageRangeGetMaxAttributeType(arg *StorageRangeGetMaxAttributeType, val StorageRangeGetMaxRetType) { +func setStorageCreateGetClassAttributeType(arg *StorageCreateGetClassAttributeType, val StorageCreateGetClassRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type StorageCreateGetClassArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type StorageCreateGetClassRetType = string + /* - types and functions for min + types and functions for size */ // isLong // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StorageRangeGetMinAttributeType = *int64 +type StorageCreateGetSizeAttributeType = *int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StorageRangeGetMinArgType = int64 +type StorageCreateGetSizeArgType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StorageRangeGetMinRetType = int64 +type StorageCreateGetSizeRetType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getStorageRangeGetMinAttributeTypeOk(arg StorageRangeGetMinAttributeType) (ret StorageRangeGetMinRetType, ok bool) { +func getStorageCreateGetSizeAttributeTypeOk(arg StorageCreateGetSizeAttributeType) (ret StorageCreateGetSizeRetType, ok bool) { if arg == nil { return ret, false } @@ -68,142 +68,137 @@ func getStorageRangeGetMinAttributeTypeOk(arg StorageRangeGetMinAttributeType) ( } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setStorageRangeGetMinAttributeType(arg *StorageRangeGetMinAttributeType, val StorageRangeGetMinRetType) { +func setStorageCreateGetSizeAttributeType(arg *StorageCreateGetSizeAttributeType, val StorageCreateGetSizeRetType) { *arg = &val } -// StorageRange struct for StorageRange +// StorageCreate The object containing information about the storage size and class. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type StorageRange struct { - Max StorageRangeGetMaxAttributeType `json:"max,omitempty"` - Min StorageRangeGetMinAttributeType `json:"min,omitempty"` +type StorageCreate struct { + // The storage class for the storage. + // REQUIRED + Class StorageCreateGetClassAttributeType `json:"class" required:"true"` + // The storage size in Gigabytes. + // REQUIRED + Size StorageCreateGetSizeAttributeType `json:"size" required:"true"` } -// NewStorageRange instantiates a new StorageRange object +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _StorageCreate StorageCreate + +// NewStorageCreate instantiates a new StorageCreate 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 NewStorageRange() *StorageRange { - this := StorageRange{} +func NewStorageCreate(class StorageCreateGetClassArgType, size StorageCreateGetSizeArgType) *StorageCreate { + this := StorageCreate{} + setStorageCreateGetClassAttributeType(&this.Class, class) + setStorageCreateGetSizeAttributeType(&this.Size, size) return &this } -// NewStorageRangeWithDefaults instantiates a new StorageRange object +// NewStorageCreateWithDefaults instantiates a new StorageCreate 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 NewStorageRangeWithDefaults() *StorageRange { - this := StorageRange{} +func NewStorageCreateWithDefaults() *StorageCreate { + this := StorageCreate{} return &this } -// GetMax returns the Max field value if set, zero value otherwise. +// GetClass returns the Class field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *StorageRange) GetMax() (res StorageRangeGetMaxRetType) { - res, _ = o.GetMaxOk() - return +func (o *StorageCreate) GetClass() (ret StorageCreateGetClassRetType) { + ret, _ = o.GetClassOk() + return ret } -// GetMaxOk returns a tuple with the Max field value if set, nil otherwise +// GetClassOk returns a tuple with the Class 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 *StorageRange) GetMaxOk() (ret StorageRangeGetMaxRetType, ok bool) { - return getStorageRangeGetMaxAttributeTypeOk(o.Max) -} - -// HasMax 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 *StorageRange) HasMax() bool { - _, ok := o.GetMaxOk() - return ok +func (o *StorageCreate) GetClassOk() (ret StorageCreateGetClassRetType, ok bool) { + return getStorageCreateGetClassAttributeTypeOk(o.Class) } -// SetMax gets a reference to the given int64 and assigns it to the Max field. +// SetClass sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *StorageRange) SetMax(v StorageRangeGetMaxRetType) { - setStorageRangeGetMaxAttributeType(&o.Max, v) +func (o *StorageCreate) SetClass(v StorageCreateGetClassRetType) { + setStorageCreateGetClassAttributeType(&o.Class, v) } -// GetMin returns the Min field value if set, zero value otherwise. +// GetSize returns the Size field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *StorageRange) GetMin() (res StorageRangeGetMinRetType) { - res, _ = o.GetMinOk() - return +func (o *StorageCreate) GetSize() (ret StorageCreateGetSizeRetType) { + ret, _ = o.GetSizeOk() + return ret } -// GetMinOk returns a tuple with the Min field value if set, nil otherwise +// GetSizeOk returns a tuple with the Size field value // and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *StorageRange) GetMinOk() (ret StorageRangeGetMinRetType, ok bool) { - return getStorageRangeGetMinAttributeTypeOk(o.Min) -} - -// HasMin 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 *StorageRange) HasMin() bool { - _, ok := o.GetMinOk() - return ok +func (o *StorageCreate) GetSizeOk() (ret StorageCreateGetSizeRetType, ok bool) { + return getStorageCreateGetSizeAttributeTypeOk(o.Size) } -// SetMin gets a reference to the given int64 and assigns it to the Min field. +// SetSize sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *StorageRange) SetMin(v StorageRangeGetMinRetType) { - setStorageRangeGetMinAttributeType(&o.Min, v) +func (o *StorageCreate) SetSize(v StorageCreateGetSizeRetType) { + setStorageCreateGetSizeAttributeType(&o.Size, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o StorageRange) ToMap() (map[string]interface{}, error) { +func (o StorageCreate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getStorageRangeGetMaxAttributeTypeOk(o.Max); ok { - toSerialize["Max"] = val + if val, ok := getStorageCreateGetClassAttributeTypeOk(o.Class); ok { + toSerialize["Class"] = val } - if val, ok := getStorageRangeGetMinAttributeTypeOk(o.Min); ok { - toSerialize["Min"] = val + if val, ok := getStorageCreateGetSizeAttributeTypeOk(o.Size); ok { + toSerialize["Size"] = val } return toSerialize, nil } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableStorageRange struct { - value *StorageRange +type NullableStorageCreate struct { + value *StorageCreate isSet bool } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableStorageRange) Get() *StorageRange { +func (v NullableStorageCreate) Get() *StorageCreate { return v.value } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableStorageRange) Set(val *StorageRange) { +func (v *NullableStorageCreate) Set(val *StorageCreate) { 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 NullableStorageRange) IsSet() bool { +func (v NullableStorageCreate) 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 *NullableStorageRange) Unset() { +func (v *NullableStorageCreate) 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 NewNullableStorageRange(val *StorageRange) *NullableStorageRange { - return &NullableStorageRange{value: val, isSet: true} +func NewNullableStorageCreate(val *StorageCreate) *NullableStorageCreate { + return &NullableStorageCreate{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 NullableStorageRange) MarshalJSON() ([]byte, error) { +func (v NullableStorageCreate) 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 *NullableStorageRange) UnmarshalJSON(src []byte) error { +func (v *NullableStorageCreate) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/sqlserverflex/model_storage_create_test.go b/services/sqlserverflex/model_storage_create_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_storage_create_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_storage_range_test.go b/services/sqlserverflex/model_storage_range_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_storage_range_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_storage_test.go b/services/sqlserverflex/model_storage_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_storage_test.go +++ b/services/sqlserverflex/model_storage_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_acl.go b/services/sqlserverflex/model_storage_update.go similarity index 60% rename from services/sqlserverflex/model_acl.go rename to services/sqlserverflex/model_storage_update.go index 344c8f5e3..b7aed7c04 100644 --- a/services/sqlserverflex/model_acl.go +++ b/services/sqlserverflex/model_storage_update.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,25 +15,25 @@ import ( "encoding/json" ) -// checks if the ACL type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ACL{} +// checks if the StorageUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StorageUpdate{} /* - types and functions for items + types and functions for size */ -// isArray +// isLong // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ACLGetItemsAttributeType = *[]string +type StorageUpdateGetSizeAttributeType = *int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ACLGetItemsArgType = []string +type StorageUpdateGetSizeArgType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ACLGetItemsRetType = []string +type StorageUpdateGetSizeRetType = int64 // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getACLGetItemsAttributeTypeOk(arg ACLGetItemsAttributeType) (ret ACLGetItemsRetType, ok bool) { +func getStorageUpdateGetSizeAttributeTypeOk(arg StorageUpdateGetSizeAttributeType) (ret StorageUpdateGetSizeRetType, ok bool) { if arg == nil { return ret, false } @@ -41,111 +41,112 @@ func getACLGetItemsAttributeTypeOk(arg ACLGetItemsAttributeType) (ret ACLGetItem } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setACLGetItemsAttributeType(arg *ACLGetItemsAttributeType, val ACLGetItemsRetType) { +func setStorageUpdateGetSizeAttributeType(arg *StorageUpdateGetSizeAttributeType, val StorageUpdateGetSizeRetType) { *arg = &val } -// ACL struct for ACL +// StorageUpdate The object containing information about the storage size and class. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ACL struct { - Items ACLGetItemsAttributeType `json:"items,omitempty"` +type StorageUpdate struct { + // The storage size in Gigabytes. + Size StorageUpdateGetSizeAttributeType `json:"size,omitempty"` } -// NewACL instantiates a new ACL object +// NewStorageUpdate instantiates a new StorageUpdate 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 NewACL() *ACL { - this := ACL{} +func NewStorageUpdate() *StorageUpdate { + this := StorageUpdate{} return &this } -// NewACLWithDefaults instantiates a new ACL object +// NewStorageUpdateWithDefaults instantiates a new StorageUpdate 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 NewACLWithDefaults() *ACL { - this := ACL{} +func NewStorageUpdateWithDefaults() *StorageUpdate { + this := StorageUpdate{} return &this } -// GetItems returns the Items field value if set, zero value otherwise. +// GetSize returns the Size 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 *ACL) GetItems() (res ACLGetItemsRetType) { - res, _ = o.GetItemsOk() +func (o *StorageUpdate) GetSize() (res StorageUpdateGetSizeRetType) { + res, _ = o.GetSizeOk() return } -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// GetSizeOk returns a tuple with the Size 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 *ACL) GetItemsOk() (ret ACLGetItemsRetType, ok bool) { - return getACLGetItemsAttributeTypeOk(o.Items) +func (o *StorageUpdate) GetSizeOk() (ret StorageUpdateGetSizeRetType, ok bool) { + return getStorageUpdateGetSizeAttributeTypeOk(o.Size) } -// HasItems returns a boolean if a field has been set. +// HasSize 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 *ACL) HasItems() bool { - _, ok := o.GetItemsOk() +func (o *StorageUpdate) HasSize() bool { + _, ok := o.GetSizeOk() return ok } -// SetItems gets a reference to the given []string and assigns it to the Items field. +// SetSize gets a reference to the given int64 and assigns it to the Size field. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ACL) SetItems(v ACLGetItemsRetType) { - setACLGetItemsAttributeType(&o.Items, v) +func (o *StorageUpdate) SetSize(v StorageUpdateGetSizeRetType) { + setStorageUpdateGetSizeAttributeType(&o.Size, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ACL) ToMap() (map[string]interface{}, error) { +func (o StorageUpdate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getACLGetItemsAttributeTypeOk(o.Items); ok { - toSerialize["Items"] = val + if val, ok := getStorageUpdateGetSizeAttributeTypeOk(o.Size); ok { + toSerialize["Size"] = val } return toSerialize, nil } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableACL struct { - value *ACL +type NullableStorageUpdate struct { + value *StorageUpdate isSet bool } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableACL) Get() *ACL { +func (v NullableStorageUpdate) Get() *StorageUpdate { return v.value } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableACL) Set(val *ACL) { +func (v *NullableStorageUpdate) Set(val *StorageUpdate) { 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 NullableACL) IsSet() bool { +func (v NullableStorageUpdate) 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 *NullableACL) Unset() { +func (v *NullableStorageUpdate) 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 NewNullableACL(val *ACL) *NullableACL { - return &NullableACL{value: val, isSet: true} +func NewNullableStorageUpdate(val *StorageUpdate) *NullableStorageUpdate { + return &NullableStorageUpdate{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 NullableACL) MarshalJSON() ([]byte, error) { +func (v NullableStorageUpdate) 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 *NullableACL) UnmarshalJSON(src []byte) error { +func (v *NullableStorageUpdate) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/sqlserverflex/model_storage_update_test.go b/services/sqlserverflex/model_storage_update_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_storage_update_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_trigger_database_restore_payload_test.go b/services/sqlserverflex/model_trigger_database_restore_payload_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_trigger_database_restore_payload_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_trigger_database_restore_payload.go b/services/sqlserverflex/model_trigger_restore_payload.go similarity index 54% rename from services/sqlserverflex/model_trigger_database_restore_payload.go rename to services/sqlserverflex/model_trigger_restore_payload.go index 7f69657a3..9f0a55d1c 100644 --- a/services/sqlserverflex/model_trigger_database_restore_payload.go +++ b/services/sqlserverflex/model_trigger_restore_payload.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,8 +15,8 @@ import ( "encoding/json" ) -// checks if the TriggerDatabaseRestorePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TriggerDatabaseRestorePayload{} +// checks if the TriggerRestorePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TriggerRestorePayload{} /* types and functions for name @@ -24,10 +24,10 @@ var _ MappedNullable = &TriggerDatabaseRestorePayload{} // isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TriggerDatabaseRestorePayloadGetNameAttributeType = *string +type TriggerRestorePayloadGetNameAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getTriggerDatabaseRestorePayloadGetNameAttributeTypeOk(arg TriggerDatabaseRestorePayloadGetNameAttributeType) (ret TriggerDatabaseRestorePayloadGetNameRetType, ok bool) { +func getTriggerRestorePayloadGetNameAttributeTypeOk(arg TriggerRestorePayloadGetNameAttributeType) (ret TriggerRestorePayloadGetNameRetType, ok bool) { if arg == nil { return ret, false } @@ -35,15 +35,15 @@ func getTriggerDatabaseRestorePayloadGetNameAttributeTypeOk(arg TriggerDatabaseR } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setTriggerDatabaseRestorePayloadGetNameAttributeType(arg *TriggerDatabaseRestorePayloadGetNameAttributeType, val TriggerDatabaseRestorePayloadGetNameRetType) { +func setTriggerRestorePayloadGetNameAttributeType(arg *TriggerRestorePayloadGetNameAttributeType, val TriggerRestorePayloadGetNameRetType) { *arg = &val } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TriggerDatabaseRestorePayloadGetNameArgType = string +type TriggerRestorePayloadGetNameArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TriggerDatabaseRestorePayloadGetNameRetType = string +type TriggerRestorePayloadGetNameRetType = string /* types and functions for restoreDateTime @@ -51,10 +51,10 @@ type TriggerDatabaseRestorePayloadGetNameRetType = string // isNotNullableString // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TriggerDatabaseRestorePayloadGetRestoreDateTimeAttributeType = *string +type TriggerRestorePayloadGetRestoreDateTimeAttributeType = *string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getTriggerDatabaseRestorePayloadGetRestoreDateTimeAttributeTypeOk(arg TriggerDatabaseRestorePayloadGetRestoreDateTimeAttributeType) (ret TriggerDatabaseRestorePayloadGetRestoreDateTimeRetType, ok bool) { +func getTriggerRestorePayloadGetRestoreDateTimeAttributeTypeOk(arg TriggerRestorePayloadGetRestoreDateTimeAttributeType) (ret TriggerRestorePayloadGetRestoreDateTimeRetType, ok bool) { if arg == nil { return ret, false } @@ -62,54 +62,54 @@ func getTriggerDatabaseRestorePayloadGetRestoreDateTimeAttributeTypeOk(arg Trigg } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setTriggerDatabaseRestorePayloadGetRestoreDateTimeAttributeType(arg *TriggerDatabaseRestorePayloadGetRestoreDateTimeAttributeType, val TriggerDatabaseRestorePayloadGetRestoreDateTimeRetType) { +func setTriggerRestorePayloadGetRestoreDateTimeAttributeType(arg *TriggerRestorePayloadGetRestoreDateTimeAttributeType, val TriggerRestorePayloadGetRestoreDateTimeRetType) { *arg = &val } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TriggerDatabaseRestorePayloadGetRestoreDateTimeArgType = string +type TriggerRestorePayloadGetRestoreDateTimeArgType = string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TriggerDatabaseRestorePayloadGetRestoreDateTimeRetType = string +type TriggerRestorePayloadGetRestoreDateTimeRetType = string -// TriggerDatabaseRestorePayload struct for TriggerDatabaseRestorePayload +// TriggerRestorePayload struct for TriggerRestorePayload // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type TriggerDatabaseRestorePayload struct { - // Name for the restored database no overwrite allowed at the moment +type TriggerRestorePayload struct { + // The name of the database. // REQUIRED - Name TriggerDatabaseRestorePayloadGetNameAttributeType `json:"name" required:"true"` - // Time of the restore point formate RFC3339 + Name TriggerRestorePayloadGetNameAttributeType `json:"name" required:"true"` + // the time for the restore it will be calculated between first backup and last backup // REQUIRED - RestoreDateTime TriggerDatabaseRestorePayloadGetRestoreDateTimeAttributeType `json:"restoreDateTime" required:"true"` + RestoreDateTime TriggerRestorePayloadGetRestoreDateTimeAttributeType `json:"restoreDateTime" required:"true"` } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type _TriggerDatabaseRestorePayload TriggerDatabaseRestorePayload +type _TriggerRestorePayload TriggerRestorePayload -// NewTriggerDatabaseRestorePayload instantiates a new TriggerDatabaseRestorePayload object +// NewTriggerRestorePayload instantiates a new TriggerRestorePayload 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 NewTriggerDatabaseRestorePayload(name TriggerDatabaseRestorePayloadGetNameArgType, restoreDateTime TriggerDatabaseRestorePayloadGetRestoreDateTimeArgType) *TriggerDatabaseRestorePayload { - this := TriggerDatabaseRestorePayload{} - setTriggerDatabaseRestorePayloadGetNameAttributeType(&this.Name, name) - setTriggerDatabaseRestorePayloadGetRestoreDateTimeAttributeType(&this.RestoreDateTime, restoreDateTime) +func NewTriggerRestorePayload(name TriggerRestorePayloadGetNameArgType, restoreDateTime TriggerRestorePayloadGetRestoreDateTimeArgType) *TriggerRestorePayload { + this := TriggerRestorePayload{} + setTriggerRestorePayloadGetNameAttributeType(&this.Name, name) + setTriggerRestorePayloadGetRestoreDateTimeAttributeType(&this.RestoreDateTime, restoreDateTime) return &this } -// NewTriggerDatabaseRestorePayloadWithDefaults instantiates a new TriggerDatabaseRestorePayload object +// NewTriggerRestorePayloadWithDefaults instantiates a new TriggerRestorePayload 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 NewTriggerDatabaseRestorePayloadWithDefaults() *TriggerDatabaseRestorePayload { - this := TriggerDatabaseRestorePayload{} +func NewTriggerRestorePayloadWithDefaults() *TriggerRestorePayload { + this := TriggerRestorePayload{} return &this } // GetName returns the Name field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TriggerDatabaseRestorePayload) GetName() (ret TriggerDatabaseRestorePayloadGetNameRetType) { +func (o *TriggerRestorePayload) GetName() (ret TriggerRestorePayloadGetNameRetType) { ret, _ = o.GetNameOk() return ret } @@ -117,19 +117,19 @@ func (o *TriggerDatabaseRestorePayload) GetName() (ret TriggerDatabaseRestorePay // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TriggerDatabaseRestorePayload) GetNameOk() (ret TriggerDatabaseRestorePayloadGetNameRetType, ok bool) { - return getTriggerDatabaseRestorePayloadGetNameAttributeTypeOk(o.Name) +func (o *TriggerRestorePayload) GetNameOk() (ret TriggerRestorePayloadGetNameRetType, ok bool) { + return getTriggerRestorePayloadGetNameAttributeTypeOk(o.Name) } // SetName sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TriggerDatabaseRestorePayload) SetName(v TriggerDatabaseRestorePayloadGetNameRetType) { - setTriggerDatabaseRestorePayloadGetNameAttributeType(&o.Name, v) +func (o *TriggerRestorePayload) SetName(v TriggerRestorePayloadGetNameRetType) { + setTriggerRestorePayloadGetNameAttributeType(&o.Name, v) } // GetRestoreDateTime returns the RestoreDateTime field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TriggerDatabaseRestorePayload) GetRestoreDateTime() (ret TriggerDatabaseRestorePayloadGetRestoreDateTimeRetType) { +func (o *TriggerRestorePayload) GetRestoreDateTime() (ret TriggerRestorePayloadGetRestoreDateTimeRetType) { ret, _ = o.GetRestoreDateTimeOk() return ret } @@ -137,68 +137,68 @@ func (o *TriggerDatabaseRestorePayload) GetRestoreDateTime() (ret TriggerDatabas // GetRestoreDateTimeOk returns a tuple with the RestoreDateTime 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 *TriggerDatabaseRestorePayload) GetRestoreDateTimeOk() (ret TriggerDatabaseRestorePayloadGetRestoreDateTimeRetType, ok bool) { - return getTriggerDatabaseRestorePayloadGetRestoreDateTimeAttributeTypeOk(o.RestoreDateTime) +func (o *TriggerRestorePayload) GetRestoreDateTimeOk() (ret TriggerRestorePayloadGetRestoreDateTimeRetType, ok bool) { + return getTriggerRestorePayloadGetRestoreDateTimeAttributeTypeOk(o.RestoreDateTime) } // SetRestoreDateTime sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *TriggerDatabaseRestorePayload) SetRestoreDateTime(v TriggerDatabaseRestorePayloadGetRestoreDateTimeRetType) { - setTriggerDatabaseRestorePayloadGetRestoreDateTimeAttributeType(&o.RestoreDateTime, v) +func (o *TriggerRestorePayload) SetRestoreDateTime(v TriggerRestorePayloadGetRestoreDateTimeRetType) { + setTriggerRestorePayloadGetRestoreDateTimeAttributeType(&o.RestoreDateTime, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o TriggerDatabaseRestorePayload) ToMap() (map[string]interface{}, error) { +func (o TriggerRestorePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getTriggerDatabaseRestorePayloadGetNameAttributeTypeOk(o.Name); ok { + if val, ok := getTriggerRestorePayloadGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } - if val, ok := getTriggerDatabaseRestorePayloadGetRestoreDateTimeAttributeTypeOk(o.RestoreDateTime); ok { + if val, ok := getTriggerRestorePayloadGetRestoreDateTimeAttributeTypeOk(o.RestoreDateTime); ok { toSerialize["RestoreDateTime"] = val } return toSerialize, nil } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableTriggerDatabaseRestorePayload struct { - value *TriggerDatabaseRestorePayload +type NullableTriggerRestorePayload struct { + value *TriggerRestorePayload isSet bool } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableTriggerDatabaseRestorePayload) Get() *TriggerDatabaseRestorePayload { +func (v NullableTriggerRestorePayload) Get() *TriggerRestorePayload { return v.value } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableTriggerDatabaseRestorePayload) Set(val *TriggerDatabaseRestorePayload) { +func (v *NullableTriggerRestorePayload) Set(val *TriggerRestorePayload) { 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 NullableTriggerDatabaseRestorePayload) IsSet() bool { +func (v NullableTriggerRestorePayload) 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 *NullableTriggerDatabaseRestorePayload) Unset() { +func (v *NullableTriggerRestorePayload) 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 NewNullableTriggerDatabaseRestorePayload(val *TriggerDatabaseRestorePayload) *NullableTriggerDatabaseRestorePayload { - return &NullableTriggerDatabaseRestorePayload{value: val, isSet: true} +func NewNullableTriggerRestorePayload(val *TriggerRestorePayload) *NullableTriggerRestorePayload { + return &NullableTriggerRestorePayload{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 NullableTriggerDatabaseRestorePayload) MarshalJSON() ([]byte, error) { +func (v NullableTriggerRestorePayload) 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 *NullableTriggerDatabaseRestorePayload) UnmarshalJSON(src []byte) error { +func (v *NullableTriggerRestorePayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/sqlserverflex/model_trigger_restore_payload_test.go b/services/sqlserverflex/model_trigger_restore_payload_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_trigger_restore_payload_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_type_test.go b/services/sqlserverflex/model_type_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_type_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_update_instance_payload.go b/services/sqlserverflex/model_update_instance_payload.go index 465581f48..e2f9992b2 100644 --- a/services/sqlserverflex/model_update_instance_payload.go +++ b/services/sqlserverflex/model_update_instance_payload.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -18,33 +18,6 @@ import ( // checks if the UpdateInstancePayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateInstancePayload{} -/* - types and functions for acl -*/ - -// isModel -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateInstancePayloadGetAclAttributeType = *CreateInstancePayloadAcl - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateInstancePayloadGetAclArgType = CreateInstancePayloadAcl - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateInstancePayloadGetAclRetType = CreateInstancePayloadAcl - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateInstancePayloadGetAclAttributeTypeOk(arg UpdateInstancePayloadGetAclAttributeType) (ret UpdateInstancePayloadGetAclRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateInstancePayloadGetAclAttributeType(arg *UpdateInstancePayloadGetAclAttributeType, val UpdateInstancePayloadGetAclRetType) { - *arg = &val -} - /* types and functions for backupSchedule */ @@ -103,15 +76,15 @@ type UpdateInstancePayloadGetFlavorIdRetType = string types and functions for labels */ -// isFreeform +// isContainer // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateInstancePayloadGetLabelsAttributeType = *map[string]interface{} +type UpdateInstancePayloadGetLabelsAttributeType = *map[string]string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateInstancePayloadGetLabelsArgType = map[string]interface{} +type UpdateInstancePayloadGetLabelsArgType = map[string]string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateInstancePayloadGetLabelsRetType = map[string]interface{} +type UpdateInstancePayloadGetLabelsRetType = map[string]string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateInstancePayloadGetLabelsAttributeTypeOk(arg UpdateInstancePayloadGetLabelsAttributeType) (ret UpdateInstancePayloadGetLabelsRetType, ok bool) { @@ -154,15 +127,21 @@ type UpdateInstancePayloadGetNameArgType = string type UpdateInstancePayloadGetNameRetType = string /* - types and functions for version + types and functions for network */ -// isNotNullableString +// isModel // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateInstancePayloadGetVersionAttributeType = *string +type UpdateInstancePayloadGetNetworkAttributeType = *UpdateInstancePayloadNetwork // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateInstancePayloadGetVersionAttributeTypeOk(arg UpdateInstancePayloadGetVersionAttributeType) (ret UpdateInstancePayloadGetVersionRetType, ok bool) { +type UpdateInstancePayloadGetNetworkArgType = UpdateInstancePayloadNetwork + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UpdateInstancePayloadGetNetworkRetType = UpdateInstancePayloadNetwork + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getUpdateInstancePayloadGetNetworkAttributeTypeOk(arg UpdateInstancePayloadGetNetworkAttributeType) (ret UpdateInstancePayloadGetNetworkRetType, ok bool) { if arg == nil { return ret, false } @@ -170,33 +149,113 @@ func getUpdateInstancePayloadGetVersionAttributeTypeOk(arg UpdateInstancePayload } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateInstancePayloadGetVersionAttributeType(arg *UpdateInstancePayloadGetVersionAttributeType, val UpdateInstancePayloadGetVersionRetType) { +func setUpdateInstancePayloadGetNetworkAttributeType(arg *UpdateInstancePayloadGetNetworkAttributeType, val UpdateInstancePayloadGetNetworkRetType) { + *arg = &val +} + +/* + types and functions for retentionDays +*/ + +// isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UpdateInstancePayloadGetRetentionDaysAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UpdateInstancePayloadGetRetentionDaysArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UpdateInstancePayloadGetRetentionDaysRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getUpdateInstancePayloadGetRetentionDaysAttributeTypeOk(arg UpdateInstancePayloadGetRetentionDaysAttributeType) (ret UpdateInstancePayloadGetRetentionDaysRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setUpdateInstancePayloadGetRetentionDaysAttributeType(arg *UpdateInstancePayloadGetRetentionDaysAttributeType, val UpdateInstancePayloadGetRetentionDaysRetType) { *arg = &val } +/* + types and functions for storage +*/ + +// isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UpdateInstancePayloadGetStorageAttributeType = *StorageUpdate + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateInstancePayloadGetVersionArgType = string +type UpdateInstancePayloadGetStorageArgType = StorageUpdate // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateInstancePayloadGetVersionRetType = string +type UpdateInstancePayloadGetStorageRetType = StorageUpdate + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getUpdateInstancePayloadGetStorageAttributeTypeOk(arg UpdateInstancePayloadGetStorageAttributeType) (ret UpdateInstancePayloadGetStorageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setUpdateInstancePayloadGetStorageAttributeType(arg *UpdateInstancePayloadGetStorageAttributeType, val UpdateInstancePayloadGetStorageRetType) { + *arg = &val +} + +/* + types and functions for version +*/ + +// isEnumRef +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UpdateInstancePayloadGetVersionAttributeType = *InstanceVersion + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UpdateInstancePayloadGetVersionArgType = InstanceVersion + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UpdateInstancePayloadGetVersionRetType = InstanceVersion + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getUpdateInstancePayloadGetVersionAttributeTypeOk(arg UpdateInstancePayloadGetVersionAttributeType) (ret UpdateInstancePayloadGetVersionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setUpdateInstancePayloadGetVersionAttributeType(arg *UpdateInstancePayloadGetVersionAttributeType, val UpdateInstancePayloadGetVersionRetType) { + *arg = &val +} // UpdateInstancePayload struct for UpdateInstancePayload // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayload struct { - // REQUIRED - Acl UpdateInstancePayloadGetAclAttributeType `json:"acl" required:"true"` - // Cronjob for the daily full backup if not provided a job will generated between 00:00 and 04:59 + // The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule. // REQUIRED BackupSchedule UpdateInstancePayloadGetBackupScheduleAttributeType `json:"backupSchedule" required:"true"` - // Id of the selected flavor + // The id of the instance flavor. // REQUIRED FlavorId UpdateInstancePayloadGetFlavorIdAttributeType `json:"flavorId" required:"true"` - // REQUIRED - Labels UpdateInstancePayloadGetLabelsAttributeType `json:"labels" required:"true"` - // Name of the instance + // A dictionary of user-defined key-value pairs used to categorize or organize the resource. **Rules for Keys:** * Must be between 1 and 63 characters long. * Must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$` * **Restriction:** The prefix `stackit-` is strictly reserved and cannot be used. **Rules for Values:** * Must be between 0 (empty string) and 63 characters long. * If not empty, must begin and end with an alphanumeric character. * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$` + Labels UpdateInstancePayloadGetLabelsAttributeType `json:"labels,omitempty"` + // The name of the instance. // REQUIRED Name UpdateInstancePayloadGetNameAttributeType `json:"name" required:"true"` - // Version of the MSSQL Server + // REQUIRED + Network UpdateInstancePayloadGetNetworkAttributeType `json:"network" required:"true"` + // The days for how long the backup files should be stored before cleaned up. 30 to 90 + // Can be cast to int32 without loss of precision. + // REQUIRED + RetentionDays UpdateInstancePayloadGetRetentionDaysAttributeType `json:"retentionDays" required:"true"` + // REQUIRED + Storage UpdateInstancePayloadGetStorageAttributeType `json:"storage" required:"true"` // REQUIRED Version UpdateInstancePayloadGetVersionAttributeType `json:"version" required:"true"` } @@ -209,13 +268,14 @@ type _UpdateInstancePayload UpdateInstancePayload // 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 NewUpdateInstancePayload(acl UpdateInstancePayloadGetAclArgType, backupSchedule UpdateInstancePayloadGetBackupScheduleArgType, flavorId UpdateInstancePayloadGetFlavorIdArgType, labels UpdateInstancePayloadGetLabelsArgType, name UpdateInstancePayloadGetNameArgType, version UpdateInstancePayloadGetVersionArgType) *UpdateInstancePayload { +func NewUpdateInstancePayload(backupSchedule UpdateInstancePayloadGetBackupScheduleArgType, flavorId UpdateInstancePayloadGetFlavorIdArgType, name UpdateInstancePayloadGetNameArgType, network UpdateInstancePayloadGetNetworkArgType, retentionDays UpdateInstancePayloadGetRetentionDaysArgType, storage UpdateInstancePayloadGetStorageArgType, version UpdateInstancePayloadGetVersionArgType) *UpdateInstancePayload { this := UpdateInstancePayload{} - setUpdateInstancePayloadGetAclAttributeType(&this.Acl, acl) setUpdateInstancePayloadGetBackupScheduleAttributeType(&this.BackupSchedule, backupSchedule) setUpdateInstancePayloadGetFlavorIdAttributeType(&this.FlavorId, flavorId) - setUpdateInstancePayloadGetLabelsAttributeType(&this.Labels, labels) setUpdateInstancePayloadGetNameAttributeType(&this.Name, name) + setUpdateInstancePayloadGetNetworkAttributeType(&this.Network, network) + setUpdateInstancePayloadGetRetentionDaysAttributeType(&this.RetentionDays, retentionDays) + setUpdateInstancePayloadGetStorageAttributeType(&this.Storage, storage) setUpdateInstancePayloadGetVersionAttributeType(&this.Version, version) return &this } @@ -226,31 +286,9 @@ func NewUpdateInstancePayload(acl UpdateInstancePayloadGetAclArgType, backupSche // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateInstancePayloadWithDefaults() *UpdateInstancePayload { this := UpdateInstancePayload{} - var version string = "2022" - this.Version = &version return &this } -// GetAcl returns the Acl field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateInstancePayload) GetAcl() (ret UpdateInstancePayloadGetAclRetType) { - ret, _ = o.GetAclOk() - return ret -} - -// GetAclOk returns a tuple with the Acl 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 *UpdateInstancePayload) GetAclOk() (ret UpdateInstancePayloadGetAclRetType, ok bool) { - return getUpdateInstancePayloadGetAclAttributeTypeOk(o.Acl) -} - -// SetAcl sets field value -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateInstancePayload) SetAcl(v UpdateInstancePayloadGetAclRetType) { - setUpdateInstancePayloadGetAclAttributeType(&o.Acl, v) -} - // GetBackupSchedule returns the BackupSchedule field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) GetBackupSchedule() (ret UpdateInstancePayloadGetBackupScheduleRetType) { @@ -291,21 +329,28 @@ func (o *UpdateInstancePayload) SetFlavorId(v UpdateInstancePayloadGetFlavorIdRe setUpdateInstancePayloadGetFlavorIdAttributeType(&o.FlavorId, v) } -// GetLabels returns the Labels field value +// GetLabels returns the Labels field value if set, zero value otherwise. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateInstancePayload) GetLabels() (ret UpdateInstancePayloadGetLabelsRetType) { - ret, _ = o.GetLabelsOk() - return ret +func (o *UpdateInstancePayload) GetLabels() (res UpdateInstancePayloadGetLabelsRetType) { + res, _ = o.GetLabelsOk() + return } -// GetLabelsOk returns a tuple with the Labels field value +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) GetLabelsOk() (ret UpdateInstancePayloadGetLabelsRetType, ok bool) { return getUpdateInstancePayloadGetLabelsAttributeTypeOk(o.Labels) } -// SetLabels sets field value +// HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *UpdateInstancePayload) HasLabels() bool { + _, ok := o.GetLabelsOk() + return ok +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) SetLabels(v UpdateInstancePayloadGetLabelsRetType) { setUpdateInstancePayloadGetLabelsAttributeType(&o.Labels, v) @@ -331,6 +376,66 @@ func (o *UpdateInstancePayload) SetName(v UpdateInstancePayloadGetNameRetType) { setUpdateInstancePayloadGetNameAttributeType(&o.Name, v) } +// GetNetwork returns the Network field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *UpdateInstancePayload) GetNetwork() (ret UpdateInstancePayloadGetNetworkRetType) { + ret, _ = o.GetNetworkOk() + return ret +} + +// GetNetworkOk returns a tuple with the Network 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 *UpdateInstancePayload) GetNetworkOk() (ret UpdateInstancePayloadGetNetworkRetType, ok bool) { + return getUpdateInstancePayloadGetNetworkAttributeTypeOk(o.Network) +} + +// SetNetwork sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *UpdateInstancePayload) SetNetwork(v UpdateInstancePayloadGetNetworkRetType) { + setUpdateInstancePayloadGetNetworkAttributeType(&o.Network, v) +} + +// GetRetentionDays returns the RetentionDays field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *UpdateInstancePayload) GetRetentionDays() (ret UpdateInstancePayloadGetRetentionDaysRetType) { + ret, _ = o.GetRetentionDaysOk() + return ret +} + +// GetRetentionDaysOk returns a tuple with the RetentionDays 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 *UpdateInstancePayload) GetRetentionDaysOk() (ret UpdateInstancePayloadGetRetentionDaysRetType, ok bool) { + return getUpdateInstancePayloadGetRetentionDaysAttributeTypeOk(o.RetentionDays) +} + +// SetRetentionDays sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *UpdateInstancePayload) SetRetentionDays(v UpdateInstancePayloadGetRetentionDaysRetType) { + setUpdateInstancePayloadGetRetentionDaysAttributeType(&o.RetentionDays, v) +} + +// GetStorage returns the Storage field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *UpdateInstancePayload) GetStorage() (ret UpdateInstancePayloadGetStorageRetType) { + ret, _ = o.GetStorageOk() + return ret +} + +// GetStorageOk returns a tuple with the Storage 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 *UpdateInstancePayload) GetStorageOk() (ret UpdateInstancePayloadGetStorageRetType, ok bool) { + return getUpdateInstancePayloadGetStorageAttributeTypeOk(o.Storage) +} + +// SetStorage sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *UpdateInstancePayload) SetStorage(v UpdateInstancePayloadGetStorageRetType) { + setUpdateInstancePayloadGetStorageAttributeType(&o.Storage, v) +} + // GetVersion returns the Version field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) GetVersion() (ret UpdateInstancePayloadGetVersionRetType) { @@ -354,9 +459,6 @@ func (o *UpdateInstancePayload) SetVersion(v UpdateInstancePayloadGetVersionRetT // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UpdateInstancePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getUpdateInstancePayloadGetAclAttributeTypeOk(o.Acl); ok { - toSerialize["Acl"] = val - } if val, ok := getUpdateInstancePayloadGetBackupScheduleAttributeTypeOk(o.BackupSchedule); ok { toSerialize["BackupSchedule"] = val } @@ -369,6 +471,15 @@ func (o UpdateInstancePayload) ToMap() (map[string]interface{}, error) { if val, ok := getUpdateInstancePayloadGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } + if val, ok := getUpdateInstancePayloadGetNetworkAttributeTypeOk(o.Network); ok { + toSerialize["Network"] = val + } + if val, ok := getUpdateInstancePayloadGetRetentionDaysAttributeTypeOk(o.RetentionDays); ok { + toSerialize["RetentionDays"] = val + } + if val, ok := getUpdateInstancePayloadGetStorageAttributeTypeOk(o.Storage); ok { + toSerialize["Storage"] = val + } if val, ok := getUpdateInstancePayloadGetVersionAttributeTypeOk(o.Version); ok { toSerialize["Version"] = val } diff --git a/services/sqlserverflex/model_list_metrics_response.go b/services/sqlserverflex/model_update_instance_payload_network.go similarity index 54% rename from services/sqlserverflex/model_list_metrics_response.go rename to services/sqlserverflex/model_update_instance_payload_network.go index af92555e4..dd9500644 100644 --- a/services/sqlserverflex/model_list_metrics_response.go +++ b/services/sqlserverflex/model_update_instance_payload_network.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,25 +15,25 @@ import ( "encoding/json" ) -// checks if the ListMetricsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListMetricsResponse{} +// checks if the UpdateInstancePayloadNetwork type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateInstancePayloadNetwork{} /* - types and functions for hosts + types and functions for acl */ // isArray // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListMetricsResponseGetHostsAttributeType = *[]Host +type UpdateInstancePayloadNetworkGetAclAttributeType = *[]string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListMetricsResponseGetHostsArgType = []Host +type UpdateInstancePayloadNetworkGetAclArgType = []string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListMetricsResponseGetHostsRetType = []Host +type UpdateInstancePayloadNetworkGetAclRetType = []string // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getListMetricsResponseGetHostsAttributeTypeOk(arg ListMetricsResponseGetHostsAttributeType) (ret ListMetricsResponseGetHostsRetType, ok bool) { +func getUpdateInstancePayloadNetworkGetAclAttributeTypeOk(arg UpdateInstancePayloadNetworkGetAclAttributeType) (ret UpdateInstancePayloadNetworkGetAclRetType, ok bool) { if arg == nil { return ret, false } @@ -41,111 +41,110 @@ func getListMetricsResponseGetHostsAttributeTypeOk(arg ListMetricsResponseGetHos } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setListMetricsResponseGetHostsAttributeType(arg *ListMetricsResponseGetHostsAttributeType, val ListMetricsResponseGetHostsRetType) { +func setUpdateInstancePayloadNetworkGetAclAttributeType(arg *UpdateInstancePayloadNetworkGetAclAttributeType, val UpdateInstancePayloadNetworkGetAclRetType) { *arg = &val } -// ListMetricsResponse struct for ListMetricsResponse +// UpdateInstancePayloadNetwork the network configuration of the instance. // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type ListMetricsResponse struct { - Hosts ListMetricsResponseGetHostsAttributeType `json:"hosts,omitempty"` +type UpdateInstancePayloadNetwork struct { + // List of IPV4 cidr. + // REQUIRED + Acl UpdateInstancePayloadNetworkGetAclAttributeType `json:"acl" required:"true"` } -// NewListMetricsResponse instantiates a new ListMetricsResponse object +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _UpdateInstancePayloadNetwork UpdateInstancePayloadNetwork + +// NewUpdateInstancePayloadNetwork instantiates a new UpdateInstancePayloadNetwork 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 NewListMetricsResponse() *ListMetricsResponse { - this := ListMetricsResponse{} +func NewUpdateInstancePayloadNetwork(acl UpdateInstancePayloadNetworkGetAclArgType) *UpdateInstancePayloadNetwork { + this := UpdateInstancePayloadNetwork{} + setUpdateInstancePayloadNetworkGetAclAttributeType(&this.Acl, acl) return &this } -// NewListMetricsResponseWithDefaults instantiates a new ListMetricsResponse object +// NewUpdateInstancePayloadNetworkWithDefaults instantiates a new UpdateInstancePayloadNetwork 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 NewListMetricsResponseWithDefaults() *ListMetricsResponse { - this := ListMetricsResponse{} +func NewUpdateInstancePayloadNetworkWithDefaults() *UpdateInstancePayloadNetwork { + this := UpdateInstancePayloadNetwork{} return &this } -// GetHosts returns the Hosts field value if set, zero value otherwise. +// GetAcl returns the Acl field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListMetricsResponse) GetHosts() (res ListMetricsResponseGetHostsRetType) { - res, _ = o.GetHostsOk() - return +func (o *UpdateInstancePayloadNetwork) GetAcl() (ret UpdateInstancePayloadNetworkGetAclRetType) { + ret, _ = o.GetAclOk() + return ret } -// GetHostsOk returns a tuple with the Hosts field value if set, nil otherwise +// GetAclOk returns a tuple with the Acl 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 *ListMetricsResponse) GetHostsOk() (ret ListMetricsResponseGetHostsRetType, ok bool) { - return getListMetricsResponseGetHostsAttributeTypeOk(o.Hosts) -} - -// HasHosts 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 *ListMetricsResponse) HasHosts() bool { - _, ok := o.GetHostsOk() - return ok +func (o *UpdateInstancePayloadNetwork) GetAclOk() (ret UpdateInstancePayloadNetworkGetAclRetType, ok bool) { + return getUpdateInstancePayloadNetworkGetAclAttributeTypeOk(o.Acl) } -// SetHosts gets a reference to the given []Host and assigns it to the Hosts field. +// SetAcl sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *ListMetricsResponse) SetHosts(v ListMetricsResponseGetHostsRetType) { - setListMetricsResponseGetHostsAttributeType(&o.Hosts, v) +func (o *UpdateInstancePayloadNetwork) SetAcl(v UpdateInstancePayloadNetworkGetAclRetType) { + setUpdateInstancePayloadNetworkGetAclAttributeType(&o.Acl, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o ListMetricsResponse) ToMap() (map[string]interface{}, error) { +func (o UpdateInstancePayloadNetwork) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getListMetricsResponseGetHostsAttributeTypeOk(o.Hosts); ok { - toSerialize["Hosts"] = val + if val, ok := getUpdateInstancePayloadNetworkGetAclAttributeTypeOk(o.Acl); ok { + toSerialize["Acl"] = val } return toSerialize, nil } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableListMetricsResponse struct { - value *ListMetricsResponse +type NullableUpdateInstancePayloadNetwork struct { + value *UpdateInstancePayloadNetwork isSet bool } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableListMetricsResponse) Get() *ListMetricsResponse { +func (v NullableUpdateInstancePayloadNetwork) Get() *UpdateInstancePayloadNetwork { return v.value } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableListMetricsResponse) Set(val *ListMetricsResponse) { +func (v *NullableUpdateInstancePayloadNetwork) Set(val *UpdateInstancePayloadNetwork) { 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 NullableListMetricsResponse) IsSet() bool { +func (v NullableUpdateInstancePayloadNetwork) 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 *NullableListMetricsResponse) Unset() { +func (v *NullableUpdateInstancePayloadNetwork) 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 NewNullableListMetricsResponse(val *ListMetricsResponse) *NullableListMetricsResponse { - return &NullableListMetricsResponse{value: val, isSet: true} +func NewNullableUpdateInstancePayloadNetwork(val *UpdateInstancePayloadNetwork) *NullableUpdateInstancePayloadNetwork { + return &NullableUpdateInstancePayloadNetwork{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 NullableListMetricsResponse) MarshalJSON() ([]byte, error) { +func (v NullableUpdateInstancePayloadNetwork) 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 *NullableListMetricsResponse) UnmarshalJSON(src []byte) error { +func (v *NullableUpdateInstancePayloadNetwork) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/sqlserverflex/model_update_instance_payload_network_test.go b/services/sqlserverflex/model_update_instance_payload_network_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_update_instance_payload_network_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_update_instance_payload_test.go b/services/sqlserverflex/model_update_instance_payload_test.go index 9f9659f27..4e3a58466 100644 --- a/services/sqlserverflex/model_update_instance_payload_test.go +++ b/services/sqlserverflex/model_update_instance_payload_test.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/model_update_instance_response.go b/services/sqlserverflex/model_update_instance_protection_payload.go similarity index 51% rename from services/sqlserverflex/model_update_instance_response.go rename to services/sqlserverflex/model_update_instance_protection_payload.go index 27df89184..c12f7d69f 100644 --- a/services/sqlserverflex/model_update_instance_response.go +++ b/services/sqlserverflex/model_update_instance_protection_payload.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,25 +15,25 @@ import ( "encoding/json" ) -// checks if the UpdateInstanceResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateInstanceResponse{} +// checks if the UpdateInstanceProtectionPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateInstanceProtectionPayload{} /* - types and functions for item + types and functions for isDeletable */ -// isModel +// isBoolean // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateInstanceResponseGetItemAttributeType = *Instance +type UpdateInstanceProtectionPayloadgetIsDeletableAttributeType = *bool // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateInstanceResponseGetItemArgType = Instance +type UpdateInstanceProtectionPayloadgetIsDeletableArgType = bool // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateInstanceResponseGetItemRetType = Instance +type UpdateInstanceProtectionPayloadgetIsDeletableRetType = bool // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUpdateInstanceResponseGetItemAttributeTypeOk(arg UpdateInstanceResponseGetItemAttributeType) (ret UpdateInstanceResponseGetItemRetType, ok bool) { +func getUpdateInstanceProtectionPayloadgetIsDeletableAttributeTypeOk(arg UpdateInstanceProtectionPayloadgetIsDeletableAttributeType) (ret UpdateInstanceProtectionPayloadgetIsDeletableRetType, ok bool) { if arg == nil { return ret, false } @@ -41,111 +41,110 @@ func getUpdateInstanceResponseGetItemAttributeTypeOk(arg UpdateInstanceResponseG } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUpdateInstanceResponseGetItemAttributeType(arg *UpdateInstanceResponseGetItemAttributeType, val UpdateInstanceResponseGetItemRetType) { +func setUpdateInstanceProtectionPayloadgetIsDeletableAttributeType(arg *UpdateInstanceProtectionPayloadgetIsDeletableAttributeType, val UpdateInstanceProtectionPayloadgetIsDeletableRetType) { *arg = &val } -// UpdateInstanceResponse struct for UpdateInstanceResponse +// UpdateInstanceProtectionPayload struct for UpdateInstanceProtectionPayload // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UpdateInstanceResponse struct { - Item UpdateInstanceResponseGetItemAttributeType `json:"item,omitempty"` +type UpdateInstanceProtectionPayload struct { + // Protect instance from deletion. + // REQUIRED + IsDeletable UpdateInstanceProtectionPayloadgetIsDeletableAttributeType `json:"isDeletable" required:"true"` } -// NewUpdateInstanceResponse instantiates a new UpdateInstanceResponse object +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _UpdateInstanceProtectionPayload UpdateInstanceProtectionPayload + +// NewUpdateInstanceProtectionPayload instantiates a new UpdateInstanceProtectionPayload 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 NewUpdateInstanceResponse() *UpdateInstanceResponse { - this := UpdateInstanceResponse{} +func NewUpdateInstanceProtectionPayload(isDeletable UpdateInstanceProtectionPayloadgetIsDeletableArgType) *UpdateInstanceProtectionPayload { + this := UpdateInstanceProtectionPayload{} + setUpdateInstanceProtectionPayloadgetIsDeletableAttributeType(&this.IsDeletable, isDeletable) return &this } -// NewUpdateInstanceResponseWithDefaults instantiates a new UpdateInstanceResponse object +// NewUpdateInstanceProtectionPayloadWithDefaults instantiates a new UpdateInstanceProtectionPayload 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 NewUpdateInstanceResponseWithDefaults() *UpdateInstanceResponse { - this := UpdateInstanceResponse{} +func NewUpdateInstanceProtectionPayloadWithDefaults() *UpdateInstanceProtectionPayload { + this := UpdateInstanceProtectionPayload{} return &this } -// GetItem returns the Item field value if set, zero value otherwise. +// GetIsDeletable returns the IsDeletable field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateInstanceResponse) GetItem() (res UpdateInstanceResponseGetItemRetType) { - res, _ = o.GetItemOk() - return +func (o *UpdateInstanceProtectionPayload) GetIsDeletable() (ret UpdateInstanceProtectionPayloadgetIsDeletableRetType) { + ret, _ = o.GetIsDeletableOk() + return ret } -// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// GetIsDeletableOk returns a tuple with the IsDeletable 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 *UpdateInstanceResponse) GetItemOk() (ret UpdateInstanceResponseGetItemRetType, ok bool) { - return getUpdateInstanceResponseGetItemAttributeTypeOk(o.Item) -} - -// HasItem 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 *UpdateInstanceResponse) HasItem() bool { - _, ok := o.GetItemOk() - return ok +func (o *UpdateInstanceProtectionPayload) GetIsDeletableOk() (ret UpdateInstanceProtectionPayloadgetIsDeletableRetType, ok bool) { + return getUpdateInstanceProtectionPayloadgetIsDeletableAttributeTypeOk(o.IsDeletable) } -// SetItem gets a reference to the given Instance and assigns it to the Item field. +// SetIsDeletable sets field value // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UpdateInstanceResponse) SetItem(v UpdateInstanceResponseGetItemRetType) { - setUpdateInstanceResponseGetItemAttributeType(&o.Item, v) +func (o *UpdateInstanceProtectionPayload) SetIsDeletable(v UpdateInstanceProtectionPayloadgetIsDeletableRetType) { + setUpdateInstanceProtectionPayloadgetIsDeletableAttributeType(&o.IsDeletable, v) } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UpdateInstanceResponse) ToMap() (map[string]interface{}, error) { +func (o UpdateInstanceProtectionPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if val, ok := getUpdateInstanceResponseGetItemAttributeTypeOk(o.Item); ok { - toSerialize["Item"] = val + if val, ok := getUpdateInstanceProtectionPayloadgetIsDeletableAttributeTypeOk(o.IsDeletable); ok { + toSerialize["IsDeletable"] = val } return toSerialize, nil } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUpdateInstanceResponse struct { - value *UpdateInstanceResponse +type NullableUpdateInstanceProtectionPayload struct { + value *UpdateInstanceProtectionPayload isSet bool } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUpdateInstanceResponse) Get() *UpdateInstanceResponse { +func (v NullableUpdateInstanceProtectionPayload) Get() *UpdateInstanceProtectionPayload { return v.value } // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUpdateInstanceResponse) Set(val *UpdateInstanceResponse) { +func (v *NullableUpdateInstanceProtectionPayload) Set(val *UpdateInstanceProtectionPayload) { 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 NullableUpdateInstanceResponse) IsSet() bool { +func (v NullableUpdateInstanceProtectionPayload) 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 *NullableUpdateInstanceResponse) Unset() { +func (v *NullableUpdateInstanceProtectionPayload) 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 NewNullableUpdateInstanceResponse(val *UpdateInstanceResponse) *NullableUpdateInstanceResponse { - return &NullableUpdateInstanceResponse{value: val, isSet: true} +func NewNullableUpdateInstanceProtectionPayload(val *UpdateInstanceProtectionPayload) *NullableUpdateInstanceProtectionPayload { + return &NullableUpdateInstanceProtectionPayload{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 NullableUpdateInstanceResponse) MarshalJSON() ([]byte, error) { +func (v NullableUpdateInstanceProtectionPayload) 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 *NullableUpdateInstanceResponse) UnmarshalJSON(src []byte) error { +func (v *NullableUpdateInstanceProtectionPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/services/sqlserverflex/model_update_instance_protection_payload_test.go b/services/sqlserverflex/model_update_instance_protection_payload_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_update_instance_protection_payload_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_update_instance_protection_response.go b/services/sqlserverflex/model_update_instance_protection_response.go new file mode 100644 index 000000000..b6a1ade3c --- /dev/null +++ b/services/sqlserverflex/model_update_instance_protection_response.go @@ -0,0 +1,150 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" +) + +// checks if the UpdateInstanceProtectionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateInstanceProtectionResponse{} + +/* + types and functions for isDeletable +*/ + +// isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UpdateInstanceProtectionResponsegetIsDeletableAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UpdateInstanceProtectionResponsegetIsDeletableArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UpdateInstanceProtectionResponsegetIsDeletableRetType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getUpdateInstanceProtectionResponsegetIsDeletableAttributeTypeOk(arg UpdateInstanceProtectionResponsegetIsDeletableAttributeType) (ret UpdateInstanceProtectionResponsegetIsDeletableRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setUpdateInstanceProtectionResponsegetIsDeletableAttributeType(arg *UpdateInstanceProtectionResponsegetIsDeletableAttributeType, val UpdateInstanceProtectionResponsegetIsDeletableRetType) { + *arg = &val +} + +// UpdateInstanceProtectionResponse struct for UpdateInstanceProtectionResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UpdateInstanceProtectionResponse struct { + // Protect instance from deletion. + // REQUIRED + IsDeletable UpdateInstanceProtectionResponsegetIsDeletableAttributeType `json:"isDeletable" required:"true"` +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _UpdateInstanceProtectionResponse UpdateInstanceProtectionResponse + +// NewUpdateInstanceProtectionResponse instantiates a new UpdateInstanceProtectionResponse 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 NewUpdateInstanceProtectionResponse(isDeletable UpdateInstanceProtectionResponsegetIsDeletableArgType) *UpdateInstanceProtectionResponse { + this := UpdateInstanceProtectionResponse{} + setUpdateInstanceProtectionResponsegetIsDeletableAttributeType(&this.IsDeletable, isDeletable) + return &this +} + +// NewUpdateInstanceProtectionResponseWithDefaults instantiates a new UpdateInstanceProtectionResponse 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 NewUpdateInstanceProtectionResponseWithDefaults() *UpdateInstanceProtectionResponse { + this := UpdateInstanceProtectionResponse{} + return &this +} + +// GetIsDeletable returns the IsDeletable field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *UpdateInstanceProtectionResponse) GetIsDeletable() (ret UpdateInstanceProtectionResponsegetIsDeletableRetType) { + ret, _ = o.GetIsDeletableOk() + return ret +} + +// GetIsDeletableOk returns a tuple with the IsDeletable 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 *UpdateInstanceProtectionResponse) GetIsDeletableOk() (ret UpdateInstanceProtectionResponsegetIsDeletableRetType, ok bool) { + return getUpdateInstanceProtectionResponsegetIsDeletableAttributeTypeOk(o.IsDeletable) +} + +// SetIsDeletable sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *UpdateInstanceProtectionResponse) SetIsDeletable(v UpdateInstanceProtectionResponsegetIsDeletableRetType) { + setUpdateInstanceProtectionResponsegetIsDeletableAttributeType(&o.IsDeletable, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o UpdateInstanceProtectionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getUpdateInstanceProtectionResponsegetIsDeletableAttributeTypeOk(o.IsDeletable); ok { + toSerialize["IsDeletable"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableUpdateInstanceProtectionResponse struct { + value *UpdateInstanceProtectionResponse + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableUpdateInstanceProtectionResponse) Get() *UpdateInstanceProtectionResponse { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableUpdateInstanceProtectionResponse) Set(val *UpdateInstanceProtectionResponse) { + 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 NullableUpdateInstanceProtectionResponse) 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 *NullableUpdateInstanceProtectionResponse) 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 NewNullableUpdateInstanceProtectionResponse(val *UpdateInstanceProtectionResponse) *NullableUpdateInstanceProtectionResponse { + return &NullableUpdateInstanceProtectionResponse{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 NullableUpdateInstanceProtectionResponse) 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 *NullableUpdateInstanceProtectionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_update_instance_protection_response_test.go b/services/sqlserverflex/model_update_instance_protection_response_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_update_instance_protection_response_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_update_instance_response_test.go b/services/sqlserverflex/model_update_instance_response_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_update_instance_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_user.go b/services/sqlserverflex/model_user.go deleted file mode 100644 index fca220687..000000000 --- a/services/sqlserverflex/model_user.go +++ /dev/null @@ -1,557 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package sqlserverflex - -import ( - "encoding/json" -) - -// checks if the User type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &User{} - -/* - types and functions for database -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetDatabaseAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUserGetDatabaseAttributeTypeOk(arg UserGetDatabaseAttributeType) (ret UserGetDatabaseRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUserGetDatabaseAttributeType(arg *UserGetDatabaseAttributeType, val UserGetDatabaseRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetDatabaseArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetDatabaseRetType = string - -/* - types and functions for host -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetHostAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUserGetHostAttributeTypeOk(arg UserGetHostAttributeType) (ret UserGetHostRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUserGetHostAttributeType(arg *UserGetHostAttributeType, val UserGetHostRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetHostArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetHostRetType = string - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUserGetIdAttributeTypeOk(arg UserGetIdAttributeType) (ret UserGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUserGetIdAttributeType(arg *UserGetIdAttributeType, val UserGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetIdRetType = string - -/* - types and functions for password -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetPasswordAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUserGetPasswordAttributeTypeOk(arg UserGetPasswordAttributeType) (ret UserGetPasswordRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUserGetPasswordAttributeType(arg *UserGetPasswordAttributeType, val UserGetPasswordRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetPasswordArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetPasswordRetType = string - -/* - types and functions for port -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetPortAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetPortArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetPortRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUserGetPortAttributeTypeOk(arg UserGetPortAttributeType) (ret UserGetPortRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUserGetPortAttributeType(arg *UserGetPortAttributeType, val UserGetPortRetType) { - *arg = &val -} - -/* - types and functions for roles -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetRolesAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetRolesArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetRolesRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUserGetRolesAttributeTypeOk(arg UserGetRolesAttributeType) (ret UserGetRolesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUserGetRolesAttributeType(arg *UserGetRolesAttributeType, val UserGetRolesRetType) { - *arg = &val -} - -/* - types and functions for uri -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetUriAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUserGetUriAttributeTypeOk(arg UserGetUriAttributeType) (ret UserGetUriRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUserGetUriAttributeType(arg *UserGetUriAttributeType, val UserGetUriRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetUriArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetUriRetType = string - -/* - types and functions for username -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetUsernameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUserGetUsernameAttributeTypeOk(arg UserGetUsernameAttributeType) (ret UserGetUsernameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUserGetUsernameAttributeType(arg *UserGetUsernameAttributeType, val UserGetUsernameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetUsernameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserGetUsernameRetType = string - -// User struct for User -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type User struct { - Database UserGetDatabaseAttributeType `json:"database,omitempty"` - Host UserGetHostAttributeType `json:"host,omitempty"` - Id UserGetIdAttributeType `json:"id,omitempty"` - Password UserGetPasswordAttributeType `json:"password,omitempty"` - Port UserGetPortAttributeType `json:"port,omitempty"` - Roles UserGetRolesAttributeType `json:"roles,omitempty"` - Uri UserGetUriAttributeType `json:"uri,omitempty"` - Username UserGetUsernameAttributeType `json:"username,omitempty"` -} - -// NewUser instantiates a new User 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 NewUser() *User { - this := User{} - return &this -} - -// NewUserWithDefaults instantiates a new User 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 NewUserWithDefaults() *User { - this := User{} - return &this -} - -// GetDatabase returns the Database 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 *User) GetDatabase() (res UserGetDatabaseRetType) { - res, _ = o.GetDatabaseOk() - return -} - -// GetDatabaseOk returns a tuple with the Database 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 *User) GetDatabaseOk() (ret UserGetDatabaseRetType, ok bool) { - return getUserGetDatabaseAttributeTypeOk(o.Database) -} - -// HasDatabase 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 *User) HasDatabase() bool { - _, ok := o.GetDatabaseOk() - return ok -} - -// SetDatabase gets a reference to the given string and assigns it to the Database field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *User) SetDatabase(v UserGetDatabaseRetType) { - setUserGetDatabaseAttributeType(&o.Database, v) -} - -// GetHost returns the Host 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 *User) GetHost() (res UserGetHostRetType) { - res, _ = o.GetHostOk() - return -} - -// GetHostOk returns a tuple with the Host 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 *User) GetHostOk() (ret UserGetHostRetType, ok bool) { - return getUserGetHostAttributeTypeOk(o.Host) -} - -// HasHost 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 *User) HasHost() bool { - _, ok := o.GetHostOk() - return ok -} - -// SetHost gets a reference to the given string and assigns it to the Host field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *User) SetHost(v UserGetHostRetType) { - setUserGetHostAttributeType(&o.Host, v) -} - -// GetId returns the Id 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 *User) GetId() (res UserGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *User) GetIdOk() (ret UserGetIdRetType, ok bool) { - return getUserGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *User) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *User) SetId(v UserGetIdRetType) { - setUserGetIdAttributeType(&o.Id, v) -} - -// GetPassword returns the Password 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 *User) GetPassword() (res UserGetPasswordRetType) { - res, _ = o.GetPasswordOk() - return -} - -// GetPasswordOk returns a tuple with the Password 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 *User) GetPasswordOk() (ret UserGetPasswordRetType, ok bool) { - return getUserGetPasswordAttributeTypeOk(o.Password) -} - -// HasPassword 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 *User) HasPassword() bool { - _, ok := o.GetPasswordOk() - return ok -} - -// SetPassword gets a reference to the given string and assigns it to the Password field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *User) SetPassword(v UserGetPasswordRetType) { - setUserGetPasswordAttributeType(&o.Password, v) -} - -// GetPort returns the Port 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 *User) GetPort() (res UserGetPortRetType) { - res, _ = o.GetPortOk() - return -} - -// GetPortOk returns a tuple with the Port 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 *User) GetPortOk() (ret UserGetPortRetType, ok bool) { - return getUserGetPortAttributeTypeOk(o.Port) -} - -// HasPort 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 *User) HasPort() bool { - _, ok := o.GetPortOk() - return ok -} - -// SetPort gets a reference to the given int64 and assigns it to the Port field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *User) SetPort(v UserGetPortRetType) { - setUserGetPortAttributeType(&o.Port, v) -} - -// GetRoles returns the Roles 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 *User) GetRoles() (res UserGetRolesRetType) { - res, _ = o.GetRolesOk() - return -} - -// GetRolesOk returns a tuple with the Roles 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 *User) GetRolesOk() (ret UserGetRolesRetType, ok bool) { - return getUserGetRolesAttributeTypeOk(o.Roles) -} - -// HasRoles 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 *User) HasRoles() bool { - _, ok := o.GetRolesOk() - return ok -} - -// SetRoles gets a reference to the given []string and assigns it to the Roles field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *User) SetRoles(v UserGetRolesRetType) { - setUserGetRolesAttributeType(&o.Roles, v) -} - -// GetUri returns the Uri 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 *User) GetUri() (res UserGetUriRetType) { - res, _ = o.GetUriOk() - return -} - -// GetUriOk returns a tuple with the Uri 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 *User) GetUriOk() (ret UserGetUriRetType, ok bool) { - return getUserGetUriAttributeTypeOk(o.Uri) -} - -// HasUri 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 *User) HasUri() bool { - _, ok := o.GetUriOk() - return ok -} - -// SetUri gets a reference to the given string and assigns it to the Uri field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *User) SetUri(v UserGetUriRetType) { - setUserGetUriAttributeType(&o.Uri, v) -} - -// GetUsername returns the Username 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 *User) GetUsername() (res UserGetUsernameRetType) { - res, _ = o.GetUsernameOk() - return -} - -// GetUsernameOk returns a tuple with the Username 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 *User) GetUsernameOk() (ret UserGetUsernameRetType, ok bool) { - return getUserGetUsernameAttributeTypeOk(o.Username) -} - -// HasUsername 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 *User) HasUsername() bool { - _, ok := o.GetUsernameOk() - return ok -} - -// SetUsername gets a reference to the given string and assigns it to the Username field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *User) SetUsername(v UserGetUsernameRetType) { - setUserGetUsernameAttributeType(&o.Username, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o User) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUserGetDatabaseAttributeTypeOk(o.Database); ok { - toSerialize["Database"] = val - } - if val, ok := getUserGetHostAttributeTypeOk(o.Host); ok { - toSerialize["Host"] = val - } - if val, ok := getUserGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getUserGetPasswordAttributeTypeOk(o.Password); ok { - toSerialize["Password"] = val - } - if val, ok := getUserGetPortAttributeTypeOk(o.Port); ok { - toSerialize["Port"] = val - } - if val, ok := getUserGetRolesAttributeTypeOk(o.Roles); ok { - toSerialize["Roles"] = val - } - if val, ok := getUserGetUriAttributeTypeOk(o.Uri); ok { - toSerialize["Uri"] = val - } - if val, ok := getUserGetUsernameAttributeTypeOk(o.Username); ok { - toSerialize["Username"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUser struct { - value *User - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUser) Get() *User { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUser) Set(val *User) { - 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 NullableUser) 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 *NullableUser) 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 NewNullableUser(val *User) *NullableUser { - return &NullableUser{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 NullableUser) 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 *NullableUser) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/sqlserverflex/model_user_response_user.go b/services/sqlserverflex/model_user_response_user.go deleted file mode 100644 index 4a630cc9d..000000000 --- a/services/sqlserverflex/model_user_response_user.go +++ /dev/null @@ -1,441 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -package sqlserverflex - -import ( - "encoding/json" -) - -// checks if the UserResponseUser type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UserResponseUser{} - -/* - types and functions for default_database -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserResponseUserGetDefaultDatabaseAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUserResponseUserGetDefaultDatabaseAttributeTypeOk(arg UserResponseUserGetDefaultDatabaseAttributeType) (ret UserResponseUserGetDefaultDatabaseRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUserResponseUserGetDefaultDatabaseAttributeType(arg *UserResponseUserGetDefaultDatabaseAttributeType, val UserResponseUserGetDefaultDatabaseRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserResponseUserGetDefaultDatabaseArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserResponseUserGetDefaultDatabaseRetType = string - -/* - types and functions for host -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserResponseUserGetHostAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUserResponseUserGetHostAttributeTypeOk(arg UserResponseUserGetHostAttributeType) (ret UserResponseUserGetHostRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUserResponseUserGetHostAttributeType(arg *UserResponseUserGetHostAttributeType, val UserResponseUserGetHostRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserResponseUserGetHostArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserResponseUserGetHostRetType = string - -/* - types and functions for id -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserResponseUserGetIdAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUserResponseUserGetIdAttributeTypeOk(arg UserResponseUserGetIdAttributeType) (ret UserResponseUserGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUserResponseUserGetIdAttributeType(arg *UserResponseUserGetIdAttributeType, val UserResponseUserGetIdRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserResponseUserGetIdArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserResponseUserGetIdRetType = string - -/* - types and functions for port -*/ - -// isLong -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserResponseUserGetPortAttributeType = *int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserResponseUserGetPortArgType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserResponseUserGetPortRetType = int64 - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUserResponseUserGetPortAttributeTypeOk(arg UserResponseUserGetPortAttributeType) (ret UserResponseUserGetPortRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUserResponseUserGetPortAttributeType(arg *UserResponseUserGetPortAttributeType, val UserResponseUserGetPortRetType) { - *arg = &val -} - -/* - types and functions for roles -*/ - -// isArray -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserResponseUserGetRolesAttributeType = *[]string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserResponseUserGetRolesArgType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserResponseUserGetRolesRetType = []string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUserResponseUserGetRolesAttributeTypeOk(arg UserResponseUserGetRolesAttributeType) (ret UserResponseUserGetRolesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUserResponseUserGetRolesAttributeType(arg *UserResponseUserGetRolesAttributeType, val UserResponseUserGetRolesRetType) { - *arg = &val -} - -/* - types and functions for username -*/ - -// isNotNullableString -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserResponseUserGetUsernameAttributeType = *string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func getUserResponseUserGetUsernameAttributeTypeOk(arg UserResponseUserGetUsernameAttributeType) (ret UserResponseUserGetUsernameRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func setUserResponseUserGetUsernameAttributeType(arg *UserResponseUserGetUsernameAttributeType, val UserResponseUserGetUsernameRetType) { - *arg = &val -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserResponseUserGetUsernameArgType = string - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserResponseUserGetUsernameRetType = string - -// UserResponseUser struct for UserResponseUser -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type UserResponseUser struct { - DefaultDatabase UserResponseUserGetDefaultDatabaseAttributeType `json:"default_database,omitempty"` - Host UserResponseUserGetHostAttributeType `json:"host,omitempty"` - Id UserResponseUserGetIdAttributeType `json:"id,omitempty"` - Port UserResponseUserGetPortAttributeType `json:"port,omitempty"` - Roles UserResponseUserGetRolesAttributeType `json:"roles,omitempty"` - Username UserResponseUserGetUsernameAttributeType `json:"username,omitempty"` -} - -// NewUserResponseUser instantiates a new UserResponseUser 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 NewUserResponseUser() *UserResponseUser { - this := UserResponseUser{} - return &this -} - -// NewUserResponseUserWithDefaults instantiates a new UserResponseUser 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 NewUserResponseUserWithDefaults() *UserResponseUser { - this := UserResponseUser{} - return &this -} - -// GetDefaultDatabase returns the DefaultDatabase 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 *UserResponseUser) GetDefaultDatabase() (res UserResponseUserGetDefaultDatabaseRetType) { - res, _ = o.GetDefaultDatabaseOk() - return -} - -// GetDefaultDatabaseOk returns a tuple with the DefaultDatabase 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 *UserResponseUser) GetDefaultDatabaseOk() (ret UserResponseUserGetDefaultDatabaseRetType, ok bool) { - return getUserResponseUserGetDefaultDatabaseAttributeTypeOk(o.DefaultDatabase) -} - -// HasDefaultDatabase 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 *UserResponseUser) HasDefaultDatabase() bool { - _, ok := o.GetDefaultDatabaseOk() - return ok -} - -// SetDefaultDatabase gets a reference to the given string and assigns it to the DefaultDatabase field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UserResponseUser) SetDefaultDatabase(v UserResponseUserGetDefaultDatabaseRetType) { - setUserResponseUserGetDefaultDatabaseAttributeType(&o.DefaultDatabase, v) -} - -// GetHost returns the Host 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 *UserResponseUser) GetHost() (res UserResponseUserGetHostRetType) { - res, _ = o.GetHostOk() - return -} - -// GetHostOk returns a tuple with the Host 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 *UserResponseUser) GetHostOk() (ret UserResponseUserGetHostRetType, ok bool) { - return getUserResponseUserGetHostAttributeTypeOk(o.Host) -} - -// HasHost 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 *UserResponseUser) HasHost() bool { - _, ok := o.GetHostOk() - return ok -} - -// SetHost gets a reference to the given string and assigns it to the Host field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UserResponseUser) SetHost(v UserResponseUserGetHostRetType) { - setUserResponseUserGetHostAttributeType(&o.Host, v) -} - -// GetId returns the Id 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 *UserResponseUser) GetId() (res UserResponseUserGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id 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 *UserResponseUser) GetIdOk() (ret UserResponseUserGetIdRetType, ok bool) { - return getUserResponseUserGetIdAttributeTypeOk(o.Id) -} - -// HasId 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 *UserResponseUser) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UserResponseUser) SetId(v UserResponseUserGetIdRetType) { - setUserResponseUserGetIdAttributeType(&o.Id, v) -} - -// GetPort returns the Port 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 *UserResponseUser) GetPort() (res UserResponseUserGetPortRetType) { - res, _ = o.GetPortOk() - return -} - -// GetPortOk returns a tuple with the Port 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 *UserResponseUser) GetPortOk() (ret UserResponseUserGetPortRetType, ok bool) { - return getUserResponseUserGetPortAttributeTypeOk(o.Port) -} - -// HasPort 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 *UserResponseUser) HasPort() bool { - _, ok := o.GetPortOk() - return ok -} - -// SetPort gets a reference to the given int64 and assigns it to the Port field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UserResponseUser) SetPort(v UserResponseUserGetPortRetType) { - setUserResponseUserGetPortAttributeType(&o.Port, v) -} - -// GetRoles returns the Roles 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 *UserResponseUser) GetRoles() (res UserResponseUserGetRolesRetType) { - res, _ = o.GetRolesOk() - return -} - -// GetRolesOk returns a tuple with the Roles 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 *UserResponseUser) GetRolesOk() (ret UserResponseUserGetRolesRetType, ok bool) { - return getUserResponseUserGetRolesAttributeTypeOk(o.Roles) -} - -// HasRoles 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 *UserResponseUser) HasRoles() bool { - _, ok := o.GetRolesOk() - return ok -} - -// SetRoles gets a reference to the given []string and assigns it to the Roles field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UserResponseUser) SetRoles(v UserResponseUserGetRolesRetType) { - setUserResponseUserGetRolesAttributeType(&o.Roles, v) -} - -// GetUsername returns the Username 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 *UserResponseUser) GetUsername() (res UserResponseUserGetUsernameRetType) { - res, _ = o.GetUsernameOk() - return -} - -// GetUsernameOk returns a tuple with the Username 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 *UserResponseUser) GetUsernameOk() (ret UserResponseUserGetUsernameRetType, ok bool) { - return getUserResponseUserGetUsernameAttributeTypeOk(o.Username) -} - -// HasUsername 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 *UserResponseUser) HasUsername() bool { - _, ok := o.GetUsernameOk() - return ok -} - -// SetUsername gets a reference to the given string and assigns it to the Username field. -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o *UserResponseUser) SetUsername(v UserResponseUserGetUsernameRetType) { - setUserResponseUserGetUsernameAttributeType(&o.Username, v) -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (o UserResponseUser) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getUserResponseUserGetDefaultDatabaseAttributeTypeOk(o.DefaultDatabase); ok { - toSerialize["DefaultDatabase"] = val - } - if val, ok := getUserResponseUserGetHostAttributeTypeOk(o.Host); ok { - toSerialize["Host"] = val - } - if val, ok := getUserResponseUserGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getUserResponseUserGetPortAttributeTypeOk(o.Port); ok { - toSerialize["Port"] = val - } - if val, ok := getUserResponseUserGetRolesAttributeTypeOk(o.Roles); ok { - toSerialize["Roles"] = val - } - if val, ok := getUserResponseUserGetUsernameAttributeTypeOk(o.Username); ok { - toSerialize["Username"] = val - } - return toSerialize, nil -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -type NullableUserResponseUser struct { - value *UserResponseUser - isSet bool -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v NullableUserResponseUser) Get() *UserResponseUser { - return v.value -} - -// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func (v *NullableUserResponseUser) Set(val *UserResponseUser) { - 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 NullableUserResponseUser) 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 *NullableUserResponseUser) 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 NewNullableUserResponseUser(val *UserResponseUser) *NullableUserResponseUser { - return &NullableUserResponseUser{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 NullableUserResponseUser) 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 *NullableUserResponseUser) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/sqlserverflex/model_user_response_user_test.go b/services/sqlserverflex/model_user_response_user_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_user_response_user_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_user_sort.go b/services/sqlserverflex/model_user_sort.go new file mode 100644 index 000000000..933d4b902 --- /dev/null +++ b/services/sqlserverflex/model_user_sort.go @@ -0,0 +1,150 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" + "fmt" +) + +// UserSort the model 'UserSort' +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type UserSort string + +// List of user.sort +const ( + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + USERSORT_ID_ASC UserSort = "id.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + USERSORT_ID_DESC UserSort = "id.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + USERSORT_INDEX_DESC UserSort = "index.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + USERSORT_INDEX_ASC UserSort = "index.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + USERSORT_NAME_DESC UserSort = "name.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + USERSORT_NAME_ASC UserSort = "name.asc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + USERSORT_STATUS_DESC UserSort = "status.desc" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + USERSORT_STATUS_ASC UserSort = "status.asc" +) + +// All allowed values of UserSort enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +var AllowedUserSortEnumValues = []UserSort{ + "id.asc", + "id.desc", + "index.desc", + "index.asc", + "name.desc", + "name.asc", + "status.desc", + "status.asc", +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *UserSort) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + // Allow unmarshalling zero value for testing purposes + var zeroValue string + if value == zeroValue { + return nil + } + enumTypeValue := UserSort(value) + for _, existing := range AllowedUserSortEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid UserSort", value) +} + +// NewUserSortFromValue returns a pointer to a valid UserSort +// 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 NewUserSortFromValue(v string) (*UserSort, error) { + ev := UserSort(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for UserSort: valid values are %v", v, AllowedUserSortEnumValues) + } +} + +// 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 UserSort) IsValid() bool { + for _, existing := range AllowedUserSortEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to user.sort value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v UserSort) Ptr() *UserSort { + return &v +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableUserSort struct { + value *UserSort + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableUserSort) Get() *UserSort { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableUserSort) Set(val *UserSort) { + 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 NullableUserSort) 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 *NullableUserSort) 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 NewNullableUserSort(val *UserSort) *NullableUserSort { + return &NullableUserSort{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 NullableUserSort) 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 *NullableUserSort) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_user_sort_test.go b/services/sqlserverflex/model_user_sort_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_user_sort_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_user_test.go b/services/sqlserverflex/model_user_test.go deleted file mode 100644 index 9f9659f27..000000000 --- a/services/sqlserverflex/model_user_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MSSQL Service API - -This is the documentation for the STACKIT MSSQL service - -API version: 2.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package sqlserverflex diff --git a/services/sqlserverflex/model_validation_error.go b/services/sqlserverflex/model_validation_error.go new file mode 100644 index 000000000..3cccd233b --- /dev/null +++ b/services/sqlserverflex/model_validation_error.go @@ -0,0 +1,205 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" +) + +// checks if the ValidationError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ValidationError{} + +/* + types and functions for code +*/ + +// isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ValidationErrorGetCodeAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ValidationErrorGetCodeArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ValidationErrorGetCodeRetType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getValidationErrorGetCodeAttributeTypeOk(arg ValidationErrorGetCodeAttributeType) (ret ValidationErrorGetCodeRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setValidationErrorGetCodeAttributeType(arg *ValidationErrorGetCodeAttributeType, val ValidationErrorGetCodeRetType) { + *arg = &val +} + +/* + types and functions for validation +*/ + +// isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ValidationErrorGetValidationAttributeType = *[]ValidationErrorValidationInner + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ValidationErrorGetValidationArgType = []ValidationErrorValidationInner + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ValidationErrorGetValidationRetType = []ValidationErrorValidationInner + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getValidationErrorGetValidationAttributeTypeOk(arg ValidationErrorGetValidationAttributeType) (ret ValidationErrorGetValidationRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setValidationErrorGetValidationAttributeType(arg *ValidationErrorGetValidationAttributeType, val ValidationErrorGetValidationRetType) { + *arg = &val +} + +// ValidationError struct for ValidationError +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ValidationError struct { + // the http error should be always 422 for validationError + // Can be cast to int32 without loss of precision. + // REQUIRED + Code ValidationErrorGetCodeAttributeType `json:"code" required:"true"` + // errors for all fields where the error happened + // REQUIRED + Validation ValidationErrorGetValidationAttributeType `json:"validation" required:"true"` +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ValidationError ValidationError + +// NewValidationError instantiates a new ValidationError 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 NewValidationError(code ValidationErrorGetCodeArgType, validation ValidationErrorGetValidationArgType) *ValidationError { + this := ValidationError{} + setValidationErrorGetCodeAttributeType(&this.Code, code) + setValidationErrorGetValidationAttributeType(&this.Validation, validation) + return &this +} + +// NewValidationErrorWithDefaults instantiates a new ValidationError 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 NewValidationErrorWithDefaults() *ValidationError { + this := ValidationError{} + return &this +} + +// GetCode returns the Code field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ValidationError) GetCode() (ret ValidationErrorGetCodeRetType) { + ret, _ = o.GetCodeOk() + return ret +} + +// GetCodeOk returns a tuple with the Code 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 *ValidationError) GetCodeOk() (ret ValidationErrorGetCodeRetType, ok bool) { + return getValidationErrorGetCodeAttributeTypeOk(o.Code) +} + +// SetCode sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ValidationError) SetCode(v ValidationErrorGetCodeRetType) { + setValidationErrorGetCodeAttributeType(&o.Code, v) +} + +// GetValidation returns the Validation field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ValidationError) GetValidation() (ret ValidationErrorGetValidationRetType) { + ret, _ = o.GetValidationOk() + return ret +} + +// GetValidationOk returns a tuple with the Validation 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 *ValidationError) GetValidationOk() (ret ValidationErrorGetValidationRetType, ok bool) { + return getValidationErrorGetValidationAttributeTypeOk(o.Validation) +} + +// SetValidation sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ValidationError) SetValidation(v ValidationErrorGetValidationRetType) { + setValidationErrorGetValidationAttributeType(&o.Validation, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o ValidationError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getValidationErrorGetCodeAttributeTypeOk(o.Code); ok { + toSerialize["Code"] = val + } + if val, ok := getValidationErrorGetValidationAttributeTypeOk(o.Validation); ok { + toSerialize["Validation"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableValidationError struct { + value *ValidationError + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableValidationError) Get() *ValidationError { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableValidationError) Set(val *ValidationError) { + 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 NullableValidationError) 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 *NullableValidationError) 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 NewNullableValidationError(val *ValidationError) *NullableValidationError { + return &NullableValidationError{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 NullableValidationError) 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 *NullableValidationError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_validation_error_test.go b/services/sqlserverflex/model_validation_error_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_validation_error_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_validation_error_validation_inner.go b/services/sqlserverflex/model_validation_error_validation_inner.go new file mode 100644 index 000000000..322d42528 --- /dev/null +++ b/services/sqlserverflex/model_validation_error_validation_inner.go @@ -0,0 +1,202 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" +) + +// checks if the ValidationErrorValidationInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ValidationErrorValidationInner{} + +/* + types and functions for field +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ValidationErrorValidationInnerGetFieldAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getValidationErrorValidationInnerGetFieldAttributeTypeOk(arg ValidationErrorValidationInnerGetFieldAttributeType) (ret ValidationErrorValidationInnerGetFieldRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setValidationErrorValidationInnerGetFieldAttributeType(arg *ValidationErrorValidationInnerGetFieldAttributeType, val ValidationErrorValidationInnerGetFieldRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ValidationErrorValidationInnerGetFieldArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ValidationErrorValidationInnerGetFieldRetType = string + +/* + types and functions for message +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ValidationErrorValidationInnerGetMessageAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getValidationErrorValidationInnerGetMessageAttributeTypeOk(arg ValidationErrorValidationInnerGetMessageAttributeType) (ret ValidationErrorValidationInnerGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setValidationErrorValidationInnerGetMessageAttributeType(arg *ValidationErrorValidationInnerGetMessageAttributeType, val ValidationErrorValidationInnerGetMessageRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ValidationErrorValidationInnerGetMessageArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ValidationErrorValidationInnerGetMessageRetType = string + +// ValidationErrorValidationInner struct for ValidationErrorValidationInner +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type ValidationErrorValidationInner struct { + // REQUIRED + Field ValidationErrorValidationInnerGetFieldAttributeType `json:"field" required:"true"` + // REQUIRED + Message ValidationErrorValidationInnerGetMessageAttributeType `json:"message" required:"true"` +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _ValidationErrorValidationInner ValidationErrorValidationInner + +// NewValidationErrorValidationInner instantiates a new ValidationErrorValidationInner 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 NewValidationErrorValidationInner(field ValidationErrorValidationInnerGetFieldArgType, message ValidationErrorValidationInnerGetMessageArgType) *ValidationErrorValidationInner { + this := ValidationErrorValidationInner{} + setValidationErrorValidationInnerGetFieldAttributeType(&this.Field, field) + setValidationErrorValidationInnerGetMessageAttributeType(&this.Message, message) + return &this +} + +// NewValidationErrorValidationInnerWithDefaults instantiates a new ValidationErrorValidationInner 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 NewValidationErrorValidationInnerWithDefaults() *ValidationErrorValidationInner { + this := ValidationErrorValidationInner{} + return &this +} + +// GetField returns the Field field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ValidationErrorValidationInner) GetField() (ret ValidationErrorValidationInnerGetFieldRetType) { + ret, _ = o.GetFieldOk() + return ret +} + +// GetFieldOk returns a tuple with the Field 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 *ValidationErrorValidationInner) GetFieldOk() (ret ValidationErrorValidationInnerGetFieldRetType, ok bool) { + return getValidationErrorValidationInnerGetFieldAttributeTypeOk(o.Field) +} + +// SetField sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ValidationErrorValidationInner) SetField(v ValidationErrorValidationInnerGetFieldRetType) { + setValidationErrorValidationInnerGetFieldAttributeType(&o.Field, v) +} + +// GetMessage returns the Message field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ValidationErrorValidationInner) GetMessage() (ret ValidationErrorValidationInnerGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ValidationErrorValidationInner) GetMessageOk() (ret ValidationErrorValidationInnerGetMessageRetType, ok bool) { + return getValidationErrorValidationInnerGetMessageAttributeTypeOk(o.Message) +} + +// SetMessage sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *ValidationErrorValidationInner) SetMessage(v ValidationErrorValidationInnerGetMessageRetType) { + setValidationErrorValidationInnerGetMessageAttributeType(&o.Message, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o ValidationErrorValidationInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getValidationErrorValidationInnerGetFieldAttributeTypeOk(o.Field); ok { + toSerialize["Field"] = val + } + if val, ok := getValidationErrorValidationInnerGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableValidationErrorValidationInner struct { + value *ValidationErrorValidationInner + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableValidationErrorValidationInner) Get() *ValidationErrorValidationInner { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableValidationErrorValidationInner) Set(val *ValidationErrorValidationInner) { + 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 NullableValidationErrorValidationInner) 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 *NullableValidationErrorValidationInner) 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 NewNullableValidationErrorValidationInner(val *ValidationErrorValidationInner) *NullableValidationErrorValidationInner { + return &NullableValidationErrorValidationInner{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 NullableValidationErrorValidationInner) 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 *NullableValidationErrorValidationInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_validation_error_validation_inner_test.go b/services/sqlserverflex/model_validation_error_validation_inner_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_validation_error_validation_inner_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/model_version.go b/services/sqlserverflex/model_version.go new file mode 100644 index 000000000..c0239364d --- /dev/null +++ b/services/sqlserverflex/model_version.go @@ -0,0 +1,312 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package sqlserverflex + +import ( + "encoding/json" +) + +// checks if the Version type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Version{} + +/* + types and functions for beta +*/ + +// isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type VersiongetBetaAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type VersiongetBetaArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type VersiongetBetaRetType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getVersiongetBetaAttributeTypeOk(arg VersiongetBetaAttributeType) (ret VersiongetBetaRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setVersiongetBetaAttributeType(arg *VersiongetBetaAttributeType, val VersiongetBetaRetType) { + *arg = &val +} + +/* + types and functions for deprecated +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type VersionGetDeprecatedAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getVersionGetDeprecatedAttributeTypeOk(arg VersionGetDeprecatedAttributeType) (ret VersionGetDeprecatedRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setVersionGetDeprecatedAttributeType(arg *VersionGetDeprecatedAttributeType, val VersionGetDeprecatedRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type VersionGetDeprecatedArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type VersionGetDeprecatedRetType = string + +/* + types and functions for recommend +*/ + +// isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type VersiongetRecommendAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type VersiongetRecommendArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type VersiongetRecommendRetType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getVersiongetRecommendAttributeTypeOk(arg VersiongetRecommendAttributeType) (ret VersiongetRecommendRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setVersiongetRecommendAttributeType(arg *VersiongetRecommendAttributeType, val VersiongetRecommendRetType) { + *arg = &val +} + +/* + types and functions for version +*/ + +// isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type VersionGetVersionAttributeType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func getVersionGetVersionAttributeTypeOk(arg VersionGetVersionAttributeType) (ret VersionGetVersionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func setVersionGetVersionAttributeType(arg *VersionGetVersionAttributeType, val VersionGetVersionRetType) { + *arg = &val +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type VersionGetVersionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type VersionGetVersionRetType = string + +// Version The version of the sqlserver instance and more details. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type Version struct { + // Flag if the version is a beta version. If set the version may contain bugs and is not fully tested. + // REQUIRED + Beta VersiongetBetaAttributeType `json:"beta" required:"true"` + // Timestamp in RFC3339 format which says when the version will no longer be supported by STACKIT. + // REQUIRED + Deprecated VersionGetDeprecatedAttributeType `json:"deprecated" required:"true"` + // Flag if the version is recommend by the STACKIT Team. + // REQUIRED + Recommend VersiongetRecommendAttributeType `json:"recommend" required:"true"` + // The sqlserver version used for the instance. + // REQUIRED + Version VersionGetVersionAttributeType `json:"version" required:"true"` +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type _Version Version + +// NewVersion instantiates a new Version 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 NewVersion(beta VersiongetBetaArgType, deprecated VersionGetDeprecatedArgType, recommend VersiongetRecommendArgType, version VersionGetVersionArgType) *Version { + this := Version{} + setVersiongetBetaAttributeType(&this.Beta, beta) + setVersionGetDeprecatedAttributeType(&this.Deprecated, deprecated) + setVersiongetRecommendAttributeType(&this.Recommend, recommend) + setVersionGetVersionAttributeType(&this.Version, version) + return &this +} + +// NewVersionWithDefaults instantiates a new Version 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 NewVersionWithDefaults() *Version { + this := Version{} + return &this +} + +// GetBeta returns the Beta field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Version) GetBeta() (ret VersiongetBetaRetType) { + ret, _ = o.GetBetaOk() + return ret +} + +// GetBetaOk returns a tuple with the Beta 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 *Version) GetBetaOk() (ret VersiongetBetaRetType, ok bool) { + return getVersiongetBetaAttributeTypeOk(o.Beta) +} + +// SetBeta sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Version) SetBeta(v VersiongetBetaRetType) { + setVersiongetBetaAttributeType(&o.Beta, v) +} + +// GetDeprecated returns the Deprecated field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Version) GetDeprecated() (ret VersionGetDeprecatedRetType) { + ret, _ = o.GetDeprecatedOk() + return ret +} + +// GetDeprecatedOk returns a tuple with the Deprecated 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 *Version) GetDeprecatedOk() (ret VersionGetDeprecatedRetType, ok bool) { + return getVersionGetDeprecatedAttributeTypeOk(o.Deprecated) +} + +// SetDeprecated sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Version) SetDeprecated(v VersionGetDeprecatedRetType) { + setVersionGetDeprecatedAttributeType(&o.Deprecated, v) +} + +// GetRecommend returns the Recommend field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Version) GetRecommend() (ret VersiongetRecommendRetType) { + ret, _ = o.GetRecommendOk() + return ret +} + +// GetRecommendOk returns a tuple with the Recommend 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 *Version) GetRecommendOk() (ret VersiongetRecommendRetType, ok bool) { + return getVersiongetRecommendAttributeTypeOk(o.Recommend) +} + +// SetRecommend sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Version) SetRecommend(v VersiongetRecommendRetType) { + setVersiongetRecommendAttributeType(&o.Recommend, v) +} + +// GetVersion returns the Version field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Version) GetVersion() (ret VersionGetVersionRetType) { + ret, _ = o.GetVersionOk() + return ret +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Version) GetVersionOk() (ret VersionGetVersionRetType, ok bool) { + return getVersionGetVersionAttributeTypeOk(o.Version) +} + +// SetVersion sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o *Version) SetVersion(v VersionGetVersionRetType) { + setVersionGetVersionAttributeType(&o.Version, v) +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (o Version) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getVersiongetBetaAttributeTypeOk(o.Beta); ok { + toSerialize["Beta"] = val + } + if val, ok := getVersionGetDeprecatedAttributeTypeOk(o.Deprecated); ok { + toSerialize["Deprecated"] = val + } + if val, ok := getVersiongetRecommendAttributeTypeOk(o.Recommend); ok { + toSerialize["Recommend"] = val + } + if val, ok := getVersionGetVersionAttributeTypeOk(o.Version); ok { + toSerialize["Version"] = val + } + return toSerialize, nil +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +type NullableVersion struct { + value *Version + isSet bool +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v NullableVersion) Get() *Version { + return v.value +} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +func (v *NullableVersion) Set(val *Version) { + 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 NullableVersion) 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 *NullableVersion) 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 NewNullableVersion(val *Version) *NullableVersion { + return &NullableVersion{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 NullableVersion) 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 *NullableVersion) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/model_version_test.go b/services/sqlserverflex/model_version_test.go new file mode 100644 index 000000000..4e3a58466 --- /dev/null +++ b/services/sqlserverflex/model_version_test.go @@ -0,0 +1,11 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sqlserverflex diff --git a/services/sqlserverflex/oas_commit b/services/sqlserverflex/oas_commit index 739d1f43e..be073bf26 100644 --- a/services/sqlserverflex/oas_commit +++ b/services/sqlserverflex/oas_commit @@ -1 +1 @@ -eeac709b40abdf42e3a23fe2992395cc03565a88 +72230b88b02a415757a997174c27da16db266be6 diff --git a/services/sqlserverflex/utils.go b/services/sqlserverflex/utils.go index 96520b326..38bc7f2aa 100644 --- a/services/sqlserverflex/utils.go +++ b/services/sqlserverflex/utils.go @@ -3,7 +3,7 @@ STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service -API version: 2.0.0 +API version: 3.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/sqlserverflex/v2api/api_default.go b/services/sqlserverflex/v2api/api_default.go index 38dd2e99b..36f2cf7aa 100644 --- a/services/sqlserverflex/v2api/api_default.go +++ b/services/sqlserverflex/v2api/api_default.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/api_default_mock.go b/services/sqlserverflex/v2api/api_default_mock.go index 82837b59b..bd0666408 100644 --- a/services/sqlserverflex/v2api/api_default_mock.go +++ b/services/sqlserverflex/v2api/api_default_mock.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/client.go b/services/sqlserverflex/v2api/client.go index 7d079d850..33eedb4e5 100644 --- a/services/sqlserverflex/v2api/client.go +++ b/services/sqlserverflex/v2api/client.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/configuration.go b/services/sqlserverflex/v2api/configuration.go index 17679dd97..c697a38e8 100644 --- a/services/sqlserverflex/v2api/configuration.go +++ b/services/sqlserverflex/v2api/configuration.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_acl.go b/services/sqlserverflex/v2api/model_acl.go index 52c918dbe..dd6ea332a 100644 --- a/services/sqlserverflex/v2api/model_acl.go +++ b/services/sqlserverflex/v2api/model_acl.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_backup.go b/services/sqlserverflex/v2api/model_backup.go index 7179b60f4..06d961864 100644 --- a/services/sqlserverflex/v2api/model_backup.go +++ b/services/sqlserverflex/v2api/model_backup.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_backup_list_backups_response_grouped.go b/services/sqlserverflex/v2api/model_backup_list_backups_response_grouped.go index 507a7904d..3b86f89b0 100644 --- a/services/sqlserverflex/v2api/model_backup_list_backups_response_grouped.go +++ b/services/sqlserverflex/v2api/model_backup_list_backups_response_grouped.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_create_database_payload.go b/services/sqlserverflex/v2api/model_create_database_payload.go index 6b9ef2d8b..d8c7f2b58 100644 --- a/services/sqlserverflex/v2api/model_create_database_payload.go +++ b/services/sqlserverflex/v2api/model_create_database_payload.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_create_database_response.go b/services/sqlserverflex/v2api/model_create_database_response.go index 47025d751..0ca31adba 100644 --- a/services/sqlserverflex/v2api/model_create_database_response.go +++ b/services/sqlserverflex/v2api/model_create_database_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_create_instance_payload.go b/services/sqlserverflex/v2api/model_create_instance_payload.go index 68a24778e..cec169465 100644 --- a/services/sqlserverflex/v2api/model_create_instance_payload.go +++ b/services/sqlserverflex/v2api/model_create_instance_payload.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_create_instance_response.go b/services/sqlserverflex/v2api/model_create_instance_response.go index 2c88f5d01..0131c17ac 100644 --- a/services/sqlserverflex/v2api/model_create_instance_response.go +++ b/services/sqlserverflex/v2api/model_create_instance_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_create_user_payload.go b/services/sqlserverflex/v2api/model_create_user_payload.go index 3f0d499ba..ec65819b2 100644 --- a/services/sqlserverflex/v2api/model_create_user_payload.go +++ b/services/sqlserverflex/v2api/model_create_user_payload.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_create_user_response.go b/services/sqlserverflex/v2api/model_create_user_response.go index a8414810b..472b079f7 100644 --- a/services/sqlserverflex/v2api/model_create_user_response.go +++ b/services/sqlserverflex/v2api/model_create_user_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_data_point.go b/services/sqlserverflex/v2api/model_data_point.go index 845026e50..22aad61d2 100644 --- a/services/sqlserverflex/v2api/model_data_point.go +++ b/services/sqlserverflex/v2api/model_data_point.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_database.go b/services/sqlserverflex/v2api/model_database.go index f5d3f3c62..3cc281c3a 100644 --- a/services/sqlserverflex/v2api/model_database.go +++ b/services/sqlserverflex/v2api/model_database.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_database_documentation_create_database_request_options.go b/services/sqlserverflex/v2api/model_database_documentation_create_database_request_options.go index 1ffda5128..50e12882c 100644 --- a/services/sqlserverflex/v2api/model_database_documentation_create_database_request_options.go +++ b/services/sqlserverflex/v2api/model_database_documentation_create_database_request_options.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_database_options.go b/services/sqlserverflex/v2api/model_database_options.go index 1bbcf0f32..71539cfdc 100644 --- a/services/sqlserverflex/v2api/model_database_options.go +++ b/services/sqlserverflex/v2api/model_database_options.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_flavor.go b/services/sqlserverflex/v2api/model_flavor.go index 5135f429d..49bd4eb8e 100644 --- a/services/sqlserverflex/v2api/model_flavor.go +++ b/services/sqlserverflex/v2api/model_flavor.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_get_backup_response.go b/services/sqlserverflex/v2api/model_get_backup_response.go index c4f5b6910..a5dea3383 100644 --- a/services/sqlserverflex/v2api/model_get_backup_response.go +++ b/services/sqlserverflex/v2api/model_get_backup_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_get_database_response.go b/services/sqlserverflex/v2api/model_get_database_response.go index e371578bf..831a341a3 100644 --- a/services/sqlserverflex/v2api/model_get_database_response.go +++ b/services/sqlserverflex/v2api/model_get_database_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_get_instance_response.go b/services/sqlserverflex/v2api/model_get_instance_response.go index 51a9d023e..0dd73439f 100644 --- a/services/sqlserverflex/v2api/model_get_instance_response.go +++ b/services/sqlserverflex/v2api/model_get_instance_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_get_user_response.go b/services/sqlserverflex/v2api/model_get_user_response.go index 9265db1f9..f9d94e5ee 100644 --- a/services/sqlserverflex/v2api/model_get_user_response.go +++ b/services/sqlserverflex/v2api/model_get_user_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_host.go b/services/sqlserverflex/v2api/model_host.go index 1a1422f0d..3dc17c1b9 100644 --- a/services/sqlserverflex/v2api/model_host.go +++ b/services/sqlserverflex/v2api/model_host.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_host_metric.go b/services/sqlserverflex/v2api/model_host_metric.go index a0fff6722..c69147d69 100644 --- a/services/sqlserverflex/v2api/model_host_metric.go +++ b/services/sqlserverflex/v2api/model_host_metric.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_instance.go b/services/sqlserverflex/v2api/model_instance.go index f413c900e..df5e74ece 100644 --- a/services/sqlserverflex/v2api/model_instance.go +++ b/services/sqlserverflex/v2api/model_instance.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_instance_documentation_acl.go b/services/sqlserverflex/v2api/model_instance_documentation_acl.go index f5b2b85e6..ba45ff249 100644 --- a/services/sqlserverflex/v2api/model_instance_documentation_acl.go +++ b/services/sqlserverflex/v2api/model_instance_documentation_acl.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_instance_documentation_options.go b/services/sqlserverflex/v2api/model_instance_documentation_options.go index 94a9ad4b6..743064a03 100644 --- a/services/sqlserverflex/v2api/model_instance_documentation_options.go +++ b/services/sqlserverflex/v2api/model_instance_documentation_options.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_instance_documentation_storage.go b/services/sqlserverflex/v2api/model_instance_documentation_storage.go index d5d3487d4..69586fc3a 100644 --- a/services/sqlserverflex/v2api/model_instance_documentation_storage.go +++ b/services/sqlserverflex/v2api/model_instance_documentation_storage.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_instance_error.go b/services/sqlserverflex/v2api/model_instance_error.go index 01baa346c..58813d19c 100644 --- a/services/sqlserverflex/v2api/model_instance_error.go +++ b/services/sqlserverflex/v2api/model_instance_error.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_instance_flavor_entry.go b/services/sqlserverflex/v2api/model_instance_flavor_entry.go index 67b445655..735c00f9d 100644 --- a/services/sqlserverflex/v2api/model_instance_flavor_entry.go +++ b/services/sqlserverflex/v2api/model_instance_flavor_entry.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_instance_list_instance.go b/services/sqlserverflex/v2api/model_instance_list_instance.go index 28a05dc97..fb1bd5506 100644 --- a/services/sqlserverflex/v2api/model_instance_list_instance.go +++ b/services/sqlserverflex/v2api/model_instance_list_instance.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_instance_list_user.go b/services/sqlserverflex/v2api/model_instance_list_user.go index 34a4629d0..046626557 100644 --- a/services/sqlserverflex/v2api/model_instance_list_user.go +++ b/services/sqlserverflex/v2api/model_instance_list_user.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_list_backups_response.go b/services/sqlserverflex/v2api/model_list_backups_response.go index 4d30317fc..0a030da18 100644 --- a/services/sqlserverflex/v2api/model_list_backups_response.go +++ b/services/sqlserverflex/v2api/model_list_backups_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_list_collations_response.go b/services/sqlserverflex/v2api/model_list_collations_response.go index c42566228..1f73789a9 100644 --- a/services/sqlserverflex/v2api/model_list_collations_response.go +++ b/services/sqlserverflex/v2api/model_list_collations_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_list_compatibility_response.go b/services/sqlserverflex/v2api/model_list_compatibility_response.go index fc57912f0..09e2217c5 100644 --- a/services/sqlserverflex/v2api/model_list_compatibility_response.go +++ b/services/sqlserverflex/v2api/model_list_compatibility_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_list_databases_response.go b/services/sqlserverflex/v2api/model_list_databases_response.go index cfe02b528..2211d7662 100644 --- a/services/sqlserverflex/v2api/model_list_databases_response.go +++ b/services/sqlserverflex/v2api/model_list_databases_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_list_flavors_response.go b/services/sqlserverflex/v2api/model_list_flavors_response.go index 2030e605a..2eed48cbd 100644 --- a/services/sqlserverflex/v2api/model_list_flavors_response.go +++ b/services/sqlserverflex/v2api/model_list_flavors_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_list_instances_response.go b/services/sqlserverflex/v2api/model_list_instances_response.go index 8b5147142..33f07eeb3 100644 --- a/services/sqlserverflex/v2api/model_list_instances_response.go +++ b/services/sqlserverflex/v2api/model_list_instances_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_list_metrics_response.go b/services/sqlserverflex/v2api/model_list_metrics_response.go index e9308b25b..825aeb41d 100644 --- a/services/sqlserverflex/v2api/model_list_metrics_response.go +++ b/services/sqlserverflex/v2api/model_list_metrics_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_list_restore_jobs_response.go b/services/sqlserverflex/v2api/model_list_restore_jobs_response.go index 378c56157..274ac251c 100644 --- a/services/sqlserverflex/v2api/model_list_restore_jobs_response.go +++ b/services/sqlserverflex/v2api/model_list_restore_jobs_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_list_roles_response.go b/services/sqlserverflex/v2api/model_list_roles_response.go index 00f8b75b2..5cf82219a 100644 --- a/services/sqlserverflex/v2api/model_list_roles_response.go +++ b/services/sqlserverflex/v2api/model_list_roles_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_list_storages_response.go b/services/sqlserverflex/v2api/model_list_storages_response.go index 472adaf23..3319b3c62 100644 --- a/services/sqlserverflex/v2api/model_list_storages_response.go +++ b/services/sqlserverflex/v2api/model_list_storages_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_list_users_response.go b/services/sqlserverflex/v2api/model_list_users_response.go index 12643761c..0c6904b1b 100644 --- a/services/sqlserverflex/v2api/model_list_users_response.go +++ b/services/sqlserverflex/v2api/model_list_users_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_list_versions_response.go b/services/sqlserverflex/v2api/model_list_versions_response.go index b1b2e6061..81d115c21 100644 --- a/services/sqlserverflex/v2api/model_list_versions_response.go +++ b/services/sqlserverflex/v2api/model_list_versions_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_mssql_database_collation.go b/services/sqlserverflex/v2api/model_mssql_database_collation.go index 3bf749b88..9fdc3d3db 100644 --- a/services/sqlserverflex/v2api/model_mssql_database_collation.go +++ b/services/sqlserverflex/v2api/model_mssql_database_collation.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_mssql_database_compatibility.go b/services/sqlserverflex/v2api/model_mssql_database_compatibility.go index 287bff75e..c1272192d 100644 --- a/services/sqlserverflex/v2api/model_mssql_database_compatibility.go +++ b/services/sqlserverflex/v2api/model_mssql_database_compatibility.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_partial_update_instance_payload.go b/services/sqlserverflex/v2api/model_partial_update_instance_payload.go index 08616c966..1bc63cfe6 100644 --- a/services/sqlserverflex/v2api/model_partial_update_instance_payload.go +++ b/services/sqlserverflex/v2api/model_partial_update_instance_payload.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_reset_user_response.go b/services/sqlserverflex/v2api/model_reset_user_response.go index 429e44cbd..16988b173 100644 --- a/services/sqlserverflex/v2api/model_reset_user_response.go +++ b/services/sqlserverflex/v2api/model_reset_user_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_restore_running_restore.go b/services/sqlserverflex/v2api/model_restore_running_restore.go index 97a851924..2fe176a54 100644 --- a/services/sqlserverflex/v2api/model_restore_running_restore.go +++ b/services/sqlserverflex/v2api/model_restore_running_restore.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_single_database.go b/services/sqlserverflex/v2api/model_single_database.go index 7ae34241f..d207ebe45 100644 --- a/services/sqlserverflex/v2api/model_single_database.go +++ b/services/sqlserverflex/v2api/model_single_database.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_single_user.go b/services/sqlserverflex/v2api/model_single_user.go index c64f6fe3f..016a8e777 100644 --- a/services/sqlserverflex/v2api/model_single_user.go +++ b/services/sqlserverflex/v2api/model_single_user.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_storage.go b/services/sqlserverflex/v2api/model_storage.go index da4e6ff77..3b7f3e7b0 100644 --- a/services/sqlserverflex/v2api/model_storage.go +++ b/services/sqlserverflex/v2api/model_storage.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_storage_range.go b/services/sqlserverflex/v2api/model_storage_range.go index 5ececcce5..0cde34cb1 100644 --- a/services/sqlserverflex/v2api/model_storage_range.go +++ b/services/sqlserverflex/v2api/model_storage_range.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_trigger_database_restore_payload.go b/services/sqlserverflex/v2api/model_trigger_database_restore_payload.go index 21fb59711..b2d226448 100644 --- a/services/sqlserverflex/v2api/model_trigger_database_restore_payload.go +++ b/services/sqlserverflex/v2api/model_trigger_database_restore_payload.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_type.go b/services/sqlserverflex/v2api/model_type.go index 111d24731..fcd5a73bc 100644 --- a/services/sqlserverflex/v2api/model_type.go +++ b/services/sqlserverflex/v2api/model_type.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_update_instance_payload.go b/services/sqlserverflex/v2api/model_update_instance_payload.go index c12270101..c366a6344 100644 --- a/services/sqlserverflex/v2api/model_update_instance_payload.go +++ b/services/sqlserverflex/v2api/model_update_instance_payload.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_update_instance_response.go b/services/sqlserverflex/v2api/model_update_instance_response.go index fa2c6d5ec..d393a5883 100644 --- a/services/sqlserverflex/v2api/model_update_instance_response.go +++ b/services/sqlserverflex/v2api/model_update_instance_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_user.go b/services/sqlserverflex/v2api/model_user.go index bc12f677d..cd82d3587 100644 --- a/services/sqlserverflex/v2api/model_user.go +++ b/services/sqlserverflex/v2api/model_user.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/model_user_response_user.go b/services/sqlserverflex/v2api/model_user_response_user.go index 97af39052..4729d9811 100644 --- a/services/sqlserverflex/v2api/model_user_response_user.go +++ b/services/sqlserverflex/v2api/model_user_response_user.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/response.go b/services/sqlserverflex/v2api/response.go index 4944a8473..6cfcd73b8 100644 --- a/services/sqlserverflex/v2api/response.go +++ b/services/sqlserverflex/v2api/response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v2api/utils.go b/services/sqlserverflex/v2api/utils.go index 6d92a2cc0..9ed6d1b27 100644 --- a/services/sqlserverflex/v2api/utils.go +++ b/services/sqlserverflex/v2api/utils.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +> **⚠️ DEPRECATION NOTICE** > > **Version 2 of this API is deprecated but remains fully supported.** > We strongly recommend migrating to [Version 3 (v3)](https://docs.api.stackit.cloud/documentation/mssql-flex-service/version/v3) for all new integrations to take advantage of the latest features. > > End-of-life (EOL) for v2 is planned for 2027. API version: 2.0.0 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3api/api_default.go b/services/sqlserverflex/v3api/api_default.go new file mode 100644 index 000000000..02033fac6 --- /dev/null +++ b/services/sqlserverflex/v3api/api_default.go @@ -0,0 +1,5909 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v3api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + + "github.com/stackitcloud/stackit-sdk-go/core/config" + "github.com/stackitcloud/stackit-sdk-go/core/oapierror" +) + +type DefaultAPI interface { + + /* + CreateDatabase Create Database + + Create database for a user. Note: The name of a valid user must be provided in the 'options' map field using the key 'owner' + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiCreateDatabaseRequest + */ + CreateDatabase(ctx context.Context, projectId string, region string, instanceId string) ApiCreateDatabaseRequest + + // CreateDatabaseExecute executes the request + // @return CreateDatabaseResponse + CreateDatabaseExecute(r ApiCreateDatabaseRequest) (*CreateDatabaseResponse, error) + + /* + CreateInstance Create Instance + + Create a new instance of a sqlserver database instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @return ApiCreateInstanceRequest + */ + CreateInstance(ctx context.Context, projectId string, region string) ApiCreateInstanceRequest + + // CreateInstanceExecute executes the request + // @return CreateInstanceResponse + CreateInstanceExecute(r ApiCreateInstanceRequest) (*CreateInstanceResponse, error) + + /* + CreateUser Create User + + Create user for an instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiCreateUserRequest + */ + CreateUser(ctx context.Context, projectId string, region string, instanceId string) ApiCreateUserRequest + + // CreateUserExecute executes the request + // @return CreateUserResponse + CreateUserExecute(r ApiCreateUserRequest) (*CreateUserResponse, error) + + /* + DeleteDatabase Delete Database + + Delete database for an instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @param databaseName The name of the database. + @return ApiDeleteDatabaseRequest + */ + DeleteDatabase(ctx context.Context, projectId string, region string, instanceId string, databaseName string) ApiDeleteDatabaseRequest + + // DeleteDatabaseExecute executes the request + DeleteDatabaseExecute(r ApiDeleteDatabaseRequest) error + + /* + DeleteInstance Delete Instance + + Delete an available sqlserver instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiDeleteInstanceRequest + */ + DeleteInstance(ctx context.Context, projectId string, region string, instanceId string) ApiDeleteInstanceRequest + + // DeleteInstanceExecute executes the request + DeleteInstanceExecute(r ApiDeleteInstanceRequest) error + + /* + DeleteUser Delete User + + Delete an user from a specific instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @param userId The ID of the user. + @return ApiDeleteUserRequest + */ + DeleteUser(ctx context.Context, projectId string, region string, instanceId string, userId int64) ApiDeleteUserRequest + + // DeleteUserExecute executes the request + DeleteUserExecute(r ApiDeleteUserRequest) error + + /* + GetBackup Get specific backup + + Get information about a specific backup for an instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @param backupId The ID of the backup. + @return ApiGetBackupRequest + */ + GetBackup(ctx context.Context, projectId string, region string, instanceId string, backupId int64) ApiGetBackupRequest + + // GetBackupExecute executes the request + // @return GetBackupResponse + GetBackupExecute(r ApiGetBackupRequest) (*GetBackupResponse, error) + + /* + GetDatabase Get Database + + Get specific available database + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @param databaseName The name of the database. + @return ApiGetDatabaseRequest + */ + GetDatabase(ctx context.Context, projectId string, region string, instanceId string, databaseName string) ApiGetDatabaseRequest + + // GetDatabaseExecute executes the request + // @return GetDatabaseResponse + GetDatabaseExecute(r ApiGetDatabaseRequest) (*GetDatabaseResponse, error) + + /* + GetInstance Get Specific Instance + + Get information about a specific available instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiGetInstanceRequest + */ + GetInstance(ctx context.Context, projectId string, region string, instanceId string) ApiGetInstanceRequest + + // GetInstanceExecute executes the request + // @return GetInstanceResponse + GetInstanceExecute(r ApiGetInstanceRequest) (*GetInstanceResponse, error) + + /* + GetUser Get User + + Get a specific available user for an instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @param userId The ID of the user. + @return ApiGetUserRequest + */ + GetUser(ctx context.Context, projectId string, region string, instanceId string, userId int64) ApiGetUserRequest + + // GetUserExecute executes the request + // @return GetUserResponse + GetUserExecute(r ApiGetUserRequest) (*GetUserResponse, error) + + /* + ListBackups List backups + + List all backups which are available for a specific instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiListBackupsRequest + */ + ListBackups(ctx context.Context, projectId string, region string, instanceId string) ApiListBackupsRequest + + // ListBackupsExecute executes the request + // @return ListBackupResponse + ListBackupsExecute(r ApiListBackupsRequest) (*ListBackupResponse, error) + + /* + ListCollations Get database collation list + + Returns a list of collations for an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiListCollationsRequest + */ + ListCollations(ctx context.Context, projectId string, region string, instanceId string) ApiListCollationsRequest + + // ListCollationsExecute executes the request + // @return ListCollationsResponse + ListCollationsExecute(r ApiListCollationsRequest) (*ListCollationsResponse, error) + + /* + ListCompatibilities Get database compatibility list + + Returns a list of compatibility levels for creating a new database + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiListCompatibilitiesRequest + */ + ListCompatibilities(ctx context.Context, projectId string, region string, instanceId string) ApiListCompatibilitiesRequest + + // ListCompatibilitiesExecute executes the request + // @return ListCompatibilityResponse + ListCompatibilitiesExecute(r ApiListCompatibilitiesRequest) (*ListCompatibilityResponse, error) + + /* + ListCurrentRunningRestoreJobs List current running restore jobs + + List all currently running restore jobs which are available for a specific instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiListCurrentRunningRestoreJobsRequest + */ + ListCurrentRunningRestoreJobs(ctx context.Context, projectId string, region string, instanceId string) ApiListCurrentRunningRestoreJobsRequest + + // ListCurrentRunningRestoreJobsExecute executes the request + // @return ListCurrentRunningRestoreJobs + ListCurrentRunningRestoreJobsExecute(r ApiListCurrentRunningRestoreJobsRequest) (*ListCurrentRunningRestoreJobs, error) + + /* + ListDatabases List Databases + + List available databases for an instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiListDatabasesRequest + */ + ListDatabases(ctx context.Context, projectId string, region string, instanceId string) ApiListDatabasesRequest + + // ListDatabasesExecute executes the request + // @return ListDatabasesResponse + ListDatabasesExecute(r ApiListDatabasesRequest) (*ListDatabasesResponse, error) + + /* + ListFlavors Get Flavors + + Get all available flavors for a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @return ApiListFlavorsRequest + */ + ListFlavors(ctx context.Context, projectId string, region string) ApiListFlavorsRequest + + // ListFlavorsExecute executes the request + // @return ListFlavorsResponse + ListFlavorsExecute(r ApiListFlavorsRequest) (*ListFlavorsResponse, error) + + /* + ListInstances List Instances + + List all available instances for your project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @return ApiListInstancesRequest + */ + ListInstances(ctx context.Context, projectId string, region string) ApiListInstancesRequest + + // ListInstancesExecute executes the request + // @return ListInstancesResponse + ListInstancesExecute(r ApiListInstancesRequest) (*ListInstancesResponse, error) + + /* + ListRoles List Roles + + List available roles for an instance that can be assigned to a user + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiListRolesRequest + */ + ListRoles(ctx context.Context, projectId string, region string, instanceId string) ApiListRolesRequest + + // ListRolesExecute executes the request + // @return ListRolesResponse + ListRolesExecute(r ApiListRolesRequest) (*ListRolesResponse, error) + + /* + ListStorages Get Storages + + Get available storages for a specific flavor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param flavorId The id of an instance flavor. + @return ApiListStoragesRequest + */ + ListStorages(ctx context.Context, projectId string, region string, flavorId string) ApiListStoragesRequest + + // ListStoragesExecute executes the request + // @return ListStoragesResponse + ListStoragesExecute(r ApiListStoragesRequest) (*ListStoragesResponse, error) + + /* + ListUsers List Users + + List available users for an instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiListUsersRequest + */ + ListUsers(ctx context.Context, projectId string, region string, instanceId string) ApiListUsersRequest + + // ListUsersExecute executes the request + // @return ListUserResponse + ListUsersExecute(r ApiListUsersRequest) (*ListUserResponse, error) + + /* + ListVersions Get Versions + + Get the sqlserver available versions for the project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @return ApiListVersionsRequest + */ + ListVersions(ctx context.Context, projectId string, region string) ApiListVersionsRequest + + // ListVersionsExecute executes the request + // @return ListVersionsResponse + ListVersionsExecute(r ApiListVersionsRequest) (*ListVersionsResponse, error) + + /* + PartialUpdateInstance Update Instance Partially + + Update an available instance of a mssql database. No fields are required. + + **Please note that any changes applied via PUT or PATCH requests will initiate a reboot of the SQL Server Flex Instance.** + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiPartialUpdateInstanceRequest + */ + PartialUpdateInstance(ctx context.Context, projectId string, region string, instanceId string) ApiPartialUpdateInstanceRequest + + // PartialUpdateInstanceExecute executes the request + PartialUpdateInstanceExecute(r ApiPartialUpdateInstanceRequest) error + + /* + ResetUser Reset User + + Reset an user from an specific instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @param userId The ID of the user. + @return ApiResetUserRequest + */ + ResetUser(ctx context.Context, projectId string, region string, instanceId string, userId int64) ApiResetUserRequest + + // ResetUserExecute executes the request + // @return ResetUserResponse + ResetUserExecute(r ApiResetUserRequest) (*ResetUserResponse, error) + + /* + RestoreDatabaseFromBackup Create a Restore Operation + + Triggers a new restore operation for the specified instance. + The request body defines the source + (e.g., internal backup, external S3) and the target database. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiRestoreDatabaseFromBackupRequest + */ + RestoreDatabaseFromBackup(ctx context.Context, projectId string, region string, instanceId string) ApiRestoreDatabaseFromBackupRequest + + // RestoreDatabaseFromBackupExecute executes the request + RestoreDatabaseFromBackupExecute(r ApiRestoreDatabaseFromBackupRequest) error + + /* + TriggerBackup Trigger backup for a specific Database + + Trigger backup for a specific database + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @param databaseName The name of the database. + @return ApiTriggerBackupRequest + */ + TriggerBackup(ctx context.Context, projectId string, region string, instanceId string, databaseName string) ApiTriggerBackupRequest + + // TriggerBackupExecute executes the request + TriggerBackupExecute(r ApiTriggerBackupRequest) error + + /* + TriggerRestore Trigger restore for a specific Database + + Trigger restore for a specific Database + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @param databaseName The name of the database. + @return ApiTriggerRestoreRequest + */ + TriggerRestore(ctx context.Context, projectId string, region string, instanceId string, databaseName string) ApiTriggerRestoreRequest + + // TriggerRestoreExecute executes the request + TriggerRestoreExecute(r ApiTriggerRestoreRequest) error + + /* + UpdateInstance Update Instance + + Updates an available instance of a sqlserver database + + **Please note that any changes applied via PUT or PATCH requests will initiate a reboot of the SQL Server Flex Instance.** + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiUpdateInstanceRequest + */ + UpdateInstance(ctx context.Context, projectId string, region string, instanceId string) ApiUpdateInstanceRequest + + // UpdateInstanceExecute executes the request + UpdateInstanceExecute(r ApiUpdateInstanceRequest) error + + /* + UpdateInstanceProtection Protect Instance + + Toggle the deletion protection for an instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiUpdateInstanceProtectionRequest + */ + UpdateInstanceProtection(ctx context.Context, projectId string, region string, instanceId string) ApiUpdateInstanceProtectionRequest + + // UpdateInstanceProtectionExecute executes the request + // @return UpdateInstanceProtectionResponse + UpdateInstanceProtectionExecute(r ApiUpdateInstanceProtectionRequest) (*UpdateInstanceProtectionResponse, error) +} + +// DefaultAPIService DefaultAPI service +type DefaultAPIService service + +type ApiCreateDatabaseRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string + createDatabasePayload *CreateDatabasePayload +} + +// The request body containing the information for the new database. +func (r ApiCreateDatabaseRequest) CreateDatabasePayload(createDatabasePayload CreateDatabasePayload) ApiCreateDatabaseRequest { + r.createDatabasePayload = &createDatabasePayload + return r +} + +func (r ApiCreateDatabaseRequest) Execute() (*CreateDatabaseResponse, error) { + return r.ApiService.CreateDatabaseExecute(r) +} + +/* +CreateDatabase Create Database + +Create database for a user. Note: The name of a valid user must be provided in the 'options' map field using the key 'owner' + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiCreateDatabaseRequest +*/ +func (a *DefaultAPIService) CreateDatabase(ctx context.Context, projectId string, region string, instanceId string) ApiCreateDatabaseRequest { + return ApiCreateDatabaseRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return CreateDatabaseResponse +func (a *DefaultAPIService) CreateDatabaseExecute(r ApiCreateDatabaseRequest) (*CreateDatabaseResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateDatabaseResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateDatabase") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/databases" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createDatabasePayload == nil { + return localVarReturnValue, reportError("createDatabasePayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createDatabasePayload + 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 Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiCreateInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + createInstancePayload *CreateInstancePayload +} + +// The request body with the parameters for the instance creation. Every parameter is required. +func (r ApiCreateInstanceRequest) CreateInstancePayload(createInstancePayload CreateInstancePayload) ApiCreateInstanceRequest { + r.createInstancePayload = &createInstancePayload + return r +} + +func (r ApiCreateInstanceRequest) Execute() (*CreateInstanceResponse, error) { + return r.ApiService.CreateInstanceExecute(r) +} + +/* +CreateInstance Create Instance + +Create a new instance of a sqlserver database instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @return ApiCreateInstanceRequest +*/ +func (a *DefaultAPIService) CreateInstance(ctx context.Context, projectId string, region string) ApiCreateInstanceRequest { + return ApiCreateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return CreateInstanceResponse +func (a *DefaultAPIService) CreateInstanceExecute(r ApiCreateInstanceRequest) (*CreateInstanceResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateInstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateInstance") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createInstancePayload == nil { + return localVarReturnValue, reportError("createInstancePayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createInstancePayload + 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 Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiCreateUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string + createUserPayload *CreateUserPayload +} + +// The request body containing the user details. +func (r ApiCreateUserRequest) CreateUserPayload(createUserPayload CreateUserPayload) ApiCreateUserRequest { + r.createUserPayload = &createUserPayload + return r +} + +func (r ApiCreateUserRequest) Execute() (*CreateUserResponse, error) { + return r.ApiService.CreateUserExecute(r) +} + +/* +CreateUser Create User + +Create user for an instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiCreateUserRequest +*/ +func (a *DefaultAPIService) CreateUser(ctx context.Context, projectId string, region string, instanceId string) ApiCreateUserRequest { + return ApiCreateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return CreateUserResponse +func (a *DefaultAPIService) CreateUserExecute(r ApiCreateUserRequest) (*CreateUserResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateUserResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateUser") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createUserPayload == nil { + return localVarReturnValue, reportError("createUserPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createUserPayload + 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 Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiDeleteDatabaseRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string + databaseName string +} + +func (r ApiDeleteDatabaseRequest) Execute() error { + return r.ApiService.DeleteDatabaseExecute(r) +} + +/* +DeleteDatabase Delete Database + +Delete database for an instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @param databaseName The name of the database. + @return ApiDeleteDatabaseRequest +*/ +func (a *DefaultAPIService) DeleteDatabase(ctx context.Context, projectId string, region string, instanceId string, databaseName string) ApiDeleteDatabaseRequest { + return ApiDeleteDatabaseRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + databaseName: databaseName, + } +} + +// Execute executes the request +func (a *DefaultAPIService) DeleteDatabaseExecute(r ApiDeleteDatabaseRequest) error { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteDatabase") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/databases/{databaseName}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"databaseName"+"}", url.PathEscape(parameterValueToString(r.databaseName, "databaseName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // 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 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 err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return newErr + } + + return nil +} + +type ApiDeleteInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string +} + +func (r ApiDeleteInstanceRequest) Execute() error { + return r.ApiService.DeleteInstanceExecute(r) +} + +/* +DeleteInstance Delete Instance + +Delete an available sqlserver instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiDeleteInstanceRequest +*/ +func (a *DefaultAPIService) DeleteInstance(ctx context.Context, projectId string, region string, instanceId string) ApiDeleteInstanceRequest { + return ApiDeleteInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) DeleteInstanceExecute(r ApiDeleteInstanceRequest) error { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteInstance") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // 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 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 err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return newErr + } + + return nil +} + +type ApiDeleteUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string + userId int64 +} + +func (r ApiDeleteUserRequest) Execute() error { + return r.ApiService.DeleteUserExecute(r) +} + +/* +DeleteUser Delete User + +Delete an user from a specific instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @param userId The ID of the user. + @return ApiDeleteUserRequest +*/ +func (a *DefaultAPIService) DeleteUser(ctx context.Context, projectId string, region string, instanceId string, userId int64) ApiDeleteUserRequest { + return ApiDeleteUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + userId: userId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) DeleteUserExecute(r ApiDeleteUserRequest) error { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteUser") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // 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 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 err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return newErr + } + + return nil +} + +type ApiGetBackupRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string + backupId int64 +} + +func (r ApiGetBackupRequest) Execute() (*GetBackupResponse, error) { + return r.ApiService.GetBackupExecute(r) +} + +/* +GetBackup Get specific backup + +Get information about a specific backup for an instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @param backupId The ID of the backup. + @return ApiGetBackupRequest +*/ +func (a *DefaultAPIService) GetBackup(ctx context.Context, projectId string, region string, instanceId string, backupId int64) ApiGetBackupRequest { + return ApiGetBackupRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + backupId: backupId, + } +} + +// Execute executes the request +// +// @return GetBackupResponse +func (a *DefaultAPIService) GetBackupExecute(r ApiGetBackupRequest) (*GetBackupResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetBackupResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetBackup") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/backups/{backupId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"backupId"+"}", url.PathEscape(parameterValueToString(r.backupId, "backupId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // 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 Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiGetDatabaseRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string + databaseName string +} + +func (r ApiGetDatabaseRequest) Execute() (*GetDatabaseResponse, error) { + return r.ApiService.GetDatabaseExecute(r) +} + +/* +GetDatabase Get Database + +Get specific available database + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @param databaseName The name of the database. + @return ApiGetDatabaseRequest +*/ +func (a *DefaultAPIService) GetDatabase(ctx context.Context, projectId string, region string, instanceId string, databaseName string) ApiGetDatabaseRequest { + return ApiGetDatabaseRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + databaseName: databaseName, + } +} + +// Execute executes the request +// +// @return GetDatabaseResponse +func (a *DefaultAPIService) GetDatabaseExecute(r ApiGetDatabaseRequest) (*GetDatabaseResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetDatabaseResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetDatabase") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/databases/{databaseName}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"databaseName"+"}", url.PathEscape(parameterValueToString(r.databaseName, "databaseName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // 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 Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiGetInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string +} + +func (r ApiGetInstanceRequest) Execute() (*GetInstanceResponse, error) { + return r.ApiService.GetInstanceExecute(r) +} + +/* +GetInstance Get Specific Instance + +Get information about a specific available instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiGetInstanceRequest +*/ +func (a *DefaultAPIService) GetInstance(ctx context.Context, projectId string, region string, instanceId string) ApiGetInstanceRequest { + return ApiGetInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return GetInstanceResponse +func (a *DefaultAPIService) GetInstanceExecute(r ApiGetInstanceRequest) (*GetInstanceResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetInstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetInstance") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // 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 Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiGetUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string + userId int64 +} + +func (r ApiGetUserRequest) Execute() (*GetUserResponse, error) { + return r.ApiService.GetUserExecute(r) +} + +/* +GetUser Get User + +Get a specific available user for an instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @param userId The ID of the user. + @return ApiGetUserRequest +*/ +func (a *DefaultAPIService) GetUser(ctx context.Context, projectId string, region string, instanceId string, userId int64) ApiGetUserRequest { + return ApiGetUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + userId: userId, + } +} + +// Execute executes the request +// +// @return GetUserResponse +func (a *DefaultAPIService) GetUserExecute(r ApiGetUserRequest) (*GetUserResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetUserResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetUser") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // 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 Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListBackupsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string + page *int64 + size *int64 + sort *BackupSort +} + +// Number of the page of items list to be returned. +func (r ApiListBackupsRequest) Page(page int64) ApiListBackupsRequest { + r.page = &page + return r +} + +// Number of items to be returned on each page. +func (r ApiListBackupsRequest) Size(size int64) ApiListBackupsRequest { + r.size = &size + return r +} + +// Sorting of the backups to be returned on each page. +func (r ApiListBackupsRequest) Sort(sort BackupSort) ApiListBackupsRequest { + r.sort = &sort + return r +} + +func (r ApiListBackupsRequest) Execute() (*ListBackupResponse, error) { + return r.ApiService.ListBackupsExecute(r) +} + +/* +ListBackups List backups + +List all backups which are available for a specific instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiListBackupsRequest +*/ +func (a *DefaultAPIService) ListBackups(ctx context.Context, projectId string, region string, instanceId string) ApiListBackupsRequest { + return ApiListBackupsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return ListBackupResponse +func (a *DefaultAPIService) ListBackupsExecute(r ApiListBackupsRequest) (*ListBackupResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListBackupResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListBackups") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/backups" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } else { + var defaultValue int64 = 1 + parameterAddToHeaderOrQuery(localVarQueryParams, "page", defaultValue, "form", "") + r.page = &defaultValue + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "form", "") + } else { + var defaultValue int64 = 10 + parameterAddToHeaderOrQuery(localVarQueryParams, "size", defaultValue, "form", "") + r.size = &defaultValue + } + if r.sort != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "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 Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListCollationsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string +} + +func (r ApiListCollationsRequest) Execute() (*ListCollationsResponse, error) { + return r.ApiService.ListCollationsExecute(r) +} + +/* +ListCollations Get database collation list + +Returns a list of collations for an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiListCollationsRequest +*/ +func (a *DefaultAPIService) ListCollations(ctx context.Context, projectId string, region string, instanceId string) ApiListCollationsRequest { + return ApiListCollationsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return ListCollationsResponse +func (a *DefaultAPIService) ListCollationsExecute(r ApiListCollationsRequest) (*ListCollationsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListCollationsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListCollations") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/collations" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // 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 Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListCompatibilitiesRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string +} + +func (r ApiListCompatibilitiesRequest) Execute() (*ListCompatibilityResponse, error) { + return r.ApiService.ListCompatibilitiesExecute(r) +} + +/* +ListCompatibilities Get database compatibility list + +Returns a list of compatibility levels for creating a new database + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiListCompatibilitiesRequest +*/ +func (a *DefaultAPIService) ListCompatibilities(ctx context.Context, projectId string, region string, instanceId string) ApiListCompatibilitiesRequest { + return ApiListCompatibilitiesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return ListCompatibilityResponse +func (a *DefaultAPIService) ListCompatibilitiesExecute(r ApiListCompatibilitiesRequest) (*ListCompatibilityResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListCompatibilityResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListCompatibilities") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/compatibility" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // 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 Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListCurrentRunningRestoreJobsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string +} + +func (r ApiListCurrentRunningRestoreJobsRequest) Execute() (*ListCurrentRunningRestoreJobs, error) { + return r.ApiService.ListCurrentRunningRestoreJobsExecute(r) +} + +/* +ListCurrentRunningRestoreJobs List current running restore jobs + +List all currently running restore jobs which are available for a specific instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiListCurrentRunningRestoreJobsRequest +*/ +func (a *DefaultAPIService) ListCurrentRunningRestoreJobs(ctx context.Context, projectId string, region string, instanceId string) ApiListCurrentRunningRestoreJobsRequest { + return ApiListCurrentRunningRestoreJobsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return ListCurrentRunningRestoreJobs +func (a *DefaultAPIService) ListCurrentRunningRestoreJobsExecute(r ApiListCurrentRunningRestoreJobsRequest) (*ListCurrentRunningRestoreJobs, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListCurrentRunningRestoreJobs + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListCurrentRunningRestoreJobs") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/restore-jobs" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // 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 Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListDatabasesRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string + page *int64 + size *int64 + sort *DatabaseSort +} + +// Number of the page of items list to be returned. +func (r ApiListDatabasesRequest) Page(page int64) ApiListDatabasesRequest { + r.page = &page + return r +} + +// Number of items to be returned on each page. +func (r ApiListDatabasesRequest) Size(size int64) ApiListDatabasesRequest { + r.size = &size + return r +} + +// Sorting of the databases to be returned on each page. +func (r ApiListDatabasesRequest) Sort(sort DatabaseSort) ApiListDatabasesRequest { + r.sort = &sort + return r +} + +func (r ApiListDatabasesRequest) Execute() (*ListDatabasesResponse, error) { + return r.ApiService.ListDatabasesExecute(r) +} + +/* +ListDatabases List Databases + +List available databases for an instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiListDatabasesRequest +*/ +func (a *DefaultAPIService) ListDatabases(ctx context.Context, projectId string, region string, instanceId string) ApiListDatabasesRequest { + return ApiListDatabasesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return ListDatabasesResponse +func (a *DefaultAPIService) ListDatabasesExecute(r ApiListDatabasesRequest) (*ListDatabasesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListDatabasesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListDatabases") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/databases" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } else { + var defaultValue int64 = 1 + parameterAddToHeaderOrQuery(localVarQueryParams, "page", defaultValue, "form", "") + r.page = &defaultValue + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "form", "") + } else { + var defaultValue int64 = 10 + parameterAddToHeaderOrQuery(localVarQueryParams, "size", defaultValue, "form", "") + r.size = &defaultValue + } + if r.sort != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "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 Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListFlavorsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + page *int64 + size *int64 + sort *FlavorSort +} + +// Number of the page of items list to be returned. +func (r ApiListFlavorsRequest) Page(page int64) ApiListFlavorsRequest { + r.page = &page + return r +} + +// Number of items to be returned on each page. +func (r ApiListFlavorsRequest) Size(size int64) ApiListFlavorsRequest { + r.size = &size + return r +} + +// Sorting of the flavors to be returned on each page. +func (r ApiListFlavorsRequest) Sort(sort FlavorSort) ApiListFlavorsRequest { + r.sort = &sort + return r +} + +func (r ApiListFlavorsRequest) Execute() (*ListFlavorsResponse, error) { + return r.ApiService.ListFlavorsExecute(r) +} + +/* +ListFlavors Get Flavors + +Get all available flavors for a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @return ApiListFlavorsRequest +*/ +func (a *DefaultAPIService) ListFlavors(ctx context.Context, projectId string, region string) ApiListFlavorsRequest { + return ApiListFlavorsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return ListFlavorsResponse +func (a *DefaultAPIService) ListFlavorsExecute(r ApiListFlavorsRequest) (*ListFlavorsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListFlavorsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListFlavors") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/flavors" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } else { + var defaultValue int64 = 1 + parameterAddToHeaderOrQuery(localVarQueryParams, "page", defaultValue, "form", "") + r.page = &defaultValue + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "form", "") + } else { + var defaultValue int64 = 10 + parameterAddToHeaderOrQuery(localVarQueryParams, "size", defaultValue, "form", "") + r.size = &defaultValue + } + if r.sort != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "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 Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListInstancesRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + page *int64 + size *int64 + sort *InstanceSort +} + +// Number of the page of items list to be returned. +func (r ApiListInstancesRequest) Page(page int64) ApiListInstancesRequest { + r.page = &page + return r +} + +// Number of items to be returned on each page. +func (r ApiListInstancesRequest) Size(size int64) ApiListInstancesRequest { + r.size = &size + return r +} + +// Sorting of the items to be returned on each page. +func (r ApiListInstancesRequest) Sort(sort InstanceSort) ApiListInstancesRequest { + r.sort = &sort + return r +} + +func (r ApiListInstancesRequest) Execute() (*ListInstancesResponse, error) { + return r.ApiService.ListInstancesExecute(r) +} + +/* +ListInstances List Instances + +List all available instances for your project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @return ApiListInstancesRequest +*/ +func (a *DefaultAPIService) ListInstances(ctx context.Context, projectId string, region string) ApiListInstancesRequest { + return ApiListInstancesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return ListInstancesResponse +func (a *DefaultAPIService) ListInstancesExecute(r ApiListInstancesRequest) (*ListInstancesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListInstancesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListInstances") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } else { + var defaultValue int64 = 1 + parameterAddToHeaderOrQuery(localVarQueryParams, "page", defaultValue, "form", "") + r.page = &defaultValue + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "form", "") + } else { + var defaultValue int64 = 10 + parameterAddToHeaderOrQuery(localVarQueryParams, "size", defaultValue, "form", "") + r.size = &defaultValue + } + if r.sort != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "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 Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListRolesRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string +} + +func (r ApiListRolesRequest) Execute() (*ListRolesResponse, error) { + return r.ApiService.ListRolesExecute(r) +} + +/* +ListRoles List Roles + +List available roles for an instance that can be assigned to a user + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiListRolesRequest +*/ +func (a *DefaultAPIService) ListRoles(ctx context.Context, projectId string, region string, instanceId string) ApiListRolesRequest { + return ApiListRolesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return ListRolesResponse +func (a *DefaultAPIService) ListRolesExecute(r ApiListRolesRequest) (*ListRolesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListRolesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListRoles") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/roles" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // 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 Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListStoragesRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + flavorId string +} + +func (r ApiListStoragesRequest) Execute() (*ListStoragesResponse, error) { + return r.ApiService.ListStoragesExecute(r) +} + +/* +ListStorages Get Storages + +Get available storages for a specific flavor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param flavorId The id of an instance flavor. + @return ApiListStoragesRequest +*/ +func (a *DefaultAPIService) ListStorages(ctx context.Context, projectId string, region string, flavorId string) ApiListStoragesRequest { + return ApiListStoragesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + flavorId: flavorId, + } +} + +// Execute executes the request +// +// @return ListStoragesResponse +func (a *DefaultAPIService) ListStoragesExecute(r ApiListStoragesRequest) (*ListStoragesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListStoragesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListStorages") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/storages/{flavorId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"flavorId"+"}", url.PathEscape(parameterValueToString(r.flavorId, "flavorId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // 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 Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListUsersRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string + page *int64 + size *int64 + sort *UserSort +} + +// Number of the page of items list to be returned. +func (r ApiListUsersRequest) Page(page int64) ApiListUsersRequest { + r.page = &page + return r +} + +// Number of items to be returned on each page. +func (r ApiListUsersRequest) Size(size int64) ApiListUsersRequest { + r.size = &size + return r +} + +// Sorting of the users to be returned on each page. +func (r ApiListUsersRequest) Sort(sort UserSort) ApiListUsersRequest { + r.sort = &sort + return r +} + +func (r ApiListUsersRequest) Execute() (*ListUserResponse, error) { + return r.ApiService.ListUsersExecute(r) +} + +/* +ListUsers List Users + +List available users for an instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiListUsersRequest +*/ +func (a *DefaultAPIService) ListUsers(ctx context.Context, projectId string, region string, instanceId string) ApiListUsersRequest { + return ApiListUsersRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return ListUserResponse +func (a *DefaultAPIService) ListUsersExecute(r ApiListUsersRequest) (*ListUserResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListUserResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListUsers") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } else { + var defaultValue int64 = 1 + parameterAddToHeaderOrQuery(localVarQueryParams, "page", defaultValue, "form", "") + r.page = &defaultValue + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "form", "") + } else { + var defaultValue int64 = 10 + parameterAddToHeaderOrQuery(localVarQueryParams, "size", defaultValue, "form", "") + r.size = &defaultValue + } + if r.sort != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sort", r.sort, "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 Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListVersionsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string +} + +func (r ApiListVersionsRequest) Execute() (*ListVersionsResponse, error) { + return r.ApiService.ListVersionsExecute(r) +} + +/* +ListVersions Get Versions + +Get the sqlserver available versions for the project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @return ApiListVersionsRequest +*/ +func (a *DefaultAPIService) ListVersions(ctx context.Context, projectId string, region string) ApiListVersionsRequest { + return ApiListVersionsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return ListVersionsResponse +func (a *DefaultAPIService) ListVersionsExecute(r ApiListVersionsRequest) (*ListVersionsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListVersionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListVersions") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/versions" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // 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 Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiPartialUpdateInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string + partialUpdateInstancePayload *PartialUpdateInstancePayload +} + +// The request body with the parameters for updating the instance. +func (r ApiPartialUpdateInstanceRequest) PartialUpdateInstancePayload(partialUpdateInstancePayload PartialUpdateInstancePayload) ApiPartialUpdateInstanceRequest { + r.partialUpdateInstancePayload = &partialUpdateInstancePayload + return r +} + +func (r ApiPartialUpdateInstanceRequest) Execute() error { + return r.ApiService.PartialUpdateInstanceExecute(r) +} + +/* +PartialUpdateInstance Update Instance Partially + +Update an available instance of a mssql database. No fields are required. + +**Please note that any changes applied via PUT or PATCH requests will initiate a reboot of the SQL Server Flex Instance.** + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiPartialUpdateInstanceRequest +*/ +func (a *DefaultAPIService) PartialUpdateInstance(ctx context.Context, projectId string, region string, instanceId string) ApiPartialUpdateInstanceRequest { + return ApiPartialUpdateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) PartialUpdateInstanceExecute(r ApiPartialUpdateInstanceRequest) error { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.PartialUpdateInstance") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.partialUpdateInstancePayload == nil { + return reportError("partialUpdateInstancePayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.partialUpdateInstancePayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return 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 err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return newErr + } + + return nil +} + +type ApiResetUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string + userId int64 +} + +func (r ApiResetUserRequest) Execute() (*ResetUserResponse, error) { + return r.ApiService.ResetUserExecute(r) +} + +/* +ResetUser Reset User + +Reset an user from an specific instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @param userId The ID of the user. + @return ApiResetUserRequest +*/ +func (a *DefaultAPIService) ResetUser(ctx context.Context, projectId string, region string, instanceId string, userId int64) ApiResetUserRequest { + return ApiResetUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + userId: userId, + } +} + +// Execute executes the request +// +// @return ResetUserResponse +func (a *DefaultAPIService) ResetUserExecute(r ApiResetUserRequest) (*ResetUserResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResetUserResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ResetUser") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}/reset" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // 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 Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiRestoreDatabaseFromBackupRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string + restoreDatabaseFromBackupPayload *RestoreDatabaseFromBackupPayload +} + +// The restore operation payload. +func (r ApiRestoreDatabaseFromBackupRequest) RestoreDatabaseFromBackupPayload(restoreDatabaseFromBackupPayload RestoreDatabaseFromBackupPayload) ApiRestoreDatabaseFromBackupRequest { + r.restoreDatabaseFromBackupPayload = &restoreDatabaseFromBackupPayload + return r +} + +func (r ApiRestoreDatabaseFromBackupRequest) Execute() error { + return r.ApiService.RestoreDatabaseFromBackupExecute(r) +} + +/* +RestoreDatabaseFromBackup Create a Restore Operation + +Triggers a new restore operation for the specified instance. +The request body defines the source +(e.g., internal backup, external S3) and the target database. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiRestoreDatabaseFromBackupRequest +*/ +func (a *DefaultAPIService) RestoreDatabaseFromBackup(ctx context.Context, projectId string, region string, instanceId string) ApiRestoreDatabaseFromBackupRequest { + return ApiRestoreDatabaseFromBackupRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) RestoreDatabaseFromBackupExecute(r ApiRestoreDatabaseFromBackupRequest) error { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.RestoreDatabaseFromBackup") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/restores" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.restoreDatabaseFromBackupPayload == nil { + return reportError("restoreDatabaseFromBackupPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.restoreDatabaseFromBackupPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return 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 err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return newErr + } + + return nil +} + +type ApiTriggerBackupRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string + databaseName string +} + +func (r ApiTriggerBackupRequest) Execute() error { + return r.ApiService.TriggerBackupExecute(r) +} + +/* +TriggerBackup Trigger backup for a specific Database + +Trigger backup for a specific database + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @param databaseName The name of the database. + @return ApiTriggerBackupRequest +*/ +func (a *DefaultAPIService) TriggerBackup(ctx context.Context, projectId string, region string, instanceId string, databaseName string) ApiTriggerBackupRequest { + return ApiTriggerBackupRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + databaseName: databaseName, + } +} + +// Execute executes the request +func (a *DefaultAPIService) TriggerBackupExecute(r ApiTriggerBackupRequest) error { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.TriggerBackup") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/backups/databases/{databaseName}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"databaseName"+"}", url.PathEscape(parameterValueToString(r.databaseName, "databaseName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // 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 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 err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return newErr + } + + return nil +} + +type ApiTriggerRestoreRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string + databaseName string + triggerRestorePayload *TriggerRestorePayload +} + +// The request body with the parameters for the database restore. +func (r ApiTriggerRestoreRequest) TriggerRestorePayload(triggerRestorePayload TriggerRestorePayload) ApiTriggerRestoreRequest { + r.triggerRestorePayload = &triggerRestorePayload + return r +} + +func (r ApiTriggerRestoreRequest) Execute() error { + return r.ApiService.TriggerRestoreExecute(r) +} + +/* +TriggerRestore Trigger restore for a specific Database + +Trigger restore for a specific Database + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @param databaseName The name of the database. + @return ApiTriggerRestoreRequest +*/ +func (a *DefaultAPIService) TriggerRestore(ctx context.Context, projectId string, region string, instanceId string, databaseName string) ApiTriggerRestoreRequest { + return ApiTriggerRestoreRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + databaseName: databaseName, + } +} + +// Execute executes the request +func (a *DefaultAPIService) TriggerRestoreExecute(r ApiTriggerRestoreRequest) error { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.TriggerRestore") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/backups/databases/{databaseName}/restores" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"databaseName"+"}", url.PathEscape(parameterValueToString(r.databaseName, "databaseName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.triggerRestorePayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return 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 err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return newErr + } + + return nil +} + +type ApiUpdateInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string + updateInstancePayload *UpdateInstancePayload +} + +// The request body with the parameters for updating the instance +func (r ApiUpdateInstanceRequest) UpdateInstancePayload(updateInstancePayload UpdateInstancePayload) ApiUpdateInstanceRequest { + r.updateInstancePayload = &updateInstancePayload + return r +} + +func (r ApiUpdateInstanceRequest) Execute() error { + return r.ApiService.UpdateInstanceExecute(r) +} + +/* +UpdateInstance Update Instance + +# Updates an available instance of a sqlserver database + +**Please note that any changes applied via PUT or PATCH requests will initiate a reboot of the SQL Server Flex Instance.** + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiUpdateInstanceRequest +*/ +func (a *DefaultAPIService) UpdateInstance(ctx context.Context, projectId string, region string, instanceId string) ApiUpdateInstanceRequest { + return ApiUpdateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) UpdateInstanceExecute(r ApiUpdateInstanceRequest) error { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateInstance") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.updateInstancePayload == nil { + return reportError("updateInstancePayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateInstancePayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return 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 err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return newErr + } + + return nil +} + +type ApiUpdateInstanceProtectionRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + instanceId string + updateInstanceProtectionPayload *UpdateInstanceProtectionPayload +} + +// The request body with flag isDeletable. Parameter is required. +func (r ApiUpdateInstanceProtectionRequest) UpdateInstanceProtectionPayload(updateInstanceProtectionPayload UpdateInstanceProtectionPayload) ApiUpdateInstanceProtectionRequest { + r.updateInstanceProtectionPayload = &updateInstanceProtectionPayload + return r +} + +func (r ApiUpdateInstanceProtectionRequest) Execute() (*UpdateInstanceProtectionResponse, error) { + return r.ApiService.UpdateInstanceProtectionExecute(r) +} + +/* +UpdateInstanceProtection Protect Instance + +Toggle the deletion protection for an instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT project ID. + @param region The region which should be addressed + @param instanceId The ID of the instance. + @return ApiUpdateInstanceProtectionRequest +*/ +func (a *DefaultAPIService) UpdateInstanceProtection(ctx context.Context, projectId string, region string, instanceId string) ApiUpdateInstanceProtectionRequest { + return ApiUpdateInstanceProtectionRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return UpdateInstanceProtectionResponse +func (a *DefaultAPIService) UpdateInstanceProtectionExecute(r ApiUpdateInstanceProtectionRequest) (*UpdateInstanceProtectionResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UpdateInstanceProtectionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateInstanceProtection") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v3/projects/{projectId}/regions/{region}/instances/{instanceId}/protections" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.updateInstanceProtectionPayload == nil { + return localVarReturnValue, reportError("updateInstanceProtectionPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateInstanceProtectionPayload + 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 Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 501 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} diff --git a/services/sqlserverflex/v3api/api_default_mock.go b/services/sqlserverflex/v3api/api_default_mock.go new file mode 100644 index 000000000..d88589dbc --- /dev/null +++ b/services/sqlserverflex/v3api/api_default_mock.go @@ -0,0 +1,636 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +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 { + // CreateDatabaseExecuteMock can be populated to implement the behavior of the CreateDatabaseExecute function of this mock + CreateDatabaseExecuteMock *func(r ApiCreateDatabaseRequest) (*CreateDatabaseResponse, error) + // CreateInstanceExecuteMock can be populated to implement the behavior of the CreateInstanceExecute function of this mock + CreateInstanceExecuteMock *func(r ApiCreateInstanceRequest) (*CreateInstanceResponse, error) + // CreateUserExecuteMock can be populated to implement the behavior of the CreateUserExecute function of this mock + CreateUserExecuteMock *func(r ApiCreateUserRequest) (*CreateUserResponse, error) + // DeleteDatabaseExecuteMock can be populated to implement the behavior of the DeleteDatabaseExecute function of this mock + DeleteDatabaseExecuteMock *func(r ApiDeleteDatabaseRequest) error + // DeleteInstanceExecuteMock can be populated to implement the behavior of the DeleteInstanceExecute function of this mock + DeleteInstanceExecuteMock *func(r ApiDeleteInstanceRequest) error + // DeleteUserExecuteMock can be populated to implement the behavior of the DeleteUserExecute function of this mock + DeleteUserExecuteMock *func(r ApiDeleteUserRequest) error + // GetBackupExecuteMock can be populated to implement the behavior of the GetBackupExecute function of this mock + GetBackupExecuteMock *func(r ApiGetBackupRequest) (*GetBackupResponse, error) + // GetDatabaseExecuteMock can be populated to implement the behavior of the GetDatabaseExecute function of this mock + GetDatabaseExecuteMock *func(r ApiGetDatabaseRequest) (*GetDatabaseResponse, error) + // GetInstanceExecuteMock can be populated to implement the behavior of the GetInstanceExecute function of this mock + GetInstanceExecuteMock *func(r ApiGetInstanceRequest) (*GetInstanceResponse, error) + // GetUserExecuteMock can be populated to implement the behavior of the GetUserExecute function of this mock + GetUserExecuteMock *func(r ApiGetUserRequest) (*GetUserResponse, error) + // ListBackupsExecuteMock can be populated to implement the behavior of the ListBackupsExecute function of this mock + ListBackupsExecuteMock *func(r ApiListBackupsRequest) (*ListBackupResponse, error) + // ListCollationsExecuteMock can be populated to implement the behavior of the ListCollationsExecute function of this mock + ListCollationsExecuteMock *func(r ApiListCollationsRequest) (*ListCollationsResponse, error) + // ListCompatibilitiesExecuteMock can be populated to implement the behavior of the ListCompatibilitiesExecute function of this mock + ListCompatibilitiesExecuteMock *func(r ApiListCompatibilitiesRequest) (*ListCompatibilityResponse, error) + // ListCurrentRunningRestoreJobsExecuteMock can be populated to implement the behavior of the ListCurrentRunningRestoreJobsExecute function of this mock + ListCurrentRunningRestoreJobsExecuteMock *func(r ApiListCurrentRunningRestoreJobsRequest) (*ListCurrentRunningRestoreJobs, error) + // ListDatabasesExecuteMock can be populated to implement the behavior of the ListDatabasesExecute function of this mock + ListDatabasesExecuteMock *func(r ApiListDatabasesRequest) (*ListDatabasesResponse, error) + // ListFlavorsExecuteMock can be populated to implement the behavior of the ListFlavorsExecute function of this mock + ListFlavorsExecuteMock *func(r ApiListFlavorsRequest) (*ListFlavorsResponse, error) + // ListInstancesExecuteMock can be populated to implement the behavior of the ListInstancesExecute function of this mock + ListInstancesExecuteMock *func(r ApiListInstancesRequest) (*ListInstancesResponse, error) + // ListRolesExecuteMock can be populated to implement the behavior of the ListRolesExecute function of this mock + ListRolesExecuteMock *func(r ApiListRolesRequest) (*ListRolesResponse, error) + // ListStoragesExecuteMock can be populated to implement the behavior of the ListStoragesExecute function of this mock + ListStoragesExecuteMock *func(r ApiListStoragesRequest) (*ListStoragesResponse, error) + // ListUsersExecuteMock can be populated to implement the behavior of the ListUsersExecute function of this mock + ListUsersExecuteMock *func(r ApiListUsersRequest) (*ListUserResponse, error) + // ListVersionsExecuteMock can be populated to implement the behavior of the ListVersionsExecute function of this mock + ListVersionsExecuteMock *func(r ApiListVersionsRequest) (*ListVersionsResponse, error) + // PartialUpdateInstanceExecuteMock can be populated to implement the behavior of the PartialUpdateInstanceExecute function of this mock + PartialUpdateInstanceExecuteMock *func(r ApiPartialUpdateInstanceRequest) error + // ResetUserExecuteMock can be populated to implement the behavior of the ResetUserExecute function of this mock + ResetUserExecuteMock *func(r ApiResetUserRequest) (*ResetUserResponse, error) + // RestoreDatabaseFromBackupExecuteMock can be populated to implement the behavior of the RestoreDatabaseFromBackupExecute function of this mock + RestoreDatabaseFromBackupExecuteMock *func(r ApiRestoreDatabaseFromBackupRequest) error + // TriggerBackupExecuteMock can be populated to implement the behavior of the TriggerBackupExecute function of this mock + TriggerBackupExecuteMock *func(r ApiTriggerBackupRequest) error + // TriggerRestoreExecuteMock can be populated to implement the behavior of the TriggerRestoreExecute function of this mock + TriggerRestoreExecuteMock *func(r ApiTriggerRestoreRequest) error + // UpdateInstanceExecuteMock can be populated to implement the behavior of the UpdateInstanceExecute function of this mock + UpdateInstanceExecuteMock *func(r ApiUpdateInstanceRequest) error + // UpdateInstanceProtectionExecuteMock can be populated to implement the behavior of the UpdateInstanceProtectionExecute function of this mock + UpdateInstanceProtectionExecuteMock *func(r ApiUpdateInstanceProtectionRequest) (*UpdateInstanceProtectionResponse, error) +} + +func (a DefaultAPIServiceMock) CreateDatabase(ctx context.Context, projectId string, region string, instanceId string) ApiCreateDatabaseRequest { + return ApiCreateDatabaseRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// CreateDatabaseExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateDatabaseExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateDatabaseExecute(r ApiCreateDatabaseRequest) (*CreateDatabaseResponse, error) { + if a.CreateDatabaseExecuteMock == nil { + var localVarReturnValue *CreateDatabaseResponse + return localVarReturnValue, nil + } + + return (*a.CreateDatabaseExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateInstance(ctx context.Context, projectId string, region string) ApiCreateInstanceRequest { + return ApiCreateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// CreateInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateInstanceExecute(r ApiCreateInstanceRequest) (*CreateInstanceResponse, error) { + if a.CreateInstanceExecuteMock == nil { + var localVarReturnValue *CreateInstanceResponse + return localVarReturnValue, nil + } + + return (*a.CreateInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateUser(ctx context.Context, projectId string, region string, instanceId string) ApiCreateUserRequest { + return ApiCreateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// CreateUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateUserExecute(r ApiCreateUserRequest) (*CreateUserResponse, error) { + if a.CreateUserExecuteMock == nil { + var localVarReturnValue *CreateUserResponse + return localVarReturnValue, nil + } + + return (*a.CreateUserExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteDatabase(ctx context.Context, projectId string, region string, instanceId string, databaseName string) ApiDeleteDatabaseRequest { + return ApiDeleteDatabaseRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + databaseName: databaseName, + } +} + +// DeleteDatabaseExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteDatabaseExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteDatabaseExecute(r ApiDeleteDatabaseRequest) error { + if a.DeleteDatabaseExecuteMock == nil { + return nil + } + + return (*a.DeleteDatabaseExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteInstance(ctx context.Context, projectId string, region string, instanceId string) ApiDeleteInstanceRequest { + return ApiDeleteInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// DeleteInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteInstanceExecute(r ApiDeleteInstanceRequest) error { + if a.DeleteInstanceExecuteMock == nil { + return nil + } + + return (*a.DeleteInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteUser(ctx context.Context, projectId string, region string, instanceId string, userId int64) ApiDeleteUserRequest { + return ApiDeleteUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + userId: userId, + } +} + +// DeleteUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteUserExecute(r ApiDeleteUserRequest) error { + if a.DeleteUserExecuteMock == nil { + return nil + } + + return (*a.DeleteUserExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetBackup(ctx context.Context, projectId string, region string, instanceId string, backupId int64) ApiGetBackupRequest { + return ApiGetBackupRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + backupId: backupId, + } +} + +// GetBackupExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetBackupExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetBackupExecute(r ApiGetBackupRequest) (*GetBackupResponse, error) { + if a.GetBackupExecuteMock == nil { + var localVarReturnValue *GetBackupResponse + return localVarReturnValue, nil + } + + return (*a.GetBackupExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetDatabase(ctx context.Context, projectId string, region string, instanceId string, databaseName string) ApiGetDatabaseRequest { + return ApiGetDatabaseRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + databaseName: databaseName, + } +} + +// GetDatabaseExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetDatabaseExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetDatabaseExecute(r ApiGetDatabaseRequest) (*GetDatabaseResponse, error) { + if a.GetDatabaseExecuteMock == nil { + var localVarReturnValue *GetDatabaseResponse + return localVarReturnValue, nil + } + + return (*a.GetDatabaseExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetInstance(ctx context.Context, projectId string, region string, instanceId string) ApiGetInstanceRequest { + return ApiGetInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// GetInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetInstanceExecute(r ApiGetInstanceRequest) (*GetInstanceResponse, error) { + if a.GetInstanceExecuteMock == nil { + var localVarReturnValue *GetInstanceResponse + return localVarReturnValue, nil + } + + return (*a.GetInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetUser(ctx context.Context, projectId string, region string, instanceId string, userId int64) ApiGetUserRequest { + return ApiGetUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + userId: userId, + } +} + +// GetUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetUserExecute(r ApiGetUserRequest) (*GetUserResponse, error) { + if a.GetUserExecuteMock == nil { + var localVarReturnValue *GetUserResponse + return localVarReturnValue, nil + } + + return (*a.GetUserExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListBackups(ctx context.Context, projectId string, region string, instanceId string) ApiListBackupsRequest { + return ApiListBackupsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// ListBackupsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListBackupsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListBackupsExecute(r ApiListBackupsRequest) (*ListBackupResponse, error) { + if a.ListBackupsExecuteMock == nil { + var localVarReturnValue *ListBackupResponse + return localVarReturnValue, nil + } + + return (*a.ListBackupsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListCollations(ctx context.Context, projectId string, region string, instanceId string) ApiListCollationsRequest { + return ApiListCollationsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// ListCollationsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListCollationsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListCollationsExecute(r ApiListCollationsRequest) (*ListCollationsResponse, error) { + if a.ListCollationsExecuteMock == nil { + var localVarReturnValue *ListCollationsResponse + return localVarReturnValue, nil + } + + return (*a.ListCollationsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListCompatibilities(ctx context.Context, projectId string, region string, instanceId string) ApiListCompatibilitiesRequest { + return ApiListCompatibilitiesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// ListCompatibilitiesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListCompatibilitiesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListCompatibilitiesExecute(r ApiListCompatibilitiesRequest) (*ListCompatibilityResponse, error) { + if a.ListCompatibilitiesExecuteMock == nil { + var localVarReturnValue *ListCompatibilityResponse + return localVarReturnValue, nil + } + + return (*a.ListCompatibilitiesExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListCurrentRunningRestoreJobs(ctx context.Context, projectId string, region string, instanceId string) ApiListCurrentRunningRestoreJobsRequest { + return ApiListCurrentRunningRestoreJobsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// ListCurrentRunningRestoreJobsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListCurrentRunningRestoreJobsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListCurrentRunningRestoreJobsExecute(r ApiListCurrentRunningRestoreJobsRequest) (*ListCurrentRunningRestoreJobs, error) { + if a.ListCurrentRunningRestoreJobsExecuteMock == nil { + var localVarReturnValue *ListCurrentRunningRestoreJobs + return localVarReturnValue, nil + } + + return (*a.ListCurrentRunningRestoreJobsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListDatabases(ctx context.Context, projectId string, region string, instanceId string) ApiListDatabasesRequest { + return ApiListDatabasesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// ListDatabasesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListDatabasesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListDatabasesExecute(r ApiListDatabasesRequest) (*ListDatabasesResponse, error) { + if a.ListDatabasesExecuteMock == nil { + var localVarReturnValue *ListDatabasesResponse + return localVarReturnValue, nil + } + + return (*a.ListDatabasesExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListFlavors(ctx context.Context, projectId string, region string) ApiListFlavorsRequest { + return ApiListFlavorsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// ListFlavorsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListFlavorsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListFlavorsExecute(r ApiListFlavorsRequest) (*ListFlavorsResponse, error) { + if a.ListFlavorsExecuteMock == nil { + var localVarReturnValue *ListFlavorsResponse + return localVarReturnValue, nil + } + + return (*a.ListFlavorsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListInstances(ctx context.Context, projectId string, region string) ApiListInstancesRequest { + return ApiListInstancesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// ListInstancesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListInstancesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListInstancesExecute(r ApiListInstancesRequest) (*ListInstancesResponse, error) { + if a.ListInstancesExecuteMock == nil { + var localVarReturnValue *ListInstancesResponse + return localVarReturnValue, nil + } + + return (*a.ListInstancesExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListRoles(ctx context.Context, projectId string, region string, instanceId string) ApiListRolesRequest { + return ApiListRolesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// ListRolesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListRolesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListRolesExecute(r ApiListRolesRequest) (*ListRolesResponse, error) { + if a.ListRolesExecuteMock == nil { + var localVarReturnValue *ListRolesResponse + return localVarReturnValue, nil + } + + return (*a.ListRolesExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListStorages(ctx context.Context, projectId string, region string, flavorId string) ApiListStoragesRequest { + return ApiListStoragesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + flavorId: flavorId, + } +} + +// ListStoragesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListStoragesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListStoragesExecute(r ApiListStoragesRequest) (*ListStoragesResponse, error) { + if a.ListStoragesExecuteMock == nil { + var localVarReturnValue *ListStoragesResponse + return localVarReturnValue, nil + } + + return (*a.ListStoragesExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListUsers(ctx context.Context, projectId string, region string, instanceId string) ApiListUsersRequest { + return ApiListUsersRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// ListUsersExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListUsersExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListUsersExecute(r ApiListUsersRequest) (*ListUserResponse, error) { + if a.ListUsersExecuteMock == nil { + var localVarReturnValue *ListUserResponse + return localVarReturnValue, nil + } + + return (*a.ListUsersExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListVersions(ctx context.Context, projectId string, region string) ApiListVersionsRequest { + return ApiListVersionsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// ListVersionsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListVersionsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListVersionsExecute(r ApiListVersionsRequest) (*ListVersionsResponse, error) { + if a.ListVersionsExecuteMock == nil { + var localVarReturnValue *ListVersionsResponse + return localVarReturnValue, nil + } + + return (*a.ListVersionsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) PartialUpdateInstance(ctx context.Context, projectId string, region string, instanceId string) ApiPartialUpdateInstanceRequest { + return ApiPartialUpdateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// PartialUpdateInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the PartialUpdateInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) PartialUpdateInstanceExecute(r ApiPartialUpdateInstanceRequest) error { + if a.PartialUpdateInstanceExecuteMock == nil { + return nil + } + + return (*a.PartialUpdateInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ResetUser(ctx context.Context, projectId string, region string, instanceId string, userId int64) ApiResetUserRequest { + return ApiResetUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + userId: userId, + } +} + +// ResetUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ResetUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ResetUserExecute(r ApiResetUserRequest) (*ResetUserResponse, error) { + if a.ResetUserExecuteMock == nil { + var localVarReturnValue *ResetUserResponse + return localVarReturnValue, nil + } + + return (*a.ResetUserExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) RestoreDatabaseFromBackup(ctx context.Context, projectId string, region string, instanceId string) ApiRestoreDatabaseFromBackupRequest { + return ApiRestoreDatabaseFromBackupRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// RestoreDatabaseFromBackupExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the RestoreDatabaseFromBackupExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) RestoreDatabaseFromBackupExecute(r ApiRestoreDatabaseFromBackupRequest) error { + if a.RestoreDatabaseFromBackupExecuteMock == nil { + return nil + } + + return (*a.RestoreDatabaseFromBackupExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) TriggerBackup(ctx context.Context, projectId string, region string, instanceId string, databaseName string) ApiTriggerBackupRequest { + return ApiTriggerBackupRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + databaseName: databaseName, + } +} + +// TriggerBackupExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the TriggerBackupExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) TriggerBackupExecute(r ApiTriggerBackupRequest) error { + if a.TriggerBackupExecuteMock == nil { + return nil + } + + return (*a.TriggerBackupExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) TriggerRestore(ctx context.Context, projectId string, region string, instanceId string, databaseName string) ApiTriggerRestoreRequest { + return ApiTriggerRestoreRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + databaseName: databaseName, + } +} + +// TriggerRestoreExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the TriggerRestoreExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) TriggerRestoreExecute(r ApiTriggerRestoreRequest) error { + if a.TriggerRestoreExecuteMock == nil { + return nil + } + + return (*a.TriggerRestoreExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateInstance(ctx context.Context, projectId string, region string, instanceId string) ApiUpdateInstanceRequest { + return ApiUpdateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// UpdateInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateInstanceExecute(r ApiUpdateInstanceRequest) error { + if a.UpdateInstanceExecuteMock == nil { + return nil + } + + return (*a.UpdateInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateInstanceProtection(ctx context.Context, projectId string, region string, instanceId string) ApiUpdateInstanceProtectionRequest { + return ApiUpdateInstanceProtectionRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + instanceId: instanceId, + } +} + +// UpdateInstanceProtectionExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateInstanceProtectionExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateInstanceProtectionExecute(r ApiUpdateInstanceProtectionRequest) (*UpdateInstanceProtectionResponse, error) { + if a.UpdateInstanceProtectionExecuteMock == nil { + var localVarReturnValue *UpdateInstanceProtectionResponse + return localVarReturnValue, nil + } + + return (*a.UpdateInstanceProtectionExecuteMock)(r) +} diff --git a/services/sqlserverflex/v3api/client.go b/services/sqlserverflex/v3api/client.go new file mode 100644 index 000000000..c557b6d2d --- /dev/null +++ b/services/sqlserverflex/v3api/client.go @@ -0,0 +1,659 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v3api + +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 MSSQL Service API API v3.0.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/sqlserverflex/v3api/configuration.go b/services/sqlserverflex/v3api/configuration.go new file mode 100644 index 000000000..98807401a --- /dev/null +++ b/services/sqlserverflex/v3api/configuration.go @@ -0,0 +1,38 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v3api + +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/sqlserverflex", + Debug: false, + Servers: config.ServerConfigurations{ + { + URL: "https://mssql-flex-service.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/sqlserverflex/v3api/model_backup_running_restore.go b/services/sqlserverflex/v3api/model_backup_running_restore.go new file mode 100644 index 000000000..11ffe0038 --- /dev/null +++ b/services/sqlserverflex/v3api/model_backup_running_restore.go @@ -0,0 +1,288 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the BackupRunningRestore type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BackupRunningRestore{} + +// BackupRunningRestore struct for BackupRunningRestore +type BackupRunningRestore struct { + // the command that was executed + Command string `json:"command"` + // the name of the database that is being restored + DatabaseName string `json:"database_name"` + // the projected time when the restore should be completed + EstimatedCompletionTime string `json:"estimated_completion_time"` + // the percentage of the current running restore job + PercentComplete int32 `json:"percent_complete"` + // the start time of the current running restore job + StartTime string `json:"start_time"` + AdditionalProperties map[string]interface{} +} + +type _BackupRunningRestore BackupRunningRestore + +// NewBackupRunningRestore instantiates a new BackupRunningRestore 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 NewBackupRunningRestore(command string, databaseName string, estimatedCompletionTime string, percentComplete int32, startTime string) *BackupRunningRestore { + this := BackupRunningRestore{} + this.Command = command + this.DatabaseName = databaseName + this.EstimatedCompletionTime = estimatedCompletionTime + this.PercentComplete = percentComplete + this.StartTime = startTime + return &this +} + +// NewBackupRunningRestoreWithDefaults instantiates a new BackupRunningRestore 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 NewBackupRunningRestoreWithDefaults() *BackupRunningRestore { + this := BackupRunningRestore{} + return &this +} + +// GetCommand returns the Command field value +func (o *BackupRunningRestore) GetCommand() string { + if o == nil { + var ret string + return ret + } + + return o.Command +} + +// GetCommandOk returns a tuple with the Command field value +// and a boolean to check if the value has been set. +func (o *BackupRunningRestore) GetCommandOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Command, true +} + +// SetCommand sets field value +func (o *BackupRunningRestore) SetCommand(v string) { + o.Command = v +} + +// GetDatabaseName returns the DatabaseName field value +func (o *BackupRunningRestore) GetDatabaseName() string { + if o == nil { + var ret string + return ret + } + + return o.DatabaseName +} + +// GetDatabaseNameOk returns a tuple with the DatabaseName field value +// and a boolean to check if the value has been set. +func (o *BackupRunningRestore) GetDatabaseNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatabaseName, true +} + +// SetDatabaseName sets field value +func (o *BackupRunningRestore) SetDatabaseName(v string) { + o.DatabaseName = v +} + +// GetEstimatedCompletionTime returns the EstimatedCompletionTime field value +func (o *BackupRunningRestore) GetEstimatedCompletionTime() string { + if o == nil { + var ret string + return ret + } + + return o.EstimatedCompletionTime +} + +// GetEstimatedCompletionTimeOk returns a tuple with the EstimatedCompletionTime field value +// and a boolean to check if the value has been set. +func (o *BackupRunningRestore) GetEstimatedCompletionTimeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EstimatedCompletionTime, true +} + +// SetEstimatedCompletionTime sets field value +func (o *BackupRunningRestore) SetEstimatedCompletionTime(v string) { + o.EstimatedCompletionTime = v +} + +// GetPercentComplete returns the PercentComplete field value +func (o *BackupRunningRestore) GetPercentComplete() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.PercentComplete +} + +// GetPercentCompleteOk returns a tuple with the PercentComplete field value +// and a boolean to check if the value has been set. +func (o *BackupRunningRestore) GetPercentCompleteOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.PercentComplete, true +} + +// SetPercentComplete sets field value +func (o *BackupRunningRestore) SetPercentComplete(v int32) { + o.PercentComplete = v +} + +// GetStartTime returns the StartTime field value +func (o *BackupRunningRestore) GetStartTime() string { + if o == nil { + var ret string + return ret + } + + return o.StartTime +} + +// GetStartTimeOk returns a tuple with the StartTime field value +// and a boolean to check if the value has been set. +func (o *BackupRunningRestore) GetStartTimeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StartTime, true +} + +// SetStartTime sets field value +func (o *BackupRunningRestore) SetStartTime(v string) { + o.StartTime = v +} + +func (o BackupRunningRestore) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BackupRunningRestore) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["command"] = o.Command + toSerialize["database_name"] = o.DatabaseName + toSerialize["estimated_completion_time"] = o.EstimatedCompletionTime + toSerialize["percent_complete"] = o.PercentComplete + toSerialize["start_time"] = o.StartTime + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *BackupRunningRestore) 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{ + "command", + "database_name", + "estimated_completion_time", + "percent_complete", + "start_time", + } + + 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) + } + } + + varBackupRunningRestore := _BackupRunningRestore{} + + err = json.Unmarshal(data, &varBackupRunningRestore) + + if err != nil { + return err + } + + *o = BackupRunningRestore(varBackupRunningRestore) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "command") + delete(additionalProperties, "database_name") + delete(additionalProperties, "estimated_completion_time") + delete(additionalProperties, "percent_complete") + delete(additionalProperties, "start_time") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableBackupRunningRestore struct { + value *BackupRunningRestore + isSet bool +} + +func (v NullableBackupRunningRestore) Get() *BackupRunningRestore { + return v.value +} + +func (v *NullableBackupRunningRestore) Set(val *BackupRunningRestore) { + v.value = val + v.isSet = true +} + +func (v NullableBackupRunningRestore) IsSet() bool { + return v.isSet +} + +func (v *NullableBackupRunningRestore) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBackupRunningRestore(val *BackupRunningRestore) *NullableBackupRunningRestore { + return &NullableBackupRunningRestore{value: val, isSet: true} +} + +func (v NullableBackupRunningRestore) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBackupRunningRestore) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_backup_sort.go b/services/sqlserverflex/v3api/model_backup_sort.go new file mode 100644 index 000000000..af99a5ee5 --- /dev/null +++ b/services/sqlserverflex/v3api/model_backup_sort.go @@ -0,0 +1,134 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// BackupSort the model 'BackupSort' +type BackupSort string + +// List of backup.sort +const ( + BACKUPSORT_END_TIME_DESC BackupSort = "end_time.desc" + BACKUPSORT_END_TIME_ASC BackupSort = "end_time.asc" + BACKUPSORT_INDEX_DESC BackupSort = "index.desc" + BACKUPSORT_INDEX_ASC BackupSort = "index.asc" + BACKUPSORT_NAME_DESC BackupSort = "name.desc" + BACKUPSORT_NAME_ASC BackupSort = "name.asc" + BACKUPSORT_RETAINED_UNTIL_DESC BackupSort = "retained_until.desc" + BACKUPSORT_RETAINED_UNTIL_ASC BackupSort = "retained_until.asc" + BACKUPSORT_SIZE_DESC BackupSort = "size.desc" + BACKUPSORT_SIZE_ASC BackupSort = "size.asc" + BACKUPSORT_TYPE_DESC BackupSort = "type.desc" + BACKUPSORT_TYPE_ASC BackupSort = "type.asc" + BACKUPSORT_UNKNOWN_DEFAULT_OPEN_API BackupSort = "unknown_default_open_api" +) + +// All allowed values of BackupSort enum +var AllowedBackupSortEnumValues = []BackupSort{ + "end_time.desc", + "end_time.asc", + "index.desc", + "index.asc", + "name.desc", + "name.asc", + "retained_until.desc", + "retained_until.asc", + "size.desc", + "size.asc", + "type.desc", + "type.asc", + "unknown_default_open_api", +} + +func (v *BackupSort) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := BackupSort(value) + for _, existing := range AllowedBackupSortEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = BACKUPSORT_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewBackupSortFromValue returns a pointer to a valid BackupSort +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewBackupSortFromValue(v string) (*BackupSort, error) { + ev := BackupSort(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for BackupSort: valid values are %v", v, AllowedBackupSortEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v BackupSort) IsValid() bool { + for _, existing := range AllowedBackupSortEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to backup.sort value +func (v BackupSort) Ptr() *BackupSort { + return &v +} + +type NullableBackupSort struct { + value *BackupSort + isSet bool +} + +func (v NullableBackupSort) Get() *BackupSort { + return v.value +} + +func (v *NullableBackupSort) Set(val *BackupSort) { + v.value = val + v.isSet = true +} + +func (v NullableBackupSort) IsSet() bool { + return v.isSet +} + +func (v *NullableBackupSort) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBackupSort(val *BackupSort) *NullableBackupSort { + return &NullableBackupSort{value: val, isSet: true} +} + +func (v NullableBackupSort) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBackupSort) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_create_database_payload.go b/services/sqlserverflex/v3api/model_create_database_payload.go new file mode 100644 index 000000000..2b76a0662 --- /dev/null +++ b/services/sqlserverflex/v3api/model_create_database_payload.go @@ -0,0 +1,274 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateDatabasePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateDatabasePayload{} + +// CreateDatabasePayload struct for CreateDatabasePayload +type CreateDatabasePayload struct { + // The collation of the database. This database collation should match the *collation_name* of one of the collations given by the **Get database collation list** endpoint. + Collation *string `json:"collation,omitempty"` + // CompatibilityLevel of the Database. + Compatibility *int32 `json:"compatibility,omitempty"` + // The name of the database. + Name string `json:"name"` + // The owner of the database. + Owner string `json:"owner"` + AdditionalProperties map[string]interface{} +} + +type _CreateDatabasePayload CreateDatabasePayload + +// NewCreateDatabasePayload instantiates a new CreateDatabasePayload 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 NewCreateDatabasePayload(name string, owner string) *CreateDatabasePayload { + this := CreateDatabasePayload{} + this.Name = name + this.Owner = owner + return &this +} + +// NewCreateDatabasePayloadWithDefaults instantiates a new CreateDatabasePayload 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 NewCreateDatabasePayloadWithDefaults() *CreateDatabasePayload { + this := CreateDatabasePayload{} + return &this +} + +// GetCollation returns the Collation field value if set, zero value otherwise. +func (o *CreateDatabasePayload) GetCollation() string { + if o == nil || IsNil(o.Collation) { + var ret string + return ret + } + return *o.Collation +} + +// GetCollationOk returns a tuple with the Collation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDatabasePayload) GetCollationOk() (*string, bool) { + if o == nil || IsNil(o.Collation) { + return nil, false + } + return o.Collation, true +} + +// HasCollation returns a boolean if a field has been set. +func (o *CreateDatabasePayload) HasCollation() bool { + if o != nil && !IsNil(o.Collation) { + return true + } + + return false +} + +// SetCollation gets a reference to the given string and assigns it to the Collation field. +func (o *CreateDatabasePayload) SetCollation(v string) { + o.Collation = &v +} + +// GetCompatibility returns the Compatibility field value if set, zero value otherwise. +func (o *CreateDatabasePayload) GetCompatibility() int32 { + if o == nil || IsNil(o.Compatibility) { + var ret int32 + return ret + } + return *o.Compatibility +} + +// GetCompatibilityOk returns a tuple with the Compatibility field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDatabasePayload) GetCompatibilityOk() (*int32, bool) { + if o == nil || IsNil(o.Compatibility) { + return nil, false + } + return o.Compatibility, true +} + +// HasCompatibility returns a boolean if a field has been set. +func (o *CreateDatabasePayload) HasCompatibility() bool { + if o != nil && !IsNil(o.Compatibility) { + return true + } + + return false +} + +// SetCompatibility gets a reference to the given int32 and assigns it to the Compatibility field. +func (o *CreateDatabasePayload) SetCompatibility(v int32) { + o.Compatibility = &v +} + +// GetName returns the Name field value +func (o *CreateDatabasePayload) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateDatabasePayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateDatabasePayload) SetName(v string) { + o.Name = v +} + +// GetOwner returns the Owner field value +func (o *CreateDatabasePayload) GetOwner() string { + if o == nil { + var ret string + return ret + } + + return o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value +// and a boolean to check if the value has been set. +func (o *CreateDatabasePayload) GetOwnerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Owner, true +} + +// SetOwner sets field value +func (o *CreateDatabasePayload) SetOwner(v string) { + o.Owner = v +} + +func (o CreateDatabasePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateDatabasePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Collation) { + toSerialize["collation"] = o.Collation + } + if !IsNil(o.Compatibility) { + toSerialize["compatibility"] = o.Compatibility + } + toSerialize["name"] = o.Name + toSerialize["owner"] = o.Owner + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateDatabasePayload) 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{ + "name", + "owner", + } + + 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) + } + } + + varCreateDatabasePayload := _CreateDatabasePayload{} + + err = json.Unmarshal(data, &varCreateDatabasePayload) + + if err != nil { + return err + } + + *o = CreateDatabasePayload(varCreateDatabasePayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "collation") + delete(additionalProperties, "compatibility") + delete(additionalProperties, "name") + delete(additionalProperties, "owner") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateDatabasePayload struct { + value *CreateDatabasePayload + isSet bool +} + +func (v NullableCreateDatabasePayload) Get() *CreateDatabasePayload { + return v.value +} + +func (v *NullableCreateDatabasePayload) Set(val *CreateDatabasePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateDatabasePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateDatabasePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateDatabasePayload(val *CreateDatabasePayload) *NullableCreateDatabasePayload { + return &NullableCreateDatabasePayload{value: val, isSet: true} +} + +func (v NullableCreateDatabasePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateDatabasePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_create_database_response.go b/services/sqlserverflex/v3api/model_create_database_response.go new file mode 100644 index 000000000..11a22956c --- /dev/null +++ b/services/sqlserverflex/v3api/model_create_database_response.go @@ -0,0 +1,168 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateDatabaseResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateDatabaseResponse{} + +// CreateDatabaseResponse struct for CreateDatabaseResponse +type CreateDatabaseResponse struct { + // The id of the database. + Id int64 `json:"id"` + AdditionalProperties map[string]interface{} +} + +type _CreateDatabaseResponse CreateDatabaseResponse + +// NewCreateDatabaseResponse instantiates a new CreateDatabaseResponse 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 NewCreateDatabaseResponse(id int64) *CreateDatabaseResponse { + this := CreateDatabaseResponse{} + this.Id = id + return &this +} + +// NewCreateDatabaseResponseWithDefaults instantiates a new CreateDatabaseResponse 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 NewCreateDatabaseResponseWithDefaults() *CreateDatabaseResponse { + this := CreateDatabaseResponse{} + return &this +} + +// GetId returns the Id field value +func (o *CreateDatabaseResponse) GetId() int64 { + if o == nil { + var ret int64 + 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 *CreateDatabaseResponse) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CreateDatabaseResponse) SetId(v int64) { + o.Id = v +} + +func (o CreateDatabaseResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateDatabaseResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateDatabaseResponse) 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) + } + } + + varCreateDatabaseResponse := _CreateDatabaseResponse{} + + err = json.Unmarshal(data, &varCreateDatabaseResponse) + + if err != nil { + return err + } + + *o = CreateDatabaseResponse(varCreateDatabaseResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateDatabaseResponse struct { + value *CreateDatabaseResponse + isSet bool +} + +func (v NullableCreateDatabaseResponse) Get() *CreateDatabaseResponse { + return v.value +} + +func (v *NullableCreateDatabaseResponse) Set(val *CreateDatabaseResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateDatabaseResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateDatabaseResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateDatabaseResponse(val *CreateDatabaseResponse) *NullableCreateDatabaseResponse { + return &NullableCreateDatabaseResponse{value: val, isSet: true} +} + +func (v NullableCreateDatabaseResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateDatabaseResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_create_instance_payload.go b/services/sqlserverflex/v3api/model_create_instance_payload.go new file mode 100644 index 000000000..35a034d08 --- /dev/null +++ b/services/sqlserverflex/v3api/model_create_instance_payload.go @@ -0,0 +1,420 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateInstancePayload{} + +// CreateInstancePayload struct for CreateInstancePayload +type CreateInstancePayload struct { + // The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule. + BackupSchedule string `json:"backupSchedule"` + Encryption *InstanceEncryption `json:"encryption,omitempty"` + // The id of the instance flavor. + FlavorId string `json:"flavorId"` + // A dictionary of user-defined key-value pairs used to categorize or organize the resource. **Rules for Keys:** * Must be between 1 and 63 characters long. * Must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$` * **Restriction:** The prefix `stackit-` is strictly reserved and cannot be used. **Rules for Values:** * Must be between 0 (empty string) and 63 characters long. * If not empty, must begin and end with an alphanumeric character. * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$` + Labels *map[string]string `json:"labels,omitempty"` + // The name of the instance. + Name string `json:"name"` + Network CreateInstancePayloadNetwork `json:"network"` + // The days for how long the backup files should be stored before cleaned up. 30 to 90 + RetentionDays int32 `json:"retentionDays"` + Storage StorageCreate `json:"storage"` + Version InstanceVersion `json:"version"` + AdditionalProperties map[string]interface{} +} + +type _CreateInstancePayload CreateInstancePayload + +// NewCreateInstancePayload instantiates a new CreateInstancePayload 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 NewCreateInstancePayload(backupSchedule string, flavorId string, name string, network CreateInstancePayloadNetwork, retentionDays int32, storage StorageCreate, version InstanceVersion) *CreateInstancePayload { + this := CreateInstancePayload{} + this.BackupSchedule = backupSchedule + this.FlavorId = flavorId + this.Name = name + this.Network = network + this.RetentionDays = retentionDays + this.Storage = storage + this.Version = version + return &this +} + +// NewCreateInstancePayloadWithDefaults instantiates a new CreateInstancePayload 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 NewCreateInstancePayloadWithDefaults() *CreateInstancePayload { + this := CreateInstancePayload{} + return &this +} + +// GetBackupSchedule returns the BackupSchedule field value +func (o *CreateInstancePayload) GetBackupSchedule() string { + if o == nil { + var ret string + return ret + } + + return o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetBackupScheduleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BackupSchedule, true +} + +// SetBackupSchedule sets field value +func (o *CreateInstancePayload) SetBackupSchedule(v string) { + o.BackupSchedule = v +} + +// GetEncryption returns the Encryption field value if set, zero value otherwise. +func (o *CreateInstancePayload) GetEncryption() InstanceEncryption { + if o == nil || IsNil(o.Encryption) { + var ret InstanceEncryption + return ret + } + return *o.Encryption +} + +// GetEncryptionOk returns a tuple with the Encryption field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetEncryptionOk() (*InstanceEncryption, bool) { + if o == nil || IsNil(o.Encryption) { + return nil, false + } + return o.Encryption, true +} + +// HasEncryption returns a boolean if a field has been set. +func (o *CreateInstancePayload) HasEncryption() bool { + if o != nil && !IsNil(o.Encryption) { + return true + } + + return false +} + +// SetEncryption gets a reference to the given InstanceEncryption and assigns it to the Encryption field. +func (o *CreateInstancePayload) SetEncryption(v InstanceEncryption) { + o.Encryption = &v +} + +// GetFlavorId returns the FlavorId field value +func (o *CreateInstancePayload) GetFlavorId() string { + if o == nil { + var ret string + return ret + } + + return o.FlavorId +} + +// GetFlavorIdOk returns a tuple with the FlavorId field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetFlavorIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FlavorId, true +} + +// SetFlavorId sets field value +func (o *CreateInstancePayload) SetFlavorId(v string) { + o.FlavorId = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateInstancePayload) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *CreateInstancePayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *CreateInstancePayload) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetName returns the Name field value +func (o *CreateInstancePayload) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateInstancePayload) SetName(v string) { + o.Name = v +} + +// GetNetwork returns the Network field value +func (o *CreateInstancePayload) GetNetwork() CreateInstancePayloadNetwork { + if o == nil { + var ret CreateInstancePayloadNetwork + return ret + } + + return o.Network +} + +// GetNetworkOk returns a tuple with the Network field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetNetworkOk() (*CreateInstancePayloadNetwork, bool) { + if o == nil { + return nil, false + } + return &o.Network, true +} + +// SetNetwork sets field value +func (o *CreateInstancePayload) SetNetwork(v CreateInstancePayloadNetwork) { + o.Network = v +} + +// GetRetentionDays returns the RetentionDays field value +func (o *CreateInstancePayload) GetRetentionDays() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RetentionDays +} + +// GetRetentionDaysOk returns a tuple with the RetentionDays field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetRetentionDaysOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RetentionDays, true +} + +// SetRetentionDays sets field value +func (o *CreateInstancePayload) SetRetentionDays(v int32) { + o.RetentionDays = v +} + +// GetStorage returns the Storage field value +func (o *CreateInstancePayload) GetStorage() StorageCreate { + if o == nil { + var ret StorageCreate + return ret + } + + return o.Storage +} + +// GetStorageOk returns a tuple with the Storage field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetStorageOk() (*StorageCreate, bool) { + if o == nil { + return nil, false + } + return &o.Storage, true +} + +// SetStorage sets field value +func (o *CreateInstancePayload) SetStorage(v StorageCreate) { + o.Storage = v +} + +// GetVersion returns the Version field value +func (o *CreateInstancePayload) GetVersion() InstanceVersion { + if o == nil { + var ret InstanceVersion + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetVersionOk() (*InstanceVersion, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *CreateInstancePayload) SetVersion(v InstanceVersion) { + o.Version = v +} + +func (o CreateInstancePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["backupSchedule"] = o.BackupSchedule + if !IsNil(o.Encryption) { + toSerialize["encryption"] = o.Encryption + } + toSerialize["flavorId"] = o.FlavorId + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + toSerialize["network"] = o.Network + toSerialize["retentionDays"] = o.RetentionDays + toSerialize["storage"] = o.Storage + toSerialize["version"] = o.Version + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateInstancePayload) 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{ + "backupSchedule", + "flavorId", + "name", + "network", + "retentionDays", + "storage", + "version", + } + + 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) + } + } + + varCreateInstancePayload := _CreateInstancePayload{} + + err = json.Unmarshal(data, &varCreateInstancePayload) + + if err != nil { + return err + } + + *o = CreateInstancePayload(varCreateInstancePayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "backupSchedule") + delete(additionalProperties, "encryption") + delete(additionalProperties, "flavorId") + delete(additionalProperties, "labels") + delete(additionalProperties, "name") + delete(additionalProperties, "network") + delete(additionalProperties, "retentionDays") + delete(additionalProperties, "storage") + delete(additionalProperties, "version") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateInstancePayload struct { + value *CreateInstancePayload + isSet bool +} + +func (v NullableCreateInstancePayload) Get() *CreateInstancePayload { + return v.value +} + +func (v *NullableCreateInstancePayload) Set(val *CreateInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateInstancePayload(val *CreateInstancePayload) *NullableCreateInstancePayload { + return &NullableCreateInstancePayload{value: val, isSet: true} +} + +func (v NullableCreateInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_create_instance_payload_network.go b/services/sqlserverflex/v3api/model_create_instance_payload_network.go new file mode 100644 index 000000000..58f9f96a8 --- /dev/null +++ b/services/sqlserverflex/v3api/model_create_instance_payload_network.go @@ -0,0 +1,209 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateInstancePayloadNetwork type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateInstancePayloadNetwork{} + +// CreateInstancePayloadNetwork the network configuration of the instance. +type CreateInstancePayloadNetwork struct { + AccessScope *InstanceNetworkAccessScope `json:"accessScope,omitempty"` + // List of IPV4 cidr. + Acl []string `json:"acl"` + AdditionalProperties map[string]interface{} +} + +type _CreateInstancePayloadNetwork CreateInstancePayloadNetwork + +// NewCreateInstancePayloadNetwork instantiates a new CreateInstancePayloadNetwork 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 NewCreateInstancePayloadNetwork(acl []string) *CreateInstancePayloadNetwork { + this := CreateInstancePayloadNetwork{} + var accessScope InstanceNetworkAccessScope = INSTANCENETWORKACCESSSCOPE_PUBLIC + this.AccessScope = &accessScope + this.Acl = acl + return &this +} + +// NewCreateInstancePayloadNetworkWithDefaults instantiates a new CreateInstancePayloadNetwork 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 NewCreateInstancePayloadNetworkWithDefaults() *CreateInstancePayloadNetwork { + this := CreateInstancePayloadNetwork{} + var accessScope InstanceNetworkAccessScope = INSTANCENETWORKACCESSSCOPE_PUBLIC + this.AccessScope = &accessScope + return &this +} + +// GetAccessScope returns the AccessScope field value if set, zero value otherwise. +func (o *CreateInstancePayloadNetwork) GetAccessScope() InstanceNetworkAccessScope { + if o == nil || IsNil(o.AccessScope) { + var ret InstanceNetworkAccessScope + return ret + } + return *o.AccessScope +} + +// GetAccessScopeOk returns a tuple with the AccessScope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstancePayloadNetwork) GetAccessScopeOk() (*InstanceNetworkAccessScope, bool) { + if o == nil || IsNil(o.AccessScope) { + return nil, false + } + return o.AccessScope, true +} + +// HasAccessScope returns a boolean if a field has been set. +func (o *CreateInstancePayloadNetwork) HasAccessScope() bool { + if o != nil && !IsNil(o.AccessScope) { + return true + } + + return false +} + +// SetAccessScope gets a reference to the given InstanceNetworkAccessScope and assigns it to the AccessScope field. +func (o *CreateInstancePayloadNetwork) SetAccessScope(v InstanceNetworkAccessScope) { + o.AccessScope = &v +} + +// GetAcl returns the Acl field value +func (o *CreateInstancePayloadNetwork) GetAcl() []string { + if o == nil { + var ret []string + return ret + } + + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayloadNetwork) GetAclOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Acl, true +} + +// SetAcl sets field value +func (o *CreateInstancePayloadNetwork) SetAcl(v []string) { + o.Acl = v +} + +func (o CreateInstancePayloadNetwork) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateInstancePayloadNetwork) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AccessScope) { + toSerialize["accessScope"] = o.AccessScope + } + toSerialize["acl"] = o.Acl + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateInstancePayloadNetwork) 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{ + "acl", + } + + 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) + } + } + + varCreateInstancePayloadNetwork := _CreateInstancePayloadNetwork{} + + err = json.Unmarshal(data, &varCreateInstancePayloadNetwork) + + if err != nil { + return err + } + + *o = CreateInstancePayloadNetwork(varCreateInstancePayloadNetwork) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "accessScope") + delete(additionalProperties, "acl") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateInstancePayloadNetwork struct { + value *CreateInstancePayloadNetwork + isSet bool +} + +func (v NullableCreateInstancePayloadNetwork) Get() *CreateInstancePayloadNetwork { + return v.value +} + +func (v *NullableCreateInstancePayloadNetwork) Set(val *CreateInstancePayloadNetwork) { + v.value = val + v.isSet = true +} + +func (v NullableCreateInstancePayloadNetwork) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateInstancePayloadNetwork) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateInstancePayloadNetwork(val *CreateInstancePayloadNetwork) *NullableCreateInstancePayloadNetwork { + return &NullableCreateInstancePayloadNetwork{value: val, isSet: true} +} + +func (v NullableCreateInstancePayloadNetwork) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateInstancePayloadNetwork) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_create_instance_response.go b/services/sqlserverflex/v3api/model_create_instance_response.go new file mode 100644 index 000000000..ec30c0723 --- /dev/null +++ b/services/sqlserverflex/v3api/model_create_instance_response.go @@ -0,0 +1,168 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateInstanceResponse{} + +// CreateInstanceResponse struct for CreateInstanceResponse +type CreateInstanceResponse struct { + // The ID of the instance. + Id string `json:"id"` + AdditionalProperties map[string]interface{} +} + +type _CreateInstanceResponse CreateInstanceResponse + +// NewCreateInstanceResponse instantiates a new CreateInstanceResponse 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 NewCreateInstanceResponse(id string) *CreateInstanceResponse { + this := CreateInstanceResponse{} + this.Id = id + return &this +} + +// NewCreateInstanceResponseWithDefaults instantiates a new CreateInstanceResponse 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 NewCreateInstanceResponseWithDefaults() *CreateInstanceResponse { + this := CreateInstanceResponse{} + return &this +} + +// GetId returns the Id field value +func (o *CreateInstanceResponse) 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 *CreateInstanceResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CreateInstanceResponse) SetId(v string) { + o.Id = v +} + +func (o CreateInstanceResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateInstanceResponse) 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) + } + } + + varCreateInstanceResponse := _CreateInstanceResponse{} + + err = json.Unmarshal(data, &varCreateInstanceResponse) + + if err != nil { + return err + } + + *o = CreateInstanceResponse(varCreateInstanceResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateInstanceResponse struct { + value *CreateInstanceResponse + isSet bool +} + +func (v NullableCreateInstanceResponse) Get() *CreateInstanceResponse { + return v.value +} + +func (v *NullableCreateInstanceResponse) Set(val *CreateInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateInstanceResponse(val *CreateInstanceResponse) *NullableCreateInstanceResponse { + return &NullableCreateInstanceResponse{value: val, isSet: true} +} + +func (v NullableCreateInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_create_user_payload.go b/services/sqlserverflex/v3api/model_create_user_payload.go new file mode 100644 index 000000000..45a1716ca --- /dev/null +++ b/services/sqlserverflex/v3api/model_create_user_payload.go @@ -0,0 +1,236 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateUserPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateUserPayload{} + +// CreateUserPayload struct for CreateUserPayload +type CreateUserPayload struct { + // The default database for a user of the instance. + DefaultDatabase *string `json:"default_database,omitempty"` + // A list containing the user roles for the instance. A list with the valid user roles can be retrieved using the List Roles endpoint. + Roles []string `json:"roles"` + // The name of the user. + Username string `json:"username"` + AdditionalProperties map[string]interface{} +} + +type _CreateUserPayload CreateUserPayload + +// NewCreateUserPayload instantiates a new CreateUserPayload 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 NewCreateUserPayload(roles []string, username string) *CreateUserPayload { + this := CreateUserPayload{} + this.Roles = roles + this.Username = username + return &this +} + +// NewCreateUserPayloadWithDefaults instantiates a new CreateUserPayload 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 NewCreateUserPayloadWithDefaults() *CreateUserPayload { + this := CreateUserPayload{} + return &this +} + +// GetDefaultDatabase returns the DefaultDatabase field value if set, zero value otherwise. +func (o *CreateUserPayload) GetDefaultDatabase() string { + if o == nil || IsNil(o.DefaultDatabase) { + var ret string + return ret + } + return *o.DefaultDatabase +} + +// GetDefaultDatabaseOk returns a tuple with the DefaultDatabase field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateUserPayload) GetDefaultDatabaseOk() (*string, bool) { + if o == nil || IsNil(o.DefaultDatabase) { + return nil, false + } + return o.DefaultDatabase, true +} + +// HasDefaultDatabase returns a boolean if a field has been set. +func (o *CreateUserPayload) HasDefaultDatabase() bool { + if o != nil && !IsNil(o.DefaultDatabase) { + return true + } + + return false +} + +// SetDefaultDatabase gets a reference to the given string and assigns it to the DefaultDatabase field. +func (o *CreateUserPayload) SetDefaultDatabase(v string) { + o.DefaultDatabase = &v +} + +// GetRoles returns the Roles field value +func (o *CreateUserPayload) GetRoles() []string { + if o == nil { + var ret []string + return ret + } + + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value +// and a boolean to check if the value has been set. +func (o *CreateUserPayload) GetRolesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Roles, true +} + +// SetRoles sets field value +func (o *CreateUserPayload) SetRoles(v []string) { + o.Roles = v +} + +// GetUsername returns the Username field value +func (o *CreateUserPayload) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *CreateUserPayload) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *CreateUserPayload) SetUsername(v string) { + o.Username = v +} + +func (o CreateUserPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateUserPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DefaultDatabase) { + toSerialize["default_database"] = o.DefaultDatabase + } + toSerialize["roles"] = o.Roles + toSerialize["username"] = o.Username + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateUserPayload) 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{ + "roles", + "username", + } + + 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) + } + } + + varCreateUserPayload := _CreateUserPayload{} + + err = json.Unmarshal(data, &varCreateUserPayload) + + if err != nil { + return err + } + + *o = CreateUserPayload(varCreateUserPayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "default_database") + delete(additionalProperties, "roles") + delete(additionalProperties, "username") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateUserPayload struct { + value *CreateUserPayload + isSet bool +} + +func (v NullableCreateUserPayload) Get() *CreateUserPayload { + return v.value +} + +func (v *NullableCreateUserPayload) Set(val *CreateUserPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateUserPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateUserPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateUserPayload(val *CreateUserPayload) *NullableCreateUserPayload { + return &NullableCreateUserPayload{value: val, isSet: true} +} + +func (v NullableCreateUserPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateUserPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_create_user_response.go b/services/sqlserverflex/v3api/model_create_user_response.go new file mode 100644 index 000000000..3626a2849 --- /dev/null +++ b/services/sqlserverflex/v3api/model_create_user_response.go @@ -0,0 +1,407 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateUserResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateUserResponse{} + +// CreateUserResponse struct for CreateUserResponse +type CreateUserResponse struct { + // The default database for a user of the instance. + DefaultDatabase string `json:"default_database"` + // The host of the instance in which the user belongs to. + Host string `json:"host"` + // The ID of the user. + Id int64 `json:"id"` + // The password for the user. + Password string `json:"password"` + // The port of the instance in which the user belongs to. + Port int32 `json:"port"` + Roles []string `json:"roles"` + // The current status of the user. + Status string `json:"status"` + // The connection string for the user to the instance. + Uri string `json:"uri"` + // The name of the user. + Username string `json:"username"` + AdditionalProperties map[string]interface{} +} + +type _CreateUserResponse CreateUserResponse + +// NewCreateUserResponse instantiates a new CreateUserResponse 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 NewCreateUserResponse(defaultDatabase string, host string, id int64, password string, port int32, roles []string, status string, uri string, username string) *CreateUserResponse { + this := CreateUserResponse{} + this.DefaultDatabase = defaultDatabase + this.Host = host + this.Id = id + this.Password = password + this.Port = port + this.Roles = roles + this.Status = status + this.Uri = uri + this.Username = username + return &this +} + +// NewCreateUserResponseWithDefaults instantiates a new CreateUserResponse 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 NewCreateUserResponseWithDefaults() *CreateUserResponse { + this := CreateUserResponse{} + return &this +} + +// GetDefaultDatabase returns the DefaultDatabase field value +func (o *CreateUserResponse) GetDefaultDatabase() string { + if o == nil { + var ret string + return ret + } + + return o.DefaultDatabase +} + +// GetDefaultDatabaseOk returns a tuple with the DefaultDatabase field value +// and a boolean to check if the value has been set. +func (o *CreateUserResponse) GetDefaultDatabaseOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DefaultDatabase, true +} + +// SetDefaultDatabase sets field value +func (o *CreateUserResponse) SetDefaultDatabase(v string) { + o.DefaultDatabase = v +} + +// GetHost returns the Host field value +func (o *CreateUserResponse) GetHost() string { + if o == nil { + var ret string + return ret + } + + return o.Host +} + +// GetHostOk returns a tuple with the Host field value +// and a boolean to check if the value has been set. +func (o *CreateUserResponse) GetHostOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Host, true +} + +// SetHost sets field value +func (o *CreateUserResponse) SetHost(v string) { + o.Host = v +} + +// GetId returns the Id field value +func (o *CreateUserResponse) GetId() int64 { + if o == nil { + var ret int64 + 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 *CreateUserResponse) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CreateUserResponse) SetId(v int64) { + o.Id = v +} + +// GetPassword returns the Password field value +func (o *CreateUserResponse) GetPassword() string { + if o == nil { + var ret string + return ret + } + + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *CreateUserResponse) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Password, true +} + +// SetPassword sets field value +func (o *CreateUserResponse) SetPassword(v string) { + o.Password = v +} + +// GetPort returns the Port field value +func (o *CreateUserResponse) GetPort() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Port +} + +// GetPortOk returns a tuple with the Port field value +// and a boolean to check if the value has been set. +func (o *CreateUserResponse) GetPortOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Port, true +} + +// SetPort sets field value +func (o *CreateUserResponse) SetPort(v int32) { + o.Port = v +} + +// GetRoles returns the Roles field value +func (o *CreateUserResponse) GetRoles() []string { + if o == nil { + var ret []string + return ret + } + + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value +// and a boolean to check if the value has been set. +func (o *CreateUserResponse) GetRolesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Roles, true +} + +// SetRoles sets field value +func (o *CreateUserResponse) SetRoles(v []string) { + o.Roles = v +} + +// GetStatus returns the Status field value +func (o *CreateUserResponse) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *CreateUserResponse) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *CreateUserResponse) SetStatus(v string) { + o.Status = v +} + +// GetUri returns the Uri field value +func (o *CreateUserResponse) GetUri() string { + if o == nil { + var ret string + return ret + } + + return o.Uri +} + +// GetUriOk returns a tuple with the Uri field value +// and a boolean to check if the value has been set. +func (o *CreateUserResponse) GetUriOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Uri, true +} + +// SetUri sets field value +func (o *CreateUserResponse) SetUri(v string) { + o.Uri = v +} + +// GetUsername returns the Username field value +func (o *CreateUserResponse) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *CreateUserResponse) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *CreateUserResponse) SetUsername(v string) { + o.Username = v +} + +func (o CreateUserResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateUserResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["default_database"] = o.DefaultDatabase + toSerialize["host"] = o.Host + toSerialize["id"] = o.Id + toSerialize["password"] = o.Password + toSerialize["port"] = o.Port + toSerialize["roles"] = o.Roles + toSerialize["status"] = o.Status + toSerialize["uri"] = o.Uri + toSerialize["username"] = o.Username + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateUserResponse) 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{ + "default_database", + "host", + "id", + "password", + "port", + "roles", + "status", + "uri", + "username", + } + + 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) + } + } + + varCreateUserResponse := _CreateUserResponse{} + + err = json.Unmarshal(data, &varCreateUserResponse) + + if err != nil { + return err + } + + *o = CreateUserResponse(varCreateUserResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "default_database") + delete(additionalProperties, "host") + delete(additionalProperties, "id") + delete(additionalProperties, "password") + delete(additionalProperties, "port") + delete(additionalProperties, "roles") + delete(additionalProperties, "status") + delete(additionalProperties, "uri") + delete(additionalProperties, "username") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateUserResponse struct { + value *CreateUserResponse + isSet bool +} + +func (v NullableCreateUserResponse) Get() *CreateUserResponse { + return v.value +} + +func (v *NullableCreateUserResponse) Set(val *CreateUserResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateUserResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateUserResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateUserResponse(val *CreateUserResponse) *NullableCreateUserResponse { + return &NullableCreateUserResponse{value: val, isSet: true} +} + +func (v NullableCreateUserResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateUserResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_database_getcollation.go b/services/sqlserverflex/v3api/model_database_getcollation.go new file mode 100644 index 000000000..fea71dc2b --- /dev/null +++ b/services/sqlserverflex/v3api/model_database_getcollation.go @@ -0,0 +1,191 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" +) + +// checks if the DatabaseGetcollation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatabaseGetcollation{} + +// DatabaseGetcollation struct for DatabaseGetcollation +type DatabaseGetcollation struct { + CollationName *string `json:"collation_name,omitempty"` + Description *string `json:"description,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DatabaseGetcollation DatabaseGetcollation + +// NewDatabaseGetcollation instantiates a new DatabaseGetcollation 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 NewDatabaseGetcollation() *DatabaseGetcollation { + this := DatabaseGetcollation{} + return &this +} + +// NewDatabaseGetcollationWithDefaults instantiates a new DatabaseGetcollation 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 NewDatabaseGetcollationWithDefaults() *DatabaseGetcollation { + this := DatabaseGetcollation{} + return &this +} + +// GetCollationName returns the CollationName field value if set, zero value otherwise. +func (o *DatabaseGetcollation) GetCollationName() string { + if o == nil || IsNil(o.CollationName) { + var ret string + return ret + } + return *o.CollationName +} + +// GetCollationNameOk returns a tuple with the CollationName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatabaseGetcollation) GetCollationNameOk() (*string, bool) { + if o == nil || IsNil(o.CollationName) { + return nil, false + } + return o.CollationName, true +} + +// HasCollationName returns a boolean if a field has been set. +func (o *DatabaseGetcollation) HasCollationName() bool { + if o != nil && !IsNil(o.CollationName) { + return true + } + + return false +} + +// SetCollationName gets a reference to the given string and assigns it to the CollationName field. +func (o *DatabaseGetcollation) SetCollationName(v string) { + o.CollationName = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *DatabaseGetcollation) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatabaseGetcollation) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *DatabaseGetcollation) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *DatabaseGetcollation) SetDescription(v string) { + o.Description = &v +} + +func (o DatabaseGetcollation) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatabaseGetcollation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CollationName) { + toSerialize["collation_name"] = o.CollationName + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DatabaseGetcollation) UnmarshalJSON(data []byte) (err error) { + varDatabaseGetcollation := _DatabaseGetcollation{} + + err = json.Unmarshal(data, &varDatabaseGetcollation) + + if err != nil { + return err + } + + *o = DatabaseGetcollation(varDatabaseGetcollation) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "collation_name") + delete(additionalProperties, "description") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDatabaseGetcollation struct { + value *DatabaseGetcollation + isSet bool +} + +func (v NullableDatabaseGetcollation) Get() *DatabaseGetcollation { + return v.value +} + +func (v *NullableDatabaseGetcollation) Set(val *DatabaseGetcollation) { + v.value = val + v.isSet = true +} + +func (v NullableDatabaseGetcollation) IsSet() bool { + return v.isSet +} + +func (v *NullableDatabaseGetcollation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatabaseGetcollation(val *DatabaseGetcollation) *NullableDatabaseGetcollation { + return &NullableDatabaseGetcollation{value: val, isSet: true} +} + +func (v NullableDatabaseGetcollation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatabaseGetcollation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_database_getcompatibility.go b/services/sqlserverflex/v3api/model_database_getcompatibility.go new file mode 100644 index 000000000..98baae7f3 --- /dev/null +++ b/services/sqlserverflex/v3api/model_database_getcompatibility.go @@ -0,0 +1,191 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" +) + +// checks if the DatabaseGetcompatibility type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatabaseGetcompatibility{} + +// DatabaseGetcompatibility struct for DatabaseGetcompatibility +type DatabaseGetcompatibility struct { + CompatibilityLevel *int32 `json:"compatibility_level,omitempty"` + Description *string `json:"description,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DatabaseGetcompatibility DatabaseGetcompatibility + +// NewDatabaseGetcompatibility instantiates a new DatabaseGetcompatibility 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 NewDatabaseGetcompatibility() *DatabaseGetcompatibility { + this := DatabaseGetcompatibility{} + return &this +} + +// NewDatabaseGetcompatibilityWithDefaults instantiates a new DatabaseGetcompatibility 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 NewDatabaseGetcompatibilityWithDefaults() *DatabaseGetcompatibility { + this := DatabaseGetcompatibility{} + return &this +} + +// GetCompatibilityLevel returns the CompatibilityLevel field value if set, zero value otherwise. +func (o *DatabaseGetcompatibility) GetCompatibilityLevel() int32 { + if o == nil || IsNil(o.CompatibilityLevel) { + var ret int32 + return ret + } + return *o.CompatibilityLevel +} + +// GetCompatibilityLevelOk returns a tuple with the CompatibilityLevel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatabaseGetcompatibility) GetCompatibilityLevelOk() (*int32, bool) { + if o == nil || IsNil(o.CompatibilityLevel) { + return nil, false + } + return o.CompatibilityLevel, true +} + +// HasCompatibilityLevel returns a boolean if a field has been set. +func (o *DatabaseGetcompatibility) HasCompatibilityLevel() bool { + if o != nil && !IsNil(o.CompatibilityLevel) { + return true + } + + return false +} + +// SetCompatibilityLevel gets a reference to the given int32 and assigns it to the CompatibilityLevel field. +func (o *DatabaseGetcompatibility) SetCompatibilityLevel(v int32) { + o.CompatibilityLevel = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *DatabaseGetcompatibility) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatabaseGetcompatibility) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *DatabaseGetcompatibility) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *DatabaseGetcompatibility) SetDescription(v string) { + o.Description = &v +} + +func (o DatabaseGetcompatibility) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatabaseGetcompatibility) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CompatibilityLevel) { + toSerialize["compatibility_level"] = o.CompatibilityLevel + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DatabaseGetcompatibility) UnmarshalJSON(data []byte) (err error) { + varDatabaseGetcompatibility := _DatabaseGetcompatibility{} + + err = json.Unmarshal(data, &varDatabaseGetcompatibility) + + if err != nil { + return err + } + + *o = DatabaseGetcompatibility(varDatabaseGetcompatibility) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "compatibility_level") + delete(additionalProperties, "description") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDatabaseGetcompatibility struct { + value *DatabaseGetcompatibility + isSet bool +} + +func (v NullableDatabaseGetcompatibility) Get() *DatabaseGetcompatibility { + return v.value +} + +func (v *NullableDatabaseGetcompatibility) Set(val *DatabaseGetcompatibility) { + v.value = val + v.isSet = true +} + +func (v NullableDatabaseGetcompatibility) IsSet() bool { + return v.isSet +} + +func (v *NullableDatabaseGetcompatibility) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatabaseGetcompatibility(val *DatabaseGetcompatibility) *NullableDatabaseGetcompatibility { + return &NullableDatabaseGetcompatibility{value: val, isSet: true} +} + +func (v NullableDatabaseGetcompatibility) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatabaseGetcompatibility) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_database_roles.go b/services/sqlserverflex/v3api/model_database_roles.go new file mode 100644 index 000000000..b271979f7 --- /dev/null +++ b/services/sqlserverflex/v3api/model_database_roles.go @@ -0,0 +1,198 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the DatabaseRoles type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatabaseRoles{} + +// DatabaseRoles The name and the roles for a database for a user. +type DatabaseRoles struct { + // The name of the database. + Name string `json:"name"` + // The name and the roles for a database + Roles []string `json:"roles"` + AdditionalProperties map[string]interface{} +} + +type _DatabaseRoles DatabaseRoles + +// NewDatabaseRoles instantiates a new DatabaseRoles 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 NewDatabaseRoles(name string, roles []string) *DatabaseRoles { + this := DatabaseRoles{} + this.Name = name + this.Roles = roles + return &this +} + +// NewDatabaseRolesWithDefaults instantiates a new DatabaseRoles 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 NewDatabaseRolesWithDefaults() *DatabaseRoles { + this := DatabaseRoles{} + return &this +} + +// GetName returns the Name field value +func (o *DatabaseRoles) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DatabaseRoles) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DatabaseRoles) SetName(v string) { + o.Name = v +} + +// GetRoles returns the Roles field value +func (o *DatabaseRoles) GetRoles() []string { + if o == nil { + var ret []string + return ret + } + + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value +// and a boolean to check if the value has been set. +func (o *DatabaseRoles) GetRolesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Roles, true +} + +// SetRoles sets field value +func (o *DatabaseRoles) SetRoles(v []string) { + o.Roles = v +} + +func (o DatabaseRoles) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatabaseRoles) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["roles"] = o.Roles + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DatabaseRoles) 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{ + "name", + "roles", + } + + 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) + } + } + + varDatabaseRoles := _DatabaseRoles{} + + err = json.Unmarshal(data, &varDatabaseRoles) + + if err != nil { + return err + } + + *o = DatabaseRoles(varDatabaseRoles) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "roles") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDatabaseRoles struct { + value *DatabaseRoles + isSet bool +} + +func (v NullableDatabaseRoles) Get() *DatabaseRoles { + return v.value +} + +func (v *NullableDatabaseRoles) Set(val *DatabaseRoles) { + v.value = val + v.isSet = true +} + +func (v NullableDatabaseRoles) IsSet() bool { + return v.isSet +} + +func (v *NullableDatabaseRoles) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatabaseRoles(val *DatabaseRoles) *NullableDatabaseRoles { + return &NullableDatabaseRoles{value: val, isSet: true} +} + +func (v NullableDatabaseRoles) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatabaseRoles) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_database_sort.go b/services/sqlserverflex/v3api/model_database_sort.go new file mode 100644 index 000000000..80b3b67b8 --- /dev/null +++ b/services/sqlserverflex/v3api/model_database_sort.go @@ -0,0 +1,130 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// DatabaseSort the model 'DatabaseSort' +type DatabaseSort string + +// List of database.sort +const ( + DATABASESORT_CREATED_AT_DESC DatabaseSort = "created_at.desc" + DATABASESORT_CREATED_AT_ASC DatabaseSort = "created_at.asc" + DATABASESORT_DATABASE_ID_DESC DatabaseSort = "database_id.desc" + DATABASESORT_DATABASE_ID_ASC DatabaseSort = "database_id.asc" + DATABASESORT_DATABASE_NAME_DESC DatabaseSort = "database_name.desc" + DATABASESORT_DATABASE_NAME_ASC DatabaseSort = "database_name.asc" + DATABASESORT_DATABASE_OWNER_DESC DatabaseSort = "database_owner.desc" + DATABASESORT_DATABASE_OWNER_ASC DatabaseSort = "database_owner.asc" + DATABASESORT_INDEX_ASC DatabaseSort = "index.asc" + DATABASESORT_INDEX_DESC DatabaseSort = "index.desc" + DATABASESORT_UNKNOWN_DEFAULT_OPEN_API DatabaseSort = "unknown_default_open_api" +) + +// All allowed values of DatabaseSort enum +var AllowedDatabaseSortEnumValues = []DatabaseSort{ + "created_at.desc", + "created_at.asc", + "database_id.desc", + "database_id.asc", + "database_name.desc", + "database_name.asc", + "database_owner.desc", + "database_owner.asc", + "index.asc", + "index.desc", + "unknown_default_open_api", +} + +func (v *DatabaseSort) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := DatabaseSort(value) + for _, existing := range AllowedDatabaseSortEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = DATABASESORT_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewDatabaseSortFromValue returns a pointer to a valid DatabaseSort +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewDatabaseSortFromValue(v string) (*DatabaseSort, error) { + ev := DatabaseSort(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for DatabaseSort: valid values are %v", v, AllowedDatabaseSortEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v DatabaseSort) IsValid() bool { + for _, existing := range AllowedDatabaseSortEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to database.sort value +func (v DatabaseSort) Ptr() *DatabaseSort { + return &v +} + +type NullableDatabaseSort struct { + value *DatabaseSort + isSet bool +} + +func (v NullableDatabaseSort) Get() *DatabaseSort { + return v.value +} + +func (v *NullableDatabaseSort) Set(val *DatabaseSort) { + v.value = val + v.isSet = true +} + +func (v NullableDatabaseSort) IsSet() bool { + return v.isSet +} + +func (v *NullableDatabaseSort) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatabaseSort(val *DatabaseSort) *NullableDatabaseSort { + return &NullableDatabaseSort{value: val, isSet: true} +} + +func (v NullableDatabaseSort) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatabaseSort) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_error.go b/services/sqlserverflex/v3api/model_error.go new file mode 100644 index 000000000..3928f58d7 --- /dev/null +++ b/services/sqlserverflex/v3api/model_error.go @@ -0,0 +1,258 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the Error type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Error{} + +// Error struct for Error +type Error struct { + // The http error code of the error. + Code int32 `json:"code"` + // More detailed information about the error. + Message string `json:"message"` + // The trace id of the request. + TraceId string `json:"traceId"` + // Describes in which state the api was when the error happened. + Type string `json:"type"` + AdditionalProperties map[string]interface{} +} + +type _Error Error + +// NewError instantiates a new Error 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 NewError(code int32, message string, traceId string, types string) *Error { + this := Error{} + this.Code = code + this.Message = message + this.TraceId = traceId + this.Type = types + return &this +} + +// NewErrorWithDefaults instantiates a new Error 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 NewErrorWithDefaults() *Error { + this := Error{} + return &this +} + +// GetCode returns the Code field value +func (o *Error) GetCode() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *Error) GetCodeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Code, true +} + +// SetCode sets field value +func (o *Error) SetCode(v int32) { + o.Code = v +} + +// GetMessage returns the Message field value +func (o *Error) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *Error) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *Error) SetMessage(v string) { + o.Message = v +} + +// GetTraceId returns the TraceId field value +func (o *Error) GetTraceId() string { + if o == nil { + var ret string + return ret + } + + return o.TraceId +} + +// GetTraceIdOk returns a tuple with the TraceId field value +// and a boolean to check if the value has been set. +func (o *Error) GetTraceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TraceId, true +} + +// SetTraceId sets field value +func (o *Error) SetTraceId(v string) { + o.TraceId = v +} + +// GetType returns the Type field value +func (o *Error) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Error) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Error) SetType(v string) { + o.Type = v +} + +func (o Error) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Error) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["code"] = o.Code + toSerialize["message"] = o.Message + toSerialize["traceId"] = o.TraceId + toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Error) 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{ + "code", + "message", + "traceId", + "type", + } + + 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) + } + } + + varError := _Error{} + + err = json.Unmarshal(data, &varError) + + if err != nil { + return err + } + + *o = Error(varError) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "code") + delete(additionalProperties, "message") + delete(additionalProperties, "traceId") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableError struct { + value *Error + isSet bool +} + +func (v NullableError) Get() *Error { + return v.value +} + +func (v *NullableError) Set(val *Error) { + v.value = val + v.isSet = true +} + +func (v NullableError) IsSet() bool { + return v.isSet +} + +func (v *NullableError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableError(val *Error) *NullableError { + return &NullableError{value: val, isSet: true} +} + +func (v NullableError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_external_s3.go b/services/sqlserverflex/v3api/model_external_s3.go new file mode 100644 index 000000000..dc49c3541 --- /dev/null +++ b/services/sqlserverflex/v3api/model_external_s3.go @@ -0,0 +1,258 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ExternalS3 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExternalS3{} + +// ExternalS3 The external S3 information +type ExternalS3 struct { + // The s3 access key id + S3AccessKey string `json:"s3_access_key"` + // The s3 access secret + S3AccessSecret string `json:"s3_access_secret"` + // The s3 bucket address + S3Bucket string `json:"s3_bucket"` + // The backup files from which the database should be restored + S3Files []S3fileInfo `json:"s3_files"` + AdditionalProperties map[string]interface{} +} + +type _ExternalS3 ExternalS3 + +// NewExternalS3 instantiates a new ExternalS3 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 NewExternalS3(s3AccessKey string, s3AccessSecret string, s3Bucket string, s3Files []S3fileInfo) *ExternalS3 { + this := ExternalS3{} + this.S3AccessKey = s3AccessKey + this.S3AccessSecret = s3AccessSecret + this.S3Bucket = s3Bucket + this.S3Files = s3Files + return &this +} + +// NewExternalS3WithDefaults instantiates a new ExternalS3 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 NewExternalS3WithDefaults() *ExternalS3 { + this := ExternalS3{} + return &this +} + +// GetS3AccessKey returns the S3AccessKey field value +func (o *ExternalS3) GetS3AccessKey() string { + if o == nil { + var ret string + return ret + } + + return o.S3AccessKey +} + +// GetS3AccessKeyOk returns a tuple with the S3AccessKey field value +// and a boolean to check if the value has been set. +func (o *ExternalS3) GetS3AccessKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.S3AccessKey, true +} + +// SetS3AccessKey sets field value +func (o *ExternalS3) SetS3AccessKey(v string) { + o.S3AccessKey = v +} + +// GetS3AccessSecret returns the S3AccessSecret field value +func (o *ExternalS3) GetS3AccessSecret() string { + if o == nil { + var ret string + return ret + } + + return o.S3AccessSecret +} + +// GetS3AccessSecretOk returns a tuple with the S3AccessSecret field value +// and a boolean to check if the value has been set. +func (o *ExternalS3) GetS3AccessSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.S3AccessSecret, true +} + +// SetS3AccessSecret sets field value +func (o *ExternalS3) SetS3AccessSecret(v string) { + o.S3AccessSecret = v +} + +// GetS3Bucket returns the S3Bucket field value +func (o *ExternalS3) GetS3Bucket() string { + if o == nil { + var ret string + return ret + } + + return o.S3Bucket +} + +// GetS3BucketOk returns a tuple with the S3Bucket field value +// and a boolean to check if the value has been set. +func (o *ExternalS3) GetS3BucketOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.S3Bucket, true +} + +// SetS3Bucket sets field value +func (o *ExternalS3) SetS3Bucket(v string) { + o.S3Bucket = v +} + +// GetS3Files returns the S3Files field value +func (o *ExternalS3) GetS3Files() []S3fileInfo { + if o == nil { + var ret []S3fileInfo + return ret + } + + return o.S3Files +} + +// GetS3FilesOk returns a tuple with the S3Files field value +// and a boolean to check if the value has been set. +func (o *ExternalS3) GetS3FilesOk() ([]S3fileInfo, bool) { + if o == nil { + return nil, false + } + return o.S3Files, true +} + +// SetS3Files sets field value +func (o *ExternalS3) SetS3Files(v []S3fileInfo) { + o.S3Files = v +} + +func (o ExternalS3) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExternalS3) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["s3_access_key"] = o.S3AccessKey + toSerialize["s3_access_secret"] = o.S3AccessSecret + toSerialize["s3_bucket"] = o.S3Bucket + toSerialize["s3_files"] = o.S3Files + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ExternalS3) 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{ + "s3_access_key", + "s3_access_secret", + "s3_bucket", + "s3_files", + } + + 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) + } + } + + varExternalS3 := _ExternalS3{} + + err = json.Unmarshal(data, &varExternalS3) + + if err != nil { + return err + } + + *o = ExternalS3(varExternalS3) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "s3_access_key") + delete(additionalProperties, "s3_access_secret") + delete(additionalProperties, "s3_bucket") + delete(additionalProperties, "s3_files") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableExternalS3 struct { + value *ExternalS3 + isSet bool +} + +func (v NullableExternalS3) Get() *ExternalS3 { + return v.value +} + +func (v *NullableExternalS3) Set(val *ExternalS3) { + v.value = val + v.isSet = true +} + +func (v NullableExternalS3) IsSet() bool { + return v.isSet +} + +func (v *NullableExternalS3) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExternalS3(val *ExternalS3) *NullableExternalS3 { + return &NullableExternalS3{value: val, isSet: true} +} + +func (v NullableExternalS3) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExternalS3) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_flavor_sort.go b/services/sqlserverflex/v3api/model_flavor_sort.go new file mode 100644 index 000000000..ac5d8ccf4 --- /dev/null +++ b/services/sqlserverflex/v3api/model_flavor_sort.go @@ -0,0 +1,146 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// FlavorSort the model 'FlavorSort' +type FlavorSort string + +// List of flavor.sort +const ( + FLAVORSORT_INDEX_DESC FlavorSort = "index.desc" + FLAVORSORT_INDEX_ASC FlavorSort = "index.asc" + FLAVORSORT_CPU_DESC FlavorSort = "cpu.desc" + FLAVORSORT_CPU_ASC FlavorSort = "cpu.asc" + FLAVORSORT_FLAVOR_DESCRIPTION_ASC FlavorSort = "flavor_description.asc" + FLAVORSORT_FLAVOR_DESCRIPTION_DESC FlavorSort = "flavor_description.desc" + FLAVORSORT_ID_DESC FlavorSort = "id.desc" + FLAVORSORT_ID_ASC FlavorSort = "id.asc" + FLAVORSORT_SIZE_MAX_DESC FlavorSort = "size_max.desc" + FLAVORSORT_SIZE_MAX_ASC FlavorSort = "size_max.asc" + FLAVORSORT_RAM_DESC FlavorSort = "ram.desc" + FLAVORSORT_RAM_ASC FlavorSort = "ram.asc" + FLAVORSORT_SIZE_MIN_DESC FlavorSort = "size_min.desc" + FLAVORSORT_SIZE_MIN_ASC FlavorSort = "size_min.asc" + FLAVORSORT_STORAGE_CLASS_ASC FlavorSort = "storage_class.asc" + FLAVORSORT_STORAGE_CLASS_DESC FlavorSort = "storage_class.desc" + FLAVORSORT_NODE_TYPE_ASC FlavorSort = "node_type.asc" + FLAVORSORT_NODE_TYPE_DESC FlavorSort = "node_type.desc" + FLAVORSORT_UNKNOWN_DEFAULT_OPEN_API FlavorSort = "unknown_default_open_api" +) + +// All allowed values of FlavorSort enum +var AllowedFlavorSortEnumValues = []FlavorSort{ + "index.desc", + "index.asc", + "cpu.desc", + "cpu.asc", + "flavor_description.asc", + "flavor_description.desc", + "id.desc", + "id.asc", + "size_max.desc", + "size_max.asc", + "ram.desc", + "ram.asc", + "size_min.desc", + "size_min.asc", + "storage_class.asc", + "storage_class.desc", + "node_type.asc", + "node_type.desc", + "unknown_default_open_api", +} + +func (v *FlavorSort) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := FlavorSort(value) + for _, existing := range AllowedFlavorSortEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = FLAVORSORT_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewFlavorSortFromValue returns a pointer to a valid FlavorSort +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewFlavorSortFromValue(v string) (*FlavorSort, error) { + ev := FlavorSort(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for FlavorSort: valid values are %v", v, AllowedFlavorSortEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v FlavorSort) IsValid() bool { + for _, existing := range AllowedFlavorSortEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to flavor.sort value +func (v FlavorSort) Ptr() *FlavorSort { + return &v +} + +type NullableFlavorSort struct { + value *FlavorSort + isSet bool +} + +func (v NullableFlavorSort) Get() *FlavorSort { + return v.value +} + +func (v *NullableFlavorSort) Set(val *FlavorSort) { + v.value = val + v.isSet = true +} + +func (v NullableFlavorSort) IsSet() bool { + return v.isSet +} + +func (v *NullableFlavorSort) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFlavorSort(val *FlavorSort) *NullableFlavorSort { + return &NullableFlavorSort{value: val, isSet: true} +} + +func (v NullableFlavorSort) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFlavorSort) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_flavor_storage_classes_storage_class.go b/services/sqlserverflex/v3api/model_flavor_storage_classes_storage_class.go new file mode 100644 index 000000000..9ce53bbcc --- /dev/null +++ b/services/sqlserverflex/v3api/model_flavor_storage_classes_storage_class.go @@ -0,0 +1,225 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the FlavorStorageClassesStorageClass type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FlavorStorageClassesStorageClass{} + +// FlavorStorageClassesStorageClass a storageClass defines how efficient the storage can work +type FlavorStorageClassesStorageClass struct { + Class string `json:"class"` + MaxIoPerSec int32 `json:"maxIoPerSec"` + MaxThroughInMb int32 `json:"maxThroughInMb"` + AdditionalProperties map[string]interface{} +} + +type _FlavorStorageClassesStorageClass FlavorStorageClassesStorageClass + +// NewFlavorStorageClassesStorageClass instantiates a new FlavorStorageClassesStorageClass 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 NewFlavorStorageClassesStorageClass(class string, maxIoPerSec int32, maxThroughInMb int32) *FlavorStorageClassesStorageClass { + this := FlavorStorageClassesStorageClass{} + this.Class = class + this.MaxIoPerSec = maxIoPerSec + this.MaxThroughInMb = maxThroughInMb + return &this +} + +// NewFlavorStorageClassesStorageClassWithDefaults instantiates a new FlavorStorageClassesStorageClass 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 NewFlavorStorageClassesStorageClassWithDefaults() *FlavorStorageClassesStorageClass { + this := FlavorStorageClassesStorageClass{} + return &this +} + +// GetClass returns the Class field value +func (o *FlavorStorageClassesStorageClass) GetClass() string { + if o == nil { + var ret string + return ret + } + + return o.Class +} + +// GetClassOk returns a tuple with the Class field value +// and a boolean to check if the value has been set. +func (o *FlavorStorageClassesStorageClass) GetClassOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Class, true +} + +// SetClass sets field value +func (o *FlavorStorageClassesStorageClass) SetClass(v string) { + o.Class = v +} + +// GetMaxIoPerSec returns the MaxIoPerSec field value +func (o *FlavorStorageClassesStorageClass) GetMaxIoPerSec() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.MaxIoPerSec +} + +// GetMaxIoPerSecOk returns a tuple with the MaxIoPerSec field value +// and a boolean to check if the value has been set. +func (o *FlavorStorageClassesStorageClass) GetMaxIoPerSecOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.MaxIoPerSec, true +} + +// SetMaxIoPerSec sets field value +func (o *FlavorStorageClassesStorageClass) SetMaxIoPerSec(v int32) { + o.MaxIoPerSec = v +} + +// GetMaxThroughInMb returns the MaxThroughInMb field value +func (o *FlavorStorageClassesStorageClass) GetMaxThroughInMb() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.MaxThroughInMb +} + +// GetMaxThroughInMbOk returns a tuple with the MaxThroughInMb field value +// and a boolean to check if the value has been set. +func (o *FlavorStorageClassesStorageClass) GetMaxThroughInMbOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.MaxThroughInMb, true +} + +// SetMaxThroughInMb sets field value +func (o *FlavorStorageClassesStorageClass) SetMaxThroughInMb(v int32) { + o.MaxThroughInMb = v +} + +func (o FlavorStorageClassesStorageClass) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FlavorStorageClassesStorageClass) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["class"] = o.Class + toSerialize["maxIoPerSec"] = o.MaxIoPerSec + toSerialize["maxThroughInMb"] = o.MaxThroughInMb + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FlavorStorageClassesStorageClass) 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{ + "class", + "maxIoPerSec", + "maxThroughInMb", + } + + 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) + } + } + + varFlavorStorageClassesStorageClass := _FlavorStorageClassesStorageClass{} + + err = json.Unmarshal(data, &varFlavorStorageClassesStorageClass) + + if err != nil { + return err + } + + *o = FlavorStorageClassesStorageClass(varFlavorStorageClassesStorageClass) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "class") + delete(additionalProperties, "maxIoPerSec") + delete(additionalProperties, "maxThroughInMb") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFlavorStorageClassesStorageClass struct { + value *FlavorStorageClassesStorageClass + isSet bool +} + +func (v NullableFlavorStorageClassesStorageClass) Get() *FlavorStorageClassesStorageClass { + return v.value +} + +func (v *NullableFlavorStorageClassesStorageClass) Set(val *FlavorStorageClassesStorageClass) { + v.value = val + v.isSet = true +} + +func (v NullableFlavorStorageClassesStorageClass) IsSet() bool { + return v.isSet +} + +func (v *NullableFlavorStorageClassesStorageClass) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFlavorStorageClassesStorageClass(val *FlavorStorageClassesStorageClass) *NullableFlavorStorageClassesStorageClass { + return &NullableFlavorStorageClassesStorageClass{value: val, isSet: true} +} + +func (v NullableFlavorStorageClassesStorageClass) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFlavorStorageClassesStorageClass) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_flavor_storage_range.go b/services/sqlserverflex/v3api/model_flavor_storage_range.go new file mode 100644 index 000000000..2f1de65e5 --- /dev/null +++ b/services/sqlserverflex/v3api/model_flavor_storage_range.go @@ -0,0 +1,198 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the FlavorStorageRange type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FlavorStorageRange{} + +// FlavorStorageRange range of maximum and minimum storage which can be ordered for the flavor in Gigabyte. +type FlavorStorageRange struct { + // maximum storage which can be ordered for the flavor in Gigabyte. + Max int32 `json:"max"` + // minimum storage which is required to order in Gigabyte. + Min int32 `json:"min"` + AdditionalProperties map[string]interface{} +} + +type _FlavorStorageRange FlavorStorageRange + +// NewFlavorStorageRange instantiates a new FlavorStorageRange 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 NewFlavorStorageRange(max int32, min int32) *FlavorStorageRange { + this := FlavorStorageRange{} + this.Max = max + this.Min = min + return &this +} + +// NewFlavorStorageRangeWithDefaults instantiates a new FlavorStorageRange 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 NewFlavorStorageRangeWithDefaults() *FlavorStorageRange { + this := FlavorStorageRange{} + return &this +} + +// GetMax returns the Max field value +func (o *FlavorStorageRange) GetMax() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Max +} + +// GetMaxOk returns a tuple with the Max field value +// and a boolean to check if the value has been set. +func (o *FlavorStorageRange) GetMaxOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Max, true +} + +// SetMax sets field value +func (o *FlavorStorageRange) SetMax(v int32) { + o.Max = v +} + +// GetMin returns the Min field value +func (o *FlavorStorageRange) GetMin() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Min +} + +// GetMinOk returns a tuple with the Min field value +// and a boolean to check if the value has been set. +func (o *FlavorStorageRange) GetMinOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Min, true +} + +// SetMin sets field value +func (o *FlavorStorageRange) SetMin(v int32) { + o.Min = v +} + +func (o FlavorStorageRange) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FlavorStorageRange) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["max"] = o.Max + toSerialize["min"] = o.Min + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FlavorStorageRange) 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{ + "max", + "min", + } + + 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) + } + } + + varFlavorStorageRange := _FlavorStorageRange{} + + err = json.Unmarshal(data, &varFlavorStorageRange) + + if err != nil { + return err + } + + *o = FlavorStorageRange(varFlavorStorageRange) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "max") + delete(additionalProperties, "min") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFlavorStorageRange struct { + value *FlavorStorageRange + isSet bool +} + +func (v NullableFlavorStorageRange) Get() *FlavorStorageRange { + return v.value +} + +func (v *NullableFlavorStorageRange) Set(val *FlavorStorageRange) { + v.value = val + v.isSet = true +} + +func (v NullableFlavorStorageRange) IsSet() bool { + return v.isSet +} + +func (v *NullableFlavorStorageRange) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFlavorStorageRange(val *FlavorStorageRange) *NullableFlavorStorageRange { + return &NullableFlavorStorageRange{value: val, isSet: true} +} + +func (v NullableFlavorStorageRange) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFlavorStorageRange) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_get_backup_response.go b/services/sqlserverflex/v3api/model_get_backup_response.go new file mode 100644 index 000000000..ff60be2a0 --- /dev/null +++ b/services/sqlserverflex/v3api/model_get_backup_response.go @@ -0,0 +1,318 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the GetBackupResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetBackupResponse{} + +// GetBackupResponse struct for GetBackupResponse +type GetBackupResponse struct { + // The time when the backup was completed in RFC3339 format. + CompletionTime string `json:"completionTime"` + // The ID of the backup. + Id int64 `json:"id"` + // The name of the backup. + Name string `json:"name"` + // The time until the backup will be retained. + RetainedUntil string `json:"retainedUntil"` + // The size of the backup in bytes. + Size int64 `json:"size"` + // The type of the backup, which can be automated or manual triggered. + Type string `json:"type"` + AdditionalProperties map[string]interface{} +} + +type _GetBackupResponse GetBackupResponse + +// NewGetBackupResponse instantiates a new GetBackupResponse 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 NewGetBackupResponse(completionTime string, id int64, name string, retainedUntil string, size int64, types string) *GetBackupResponse { + this := GetBackupResponse{} + this.CompletionTime = completionTime + this.Id = id + this.Name = name + this.RetainedUntil = retainedUntil + this.Size = size + this.Type = types + return &this +} + +// NewGetBackupResponseWithDefaults instantiates a new GetBackupResponse 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 NewGetBackupResponseWithDefaults() *GetBackupResponse { + this := GetBackupResponse{} + return &this +} + +// GetCompletionTime returns the CompletionTime field value +func (o *GetBackupResponse) GetCompletionTime() string { + if o == nil { + var ret string + return ret + } + + return o.CompletionTime +} + +// GetCompletionTimeOk returns a tuple with the CompletionTime field value +// and a boolean to check if the value has been set. +func (o *GetBackupResponse) GetCompletionTimeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CompletionTime, true +} + +// SetCompletionTime sets field value +func (o *GetBackupResponse) SetCompletionTime(v string) { + o.CompletionTime = v +} + +// GetId returns the Id field value +func (o *GetBackupResponse) GetId() int64 { + if o == nil { + var ret int64 + 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 *GetBackupResponse) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *GetBackupResponse) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *GetBackupResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GetBackupResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GetBackupResponse) SetName(v string) { + o.Name = v +} + +// GetRetainedUntil returns the RetainedUntil field value +func (o *GetBackupResponse) GetRetainedUntil() string { + if o == nil { + var ret string + return ret + } + + return o.RetainedUntil +} + +// GetRetainedUntilOk returns a tuple with the RetainedUntil field value +// and a boolean to check if the value has been set. +func (o *GetBackupResponse) GetRetainedUntilOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RetainedUntil, true +} + +// SetRetainedUntil sets field value +func (o *GetBackupResponse) SetRetainedUntil(v string) { + o.RetainedUntil = v +} + +// GetSize returns the Size field value +func (o *GetBackupResponse) GetSize() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value +// and a boolean to check if the value has been set. +func (o *GetBackupResponse) GetSizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Size, true +} + +// SetSize sets field value +func (o *GetBackupResponse) SetSize(v int64) { + o.Size = v +} + +// GetType returns the Type field value +func (o *GetBackupResponse) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *GetBackupResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *GetBackupResponse) SetType(v string) { + o.Type = v +} + +func (o GetBackupResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetBackupResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["completionTime"] = o.CompletionTime + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["retainedUntil"] = o.RetainedUntil + toSerialize["size"] = o.Size + toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GetBackupResponse) 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{ + "completionTime", + "id", + "name", + "retainedUntil", + "size", + "type", + } + + 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) + } + } + + varGetBackupResponse := _GetBackupResponse{} + + err = json.Unmarshal(data, &varGetBackupResponse) + + if err != nil { + return err + } + + *o = GetBackupResponse(varGetBackupResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "completionTime") + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "retainedUntil") + delete(additionalProperties, "size") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGetBackupResponse struct { + value *GetBackupResponse + isSet bool +} + +func (v NullableGetBackupResponse) Get() *GetBackupResponse { + return v.value +} + +func (v *NullableGetBackupResponse) Set(val *GetBackupResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetBackupResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetBackupResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetBackupResponse(val *GetBackupResponse) *NullableGetBackupResponse { + return &NullableGetBackupResponse{value: val, isSet: true} +} + +func (v NullableGetBackupResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetBackupResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_get_database_response.go b/services/sqlserverflex/v3api/model_get_database_response.go new file mode 100644 index 000000000..11173a0b2 --- /dev/null +++ b/services/sqlserverflex/v3api/model_get_database_response.go @@ -0,0 +1,288 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the GetDatabaseResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetDatabaseResponse{} + +// GetDatabaseResponse struct for GetDatabaseResponse +type GetDatabaseResponse struct { + // The collation of the database. This database collation should match the *collation_name* of one of the collations given by the **Get database collation list** endpoint. + CollationName string `json:"collationName"` + // CompatibilityLevel of the Database. + CompatibilityLevel int32 `json:"compatibilityLevel"` + // The id of the database. + Id int64 `json:"id"` + // The name of the database. + Name string `json:"name"` + // The owner of the database. + Owner string `json:"owner"` + AdditionalProperties map[string]interface{} +} + +type _GetDatabaseResponse GetDatabaseResponse + +// NewGetDatabaseResponse instantiates a new GetDatabaseResponse 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 NewGetDatabaseResponse(collationName string, compatibilityLevel int32, id int64, name string, owner string) *GetDatabaseResponse { + this := GetDatabaseResponse{} + this.CollationName = collationName + this.CompatibilityLevel = compatibilityLevel + this.Id = id + this.Name = name + this.Owner = owner + return &this +} + +// NewGetDatabaseResponseWithDefaults instantiates a new GetDatabaseResponse 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 NewGetDatabaseResponseWithDefaults() *GetDatabaseResponse { + this := GetDatabaseResponse{} + return &this +} + +// GetCollationName returns the CollationName field value +func (o *GetDatabaseResponse) GetCollationName() string { + if o == nil { + var ret string + return ret + } + + return o.CollationName +} + +// GetCollationNameOk returns a tuple with the CollationName field value +// and a boolean to check if the value has been set. +func (o *GetDatabaseResponse) GetCollationNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CollationName, true +} + +// SetCollationName sets field value +func (o *GetDatabaseResponse) SetCollationName(v string) { + o.CollationName = v +} + +// GetCompatibilityLevel returns the CompatibilityLevel field value +func (o *GetDatabaseResponse) GetCompatibilityLevel() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.CompatibilityLevel +} + +// GetCompatibilityLevelOk returns a tuple with the CompatibilityLevel field value +// and a boolean to check if the value has been set. +func (o *GetDatabaseResponse) GetCompatibilityLevelOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.CompatibilityLevel, true +} + +// SetCompatibilityLevel sets field value +func (o *GetDatabaseResponse) SetCompatibilityLevel(v int32) { + o.CompatibilityLevel = v +} + +// GetId returns the Id field value +func (o *GetDatabaseResponse) GetId() int64 { + if o == nil { + var ret int64 + 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 *GetDatabaseResponse) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *GetDatabaseResponse) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *GetDatabaseResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GetDatabaseResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GetDatabaseResponse) SetName(v string) { + o.Name = v +} + +// GetOwner returns the Owner field value +func (o *GetDatabaseResponse) GetOwner() string { + if o == nil { + var ret string + return ret + } + + return o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value +// and a boolean to check if the value has been set. +func (o *GetDatabaseResponse) GetOwnerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Owner, true +} + +// SetOwner sets field value +func (o *GetDatabaseResponse) SetOwner(v string) { + o.Owner = v +} + +func (o GetDatabaseResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetDatabaseResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["collationName"] = o.CollationName + toSerialize["compatibilityLevel"] = o.CompatibilityLevel + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["owner"] = o.Owner + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GetDatabaseResponse) 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{ + "collationName", + "compatibilityLevel", + "id", + "name", + "owner", + } + + 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) + } + } + + varGetDatabaseResponse := _GetDatabaseResponse{} + + err = json.Unmarshal(data, &varGetDatabaseResponse) + + if err != nil { + return err + } + + *o = GetDatabaseResponse(varGetDatabaseResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "collationName") + delete(additionalProperties, "compatibilityLevel") + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "owner") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGetDatabaseResponse struct { + value *GetDatabaseResponse + isSet bool +} + +func (v NullableGetDatabaseResponse) Get() *GetDatabaseResponse { + return v.value +} + +func (v *NullableGetDatabaseResponse) Set(val *GetDatabaseResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetDatabaseResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetDatabaseResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetDatabaseResponse(val *GetDatabaseResponse) *NullableGetDatabaseResponse { + return &NullableGetDatabaseResponse{value: val, isSet: true} +} + +func (v NullableGetDatabaseResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetDatabaseResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_get_instance_response.go b/services/sqlserverflex/v3api/model_get_instance_response.go new file mode 100644 index 000000000..b90b9840e --- /dev/null +++ b/services/sqlserverflex/v3api/model_get_instance_response.go @@ -0,0 +1,567 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the GetInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetInstanceResponse{} + +// GetInstanceResponse struct for GetInstanceResponse +type GetInstanceResponse struct { + // The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule. + BackupSchedule string `json:"backupSchedule"` + Edition InstanceEdition `json:"edition"` + Encryption *InstanceEncryption `json:"encryption,omitempty"` + // The id of the instance flavor. + FlavorId string `json:"flavorId"` + // The ID of the instance. + Id string `json:"id"` + // Whether the instance can be deleted or not. + IsDeletable bool `json:"isDeletable"` + // A dictionary of user-defined key-value pairs used to categorize or organize the resource. **Rules for Keys:** * Must be between 1 and 63 characters long. * Must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$` * **Restriction:** The prefix `stackit-` is strictly reserved and cannot be used. **Rules for Values:** * Must be between 0 (empty string) and 63 characters long. * If not empty, must begin and end with an alphanumeric character. * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$` + Labels *map[string]string `json:"labels,omitempty"` + // The name of the instance. + Name string `json:"name"` + Network InstanceNetwork `json:"network"` + Replicas Replicas `json:"replicas"` + // The days for how long the backup files should be stored before cleaned up. 30 to 90 + RetentionDays int32 `json:"retentionDays"` + State State `json:"state"` + Storage Storage `json:"storage"` + Version InstanceVersion `json:"version"` + AdditionalProperties map[string]interface{} +} + +type _GetInstanceResponse GetInstanceResponse + +// NewGetInstanceResponse instantiates a new GetInstanceResponse 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 NewGetInstanceResponse(backupSchedule string, edition InstanceEdition, flavorId string, id string, isDeletable bool, name string, network InstanceNetwork, replicas Replicas, retentionDays int32, state State, storage Storage, version InstanceVersion) *GetInstanceResponse { + this := GetInstanceResponse{} + this.BackupSchedule = backupSchedule + this.Edition = edition + this.FlavorId = flavorId + this.Id = id + this.IsDeletable = isDeletable + this.Name = name + this.Network = network + this.Replicas = replicas + this.RetentionDays = retentionDays + this.State = state + this.Storage = storage + this.Version = version + return &this +} + +// NewGetInstanceResponseWithDefaults instantiates a new GetInstanceResponse 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 NewGetInstanceResponseWithDefaults() *GetInstanceResponse { + this := GetInstanceResponse{} + return &this +} + +// GetBackupSchedule returns the BackupSchedule field value +func (o *GetInstanceResponse) GetBackupSchedule() string { + if o == nil { + var ret string + return ret + } + + return o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetBackupScheduleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BackupSchedule, true +} + +// SetBackupSchedule sets field value +func (o *GetInstanceResponse) SetBackupSchedule(v string) { + o.BackupSchedule = v +} + +// GetEdition returns the Edition field value +func (o *GetInstanceResponse) GetEdition() InstanceEdition { + if o == nil { + var ret InstanceEdition + return ret + } + + return o.Edition +} + +// GetEditionOk returns a tuple with the Edition field value +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetEditionOk() (*InstanceEdition, bool) { + if o == nil { + return nil, false + } + return &o.Edition, true +} + +// SetEdition sets field value +func (o *GetInstanceResponse) SetEdition(v InstanceEdition) { + o.Edition = v +} + +// GetEncryption returns the Encryption field value if set, zero value otherwise. +func (o *GetInstanceResponse) GetEncryption() InstanceEncryption { + if o == nil || IsNil(o.Encryption) { + var ret InstanceEncryption + return ret + } + return *o.Encryption +} + +// GetEncryptionOk returns a tuple with the Encryption field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetEncryptionOk() (*InstanceEncryption, bool) { + if o == nil || IsNil(o.Encryption) { + return nil, false + } + return o.Encryption, true +} + +// HasEncryption returns a boolean if a field has been set. +func (o *GetInstanceResponse) HasEncryption() bool { + if o != nil && !IsNil(o.Encryption) { + return true + } + + return false +} + +// SetEncryption gets a reference to the given InstanceEncryption and assigns it to the Encryption field. +func (o *GetInstanceResponse) SetEncryption(v InstanceEncryption) { + o.Encryption = &v +} + +// GetFlavorId returns the FlavorId field value +func (o *GetInstanceResponse) GetFlavorId() string { + if o == nil { + var ret string + return ret + } + + return o.FlavorId +} + +// GetFlavorIdOk returns a tuple with the FlavorId field value +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetFlavorIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FlavorId, true +} + +// SetFlavorId sets field value +func (o *GetInstanceResponse) SetFlavorId(v string) { + o.FlavorId = v +} + +// GetId returns the Id field value +func (o *GetInstanceResponse) 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 *GetInstanceResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *GetInstanceResponse) SetId(v string) { + o.Id = v +} + +// GetIsDeletable returns the IsDeletable field value +func (o *GetInstanceResponse) GetIsDeletable() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeletable +} + +// GetIsDeletableOk returns a tuple with the IsDeletable field value +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetIsDeletableOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeletable, true +} + +// SetIsDeletable sets field value +func (o *GetInstanceResponse) SetIsDeletable(v bool) { + o.IsDeletable = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *GetInstanceResponse) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *GetInstanceResponse) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *GetInstanceResponse) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetName returns the Name field value +func (o *GetInstanceResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GetInstanceResponse) SetName(v string) { + o.Name = v +} + +// GetNetwork returns the Network field value +func (o *GetInstanceResponse) GetNetwork() InstanceNetwork { + if o == nil { + var ret InstanceNetwork + return ret + } + + return o.Network +} + +// GetNetworkOk returns a tuple with the Network field value +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetNetworkOk() (*InstanceNetwork, bool) { + if o == nil { + return nil, false + } + return &o.Network, true +} + +// SetNetwork sets field value +func (o *GetInstanceResponse) SetNetwork(v InstanceNetwork) { + o.Network = v +} + +// GetReplicas returns the Replicas field value +func (o *GetInstanceResponse) GetReplicas() Replicas { + if o == nil { + var ret Replicas + return ret + } + + return o.Replicas +} + +// GetReplicasOk returns a tuple with the Replicas field value +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetReplicasOk() (*Replicas, bool) { + if o == nil { + return nil, false + } + return &o.Replicas, true +} + +// SetReplicas sets field value +func (o *GetInstanceResponse) SetReplicas(v Replicas) { + o.Replicas = v +} + +// GetRetentionDays returns the RetentionDays field value +func (o *GetInstanceResponse) GetRetentionDays() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RetentionDays +} + +// GetRetentionDaysOk returns a tuple with the RetentionDays field value +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetRetentionDaysOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RetentionDays, true +} + +// SetRetentionDays sets field value +func (o *GetInstanceResponse) SetRetentionDays(v int32) { + o.RetentionDays = v +} + +// GetState returns the State field value +func (o *GetInstanceResponse) GetState() State { + if o == nil { + var ret State + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetStateOk() (*State, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *GetInstanceResponse) SetState(v State) { + o.State = v +} + +// GetStorage returns the Storage field value +func (o *GetInstanceResponse) GetStorage() Storage { + if o == nil { + var ret Storage + return ret + } + + return o.Storage +} + +// GetStorageOk returns a tuple with the Storage field value +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetStorageOk() (*Storage, bool) { + if o == nil { + return nil, false + } + return &o.Storage, true +} + +// SetStorage sets field value +func (o *GetInstanceResponse) SetStorage(v Storage) { + o.Storage = v +} + +// GetVersion returns the Version field value +func (o *GetInstanceResponse) GetVersion() InstanceVersion { + if o == nil { + var ret InstanceVersion + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetVersionOk() (*InstanceVersion, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *GetInstanceResponse) SetVersion(v InstanceVersion) { + o.Version = v +} + +func (o GetInstanceResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["backupSchedule"] = o.BackupSchedule + toSerialize["edition"] = o.Edition + if !IsNil(o.Encryption) { + toSerialize["encryption"] = o.Encryption + } + toSerialize["flavorId"] = o.FlavorId + toSerialize["id"] = o.Id + toSerialize["isDeletable"] = o.IsDeletable + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + toSerialize["network"] = o.Network + toSerialize["replicas"] = o.Replicas + toSerialize["retentionDays"] = o.RetentionDays + toSerialize["state"] = o.State + toSerialize["storage"] = o.Storage + toSerialize["version"] = o.Version + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GetInstanceResponse) 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{ + "backupSchedule", + "edition", + "flavorId", + "id", + "isDeletable", + "name", + "network", + "replicas", + "retentionDays", + "state", + "storage", + "version", + } + + 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) + } + } + + varGetInstanceResponse := _GetInstanceResponse{} + + err = json.Unmarshal(data, &varGetInstanceResponse) + + if err != nil { + return err + } + + *o = GetInstanceResponse(varGetInstanceResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "backupSchedule") + delete(additionalProperties, "edition") + delete(additionalProperties, "encryption") + delete(additionalProperties, "flavorId") + delete(additionalProperties, "id") + delete(additionalProperties, "isDeletable") + delete(additionalProperties, "labels") + delete(additionalProperties, "name") + delete(additionalProperties, "network") + delete(additionalProperties, "replicas") + delete(additionalProperties, "retentionDays") + delete(additionalProperties, "state") + delete(additionalProperties, "storage") + delete(additionalProperties, "version") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGetInstanceResponse struct { + value *GetInstanceResponse + isSet bool +} + +func (v NullableGetInstanceResponse) Get() *GetInstanceResponse { + return v.value +} + +func (v *NullableGetInstanceResponse) Set(val *GetInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetInstanceResponse(val *GetInstanceResponse) *NullableGetInstanceResponse { + return &NullableGetInstanceResponse{value: val, isSet: true} +} + +func (v NullableGetInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_get_user_response.go b/services/sqlserverflex/v3api/model_get_user_response.go new file mode 100644 index 000000000..4ab10c29f --- /dev/null +++ b/services/sqlserverflex/v3api/model_get_user_response.go @@ -0,0 +1,348 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the GetUserResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetUserResponse{} + +// GetUserResponse struct for GetUserResponse +type GetUserResponse struct { + // The default database for a user of the instance. + DefaultDatabase string `json:"default_database"` + // The host of the instance in which the user belongs to. + Host string `json:"host"` + // The ID of the user. + Id int64 `json:"id"` + // The port of the instance in which the user belongs to. + Port int32 `json:"port"` + // A list of user roles. + Roles []string `json:"roles"` + // The current status of the user. + Status string `json:"status"` + // The name of the user. + Username string `json:"username"` + AdditionalProperties map[string]interface{} +} + +type _GetUserResponse GetUserResponse + +// NewGetUserResponse instantiates a new GetUserResponse 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 NewGetUserResponse(defaultDatabase string, host string, id int64, port int32, roles []string, status string, username string) *GetUserResponse { + this := GetUserResponse{} + this.DefaultDatabase = defaultDatabase + this.Host = host + this.Id = id + this.Port = port + this.Roles = roles + this.Status = status + this.Username = username + return &this +} + +// NewGetUserResponseWithDefaults instantiates a new GetUserResponse 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 NewGetUserResponseWithDefaults() *GetUserResponse { + this := GetUserResponse{} + return &this +} + +// GetDefaultDatabase returns the DefaultDatabase field value +func (o *GetUserResponse) GetDefaultDatabase() string { + if o == nil { + var ret string + return ret + } + + return o.DefaultDatabase +} + +// GetDefaultDatabaseOk returns a tuple with the DefaultDatabase field value +// and a boolean to check if the value has been set. +func (o *GetUserResponse) GetDefaultDatabaseOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DefaultDatabase, true +} + +// SetDefaultDatabase sets field value +func (o *GetUserResponse) SetDefaultDatabase(v string) { + o.DefaultDatabase = v +} + +// GetHost returns the Host field value +func (o *GetUserResponse) GetHost() string { + if o == nil { + var ret string + return ret + } + + return o.Host +} + +// GetHostOk returns a tuple with the Host field value +// and a boolean to check if the value has been set. +func (o *GetUserResponse) GetHostOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Host, true +} + +// SetHost sets field value +func (o *GetUserResponse) SetHost(v string) { + o.Host = v +} + +// GetId returns the Id field value +func (o *GetUserResponse) GetId() int64 { + if o == nil { + var ret int64 + 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 *GetUserResponse) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *GetUserResponse) SetId(v int64) { + o.Id = v +} + +// GetPort returns the Port field value +func (o *GetUserResponse) GetPort() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Port +} + +// GetPortOk returns a tuple with the Port field value +// and a boolean to check if the value has been set. +func (o *GetUserResponse) GetPortOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Port, true +} + +// SetPort sets field value +func (o *GetUserResponse) SetPort(v int32) { + o.Port = v +} + +// GetRoles returns the Roles field value +func (o *GetUserResponse) GetRoles() []string { + if o == nil { + var ret []string + return ret + } + + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value +// and a boolean to check if the value has been set. +func (o *GetUserResponse) GetRolesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Roles, true +} + +// SetRoles sets field value +func (o *GetUserResponse) SetRoles(v []string) { + o.Roles = v +} + +// GetStatus returns the Status field value +func (o *GetUserResponse) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *GetUserResponse) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *GetUserResponse) SetStatus(v string) { + o.Status = v +} + +// GetUsername returns the Username field value +func (o *GetUserResponse) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *GetUserResponse) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *GetUserResponse) SetUsername(v string) { + o.Username = v +} + +func (o GetUserResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetUserResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["default_database"] = o.DefaultDatabase + toSerialize["host"] = o.Host + toSerialize["id"] = o.Id + toSerialize["port"] = o.Port + toSerialize["roles"] = o.Roles + toSerialize["status"] = o.Status + toSerialize["username"] = o.Username + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GetUserResponse) 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{ + "default_database", + "host", + "id", + "port", + "roles", + "status", + "username", + } + + 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) + } + } + + varGetUserResponse := _GetUserResponse{} + + err = json.Unmarshal(data, &varGetUserResponse) + + if err != nil { + return err + } + + *o = GetUserResponse(varGetUserResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "default_database") + delete(additionalProperties, "host") + delete(additionalProperties, "id") + delete(additionalProperties, "port") + delete(additionalProperties, "roles") + delete(additionalProperties, "status") + delete(additionalProperties, "username") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableGetUserResponse struct { + value *GetUserResponse + isSet bool +} + +func (v NullableGetUserResponse) Get() *GetUserResponse { + return v.value +} + +func (v *NullableGetUserResponse) Set(val *GetUserResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetUserResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetUserResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetUserResponse(val *GetUserResponse) *NullableGetUserResponse { + return &NullableGetUserResponse{value: val, isSet: true} +} + +func (v NullableGetUserResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetUserResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_instance_edition.go b/services/sqlserverflex/v3api/model_instance_edition.go new file mode 100644 index 000000000..4682dcdb5 --- /dev/null +++ b/services/sqlserverflex/v3api/model_instance_edition.go @@ -0,0 +1,116 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// InstanceEdition Edition of the MSSQL server instance +type InstanceEdition string + +// List of instance.edition +const ( + INSTANCEEDITION_STANDARD InstanceEdition = "Standard" + INSTANCEEDITION_ENTERPRISE_CORE InstanceEdition = "EnterpriseCore" + INSTANCEEDITION_DEVELOPER InstanceEdition = "developer" + INSTANCEEDITION_UNKNOWN_DEFAULT_OPEN_API InstanceEdition = "unknown_default_open_api" +) + +// All allowed values of InstanceEdition enum +var AllowedInstanceEditionEnumValues = []InstanceEdition{ + "Standard", + "EnterpriseCore", + "developer", + "unknown_default_open_api", +} + +func (v *InstanceEdition) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := InstanceEdition(value) + for _, existing := range AllowedInstanceEditionEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = INSTANCEEDITION_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewInstanceEditionFromValue returns a pointer to a valid InstanceEdition +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewInstanceEditionFromValue(v string) (*InstanceEdition, error) { + ev := InstanceEdition(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for InstanceEdition: valid values are %v", v, AllowedInstanceEditionEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v InstanceEdition) IsValid() bool { + for _, existing := range AllowedInstanceEditionEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to instance.edition value +func (v InstanceEdition) Ptr() *InstanceEdition { + return &v +} + +type NullableInstanceEdition struct { + value *InstanceEdition + isSet bool +} + +func (v NullableInstanceEdition) Get() *InstanceEdition { + return v.value +} + +func (v *NullableInstanceEdition) Set(val *InstanceEdition) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceEdition) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceEdition) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceEdition(val *InstanceEdition) *NullableInstanceEdition { + return &NullableInstanceEdition{value: val, isSet: true} +} + +func (v NullableInstanceEdition) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceEdition) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_instance_encryption.go b/services/sqlserverflex/v3api/model_instance_encryption.go new file mode 100644 index 000000000..762f111fa --- /dev/null +++ b/services/sqlserverflex/v3api/model_instance_encryption.go @@ -0,0 +1,257 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the InstanceEncryption type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceEncryption{} + +// InstanceEncryption this defines which key to use for storage encryption +type InstanceEncryption struct { + // The key identifier + KekKeyId string `json:"kekKeyId"` + // The keyring identifier + KekKeyRingId string `json:"kekKeyRingId"` + // The key version + KekKeyVersion string `json:"kekKeyVersion"` + ServiceAccount string `json:"serviceAccount"` + AdditionalProperties map[string]interface{} +} + +type _InstanceEncryption InstanceEncryption + +// NewInstanceEncryption instantiates a new InstanceEncryption 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 NewInstanceEncryption(kekKeyId string, kekKeyRingId string, kekKeyVersion string, serviceAccount string) *InstanceEncryption { + this := InstanceEncryption{} + this.KekKeyId = kekKeyId + this.KekKeyRingId = kekKeyRingId + this.KekKeyVersion = kekKeyVersion + this.ServiceAccount = serviceAccount + return &this +} + +// NewInstanceEncryptionWithDefaults instantiates a new InstanceEncryption 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 NewInstanceEncryptionWithDefaults() *InstanceEncryption { + this := InstanceEncryption{} + return &this +} + +// GetKekKeyId returns the KekKeyId field value +func (o *InstanceEncryption) GetKekKeyId() string { + if o == nil { + var ret string + return ret + } + + return o.KekKeyId +} + +// GetKekKeyIdOk returns a tuple with the KekKeyId field value +// and a boolean to check if the value has been set. +func (o *InstanceEncryption) GetKekKeyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KekKeyId, true +} + +// SetKekKeyId sets field value +func (o *InstanceEncryption) SetKekKeyId(v string) { + o.KekKeyId = v +} + +// GetKekKeyRingId returns the KekKeyRingId field value +func (o *InstanceEncryption) GetKekKeyRingId() string { + if o == nil { + var ret string + return ret + } + + return o.KekKeyRingId +} + +// GetKekKeyRingIdOk returns a tuple with the KekKeyRingId field value +// and a boolean to check if the value has been set. +func (o *InstanceEncryption) GetKekKeyRingIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KekKeyRingId, true +} + +// SetKekKeyRingId sets field value +func (o *InstanceEncryption) SetKekKeyRingId(v string) { + o.KekKeyRingId = v +} + +// GetKekKeyVersion returns the KekKeyVersion field value +func (o *InstanceEncryption) GetKekKeyVersion() string { + if o == nil { + var ret string + return ret + } + + return o.KekKeyVersion +} + +// GetKekKeyVersionOk returns a tuple with the KekKeyVersion field value +// and a boolean to check if the value has been set. +func (o *InstanceEncryption) GetKekKeyVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KekKeyVersion, true +} + +// SetKekKeyVersion sets field value +func (o *InstanceEncryption) SetKekKeyVersion(v string) { + o.KekKeyVersion = v +} + +// GetServiceAccount returns the ServiceAccount field value +func (o *InstanceEncryption) GetServiceAccount() string { + if o == nil { + var ret string + return ret + } + + return o.ServiceAccount +} + +// GetServiceAccountOk returns a tuple with the ServiceAccount field value +// and a boolean to check if the value has been set. +func (o *InstanceEncryption) GetServiceAccountOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ServiceAccount, true +} + +// SetServiceAccount sets field value +func (o *InstanceEncryption) SetServiceAccount(v string) { + o.ServiceAccount = v +} + +func (o InstanceEncryption) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InstanceEncryption) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["kekKeyId"] = o.KekKeyId + toSerialize["kekKeyRingId"] = o.KekKeyRingId + toSerialize["kekKeyVersion"] = o.KekKeyVersion + toSerialize["serviceAccount"] = o.ServiceAccount + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *InstanceEncryption) 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{ + "kekKeyId", + "kekKeyRingId", + "kekKeyVersion", + "serviceAccount", + } + + 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) + } + } + + varInstanceEncryption := _InstanceEncryption{} + + err = json.Unmarshal(data, &varInstanceEncryption) + + if err != nil { + return err + } + + *o = InstanceEncryption(varInstanceEncryption) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "kekKeyId") + delete(additionalProperties, "kekKeyRingId") + delete(additionalProperties, "kekKeyVersion") + delete(additionalProperties, "serviceAccount") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableInstanceEncryption struct { + value *InstanceEncryption + isSet bool +} + +func (v NullableInstanceEncryption) Get() *InstanceEncryption { + return v.value +} + +func (v *NullableInstanceEncryption) Set(val *InstanceEncryption) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceEncryption) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceEncryption) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceEncryption(val *InstanceEncryption) *NullableInstanceEncryption { + return &NullableInstanceEncryption{value: val, isSet: true} +} + +func (v NullableInstanceEncryption) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceEncryption) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_instance_network.go b/services/sqlserverflex/v3api/model_instance_network.go new file mode 100644 index 000000000..685220381 --- /dev/null +++ b/services/sqlserverflex/v3api/model_instance_network.go @@ -0,0 +1,270 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" +) + +// checks if the InstanceNetwork type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceNetwork{} + +// InstanceNetwork The access configuration of the instance +type InstanceNetwork struct { + AccessScope *InstanceNetworkAccessScope `json:"accessScope,omitempty"` + // List of IPV4 cidr. + Acl []string `json:"acl,omitempty"` + InstanceAddress *string `json:"instanceAddress,omitempty"` + RouterAddress *string `json:"routerAddress,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _InstanceNetwork InstanceNetwork + +// NewInstanceNetwork instantiates a new InstanceNetwork 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 NewInstanceNetwork() *InstanceNetwork { + this := InstanceNetwork{} + var accessScope InstanceNetworkAccessScope = INSTANCENETWORKACCESSSCOPE_PUBLIC + this.AccessScope = &accessScope + return &this +} + +// NewInstanceNetworkWithDefaults instantiates a new InstanceNetwork 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 NewInstanceNetworkWithDefaults() *InstanceNetwork { + this := InstanceNetwork{} + var accessScope InstanceNetworkAccessScope = INSTANCENETWORKACCESSSCOPE_PUBLIC + this.AccessScope = &accessScope + return &this +} + +// GetAccessScope returns the AccessScope field value if set, zero value otherwise. +func (o *InstanceNetwork) GetAccessScope() InstanceNetworkAccessScope { + if o == nil || IsNil(o.AccessScope) { + var ret InstanceNetworkAccessScope + return ret + } + return *o.AccessScope +} + +// GetAccessScopeOk returns a tuple with the AccessScope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceNetwork) GetAccessScopeOk() (*InstanceNetworkAccessScope, bool) { + if o == nil || IsNil(o.AccessScope) { + return nil, false + } + return o.AccessScope, true +} + +// HasAccessScope returns a boolean if a field has been set. +func (o *InstanceNetwork) HasAccessScope() bool { + if o != nil && !IsNil(o.AccessScope) { + return true + } + + return false +} + +// SetAccessScope gets a reference to the given InstanceNetworkAccessScope and assigns it to the AccessScope field. +func (o *InstanceNetwork) SetAccessScope(v InstanceNetworkAccessScope) { + o.AccessScope = &v +} + +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *InstanceNetwork) GetAcl() []string { + if o == nil || IsNil(o.Acl) { + var ret []string + return ret + } + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceNetwork) GetAclOk() ([]string, bool) { + if o == nil || IsNil(o.Acl) { + return nil, false + } + return o.Acl, true +} + +// HasAcl returns a boolean if a field has been set. +func (o *InstanceNetwork) HasAcl() bool { + if o != nil && !IsNil(o.Acl) { + return true + } + + return false +} + +// SetAcl gets a reference to the given []string and assigns it to the Acl field. +func (o *InstanceNetwork) SetAcl(v []string) { + o.Acl = v +} + +// GetInstanceAddress returns the InstanceAddress field value if set, zero value otherwise. +func (o *InstanceNetwork) GetInstanceAddress() string { + if o == nil || IsNil(o.InstanceAddress) { + var ret string + return ret + } + return *o.InstanceAddress +} + +// GetInstanceAddressOk returns a tuple with the InstanceAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceNetwork) GetInstanceAddressOk() (*string, bool) { + if o == nil || IsNil(o.InstanceAddress) { + return nil, false + } + return o.InstanceAddress, true +} + +// HasInstanceAddress returns a boolean if a field has been set. +func (o *InstanceNetwork) HasInstanceAddress() bool { + if o != nil && !IsNil(o.InstanceAddress) { + return true + } + + return false +} + +// SetInstanceAddress gets a reference to the given string and assigns it to the InstanceAddress field. +func (o *InstanceNetwork) SetInstanceAddress(v string) { + o.InstanceAddress = &v +} + +// GetRouterAddress returns the RouterAddress field value if set, zero value otherwise. +func (o *InstanceNetwork) GetRouterAddress() string { + if o == nil || IsNil(o.RouterAddress) { + var ret string + return ret + } + return *o.RouterAddress +} + +// GetRouterAddressOk returns a tuple with the RouterAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceNetwork) GetRouterAddressOk() (*string, bool) { + if o == nil || IsNil(o.RouterAddress) { + return nil, false + } + return o.RouterAddress, true +} + +// HasRouterAddress returns a boolean if a field has been set. +func (o *InstanceNetwork) HasRouterAddress() bool { + if o != nil && !IsNil(o.RouterAddress) { + return true + } + + return false +} + +// SetRouterAddress gets a reference to the given string and assigns it to the RouterAddress field. +func (o *InstanceNetwork) SetRouterAddress(v string) { + o.RouterAddress = &v +} + +func (o InstanceNetwork) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InstanceNetwork) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AccessScope) { + toSerialize["accessScope"] = o.AccessScope + } + if !IsNil(o.Acl) { + toSerialize["acl"] = o.Acl + } + if !IsNil(o.InstanceAddress) { + toSerialize["instanceAddress"] = o.InstanceAddress + } + if !IsNil(o.RouterAddress) { + toSerialize["routerAddress"] = o.RouterAddress + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *InstanceNetwork) UnmarshalJSON(data []byte) (err error) { + varInstanceNetwork := _InstanceNetwork{} + + err = json.Unmarshal(data, &varInstanceNetwork) + + if err != nil { + return err + } + + *o = InstanceNetwork(varInstanceNetwork) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "accessScope") + delete(additionalProperties, "acl") + delete(additionalProperties, "instanceAddress") + delete(additionalProperties, "routerAddress") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableInstanceNetwork struct { + value *InstanceNetwork + isSet bool +} + +func (v NullableInstanceNetwork) Get() *InstanceNetwork { + return v.value +} + +func (v *NullableInstanceNetwork) Set(val *InstanceNetwork) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceNetwork) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceNetwork) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceNetwork(val *InstanceNetwork) *NullableInstanceNetwork { + return &NullableInstanceNetwork{value: val, isSet: true} +} + +func (v NullableInstanceNetwork) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceNetwork) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_instance_network_access_scope.go b/services/sqlserverflex/v3api/model_instance_network_access_scope.go new file mode 100644 index 000000000..2e5f40783 --- /dev/null +++ b/services/sqlserverflex/v3api/model_instance_network_access_scope.go @@ -0,0 +1,114 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// InstanceNetworkAccessScope The network access scope of the instance ⚠️ **Note:** This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected. +type InstanceNetworkAccessScope string + +// List of instance.network.accessScope +const ( + INSTANCENETWORKACCESSSCOPE_PUBLIC InstanceNetworkAccessScope = "PUBLIC" + INSTANCENETWORKACCESSSCOPE_SNA InstanceNetworkAccessScope = "SNA" + INSTANCENETWORKACCESSSCOPE_UNKNOWN_DEFAULT_OPEN_API InstanceNetworkAccessScope = "unknown_default_open_api" +) + +// All allowed values of InstanceNetworkAccessScope enum +var AllowedInstanceNetworkAccessScopeEnumValues = []InstanceNetworkAccessScope{ + "PUBLIC", + "SNA", + "unknown_default_open_api", +} + +func (v *InstanceNetworkAccessScope) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := InstanceNetworkAccessScope(value) + for _, existing := range AllowedInstanceNetworkAccessScopeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = INSTANCENETWORKACCESSSCOPE_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewInstanceNetworkAccessScopeFromValue returns a pointer to a valid InstanceNetworkAccessScope +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewInstanceNetworkAccessScopeFromValue(v string) (*InstanceNetworkAccessScope, error) { + ev := InstanceNetworkAccessScope(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for InstanceNetworkAccessScope: valid values are %v", v, AllowedInstanceNetworkAccessScopeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v InstanceNetworkAccessScope) IsValid() bool { + for _, existing := range AllowedInstanceNetworkAccessScopeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to instance.network.accessScope value +func (v InstanceNetworkAccessScope) Ptr() *InstanceNetworkAccessScope { + return &v +} + +type NullableInstanceNetworkAccessScope struct { + value *InstanceNetworkAccessScope + isSet bool +} + +func (v NullableInstanceNetworkAccessScope) Get() *InstanceNetworkAccessScope { + return v.value +} + +func (v *NullableInstanceNetworkAccessScope) Set(val *InstanceNetworkAccessScope) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceNetworkAccessScope) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceNetworkAccessScope) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceNetworkAccessScope(val *InstanceNetworkAccessScope) *NullableInstanceNetworkAccessScope { + return &NullableInstanceNetworkAccessScope{value: val, isSet: true} +} + +func (v NullableInstanceNetworkAccessScope) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceNetworkAccessScope) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_instance_sort.go b/services/sqlserverflex/v3api/model_instance_sort.go new file mode 100644 index 000000000..fdda55714 --- /dev/null +++ b/services/sqlserverflex/v3api/model_instance_sort.go @@ -0,0 +1,130 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// InstanceSort the model 'InstanceSort' +type InstanceSort string + +// List of instance.sort +const ( + INSTANCESORT_INDEX_DESC InstanceSort = "index.desc" + INSTANCESORT_INDEX_ASC InstanceSort = "index.asc" + INSTANCESORT_ID_DESC InstanceSort = "id.desc" + INSTANCESORT_ID_ASC InstanceSort = "id.asc" + INSTANCESORT_IS_DELETABLE_DESC InstanceSort = "is_deletable.desc" + INSTANCESORT_IS_DELETABLE_ASC InstanceSort = "is_deletable.asc" + INSTANCESORT_NAME_ASC InstanceSort = "name.asc" + INSTANCESORT_NAME_DESC InstanceSort = "name.desc" + INSTANCESORT_STATE_ASC InstanceSort = "state.asc" + INSTANCESORT_STATE_DESC InstanceSort = "state.desc" + INSTANCESORT_UNKNOWN_DEFAULT_OPEN_API InstanceSort = "unknown_default_open_api" +) + +// All allowed values of InstanceSort enum +var AllowedInstanceSortEnumValues = []InstanceSort{ + "index.desc", + "index.asc", + "id.desc", + "id.asc", + "is_deletable.desc", + "is_deletable.asc", + "name.asc", + "name.desc", + "state.asc", + "state.desc", + "unknown_default_open_api", +} + +func (v *InstanceSort) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := InstanceSort(value) + for _, existing := range AllowedInstanceSortEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = INSTANCESORT_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewInstanceSortFromValue returns a pointer to a valid InstanceSort +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewInstanceSortFromValue(v string) (*InstanceSort, error) { + ev := InstanceSort(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for InstanceSort: valid values are %v", v, AllowedInstanceSortEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v InstanceSort) IsValid() bool { + for _, existing := range AllowedInstanceSortEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to instance.sort value +func (v InstanceSort) Ptr() *InstanceSort { + return &v +} + +type NullableInstanceSort struct { + value *InstanceSort + isSet bool +} + +func (v NullableInstanceSort) Get() *InstanceSort { + return v.value +} + +func (v *NullableInstanceSort) Set(val *InstanceSort) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceSort) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceSort) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceSort(val *InstanceSort) *NullableInstanceSort { + return &NullableInstanceSort{value: val, isSet: true} +} + +func (v NullableInstanceSort) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceSort) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_instance_version.go b/services/sqlserverflex/v3api/model_instance_version.go new file mode 100644 index 000000000..b7d2ba77e --- /dev/null +++ b/services/sqlserverflex/v3api/model_instance_version.go @@ -0,0 +1,112 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// InstanceVersion The sqlserver version used for the instance. +type InstanceVersion string + +// List of instance.version +const ( + INSTANCEVERSION__2022 InstanceVersion = "2022" + INSTANCEVERSION_UNKNOWN_DEFAULT_OPEN_API InstanceVersion = "unknown_default_open_api" +) + +// All allowed values of InstanceVersion enum +var AllowedInstanceVersionEnumValues = []InstanceVersion{ + "2022", + "unknown_default_open_api", +} + +func (v *InstanceVersion) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := InstanceVersion(value) + for _, existing := range AllowedInstanceVersionEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = INSTANCEVERSION_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewInstanceVersionFromValue returns a pointer to a valid InstanceVersion +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewInstanceVersionFromValue(v string) (*InstanceVersion, error) { + ev := InstanceVersion(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for InstanceVersion: valid values are %v", v, AllowedInstanceVersionEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v InstanceVersion) IsValid() bool { + for _, existing := range AllowedInstanceVersionEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to instance.version value +func (v InstanceVersion) Ptr() *InstanceVersion { + return &v +} + +type NullableInstanceVersion struct { + value *InstanceVersion + isSet bool +} + +func (v NullableInstanceVersion) Get() *InstanceVersion { + return v.value +} + +func (v *NullableInstanceVersion) Set(val *InstanceVersion) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceVersion) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceVersion) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceVersion(val *InstanceVersion) *NullableInstanceVersion { + return &NullableInstanceVersion{value: val, isSet: true} +} + +func (v NullableInstanceVersion) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceVersion) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_instance_version_opt.go b/services/sqlserverflex/v3api/model_instance_version_opt.go new file mode 100644 index 000000000..709f30fc0 --- /dev/null +++ b/services/sqlserverflex/v3api/model_instance_version_opt.go @@ -0,0 +1,112 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// InstanceVersionOpt the model 'InstanceVersionOpt' +type InstanceVersionOpt string + +// List of instance.version.opt +const ( + INSTANCEVERSIONOPT__2022 InstanceVersionOpt = "2022" + INSTANCEVERSIONOPT_UNKNOWN_DEFAULT_OPEN_API InstanceVersionOpt = "unknown_default_open_api" +) + +// All allowed values of InstanceVersionOpt enum +var AllowedInstanceVersionOptEnumValues = []InstanceVersionOpt{ + "2022", + "unknown_default_open_api", +} + +func (v *InstanceVersionOpt) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := InstanceVersionOpt(value) + for _, existing := range AllowedInstanceVersionOptEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = INSTANCEVERSIONOPT_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewInstanceVersionOptFromValue returns a pointer to a valid InstanceVersionOpt +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewInstanceVersionOptFromValue(v string) (*InstanceVersionOpt, error) { + ev := InstanceVersionOpt(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for InstanceVersionOpt: valid values are %v", v, AllowedInstanceVersionOptEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v InstanceVersionOpt) IsValid() bool { + for _, existing := range AllowedInstanceVersionOptEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to instance.version.opt value +func (v InstanceVersionOpt) Ptr() *InstanceVersionOpt { + return &v +} + +type NullableInstanceVersionOpt struct { + value *InstanceVersionOpt + isSet bool +} + +func (v NullableInstanceVersionOpt) Get() *InstanceVersionOpt { + return v.value +} + +func (v *NullableInstanceVersionOpt) Set(val *InstanceVersionOpt) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceVersionOpt) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceVersionOpt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceVersionOpt(val *InstanceVersionOpt) *NullableInstanceVersionOpt { + return &NullableInstanceVersionOpt{value: val, isSet: true} +} + +func (v NullableInstanceVersionOpt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceVersionOpt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_list_backup.go b/services/sqlserverflex/v3api/model_list_backup.go new file mode 100644 index 000000000..1006f13a3 --- /dev/null +++ b/services/sqlserverflex/v3api/model_list_backup.go @@ -0,0 +1,318 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ListBackup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListBackup{} + +// ListBackup struct for ListBackup +type ListBackup struct { + // The time when the backup was completed in RFC3339 format. + CompletionTime string `json:"completionTime"` + // The ID of the backup. + Id int64 `json:"id"` + // The name of the backup. + Name string `json:"name"` + // The time until the backup will be retained. + RetainedUntil string `json:"retainedUntil"` + // The size of the backup in bytes. + Size int64 `json:"size"` + // The type of the backup, which can be automated or manual triggered. + Type string `json:"type"` + AdditionalProperties map[string]interface{} +} + +type _ListBackup ListBackup + +// NewListBackup instantiates a new ListBackup 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 NewListBackup(completionTime string, id int64, name string, retainedUntil string, size int64, types string) *ListBackup { + this := ListBackup{} + this.CompletionTime = completionTime + this.Id = id + this.Name = name + this.RetainedUntil = retainedUntil + this.Size = size + this.Type = types + return &this +} + +// NewListBackupWithDefaults instantiates a new ListBackup 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 NewListBackupWithDefaults() *ListBackup { + this := ListBackup{} + return &this +} + +// GetCompletionTime returns the CompletionTime field value +func (o *ListBackup) GetCompletionTime() string { + if o == nil { + var ret string + return ret + } + + return o.CompletionTime +} + +// GetCompletionTimeOk returns a tuple with the CompletionTime field value +// and a boolean to check if the value has been set. +func (o *ListBackup) GetCompletionTimeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CompletionTime, true +} + +// SetCompletionTime sets field value +func (o *ListBackup) SetCompletionTime(v string) { + o.CompletionTime = v +} + +// GetId returns the Id field value +func (o *ListBackup) GetId() int64 { + if o == nil { + var ret int64 + 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 *ListBackup) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ListBackup) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ListBackup) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ListBackup) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ListBackup) SetName(v string) { + o.Name = v +} + +// GetRetainedUntil returns the RetainedUntil field value +func (o *ListBackup) GetRetainedUntil() string { + if o == nil { + var ret string + return ret + } + + return o.RetainedUntil +} + +// GetRetainedUntilOk returns a tuple with the RetainedUntil field value +// and a boolean to check if the value has been set. +func (o *ListBackup) GetRetainedUntilOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RetainedUntil, true +} + +// SetRetainedUntil sets field value +func (o *ListBackup) SetRetainedUntil(v string) { + o.RetainedUntil = v +} + +// GetSize returns the Size field value +func (o *ListBackup) GetSize() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value +// and a boolean to check if the value has been set. +func (o *ListBackup) GetSizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Size, true +} + +// SetSize sets field value +func (o *ListBackup) SetSize(v int64) { + o.Size = v +} + +// GetType returns the Type field value +func (o *ListBackup) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ListBackup) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ListBackup) SetType(v string) { + o.Type = v +} + +func (o ListBackup) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListBackup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["completionTime"] = o.CompletionTime + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["retainedUntil"] = o.RetainedUntil + toSerialize["size"] = o.Size + toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListBackup) 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{ + "completionTime", + "id", + "name", + "retainedUntil", + "size", + "type", + } + + 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) + } + } + + varListBackup := _ListBackup{} + + err = json.Unmarshal(data, &varListBackup) + + if err != nil { + return err + } + + *o = ListBackup(varListBackup) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "completionTime") + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "retainedUntil") + delete(additionalProperties, "size") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListBackup struct { + value *ListBackup + isSet bool +} + +func (v NullableListBackup) Get() *ListBackup { + return v.value +} + +func (v *NullableListBackup) Set(val *ListBackup) { + v.value = val + v.isSet = true +} + +func (v NullableListBackup) IsSet() bool { + return v.isSet +} + +func (v *NullableListBackup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListBackup(val *ListBackup) *NullableListBackup { + return &NullableListBackup{value: val, isSet: true} +} + +func (v NullableListBackup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListBackup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_list_backup_response.go b/services/sqlserverflex/v3api/model_list_backup_response.go new file mode 100644 index 000000000..56a0054fa --- /dev/null +++ b/services/sqlserverflex/v3api/model_list_backup_response.go @@ -0,0 +1,197 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ListBackupResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListBackupResponse{} + +// ListBackupResponse struct for ListBackupResponse +type ListBackupResponse struct { + // The list containing the information about the backups. + Backups []ListBackupsResponse `json:"backups"` + Pagination Pagination `json:"pagination"` + AdditionalProperties map[string]interface{} +} + +type _ListBackupResponse ListBackupResponse + +// NewListBackupResponse instantiates a new ListBackupResponse 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 NewListBackupResponse(backups []ListBackupsResponse, pagination Pagination) *ListBackupResponse { + this := ListBackupResponse{} + this.Backups = backups + this.Pagination = pagination + return &this +} + +// NewListBackupResponseWithDefaults instantiates a new ListBackupResponse 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 NewListBackupResponseWithDefaults() *ListBackupResponse { + this := ListBackupResponse{} + return &this +} + +// GetBackups returns the Backups field value +func (o *ListBackupResponse) GetBackups() []ListBackupsResponse { + if o == nil { + var ret []ListBackupsResponse + return ret + } + + return o.Backups +} + +// GetBackupsOk returns a tuple with the Backups field value +// and a boolean to check if the value has been set. +func (o *ListBackupResponse) GetBackupsOk() ([]ListBackupsResponse, bool) { + if o == nil { + return nil, false + } + return o.Backups, true +} + +// SetBackups sets field value +func (o *ListBackupResponse) SetBackups(v []ListBackupsResponse) { + o.Backups = v +} + +// GetPagination returns the Pagination field value +func (o *ListBackupResponse) GetPagination() Pagination { + if o == nil { + var ret Pagination + return ret + } + + return o.Pagination +} + +// GetPaginationOk returns a tuple with the Pagination field value +// and a boolean to check if the value has been set. +func (o *ListBackupResponse) GetPaginationOk() (*Pagination, bool) { + if o == nil { + return nil, false + } + return &o.Pagination, true +} + +// SetPagination sets field value +func (o *ListBackupResponse) SetPagination(v Pagination) { + o.Pagination = v +} + +func (o ListBackupResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListBackupResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["backups"] = o.Backups + toSerialize["pagination"] = o.Pagination + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListBackupResponse) 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{ + "backups", + "pagination", + } + + 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) + } + } + + varListBackupResponse := _ListBackupResponse{} + + err = json.Unmarshal(data, &varListBackupResponse) + + if err != nil { + return err + } + + *o = ListBackupResponse(varListBackupResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "backups") + delete(additionalProperties, "pagination") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListBackupResponse struct { + value *ListBackupResponse + isSet bool +} + +func (v NullableListBackupResponse) Get() *ListBackupResponse { + return v.value +} + +func (v *NullableListBackupResponse) Set(val *ListBackupResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListBackupResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListBackupResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListBackupResponse(val *ListBackupResponse) *NullableListBackupResponse { + return &NullableListBackupResponse{value: val, isSet: true} +} + +func (v NullableListBackupResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListBackupResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_list_backups_response.go b/services/sqlserverflex/v3api/model_list_backups_response.go new file mode 100644 index 000000000..9ae111dbf --- /dev/null +++ b/services/sqlserverflex/v3api/model_list_backups_response.go @@ -0,0 +1,198 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ListBackupsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListBackupsResponse{} + +// ListBackupsResponse struct for ListBackupsResponse +type ListBackupsResponse struct { + // List of the backups beloning to that database + Backups []ListBackup `json:"backups"` + // Name of the database the backups belong to + DatabaseName string `json:"databaseName"` + AdditionalProperties map[string]interface{} +} + +type _ListBackupsResponse ListBackupsResponse + +// NewListBackupsResponse instantiates a new ListBackupsResponse 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 NewListBackupsResponse(backups []ListBackup, databaseName string) *ListBackupsResponse { + this := ListBackupsResponse{} + this.Backups = backups + this.DatabaseName = databaseName + return &this +} + +// NewListBackupsResponseWithDefaults instantiates a new ListBackupsResponse 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 NewListBackupsResponseWithDefaults() *ListBackupsResponse { + this := ListBackupsResponse{} + return &this +} + +// GetBackups returns the Backups field value +func (o *ListBackupsResponse) GetBackups() []ListBackup { + if o == nil { + var ret []ListBackup + return ret + } + + return o.Backups +} + +// GetBackupsOk returns a tuple with the Backups field value +// and a boolean to check if the value has been set. +func (o *ListBackupsResponse) GetBackupsOk() ([]ListBackup, bool) { + if o == nil { + return nil, false + } + return o.Backups, true +} + +// SetBackups sets field value +func (o *ListBackupsResponse) SetBackups(v []ListBackup) { + o.Backups = v +} + +// GetDatabaseName returns the DatabaseName field value +func (o *ListBackupsResponse) GetDatabaseName() string { + if o == nil { + var ret string + return ret + } + + return o.DatabaseName +} + +// GetDatabaseNameOk returns a tuple with the DatabaseName field value +// and a boolean to check if the value has been set. +func (o *ListBackupsResponse) GetDatabaseNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatabaseName, true +} + +// SetDatabaseName sets field value +func (o *ListBackupsResponse) SetDatabaseName(v string) { + o.DatabaseName = v +} + +func (o ListBackupsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListBackupsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["backups"] = o.Backups + toSerialize["databaseName"] = o.DatabaseName + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListBackupsResponse) 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{ + "backups", + "databaseName", + } + + 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) + } + } + + varListBackupsResponse := _ListBackupsResponse{} + + err = json.Unmarshal(data, &varListBackupsResponse) + + if err != nil { + return err + } + + *o = ListBackupsResponse(varListBackupsResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "backups") + delete(additionalProperties, "databaseName") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListBackupsResponse struct { + value *ListBackupsResponse + isSet bool +} + +func (v NullableListBackupsResponse) Get() *ListBackupsResponse { + return v.value +} + +func (v *NullableListBackupsResponse) Set(val *ListBackupsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListBackupsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListBackupsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListBackupsResponse(val *ListBackupsResponse) *NullableListBackupsResponse { + return &NullableListBackupsResponse{value: val, isSet: true} +} + +func (v NullableListBackupsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListBackupsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_list_collations_response.go b/services/sqlserverflex/v3api/model_list_collations_response.go new file mode 100644 index 000000000..e9de32d9d --- /dev/null +++ b/services/sqlserverflex/v3api/model_list_collations_response.go @@ -0,0 +1,168 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ListCollationsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListCollationsResponse{} + +// ListCollationsResponse struct for ListCollationsResponse +type ListCollationsResponse struct { + // List of collations available for the instance. + Collations []DatabaseGetcollation `json:"collations"` + AdditionalProperties map[string]interface{} +} + +type _ListCollationsResponse ListCollationsResponse + +// NewListCollationsResponse instantiates a new ListCollationsResponse 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 NewListCollationsResponse(collations []DatabaseGetcollation) *ListCollationsResponse { + this := ListCollationsResponse{} + this.Collations = collations + return &this +} + +// NewListCollationsResponseWithDefaults instantiates a new ListCollationsResponse 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 NewListCollationsResponseWithDefaults() *ListCollationsResponse { + this := ListCollationsResponse{} + return &this +} + +// GetCollations returns the Collations field value +func (o *ListCollationsResponse) GetCollations() []DatabaseGetcollation { + if o == nil { + var ret []DatabaseGetcollation + return ret + } + + return o.Collations +} + +// GetCollationsOk returns a tuple with the Collations field value +// and a boolean to check if the value has been set. +func (o *ListCollationsResponse) GetCollationsOk() ([]DatabaseGetcollation, bool) { + if o == nil { + return nil, false + } + return o.Collations, true +} + +// SetCollations sets field value +func (o *ListCollationsResponse) SetCollations(v []DatabaseGetcollation) { + o.Collations = v +} + +func (o ListCollationsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListCollationsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["collations"] = o.Collations + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListCollationsResponse) 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{ + "collations", + } + + 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) + } + } + + varListCollationsResponse := _ListCollationsResponse{} + + err = json.Unmarshal(data, &varListCollationsResponse) + + if err != nil { + return err + } + + *o = ListCollationsResponse(varListCollationsResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "collations") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListCollationsResponse struct { + value *ListCollationsResponse + isSet bool +} + +func (v NullableListCollationsResponse) Get() *ListCollationsResponse { + return v.value +} + +func (v *NullableListCollationsResponse) Set(val *ListCollationsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListCollationsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListCollationsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListCollationsResponse(val *ListCollationsResponse) *NullableListCollationsResponse { + return &NullableListCollationsResponse{value: val, isSet: true} +} + +func (v NullableListCollationsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListCollationsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_list_compatibility_response.go b/services/sqlserverflex/v3api/model_list_compatibility_response.go new file mode 100644 index 000000000..a0852a134 --- /dev/null +++ b/services/sqlserverflex/v3api/model_list_compatibility_response.go @@ -0,0 +1,168 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ListCompatibilityResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListCompatibilityResponse{} + +// ListCompatibilityResponse struct for ListCompatibilityResponse +type ListCompatibilityResponse struct { + // List of compatibilities available for a d + Compatibilities []DatabaseGetcompatibility `json:"compatibilities"` + AdditionalProperties map[string]interface{} +} + +type _ListCompatibilityResponse ListCompatibilityResponse + +// NewListCompatibilityResponse instantiates a new ListCompatibilityResponse 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 NewListCompatibilityResponse(compatibilities []DatabaseGetcompatibility) *ListCompatibilityResponse { + this := ListCompatibilityResponse{} + this.Compatibilities = compatibilities + return &this +} + +// NewListCompatibilityResponseWithDefaults instantiates a new ListCompatibilityResponse 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 NewListCompatibilityResponseWithDefaults() *ListCompatibilityResponse { + this := ListCompatibilityResponse{} + return &this +} + +// GetCompatibilities returns the Compatibilities field value +func (o *ListCompatibilityResponse) GetCompatibilities() []DatabaseGetcompatibility { + if o == nil { + var ret []DatabaseGetcompatibility + return ret + } + + return o.Compatibilities +} + +// GetCompatibilitiesOk returns a tuple with the Compatibilities field value +// and a boolean to check if the value has been set. +func (o *ListCompatibilityResponse) GetCompatibilitiesOk() ([]DatabaseGetcompatibility, bool) { + if o == nil { + return nil, false + } + return o.Compatibilities, true +} + +// SetCompatibilities sets field value +func (o *ListCompatibilityResponse) SetCompatibilities(v []DatabaseGetcompatibility) { + o.Compatibilities = v +} + +func (o ListCompatibilityResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListCompatibilityResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["compatibilities"] = o.Compatibilities + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListCompatibilityResponse) 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{ + "compatibilities", + } + + 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) + } + } + + varListCompatibilityResponse := _ListCompatibilityResponse{} + + err = json.Unmarshal(data, &varListCompatibilityResponse) + + if err != nil { + return err + } + + *o = ListCompatibilityResponse(varListCompatibilityResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "compatibilities") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListCompatibilityResponse struct { + value *ListCompatibilityResponse + isSet bool +} + +func (v NullableListCompatibilityResponse) Get() *ListCompatibilityResponse { + return v.value +} + +func (v *NullableListCompatibilityResponse) Set(val *ListCompatibilityResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListCompatibilityResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListCompatibilityResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListCompatibilityResponse(val *ListCompatibilityResponse) *NullableListCompatibilityResponse { + return &NullableListCompatibilityResponse{value: val, isSet: true} +} + +func (v NullableListCompatibilityResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListCompatibilityResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_list_current_running_restore_jobs.go b/services/sqlserverflex/v3api/model_list_current_running_restore_jobs.go new file mode 100644 index 000000000..e6eafee72 --- /dev/null +++ b/services/sqlserverflex/v3api/model_list_current_running_restore_jobs.go @@ -0,0 +1,168 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ListCurrentRunningRestoreJobs type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListCurrentRunningRestoreJobs{} + +// ListCurrentRunningRestoreJobs struct for ListCurrentRunningRestoreJobs +type ListCurrentRunningRestoreJobs struct { + // List of the currently running Restore jobs + RunningRestores []BackupRunningRestore `json:"runningRestores"` + AdditionalProperties map[string]interface{} +} + +type _ListCurrentRunningRestoreJobs ListCurrentRunningRestoreJobs + +// NewListCurrentRunningRestoreJobs instantiates a new ListCurrentRunningRestoreJobs 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 NewListCurrentRunningRestoreJobs(runningRestores []BackupRunningRestore) *ListCurrentRunningRestoreJobs { + this := ListCurrentRunningRestoreJobs{} + this.RunningRestores = runningRestores + return &this +} + +// NewListCurrentRunningRestoreJobsWithDefaults instantiates a new ListCurrentRunningRestoreJobs 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 NewListCurrentRunningRestoreJobsWithDefaults() *ListCurrentRunningRestoreJobs { + this := ListCurrentRunningRestoreJobs{} + return &this +} + +// GetRunningRestores returns the RunningRestores field value +func (o *ListCurrentRunningRestoreJobs) GetRunningRestores() []BackupRunningRestore { + if o == nil { + var ret []BackupRunningRestore + return ret + } + + return o.RunningRestores +} + +// GetRunningRestoresOk returns a tuple with the RunningRestores field value +// and a boolean to check if the value has been set. +func (o *ListCurrentRunningRestoreJobs) GetRunningRestoresOk() ([]BackupRunningRestore, bool) { + if o == nil { + return nil, false + } + return o.RunningRestores, true +} + +// SetRunningRestores sets field value +func (o *ListCurrentRunningRestoreJobs) SetRunningRestores(v []BackupRunningRestore) { + o.RunningRestores = v +} + +func (o ListCurrentRunningRestoreJobs) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListCurrentRunningRestoreJobs) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["runningRestores"] = o.RunningRestores + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListCurrentRunningRestoreJobs) 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{ + "runningRestores", + } + + 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) + } + } + + varListCurrentRunningRestoreJobs := _ListCurrentRunningRestoreJobs{} + + err = json.Unmarshal(data, &varListCurrentRunningRestoreJobs) + + if err != nil { + return err + } + + *o = ListCurrentRunningRestoreJobs(varListCurrentRunningRestoreJobs) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "runningRestores") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListCurrentRunningRestoreJobs struct { + value *ListCurrentRunningRestoreJobs + isSet bool +} + +func (v NullableListCurrentRunningRestoreJobs) Get() *ListCurrentRunningRestoreJobs { + return v.value +} + +func (v *NullableListCurrentRunningRestoreJobs) Set(val *ListCurrentRunningRestoreJobs) { + v.value = val + v.isSet = true +} + +func (v NullableListCurrentRunningRestoreJobs) IsSet() bool { + return v.isSet +} + +func (v *NullableListCurrentRunningRestoreJobs) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListCurrentRunningRestoreJobs(val *ListCurrentRunningRestoreJobs) *NullableListCurrentRunningRestoreJobs { + return &NullableListCurrentRunningRestoreJobs{value: val, isSet: true} +} + +func (v NullableListCurrentRunningRestoreJobs) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListCurrentRunningRestoreJobs) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_list_database.go b/services/sqlserverflex/v3api/model_list_database.go new file mode 100644 index 000000000..87d4958a7 --- /dev/null +++ b/services/sqlserverflex/v3api/model_list_database.go @@ -0,0 +1,258 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ListDatabase type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListDatabase{} + +// ListDatabase struct for ListDatabase +type ListDatabase struct { + // The date when the database was created in RFC3339 format. + Created string `json:"created"` + // The id of the database. + Id int64 `json:"id"` + // The name of the database. + Name string `json:"name"` + // The owner of the database. + Owner string `json:"owner"` + AdditionalProperties map[string]interface{} +} + +type _ListDatabase ListDatabase + +// NewListDatabase instantiates a new ListDatabase 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 NewListDatabase(created string, id int64, name string, owner string) *ListDatabase { + this := ListDatabase{} + this.Created = created + this.Id = id + this.Name = name + this.Owner = owner + return &this +} + +// NewListDatabaseWithDefaults instantiates a new ListDatabase 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 NewListDatabaseWithDefaults() *ListDatabase { + this := ListDatabase{} + return &this +} + +// GetCreated returns the Created field value +func (o *ListDatabase) GetCreated() string { + if o == nil { + var ret string + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *ListDatabase) GetCreatedOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *ListDatabase) SetCreated(v string) { + o.Created = v +} + +// GetId returns the Id field value +func (o *ListDatabase) GetId() int64 { + if o == nil { + var ret int64 + 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 *ListDatabase) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ListDatabase) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ListDatabase) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ListDatabase) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ListDatabase) SetName(v string) { + o.Name = v +} + +// GetOwner returns the Owner field value +func (o *ListDatabase) GetOwner() string { + if o == nil { + var ret string + return ret + } + + return o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value +// and a boolean to check if the value has been set. +func (o *ListDatabase) GetOwnerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Owner, true +} + +// SetOwner sets field value +func (o *ListDatabase) SetOwner(v string) { + o.Owner = v +} + +func (o ListDatabase) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListDatabase) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["created"] = o.Created + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["owner"] = o.Owner + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListDatabase) 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{ + "created", + "id", + "name", + "owner", + } + + 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) + } + } + + varListDatabase := _ListDatabase{} + + err = json.Unmarshal(data, &varListDatabase) + + if err != nil { + return err + } + + *o = ListDatabase(varListDatabase) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "created") + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "owner") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListDatabase struct { + value *ListDatabase + isSet bool +} + +func (v NullableListDatabase) Get() *ListDatabase { + return v.value +} + +func (v *NullableListDatabase) Set(val *ListDatabase) { + v.value = val + v.isSet = true +} + +func (v NullableListDatabase) IsSet() bool { + return v.isSet +} + +func (v *NullableListDatabase) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListDatabase(val *ListDatabase) *NullableListDatabase { + return &NullableListDatabase{value: val, isSet: true} +} + +func (v NullableListDatabase) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListDatabase) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_list_databases_response.go b/services/sqlserverflex/v3api/model_list_databases_response.go new file mode 100644 index 000000000..496abad29 --- /dev/null +++ b/services/sqlserverflex/v3api/model_list_databases_response.go @@ -0,0 +1,197 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ListDatabasesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListDatabasesResponse{} + +// ListDatabasesResponse struct for ListDatabasesResponse +type ListDatabasesResponse struct { + // A list containing all databases for the instance. + Databases []ListDatabase `json:"databases"` + Pagination Pagination `json:"pagination"` + AdditionalProperties map[string]interface{} +} + +type _ListDatabasesResponse ListDatabasesResponse + +// NewListDatabasesResponse instantiates a new ListDatabasesResponse 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 NewListDatabasesResponse(databases []ListDatabase, pagination Pagination) *ListDatabasesResponse { + this := ListDatabasesResponse{} + this.Databases = databases + this.Pagination = pagination + return &this +} + +// NewListDatabasesResponseWithDefaults instantiates a new ListDatabasesResponse 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 NewListDatabasesResponseWithDefaults() *ListDatabasesResponse { + this := ListDatabasesResponse{} + return &this +} + +// GetDatabases returns the Databases field value +func (o *ListDatabasesResponse) GetDatabases() []ListDatabase { + if o == nil { + var ret []ListDatabase + return ret + } + + return o.Databases +} + +// GetDatabasesOk returns a tuple with the Databases field value +// and a boolean to check if the value has been set. +func (o *ListDatabasesResponse) GetDatabasesOk() ([]ListDatabase, bool) { + if o == nil { + return nil, false + } + return o.Databases, true +} + +// SetDatabases sets field value +func (o *ListDatabasesResponse) SetDatabases(v []ListDatabase) { + o.Databases = v +} + +// GetPagination returns the Pagination field value +func (o *ListDatabasesResponse) GetPagination() Pagination { + if o == nil { + var ret Pagination + return ret + } + + return o.Pagination +} + +// GetPaginationOk returns a tuple with the Pagination field value +// and a boolean to check if the value has been set. +func (o *ListDatabasesResponse) GetPaginationOk() (*Pagination, bool) { + if o == nil { + return nil, false + } + return &o.Pagination, true +} + +// SetPagination sets field value +func (o *ListDatabasesResponse) SetPagination(v Pagination) { + o.Pagination = v +} + +func (o ListDatabasesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListDatabasesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["databases"] = o.Databases + toSerialize["pagination"] = o.Pagination + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListDatabasesResponse) 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{ + "databases", + "pagination", + } + + 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) + } + } + + varListDatabasesResponse := _ListDatabasesResponse{} + + err = json.Unmarshal(data, &varListDatabasesResponse) + + if err != nil { + return err + } + + *o = ListDatabasesResponse(varListDatabasesResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "databases") + delete(additionalProperties, "pagination") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListDatabasesResponse struct { + value *ListDatabasesResponse + isSet bool +} + +func (v NullableListDatabasesResponse) Get() *ListDatabasesResponse { + return v.value +} + +func (v *NullableListDatabasesResponse) Set(val *ListDatabasesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListDatabasesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListDatabasesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListDatabasesResponse(val *ListDatabasesResponse) *NullableListDatabasesResponse { + return &NullableListDatabasesResponse{value: val, isSet: true} +} + +func (v NullableListDatabasesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListDatabasesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_list_flavors.go b/services/sqlserverflex/v3api/model_list_flavors.go new file mode 100644 index 000000000..276469043 --- /dev/null +++ b/services/sqlserverflex/v3api/model_list_flavors.go @@ -0,0 +1,378 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ListFlavors type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListFlavors{} + +// ListFlavors The flavor of the instance containing the technical features. +type ListFlavors struct { + // The cpu count of the instance. + Cpu int64 `json:"cpu"` + // The flavor description. + Description string `json:"description"` + // The id of the instance flavor. + Id string `json:"id"` + // maximum storage which can be ordered for the flavor in Gigabyte. + MaxGB int32 `json:"maxGB"` + // The memory of the instance in Gibibyte. + Memory int64 `json:"memory"` + // minimum storage which is required to order in Gigabyte. + MinGB int32 `json:"minGB"` + // defines the nodeType it can be either single or HA + NodeType string `json:"nodeType"` + // maximum storage which can be ordered for the flavor in Gigabyte. + StorageClasses []FlavorStorageClassesStorageClass `json:"storageClasses"` + AdditionalProperties map[string]interface{} +} + +type _ListFlavors ListFlavors + +// NewListFlavors instantiates a new ListFlavors 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 NewListFlavors(cpu int64, description string, id string, maxGB int32, memory int64, minGB int32, nodeType string, storageClasses []FlavorStorageClassesStorageClass) *ListFlavors { + this := ListFlavors{} + this.Cpu = cpu + this.Description = description + this.Id = id + this.MaxGB = maxGB + this.Memory = memory + this.MinGB = minGB + this.NodeType = nodeType + this.StorageClasses = storageClasses + return &this +} + +// NewListFlavorsWithDefaults instantiates a new ListFlavors 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 NewListFlavorsWithDefaults() *ListFlavors { + this := ListFlavors{} + return &this +} + +// GetCpu returns the Cpu field value +func (o *ListFlavors) GetCpu() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Cpu +} + +// GetCpuOk returns a tuple with the Cpu field value +// and a boolean to check if the value has been set. +func (o *ListFlavors) GetCpuOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Cpu, true +} + +// SetCpu sets field value +func (o *ListFlavors) SetCpu(v int64) { + o.Cpu = v +} + +// GetDescription returns the Description field value +func (o *ListFlavors) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *ListFlavors) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *ListFlavors) SetDescription(v string) { + o.Description = v +} + +// GetId returns the Id field value +func (o *ListFlavors) 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 *ListFlavors) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ListFlavors) SetId(v string) { + o.Id = v +} + +// GetMaxGB returns the MaxGB field value +func (o *ListFlavors) GetMaxGB() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.MaxGB +} + +// GetMaxGBOk returns a tuple with the MaxGB field value +// and a boolean to check if the value has been set. +func (o *ListFlavors) GetMaxGBOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.MaxGB, true +} + +// SetMaxGB sets field value +func (o *ListFlavors) SetMaxGB(v int32) { + o.MaxGB = v +} + +// GetMemory returns the Memory field value +func (o *ListFlavors) GetMemory() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Memory +} + +// GetMemoryOk returns a tuple with the Memory field value +// and a boolean to check if the value has been set. +func (o *ListFlavors) GetMemoryOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Memory, true +} + +// SetMemory sets field value +func (o *ListFlavors) SetMemory(v int64) { + o.Memory = v +} + +// GetMinGB returns the MinGB field value +func (o *ListFlavors) GetMinGB() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.MinGB +} + +// GetMinGBOk returns a tuple with the MinGB field value +// and a boolean to check if the value has been set. +func (o *ListFlavors) GetMinGBOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.MinGB, true +} + +// SetMinGB sets field value +func (o *ListFlavors) SetMinGB(v int32) { + o.MinGB = v +} + +// GetNodeType returns the NodeType field value +func (o *ListFlavors) GetNodeType() string { + if o == nil { + var ret string + return ret + } + + return o.NodeType +} + +// GetNodeTypeOk returns a tuple with the NodeType field value +// and a boolean to check if the value has been set. +func (o *ListFlavors) GetNodeTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.NodeType, true +} + +// SetNodeType sets field value +func (o *ListFlavors) SetNodeType(v string) { + o.NodeType = v +} + +// GetStorageClasses returns the StorageClasses field value +func (o *ListFlavors) GetStorageClasses() []FlavorStorageClassesStorageClass { + if o == nil { + var ret []FlavorStorageClassesStorageClass + return ret + } + + return o.StorageClasses +} + +// GetStorageClassesOk returns a tuple with the StorageClasses field value +// and a boolean to check if the value has been set. +func (o *ListFlavors) GetStorageClassesOk() ([]FlavorStorageClassesStorageClass, bool) { + if o == nil { + return nil, false + } + return o.StorageClasses, true +} + +// SetStorageClasses sets field value +func (o *ListFlavors) SetStorageClasses(v []FlavorStorageClassesStorageClass) { + o.StorageClasses = v +} + +func (o ListFlavors) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListFlavors) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["cpu"] = o.Cpu + toSerialize["description"] = o.Description + toSerialize["id"] = o.Id + toSerialize["maxGB"] = o.MaxGB + toSerialize["memory"] = o.Memory + toSerialize["minGB"] = o.MinGB + toSerialize["nodeType"] = o.NodeType + toSerialize["storageClasses"] = o.StorageClasses + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListFlavors) 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{ + "cpu", + "description", + "id", + "maxGB", + "memory", + "minGB", + "nodeType", + "storageClasses", + } + + 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) + } + } + + varListFlavors := _ListFlavors{} + + err = json.Unmarshal(data, &varListFlavors) + + if err != nil { + return err + } + + *o = ListFlavors(varListFlavors) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "cpu") + delete(additionalProperties, "description") + delete(additionalProperties, "id") + delete(additionalProperties, "maxGB") + delete(additionalProperties, "memory") + delete(additionalProperties, "minGB") + delete(additionalProperties, "nodeType") + delete(additionalProperties, "storageClasses") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListFlavors struct { + value *ListFlavors + isSet bool +} + +func (v NullableListFlavors) Get() *ListFlavors { + return v.value +} + +func (v *NullableListFlavors) Set(val *ListFlavors) { + v.value = val + v.isSet = true +} + +func (v NullableListFlavors) IsSet() bool { + return v.isSet +} + +func (v *NullableListFlavors) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListFlavors(val *ListFlavors) *NullableListFlavors { + return &NullableListFlavors{value: val, isSet: true} +} + +func (v NullableListFlavors) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListFlavors) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_list_flavors_response.go b/services/sqlserverflex/v3api/model_list_flavors_response.go new file mode 100644 index 000000000..fc3affaac --- /dev/null +++ b/services/sqlserverflex/v3api/model_list_flavors_response.go @@ -0,0 +1,197 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ListFlavorsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListFlavorsResponse{} + +// ListFlavorsResponse struct for ListFlavorsResponse +type ListFlavorsResponse struct { + // List of flavors available for the project. + Flavors []ListFlavors `json:"flavors"` + Pagination Pagination `json:"pagination"` + AdditionalProperties map[string]interface{} +} + +type _ListFlavorsResponse ListFlavorsResponse + +// NewListFlavorsResponse instantiates a new ListFlavorsResponse 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 NewListFlavorsResponse(flavors []ListFlavors, pagination Pagination) *ListFlavorsResponse { + this := ListFlavorsResponse{} + this.Flavors = flavors + this.Pagination = pagination + return &this +} + +// NewListFlavorsResponseWithDefaults instantiates a new ListFlavorsResponse 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 NewListFlavorsResponseWithDefaults() *ListFlavorsResponse { + this := ListFlavorsResponse{} + return &this +} + +// GetFlavors returns the Flavors field value +func (o *ListFlavorsResponse) GetFlavors() []ListFlavors { + if o == nil { + var ret []ListFlavors + return ret + } + + return o.Flavors +} + +// GetFlavorsOk returns a tuple with the Flavors field value +// and a boolean to check if the value has been set. +func (o *ListFlavorsResponse) GetFlavorsOk() ([]ListFlavors, bool) { + if o == nil { + return nil, false + } + return o.Flavors, true +} + +// SetFlavors sets field value +func (o *ListFlavorsResponse) SetFlavors(v []ListFlavors) { + o.Flavors = v +} + +// GetPagination returns the Pagination field value +func (o *ListFlavorsResponse) GetPagination() Pagination { + if o == nil { + var ret Pagination + return ret + } + + return o.Pagination +} + +// GetPaginationOk returns a tuple with the Pagination field value +// and a boolean to check if the value has been set. +func (o *ListFlavorsResponse) GetPaginationOk() (*Pagination, bool) { + if o == nil { + return nil, false + } + return &o.Pagination, true +} + +// SetPagination sets field value +func (o *ListFlavorsResponse) SetPagination(v Pagination) { + o.Pagination = v +} + +func (o ListFlavorsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListFlavorsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["flavors"] = o.Flavors + toSerialize["pagination"] = o.Pagination + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListFlavorsResponse) 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{ + "flavors", + "pagination", + } + + 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) + } + } + + varListFlavorsResponse := _ListFlavorsResponse{} + + err = json.Unmarshal(data, &varListFlavorsResponse) + + if err != nil { + return err + } + + *o = ListFlavorsResponse(varListFlavorsResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "flavors") + delete(additionalProperties, "pagination") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListFlavorsResponse struct { + value *ListFlavorsResponse + isSet bool +} + +func (v NullableListFlavorsResponse) Get() *ListFlavorsResponse { + return v.value +} + +func (v *NullableListFlavorsResponse) Set(val *ListFlavorsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListFlavorsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListFlavorsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListFlavorsResponse(val *ListFlavorsResponse) *NullableListFlavorsResponse { + return &NullableListFlavorsResponse{value: val, isSet: true} +} + +func (v NullableListFlavorsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListFlavorsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_list_instance.go b/services/sqlserverflex/v3api/model_list_instance.go new file mode 100644 index 000000000..9e52b1788 --- /dev/null +++ b/services/sqlserverflex/v3api/model_list_instance.go @@ -0,0 +1,257 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ListInstance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListInstance{} + +// ListInstance struct for ListInstance +type ListInstance struct { + // The ID of the instance. + Id string `json:"id"` + // Whether the instance can be deleted or not. + IsDeletable bool `json:"isDeletable"` + // The name of the instance. + Name string `json:"name"` + State State `json:"state"` + AdditionalProperties map[string]interface{} +} + +type _ListInstance ListInstance + +// NewListInstance instantiates a new ListInstance 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 NewListInstance(id string, isDeletable bool, name string, state State) *ListInstance { + this := ListInstance{} + this.Id = id + this.IsDeletable = isDeletable + this.Name = name + this.State = state + return &this +} + +// NewListInstanceWithDefaults instantiates a new ListInstance 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 NewListInstanceWithDefaults() *ListInstance { + this := ListInstance{} + return &this +} + +// GetId returns the Id field value +func (o *ListInstance) 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 *ListInstance) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ListInstance) SetId(v string) { + o.Id = v +} + +// GetIsDeletable returns the IsDeletable field value +func (o *ListInstance) GetIsDeletable() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeletable +} + +// GetIsDeletableOk returns a tuple with the IsDeletable field value +// and a boolean to check if the value has been set. +func (o *ListInstance) GetIsDeletableOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeletable, true +} + +// SetIsDeletable sets field value +func (o *ListInstance) SetIsDeletable(v bool) { + o.IsDeletable = v +} + +// GetName returns the Name field value +func (o *ListInstance) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ListInstance) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ListInstance) SetName(v string) { + o.Name = v +} + +// GetState returns the State field value +func (o *ListInstance) GetState() State { + if o == nil { + var ret State + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *ListInstance) GetStateOk() (*State, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *ListInstance) SetState(v State) { + o.State = v +} + +func (o ListInstance) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListInstance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["isDeletable"] = o.IsDeletable + toSerialize["name"] = o.Name + toSerialize["state"] = o.State + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListInstance) 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", + "isDeletable", + "name", + "state", + } + + 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) + } + } + + varListInstance := _ListInstance{} + + err = json.Unmarshal(data, &varListInstance) + + if err != nil { + return err + } + + *o = ListInstance(varListInstance) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "isDeletable") + delete(additionalProperties, "name") + delete(additionalProperties, "state") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListInstance struct { + value *ListInstance + isSet bool +} + +func (v NullableListInstance) Get() *ListInstance { + return v.value +} + +func (v *NullableListInstance) Set(val *ListInstance) { + v.value = val + v.isSet = true +} + +func (v NullableListInstance) IsSet() bool { + return v.isSet +} + +func (v *NullableListInstance) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListInstance(val *ListInstance) *NullableListInstance { + return &NullableListInstance{value: val, isSet: true} +} + +func (v NullableListInstance) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListInstance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_list_instances_response.go b/services/sqlserverflex/v3api/model_list_instances_response.go new file mode 100644 index 000000000..35ea4152d --- /dev/null +++ b/services/sqlserverflex/v3api/model_list_instances_response.go @@ -0,0 +1,197 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ListInstancesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListInstancesResponse{} + +// ListInstancesResponse struct for ListInstancesResponse +type ListInstancesResponse struct { + // List of owned instances and their current status. + Instances []ListInstance `json:"instances"` + Pagination Pagination `json:"pagination"` + AdditionalProperties map[string]interface{} +} + +type _ListInstancesResponse ListInstancesResponse + +// NewListInstancesResponse instantiates a new ListInstancesResponse 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 NewListInstancesResponse(instances []ListInstance, pagination Pagination) *ListInstancesResponse { + this := ListInstancesResponse{} + this.Instances = instances + this.Pagination = pagination + return &this +} + +// NewListInstancesResponseWithDefaults instantiates a new ListInstancesResponse 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 NewListInstancesResponseWithDefaults() *ListInstancesResponse { + this := ListInstancesResponse{} + return &this +} + +// GetInstances returns the Instances field value +func (o *ListInstancesResponse) GetInstances() []ListInstance { + if o == nil { + var ret []ListInstance + return ret + } + + return o.Instances +} + +// GetInstancesOk returns a tuple with the Instances field value +// and a boolean to check if the value has been set. +func (o *ListInstancesResponse) GetInstancesOk() ([]ListInstance, bool) { + if o == nil { + return nil, false + } + return o.Instances, true +} + +// SetInstances sets field value +func (o *ListInstancesResponse) SetInstances(v []ListInstance) { + o.Instances = v +} + +// GetPagination returns the Pagination field value +func (o *ListInstancesResponse) GetPagination() Pagination { + if o == nil { + var ret Pagination + return ret + } + + return o.Pagination +} + +// GetPaginationOk returns a tuple with the Pagination field value +// and a boolean to check if the value has been set. +func (o *ListInstancesResponse) GetPaginationOk() (*Pagination, bool) { + if o == nil { + return nil, false + } + return &o.Pagination, true +} + +// SetPagination sets field value +func (o *ListInstancesResponse) SetPagination(v Pagination) { + o.Pagination = v +} + +func (o ListInstancesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListInstancesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["instances"] = o.Instances + toSerialize["pagination"] = o.Pagination + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListInstancesResponse) 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{ + "instances", + "pagination", + } + + 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) + } + } + + varListInstancesResponse := _ListInstancesResponse{} + + err = json.Unmarshal(data, &varListInstancesResponse) + + if err != nil { + return err + } + + *o = ListInstancesResponse(varListInstancesResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "instances") + delete(additionalProperties, "pagination") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListInstancesResponse struct { + value *ListInstancesResponse + isSet bool +} + +func (v NullableListInstancesResponse) Get() *ListInstancesResponse { + return v.value +} + +func (v *NullableListInstancesResponse) Set(val *ListInstancesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListInstancesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListInstancesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListInstancesResponse(val *ListInstancesResponse) *NullableListInstancesResponse { + return &NullableListInstancesResponse{value: val, isSet: true} +} + +func (v NullableListInstancesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListInstancesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_list_roles_response.go b/services/sqlserverflex/v3api/model_list_roles_response.go new file mode 100644 index 000000000..0a95fe64d --- /dev/null +++ b/services/sqlserverflex/v3api/model_list_roles_response.go @@ -0,0 +1,168 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ListRolesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListRolesResponse{} + +// ListRolesResponse struct for ListRolesResponse +type ListRolesResponse struct { + // List of roles available for an instance. + Roles []string `json:"roles"` + AdditionalProperties map[string]interface{} +} + +type _ListRolesResponse ListRolesResponse + +// NewListRolesResponse instantiates a new ListRolesResponse 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 NewListRolesResponse(roles []string) *ListRolesResponse { + this := ListRolesResponse{} + this.Roles = roles + return &this +} + +// NewListRolesResponseWithDefaults instantiates a new ListRolesResponse 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 NewListRolesResponseWithDefaults() *ListRolesResponse { + this := ListRolesResponse{} + return &this +} + +// GetRoles returns the Roles field value +func (o *ListRolesResponse) GetRoles() []string { + if o == nil { + var ret []string + return ret + } + + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value +// and a boolean to check if the value has been set. +func (o *ListRolesResponse) GetRolesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Roles, true +} + +// SetRoles sets field value +func (o *ListRolesResponse) SetRoles(v []string) { + o.Roles = v +} + +func (o ListRolesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListRolesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["roles"] = o.Roles + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListRolesResponse) 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{ + "roles", + } + + 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) + } + } + + varListRolesResponse := _ListRolesResponse{} + + err = json.Unmarshal(data, &varListRolesResponse) + + if err != nil { + return err + } + + *o = ListRolesResponse(varListRolesResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "roles") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListRolesResponse struct { + value *ListRolesResponse + isSet bool +} + +func (v NullableListRolesResponse) Get() *ListRolesResponse { + return v.value +} + +func (v *NullableListRolesResponse) Set(val *ListRolesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListRolesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListRolesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListRolesResponse(val *ListRolesResponse) *NullableListRolesResponse { + return &NullableListRolesResponse{value: val, isSet: true} +} + +func (v NullableListRolesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListRolesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_list_storages_response.go b/services/sqlserverflex/v3api/model_list_storages_response.go new file mode 100644 index 000000000..0352e22a7 --- /dev/null +++ b/services/sqlserverflex/v3api/model_list_storages_response.go @@ -0,0 +1,197 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ListStoragesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListStoragesResponse{} + +// ListStoragesResponse struct for ListStoragesResponse +type ListStoragesResponse struct { + // maximum storage which can be ordered for the flavor in Gigabyte. + StorageClasses []FlavorStorageClassesStorageClass `json:"storageClasses"` + StorageRange FlavorStorageRange `json:"storageRange"` + AdditionalProperties map[string]interface{} +} + +type _ListStoragesResponse ListStoragesResponse + +// NewListStoragesResponse instantiates a new ListStoragesResponse 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 NewListStoragesResponse(storageClasses []FlavorStorageClassesStorageClass, storageRange FlavorStorageRange) *ListStoragesResponse { + this := ListStoragesResponse{} + this.StorageClasses = storageClasses + this.StorageRange = storageRange + return &this +} + +// NewListStoragesResponseWithDefaults instantiates a new ListStoragesResponse 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 NewListStoragesResponseWithDefaults() *ListStoragesResponse { + this := ListStoragesResponse{} + return &this +} + +// GetStorageClasses returns the StorageClasses field value +func (o *ListStoragesResponse) GetStorageClasses() []FlavorStorageClassesStorageClass { + if o == nil { + var ret []FlavorStorageClassesStorageClass + return ret + } + + return o.StorageClasses +} + +// GetStorageClassesOk returns a tuple with the StorageClasses field value +// and a boolean to check if the value has been set. +func (o *ListStoragesResponse) GetStorageClassesOk() ([]FlavorStorageClassesStorageClass, bool) { + if o == nil { + return nil, false + } + return o.StorageClasses, true +} + +// SetStorageClasses sets field value +func (o *ListStoragesResponse) SetStorageClasses(v []FlavorStorageClassesStorageClass) { + o.StorageClasses = v +} + +// GetStorageRange returns the StorageRange field value +func (o *ListStoragesResponse) GetStorageRange() FlavorStorageRange { + if o == nil { + var ret FlavorStorageRange + return ret + } + + return o.StorageRange +} + +// GetStorageRangeOk returns a tuple with the StorageRange field value +// and a boolean to check if the value has been set. +func (o *ListStoragesResponse) GetStorageRangeOk() (*FlavorStorageRange, bool) { + if o == nil { + return nil, false + } + return &o.StorageRange, true +} + +// SetStorageRange sets field value +func (o *ListStoragesResponse) SetStorageRange(v FlavorStorageRange) { + o.StorageRange = v +} + +func (o ListStoragesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListStoragesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["storageClasses"] = o.StorageClasses + toSerialize["storageRange"] = o.StorageRange + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListStoragesResponse) 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{ + "storageClasses", + "storageRange", + } + + 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) + } + } + + varListStoragesResponse := _ListStoragesResponse{} + + err = json.Unmarshal(data, &varListStoragesResponse) + + if err != nil { + return err + } + + *o = ListStoragesResponse(varListStoragesResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "storageClasses") + delete(additionalProperties, "storageRange") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListStoragesResponse struct { + value *ListStoragesResponse + isSet bool +} + +func (v NullableListStoragesResponse) Get() *ListStoragesResponse { + return v.value +} + +func (v *NullableListStoragesResponse) Set(val *ListStoragesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListStoragesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListStoragesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListStoragesResponse(val *ListStoragesResponse) *NullableListStoragesResponse { + return &NullableListStoragesResponse{value: val, isSet: true} +} + +func (v NullableListStoragesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListStoragesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_list_user.go b/services/sqlserverflex/v3api/model_list_user.go new file mode 100644 index 000000000..d6f3ba256 --- /dev/null +++ b/services/sqlserverflex/v3api/model_list_user.go @@ -0,0 +1,228 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ListUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListUser{} + +// ListUser struct for ListUser +type ListUser struct { + // The ID of the user. + Id int64 `json:"id"` + // The current status of the user. + Status string `json:"status"` + // The name of the user. + Username string `json:"username"` + AdditionalProperties map[string]interface{} +} + +type _ListUser ListUser + +// NewListUser instantiates a new ListUser 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 NewListUser(id int64, status string, username string) *ListUser { + this := ListUser{} + this.Id = id + this.Status = status + this.Username = username + return &this +} + +// NewListUserWithDefaults instantiates a new ListUser 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 NewListUserWithDefaults() *ListUser { + this := ListUser{} + return &this +} + +// GetId returns the Id field value +func (o *ListUser) GetId() int64 { + if o == nil { + var ret int64 + 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 *ListUser) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ListUser) SetId(v int64) { + o.Id = v +} + +// GetStatus returns the Status field value +func (o *ListUser) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ListUser) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ListUser) SetStatus(v string) { + o.Status = v +} + +// GetUsername returns the Username field value +func (o *ListUser) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *ListUser) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *ListUser) SetUsername(v string) { + o.Username = v +} + +func (o ListUser) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["status"] = o.Status + toSerialize["username"] = o.Username + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListUser) 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", + "status", + "username", + } + + 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) + } + } + + varListUser := _ListUser{} + + err = json.Unmarshal(data, &varListUser) + + if err != nil { + return err + } + + *o = ListUser(varListUser) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "status") + delete(additionalProperties, "username") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListUser struct { + value *ListUser + isSet bool +} + +func (v NullableListUser) Get() *ListUser { + return v.value +} + +func (v *NullableListUser) Set(val *ListUser) { + v.value = val + v.isSet = true +} + +func (v NullableListUser) IsSet() bool { + return v.isSet +} + +func (v *NullableListUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListUser(val *ListUser) *NullableListUser { + return &NullableListUser{value: val, isSet: true} +} + +func (v NullableListUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_list_user_response.go b/services/sqlserverflex/v3api/model_list_user_response.go new file mode 100644 index 000000000..c1b20ec9b --- /dev/null +++ b/services/sqlserverflex/v3api/model_list_user_response.go @@ -0,0 +1,197 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ListUserResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListUserResponse{} + +// ListUserResponse struct for ListUserResponse +type ListUserResponse struct { + Pagination Pagination `json:"pagination"` + // List of all users inside an instance + Users []ListUser `json:"users"` + AdditionalProperties map[string]interface{} +} + +type _ListUserResponse ListUserResponse + +// NewListUserResponse instantiates a new ListUserResponse 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 NewListUserResponse(pagination Pagination, users []ListUser) *ListUserResponse { + this := ListUserResponse{} + this.Pagination = pagination + this.Users = users + return &this +} + +// NewListUserResponseWithDefaults instantiates a new ListUserResponse 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 NewListUserResponseWithDefaults() *ListUserResponse { + this := ListUserResponse{} + return &this +} + +// GetPagination returns the Pagination field value +func (o *ListUserResponse) GetPagination() Pagination { + if o == nil { + var ret Pagination + return ret + } + + return o.Pagination +} + +// GetPaginationOk returns a tuple with the Pagination field value +// and a boolean to check if the value has been set. +func (o *ListUserResponse) GetPaginationOk() (*Pagination, bool) { + if o == nil { + return nil, false + } + return &o.Pagination, true +} + +// SetPagination sets field value +func (o *ListUserResponse) SetPagination(v Pagination) { + o.Pagination = v +} + +// GetUsers returns the Users field value +func (o *ListUserResponse) GetUsers() []ListUser { + if o == nil { + var ret []ListUser + return ret + } + + return o.Users +} + +// GetUsersOk returns a tuple with the Users field value +// and a boolean to check if the value has been set. +func (o *ListUserResponse) GetUsersOk() ([]ListUser, bool) { + if o == nil { + return nil, false + } + return o.Users, true +} + +// SetUsers sets field value +func (o *ListUserResponse) SetUsers(v []ListUser) { + o.Users = v +} + +func (o ListUserResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListUserResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pagination"] = o.Pagination + toSerialize["users"] = o.Users + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListUserResponse) 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{ + "pagination", + "users", + } + + 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) + } + } + + varListUserResponse := _ListUserResponse{} + + err = json.Unmarshal(data, &varListUserResponse) + + if err != nil { + return err + } + + *o = ListUserResponse(varListUserResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "pagination") + delete(additionalProperties, "users") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListUserResponse struct { + value *ListUserResponse + isSet bool +} + +func (v NullableListUserResponse) Get() *ListUserResponse { + return v.value +} + +func (v *NullableListUserResponse) Set(val *ListUserResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListUserResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListUserResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListUserResponse(val *ListUserResponse) *NullableListUserResponse { + return &NullableListUserResponse{value: val, isSet: true} +} + +func (v NullableListUserResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListUserResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_list_versions_response.go b/services/sqlserverflex/v3api/model_list_versions_response.go new file mode 100644 index 000000000..c6d60f194 --- /dev/null +++ b/services/sqlserverflex/v3api/model_list_versions_response.go @@ -0,0 +1,168 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ListVersionsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListVersionsResponse{} + +// ListVersionsResponse struct for ListVersionsResponse +type ListVersionsResponse struct { + // A list containing available sqlserver versions. + Versions []Version `json:"versions"` + AdditionalProperties map[string]interface{} +} + +type _ListVersionsResponse ListVersionsResponse + +// NewListVersionsResponse instantiates a new ListVersionsResponse 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 NewListVersionsResponse(versions []Version) *ListVersionsResponse { + this := ListVersionsResponse{} + this.Versions = versions + return &this +} + +// NewListVersionsResponseWithDefaults instantiates a new ListVersionsResponse 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 NewListVersionsResponseWithDefaults() *ListVersionsResponse { + this := ListVersionsResponse{} + return &this +} + +// GetVersions returns the Versions field value +func (o *ListVersionsResponse) GetVersions() []Version { + if o == nil { + var ret []Version + return ret + } + + return o.Versions +} + +// GetVersionsOk returns a tuple with the Versions field value +// and a boolean to check if the value has been set. +func (o *ListVersionsResponse) GetVersionsOk() ([]Version, bool) { + if o == nil { + return nil, false + } + return o.Versions, true +} + +// SetVersions sets field value +func (o *ListVersionsResponse) SetVersions(v []Version) { + o.Versions = v +} + +func (o ListVersionsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListVersionsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["versions"] = o.Versions + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListVersionsResponse) 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{ + "versions", + } + + 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) + } + } + + varListVersionsResponse := _ListVersionsResponse{} + + err = json.Unmarshal(data, &varListVersionsResponse) + + if err != nil { + return err + } + + *o = ListVersionsResponse(varListVersionsResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "versions") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListVersionsResponse struct { + value *ListVersionsResponse + isSet bool +} + +func (v NullableListVersionsResponse) Get() *ListVersionsResponse { + return v.value +} + +func (v *NullableListVersionsResponse) Set(val *ListVersionsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListVersionsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListVersionsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListVersionsResponse(val *ListVersionsResponse) *NullableListVersionsResponse { + return &NullableListVersionsResponse{value: val, isSet: true} +} + +func (v NullableListVersionsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListVersionsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_pagination.go b/services/sqlserverflex/v3api/model_pagination.go new file mode 100644 index 000000000..b9cd3c406 --- /dev/null +++ b/services/sqlserverflex/v3api/model_pagination.go @@ -0,0 +1,283 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the Pagination type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Pagination{} + +// Pagination struct for Pagination +type Pagination struct { + Page int64 `json:"page"` + Size int64 `json:"size"` + Sort string `json:"sort"` + TotalPages int64 `json:"totalPages"` + TotalRows int64 `json:"totalRows"` + AdditionalProperties map[string]interface{} +} + +type _Pagination Pagination + +// NewPagination instantiates a new Pagination 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 NewPagination(page int64, size int64, sort string, totalPages int64, totalRows int64) *Pagination { + this := Pagination{} + this.Page = page + this.Size = size + this.Sort = sort + this.TotalPages = totalPages + this.TotalRows = totalRows + return &this +} + +// NewPaginationWithDefaults instantiates a new Pagination 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 NewPaginationWithDefaults() *Pagination { + this := Pagination{} + return &this +} + +// GetPage returns the Page field value +func (o *Pagination) GetPage() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Page +} + +// GetPageOk returns a tuple with the Page field value +// and a boolean to check if the value has been set. +func (o *Pagination) GetPageOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Page, true +} + +// SetPage sets field value +func (o *Pagination) SetPage(v int64) { + o.Page = v +} + +// GetSize returns the Size field value +func (o *Pagination) GetSize() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value +// and a boolean to check if the value has been set. +func (o *Pagination) GetSizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Size, true +} + +// SetSize sets field value +func (o *Pagination) SetSize(v int64) { + o.Size = v +} + +// GetSort returns the Sort field value +func (o *Pagination) GetSort() string { + if o == nil { + var ret string + return ret + } + + return o.Sort +} + +// GetSortOk returns a tuple with the Sort field value +// and a boolean to check if the value has been set. +func (o *Pagination) GetSortOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Sort, true +} + +// SetSort sets field value +func (o *Pagination) SetSort(v string) { + o.Sort = v +} + +// GetTotalPages returns the TotalPages field value +func (o *Pagination) GetTotalPages() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value +// and a boolean to check if the value has been set. +func (o *Pagination) GetTotalPagesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.TotalPages, true +} + +// SetTotalPages sets field value +func (o *Pagination) SetTotalPages(v int64) { + o.TotalPages = v +} + +// GetTotalRows returns the TotalRows field value +func (o *Pagination) GetTotalRows() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.TotalRows +} + +// GetTotalRowsOk returns a tuple with the TotalRows field value +// and a boolean to check if the value has been set. +func (o *Pagination) GetTotalRowsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.TotalRows, true +} + +// SetTotalRows sets field value +func (o *Pagination) SetTotalRows(v int64) { + o.TotalRows = v +} + +func (o Pagination) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Pagination) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["page"] = o.Page + toSerialize["size"] = o.Size + toSerialize["sort"] = o.Sort + toSerialize["totalPages"] = o.TotalPages + toSerialize["totalRows"] = o.TotalRows + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Pagination) 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{ + "page", + "size", + "sort", + "totalPages", + "totalRows", + } + + 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) + } + } + + varPagination := _Pagination{} + + err = json.Unmarshal(data, &varPagination) + + if err != nil { + return err + } + + *o = Pagination(varPagination) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "page") + delete(additionalProperties, "size") + delete(additionalProperties, "sort") + delete(additionalProperties, "totalPages") + delete(additionalProperties, "totalRows") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePagination struct { + value *Pagination + isSet bool +} + +func (v NullablePagination) Get() *Pagination { + return v.value +} + +func (v *NullablePagination) Set(val *Pagination) { + v.value = val + v.isSet = true +} + +func (v NullablePagination) IsSet() bool { + return v.isSet +} + +func (v *NullablePagination) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePagination(val *Pagination) *NullablePagination { + return &NullablePagination{value: val, isSet: true} +} + +func (v NullablePagination) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePagination) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_partial_update_instance_payload.go b/services/sqlserverflex/v3api/model_partial_update_instance_payload.go new file mode 100644 index 000000000..ed66ff7dd --- /dev/null +++ b/services/sqlserverflex/v3api/model_partial_update_instance_payload.go @@ -0,0 +1,417 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" +) + +// checks if the PartialUpdateInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PartialUpdateInstancePayload{} + +// PartialUpdateInstancePayload struct for PartialUpdateInstancePayload +type PartialUpdateInstancePayload struct { + // The schedule on which time the daily backup is being executed. The schedule is written as a cron schedule. + BackupSchedule *string `json:"backupSchedule,omitempty"` + // The id of the instance flavor. + FlavorId *string `json:"flavorId,omitempty"` + // A dictionary of user-defined key-value pairs used to categorize or organize the resource. **Rules for Keys:** * Must be between 1 and 63 characters long. * Must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$` * **Restriction:** The prefix `stackit-` is strictly reserved and cannot be used. **Rules for Values:** * Must be between 0 (empty string) and 63 characters long. * If not empty, must begin and end with an alphanumeric character. * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$` + Labels *map[string]string `json:"labels,omitempty"` + // The name of the instance. + Name *string `json:"name,omitempty"` + Network *PartialUpdateInstancePayloadNetwork `json:"network,omitempty"` + RetentionDays *int32 `json:"retentionDays,omitempty"` + Storage *StorageUpdate `json:"storage,omitempty"` + Version *InstanceVersionOpt `json:"version,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PartialUpdateInstancePayload PartialUpdateInstancePayload + +// NewPartialUpdateInstancePayload instantiates a new PartialUpdateInstancePayload 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 NewPartialUpdateInstancePayload() *PartialUpdateInstancePayload { + this := PartialUpdateInstancePayload{} + return &this +} + +// NewPartialUpdateInstancePayloadWithDefaults instantiates a new PartialUpdateInstancePayload 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 NewPartialUpdateInstancePayloadWithDefaults() *PartialUpdateInstancePayload { + this := PartialUpdateInstancePayload{} + return &this +} + +// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetBackupSchedule() string { + if o == nil || IsNil(o.BackupSchedule) { + var ret string + return ret + } + return *o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetBackupScheduleOk() (*string, bool) { + if o == nil || IsNil(o.BackupSchedule) { + return nil, false + } + return o.BackupSchedule, true +} + +// HasBackupSchedule returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasBackupSchedule() bool { + if o != nil && !IsNil(o.BackupSchedule) { + return true + } + + return false +} + +// SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. +func (o *PartialUpdateInstancePayload) SetBackupSchedule(v string) { + o.BackupSchedule = &v +} + +// GetFlavorId returns the FlavorId field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetFlavorId() string { + if o == nil || IsNil(o.FlavorId) { + var ret string + return ret + } + return *o.FlavorId +} + +// GetFlavorIdOk returns a tuple with the FlavorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetFlavorIdOk() (*string, bool) { + if o == nil || IsNil(o.FlavorId) { + return nil, false + } + return o.FlavorId, true +} + +// HasFlavorId returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasFlavorId() bool { + if o != nil && !IsNil(o.FlavorId) { + return true + } + + return false +} + +// SetFlavorId gets a reference to the given string and assigns it to the FlavorId field. +func (o *PartialUpdateInstancePayload) SetFlavorId(v string) { + o.FlavorId = &v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *PartialUpdateInstancePayload) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PartialUpdateInstancePayload) SetName(v string) { + o.Name = &v +} + +// GetNetwork returns the Network field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetNetwork() PartialUpdateInstancePayloadNetwork { + if o == nil || IsNil(o.Network) { + var ret PartialUpdateInstancePayloadNetwork + return ret + } + return *o.Network +} + +// GetNetworkOk returns a tuple with the Network field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetNetworkOk() (*PartialUpdateInstancePayloadNetwork, bool) { + if o == nil || IsNil(o.Network) { + return nil, false + } + return o.Network, true +} + +// HasNetwork returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasNetwork() bool { + if o != nil && !IsNil(o.Network) { + return true + } + + return false +} + +// SetNetwork gets a reference to the given PartialUpdateInstancePayloadNetwork and assigns it to the Network field. +func (o *PartialUpdateInstancePayload) SetNetwork(v PartialUpdateInstancePayloadNetwork) { + o.Network = &v +} + +// GetRetentionDays returns the RetentionDays field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetRetentionDays() int32 { + if o == nil || IsNil(o.RetentionDays) { + var ret int32 + return ret + } + return *o.RetentionDays +} + +// GetRetentionDaysOk returns a tuple with the RetentionDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetRetentionDaysOk() (*int32, bool) { + if o == nil || IsNil(o.RetentionDays) { + return nil, false + } + return o.RetentionDays, true +} + +// HasRetentionDays returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasRetentionDays() bool { + if o != nil && !IsNil(o.RetentionDays) { + return true + } + + return false +} + +// SetRetentionDays gets a reference to the given int32 and assigns it to the RetentionDays field. +func (o *PartialUpdateInstancePayload) SetRetentionDays(v int32) { + o.RetentionDays = &v +} + +// GetStorage returns the Storage field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetStorage() StorageUpdate { + if o == nil || IsNil(o.Storage) { + var ret StorageUpdate + return ret + } + return *o.Storage +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetStorageOk() (*StorageUpdate, bool) { + if o == nil || IsNil(o.Storage) { + return nil, false + } + return o.Storage, true +} + +// HasStorage returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasStorage() bool { + if o != nil && !IsNil(o.Storage) { + return true + } + + return false +} + +// SetStorage gets a reference to the given StorageUpdate and assigns it to the Storage field. +func (o *PartialUpdateInstancePayload) SetStorage(v StorageUpdate) { + o.Storage = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetVersion() InstanceVersionOpt { + if o == nil || IsNil(o.Version) { + var ret InstanceVersionOpt + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetVersionOk() (*InstanceVersionOpt, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given InstanceVersionOpt and assigns it to the Version field. +func (o *PartialUpdateInstancePayload) SetVersion(v InstanceVersionOpt) { + o.Version = &v +} + +func (o PartialUpdateInstancePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PartialUpdateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BackupSchedule) { + toSerialize["backupSchedule"] = o.BackupSchedule + } + if !IsNil(o.FlavorId) { + toSerialize["flavorId"] = o.FlavorId + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Network) { + toSerialize["network"] = o.Network + } + if !IsNil(o.RetentionDays) { + toSerialize["retentionDays"] = o.RetentionDays + } + if !IsNil(o.Storage) { + toSerialize["storage"] = o.Storage + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PartialUpdateInstancePayload) UnmarshalJSON(data []byte) (err error) { + varPartialUpdateInstancePayload := _PartialUpdateInstancePayload{} + + err = json.Unmarshal(data, &varPartialUpdateInstancePayload) + + if err != nil { + return err + } + + *o = PartialUpdateInstancePayload(varPartialUpdateInstancePayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "backupSchedule") + delete(additionalProperties, "flavorId") + delete(additionalProperties, "labels") + delete(additionalProperties, "name") + delete(additionalProperties, "network") + delete(additionalProperties, "retentionDays") + delete(additionalProperties, "storage") + delete(additionalProperties, "version") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePartialUpdateInstancePayload struct { + value *PartialUpdateInstancePayload + isSet bool +} + +func (v NullablePartialUpdateInstancePayload) Get() *PartialUpdateInstancePayload { + return v.value +} + +func (v *NullablePartialUpdateInstancePayload) Set(val *PartialUpdateInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullablePartialUpdateInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullablePartialUpdateInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePartialUpdateInstancePayload(val *PartialUpdateInstancePayload) *NullablePartialUpdateInstancePayload { + return &NullablePartialUpdateInstancePayload{value: val, isSet: true} +} + +func (v NullablePartialUpdateInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePartialUpdateInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_partial_update_instance_payload_network.go b/services/sqlserverflex/v3api/model_partial_update_instance_payload_network.go new file mode 100644 index 000000000..3e9cccba2 --- /dev/null +++ b/services/sqlserverflex/v3api/model_partial_update_instance_payload_network.go @@ -0,0 +1,155 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" +) + +// checks if the PartialUpdateInstancePayloadNetwork type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PartialUpdateInstancePayloadNetwork{} + +// PartialUpdateInstancePayloadNetwork the network configuration of the instance. +type PartialUpdateInstancePayloadNetwork struct { + // List of IPV4 cidr. + Acl []string `json:"acl,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PartialUpdateInstancePayloadNetwork PartialUpdateInstancePayloadNetwork + +// NewPartialUpdateInstancePayloadNetwork instantiates a new PartialUpdateInstancePayloadNetwork 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 NewPartialUpdateInstancePayloadNetwork() *PartialUpdateInstancePayloadNetwork { + this := PartialUpdateInstancePayloadNetwork{} + return &this +} + +// NewPartialUpdateInstancePayloadNetworkWithDefaults instantiates a new PartialUpdateInstancePayloadNetwork 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 NewPartialUpdateInstancePayloadNetworkWithDefaults() *PartialUpdateInstancePayloadNetwork { + this := PartialUpdateInstancePayloadNetwork{} + return &this +} + +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayloadNetwork) GetAcl() []string { + if o == nil || IsNil(o.Acl) { + var ret []string + return ret + } + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayloadNetwork) GetAclOk() ([]string, bool) { + if o == nil || IsNil(o.Acl) { + return nil, false + } + return o.Acl, true +} + +// HasAcl returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayloadNetwork) HasAcl() bool { + if o != nil && !IsNil(o.Acl) { + return true + } + + return false +} + +// SetAcl gets a reference to the given []string and assigns it to the Acl field. +func (o *PartialUpdateInstancePayloadNetwork) SetAcl(v []string) { + o.Acl = v +} + +func (o PartialUpdateInstancePayloadNetwork) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PartialUpdateInstancePayloadNetwork) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Acl) { + toSerialize["acl"] = o.Acl + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PartialUpdateInstancePayloadNetwork) UnmarshalJSON(data []byte) (err error) { + varPartialUpdateInstancePayloadNetwork := _PartialUpdateInstancePayloadNetwork{} + + err = json.Unmarshal(data, &varPartialUpdateInstancePayloadNetwork) + + if err != nil { + return err + } + + *o = PartialUpdateInstancePayloadNetwork(varPartialUpdateInstancePayloadNetwork) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "acl") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePartialUpdateInstancePayloadNetwork struct { + value *PartialUpdateInstancePayloadNetwork + isSet bool +} + +func (v NullablePartialUpdateInstancePayloadNetwork) Get() *PartialUpdateInstancePayloadNetwork { + return v.value +} + +func (v *NullablePartialUpdateInstancePayloadNetwork) Set(val *PartialUpdateInstancePayloadNetwork) { + v.value = val + v.isSet = true +} + +func (v NullablePartialUpdateInstancePayloadNetwork) IsSet() bool { + return v.isSet +} + +func (v *NullablePartialUpdateInstancePayloadNetwork) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePartialUpdateInstancePayloadNetwork(val *PartialUpdateInstancePayloadNetwork) *NullablePartialUpdateInstancePayloadNetwork { + return &NullablePartialUpdateInstancePayloadNetwork{value: val, isSet: true} +} + +func (v NullablePartialUpdateInstancePayloadNetwork) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePartialUpdateInstancePayloadNetwork) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_replicas.go b/services/sqlserverflex/v3api/model_replicas.go new file mode 100644 index 000000000..4006b0ef7 --- /dev/null +++ b/services/sqlserverflex/v3api/model_replicas.go @@ -0,0 +1,114 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// Replicas How many replicas the instance should have. +type Replicas int32 + +// List of replicas +const ( + REPLICAS__1 Replicas = 1 + REPLICAS__3 Replicas = 3 + REPLICAS__unknown_default_open_api Replicas = 11184809 +) + +// All allowed values of Replicas enum +var AllowedReplicasEnumValues = []Replicas{ + 1, + 3, + 11184809, +} + +func (v *Replicas) UnmarshalJSON(src []byte) error { + var value int32 + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := Replicas(value) + for _, existing := range AllowedReplicasEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = REPLICAS__unknown_default_open_api + return nil +} + +// NewReplicasFromValue returns a pointer to a valid Replicas +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewReplicasFromValue(v int32) (*Replicas, error) { + ev := Replicas(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for Replicas: valid values are %v", v, AllowedReplicasEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v Replicas) IsValid() bool { + for _, existing := range AllowedReplicasEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to replicas value +func (v Replicas) Ptr() *Replicas { + return &v +} + +type NullableReplicas struct { + value *Replicas + isSet bool +} + +func (v NullableReplicas) Get() *Replicas { + return v.value +} + +func (v *NullableReplicas) Set(val *Replicas) { + v.value = val + v.isSet = true +} + +func (v NullableReplicas) IsSet() bool { + return v.isSet +} + +func (v *NullableReplicas) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReplicas(val *Replicas) *NullableReplicas { + return &NullableReplicas{value: val, isSet: true} +} + +func (v NullableReplicas) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReplicas) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_reset_user_response.go b/services/sqlserverflex/v3api/model_reset_user_response.go new file mode 100644 index 000000000..ec6ad72c6 --- /dev/null +++ b/services/sqlserverflex/v3api/model_reset_user_response.go @@ -0,0 +1,258 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ResetUserResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResetUserResponse{} + +// ResetUserResponse struct for ResetUserResponse +type ResetUserResponse struct { + // The password for the user. + Password string `json:"password"` + // The current status of the user. + Status string `json:"status"` + // The connection string for the user to the instance. + Uri string `json:"uri"` + // The name of the user. + Username string `json:"username"` + AdditionalProperties map[string]interface{} +} + +type _ResetUserResponse ResetUserResponse + +// NewResetUserResponse instantiates a new ResetUserResponse 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 NewResetUserResponse(password string, status string, uri string, username string) *ResetUserResponse { + this := ResetUserResponse{} + this.Password = password + this.Status = status + this.Uri = uri + this.Username = username + return &this +} + +// NewResetUserResponseWithDefaults instantiates a new ResetUserResponse 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 NewResetUserResponseWithDefaults() *ResetUserResponse { + this := ResetUserResponse{} + return &this +} + +// GetPassword returns the Password field value +func (o *ResetUserResponse) GetPassword() string { + if o == nil { + var ret string + return ret + } + + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *ResetUserResponse) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Password, true +} + +// SetPassword sets field value +func (o *ResetUserResponse) SetPassword(v string) { + o.Password = v +} + +// GetStatus returns the Status field value +func (o *ResetUserResponse) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ResetUserResponse) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ResetUserResponse) SetStatus(v string) { + o.Status = v +} + +// GetUri returns the Uri field value +func (o *ResetUserResponse) GetUri() string { + if o == nil { + var ret string + return ret + } + + return o.Uri +} + +// GetUriOk returns a tuple with the Uri field value +// and a boolean to check if the value has been set. +func (o *ResetUserResponse) GetUriOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Uri, true +} + +// SetUri sets field value +func (o *ResetUserResponse) SetUri(v string) { + o.Uri = v +} + +// GetUsername returns the Username field value +func (o *ResetUserResponse) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *ResetUserResponse) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *ResetUserResponse) SetUsername(v string) { + o.Username = v +} + +func (o ResetUserResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResetUserResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["password"] = o.Password + toSerialize["status"] = o.Status + toSerialize["uri"] = o.Uri + toSerialize["username"] = o.Username + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ResetUserResponse) 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{ + "password", + "status", + "uri", + "username", + } + + 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) + } + } + + varResetUserResponse := _ResetUserResponse{} + + err = json.Unmarshal(data, &varResetUserResponse) + + if err != nil { + return err + } + + *o = ResetUserResponse(varResetUserResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "password") + delete(additionalProperties, "status") + delete(additionalProperties, "uri") + delete(additionalProperties, "username") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableResetUserResponse struct { + value *ResetUserResponse + isSet bool +} + +func (v NullableResetUserResponse) Get() *ResetUserResponse { + return v.value +} + +func (v *NullableResetUserResponse) Set(val *ResetUserResponse) { + v.value = val + v.isSet = true +} + +func (v NullableResetUserResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableResetUserResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResetUserResponse(val *ResetUserResponse) *NullableResetUserResponse { + return &NullableResetUserResponse{value: val, isSet: true} +} + +func (v NullableResetUserResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResetUserResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_restore_database_from_backup_payload.go b/services/sqlserverflex/v3api/model_restore_database_from_backup_payload.go new file mode 100644 index 000000000..32187d35a --- /dev/null +++ b/services/sqlserverflex/v3api/model_restore_database_from_backup_payload.go @@ -0,0 +1,197 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the RestoreDatabaseFromBackupPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RestoreDatabaseFromBackupPayload{} + +// RestoreDatabaseFromBackupPayload Request to restore a database. +type RestoreDatabaseFromBackupPayload struct { + // The name of the database on the instance to be restore. + DatabaseName string `json:"database_name"` + Source RestoreDatabaseFromBackupPayloadSource `json:"source"` + AdditionalProperties map[string]interface{} +} + +type _RestoreDatabaseFromBackupPayload RestoreDatabaseFromBackupPayload + +// NewRestoreDatabaseFromBackupPayload instantiates a new RestoreDatabaseFromBackupPayload 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 NewRestoreDatabaseFromBackupPayload(databaseName string, source RestoreDatabaseFromBackupPayloadSource) *RestoreDatabaseFromBackupPayload { + this := RestoreDatabaseFromBackupPayload{} + this.DatabaseName = databaseName + this.Source = source + return &this +} + +// NewRestoreDatabaseFromBackupPayloadWithDefaults instantiates a new RestoreDatabaseFromBackupPayload 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 NewRestoreDatabaseFromBackupPayloadWithDefaults() *RestoreDatabaseFromBackupPayload { + this := RestoreDatabaseFromBackupPayload{} + return &this +} + +// GetDatabaseName returns the DatabaseName field value +func (o *RestoreDatabaseFromBackupPayload) GetDatabaseName() string { + if o == nil { + var ret string + return ret + } + + return o.DatabaseName +} + +// GetDatabaseNameOk returns a tuple with the DatabaseName field value +// and a boolean to check if the value has been set. +func (o *RestoreDatabaseFromBackupPayload) GetDatabaseNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatabaseName, true +} + +// SetDatabaseName sets field value +func (o *RestoreDatabaseFromBackupPayload) SetDatabaseName(v string) { + o.DatabaseName = v +} + +// GetSource returns the Source field value +func (o *RestoreDatabaseFromBackupPayload) GetSource() RestoreDatabaseFromBackupPayloadSource { + if o == nil { + var ret RestoreDatabaseFromBackupPayloadSource + return ret + } + + return o.Source +} + +// GetSourceOk returns a tuple with the Source field value +// and a boolean to check if the value has been set. +func (o *RestoreDatabaseFromBackupPayload) GetSourceOk() (*RestoreDatabaseFromBackupPayloadSource, bool) { + if o == nil { + return nil, false + } + return &o.Source, true +} + +// SetSource sets field value +func (o *RestoreDatabaseFromBackupPayload) SetSource(v RestoreDatabaseFromBackupPayloadSource) { + o.Source = v +} + +func (o RestoreDatabaseFromBackupPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RestoreDatabaseFromBackupPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["database_name"] = o.DatabaseName + toSerialize["source"] = o.Source + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RestoreDatabaseFromBackupPayload) 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{ + "database_name", + "source", + } + + 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) + } + } + + varRestoreDatabaseFromBackupPayload := _RestoreDatabaseFromBackupPayload{} + + err = json.Unmarshal(data, &varRestoreDatabaseFromBackupPayload) + + if err != nil { + return err + } + + *o = RestoreDatabaseFromBackupPayload(varRestoreDatabaseFromBackupPayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "database_name") + delete(additionalProperties, "source") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRestoreDatabaseFromBackupPayload struct { + value *RestoreDatabaseFromBackupPayload + isSet bool +} + +func (v NullableRestoreDatabaseFromBackupPayload) Get() *RestoreDatabaseFromBackupPayload { + return v.value +} + +func (v *NullableRestoreDatabaseFromBackupPayload) Set(val *RestoreDatabaseFromBackupPayload) { + v.value = val + v.isSet = true +} + +func (v NullableRestoreDatabaseFromBackupPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableRestoreDatabaseFromBackupPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRestoreDatabaseFromBackupPayload(val *RestoreDatabaseFromBackupPayload) *NullableRestoreDatabaseFromBackupPayload { + return &NullableRestoreDatabaseFromBackupPayload{value: val, isSet: true} +} + +func (v NullableRestoreDatabaseFromBackupPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRestoreDatabaseFromBackupPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_restore_database_from_backup_payload_source.go b/services/sqlserverflex/v3api/model_restore_database_from_backup_payload_source.go new file mode 100644 index 000000000..7381afcf0 --- /dev/null +++ b/services/sqlserverflex/v3api/model_restore_database_from_backup_payload_source.go @@ -0,0 +1,154 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// RestoreDatabaseFromBackupPayloadSource - The source of the restore. +type RestoreDatabaseFromBackupPayloadSource struct { + SourceBackup *SourceBackup + SourceExternalS3 *SourceExternalS3 +} + +// SourceBackupAsRestoreDatabaseFromBackupPayloadSource is a convenience function that returns SourceBackup wrapped in RestoreDatabaseFromBackupPayloadSource +func SourceBackupAsRestoreDatabaseFromBackupPayloadSource(v *SourceBackup) RestoreDatabaseFromBackupPayloadSource { + return RestoreDatabaseFromBackupPayloadSource{ + SourceBackup: v, + } +} + +// SourceExternalS3AsRestoreDatabaseFromBackupPayloadSource is a convenience function that returns SourceExternalS3 wrapped in RestoreDatabaseFromBackupPayloadSource +func SourceExternalS3AsRestoreDatabaseFromBackupPayloadSource(v *SourceExternalS3) RestoreDatabaseFromBackupPayloadSource { + return RestoreDatabaseFromBackupPayloadSource{ + SourceExternalS3: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *RestoreDatabaseFromBackupPayloadSource) UnmarshalJSON(data []byte) error { + var err error + // use discriminator value to speed up the lookup + var jsonDict map[string]interface{} + err = newStrictDecoder(data).Decode(&jsonDict) + if err != nil { + return fmt.Errorf("failed to unmarshal JSON into map for the discriminator lookup") + } + + // check if the discriminator value is 'BACKUP' + if jsonDict["type"] == "BACKUP" { + // try to unmarshal JSON data into SourceBackup + err = json.Unmarshal(data, &dst.SourceBackup) + if err == nil { + return nil // data stored in dst.SourceBackup, return on the first match + } else { + dst.SourceBackup = nil + return fmt.Errorf("failed to unmarshal RestoreDatabaseFromBackupPayloadSource as SourceBackup: %s", err.Error()) + } + } + + // check if the discriminator value is 'EXTERNAL_S3' + if jsonDict["type"] == "EXTERNAL_S3" { + // try to unmarshal JSON data into SourceExternalS3 + err = json.Unmarshal(data, &dst.SourceExternalS3) + if err == nil { + return nil // data stored in dst.SourceExternalS3, return on the first match + } else { + dst.SourceExternalS3 = nil + return fmt.Errorf("failed to unmarshal RestoreDatabaseFromBackupPayloadSource as SourceExternalS3: %s", err.Error()) + } + } + + return nil +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src RestoreDatabaseFromBackupPayloadSource) MarshalJSON() ([]byte, error) { + if src.SourceBackup != nil { + return json.Marshal(&src.SourceBackup) + } + + if src.SourceExternalS3 != nil { + return json.Marshal(&src.SourceExternalS3) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *RestoreDatabaseFromBackupPayloadSource) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.SourceBackup != nil { + return obj.SourceBackup + } + + if obj.SourceExternalS3 != nil { + return obj.SourceExternalS3 + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj RestoreDatabaseFromBackupPayloadSource) GetActualInstanceValue() interface{} { + if obj.SourceBackup != nil { + return *obj.SourceBackup + } + + if obj.SourceExternalS3 != nil { + return *obj.SourceExternalS3 + } + + // all schemas are nil + return nil +} + +type NullableRestoreDatabaseFromBackupPayloadSource struct { + value *RestoreDatabaseFromBackupPayloadSource + isSet bool +} + +func (v NullableRestoreDatabaseFromBackupPayloadSource) Get() *RestoreDatabaseFromBackupPayloadSource { + return v.value +} + +func (v *NullableRestoreDatabaseFromBackupPayloadSource) Set(val *RestoreDatabaseFromBackupPayloadSource) { + v.value = val + v.isSet = true +} + +func (v NullableRestoreDatabaseFromBackupPayloadSource) IsSet() bool { + return v.isSet +} + +func (v *NullableRestoreDatabaseFromBackupPayloadSource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRestoreDatabaseFromBackupPayloadSource(val *RestoreDatabaseFromBackupPayloadSource) *NullableRestoreDatabaseFromBackupPayloadSource { + return &NullableRestoreDatabaseFromBackupPayloadSource{value: val, isSet: true} +} + +func (v NullableRestoreDatabaseFromBackupPayloadSource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRestoreDatabaseFromBackupPayloadSource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_s3file_info.go b/services/sqlserverflex/v3api/model_s3file_info.go new file mode 100644 index 000000000..ad46f137c --- /dev/null +++ b/services/sqlserverflex/v3api/model_s3file_info.go @@ -0,0 +1,193 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" +) + +// checks if the S3fileInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &S3fileInfo{} + +// S3fileInfo struct for S3fileInfo +type S3fileInfo struct { + // The sequence number of the file + FileNumber *int32 `json:"file_number,omitempty"` + // The path to the file on the S3 bucket + FilePath *string `json:"file_path,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _S3fileInfo S3fileInfo + +// NewS3fileInfo instantiates a new S3fileInfo 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 NewS3fileInfo() *S3fileInfo { + this := S3fileInfo{} + return &this +} + +// NewS3fileInfoWithDefaults instantiates a new S3fileInfo 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 NewS3fileInfoWithDefaults() *S3fileInfo { + this := S3fileInfo{} + return &this +} + +// GetFileNumber returns the FileNumber field value if set, zero value otherwise. +func (o *S3fileInfo) GetFileNumber() int32 { + if o == nil || IsNil(o.FileNumber) { + var ret int32 + return ret + } + return *o.FileNumber +} + +// GetFileNumberOk returns a tuple with the FileNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *S3fileInfo) GetFileNumberOk() (*int32, bool) { + if o == nil || IsNil(o.FileNumber) { + return nil, false + } + return o.FileNumber, true +} + +// HasFileNumber returns a boolean if a field has been set. +func (o *S3fileInfo) HasFileNumber() bool { + if o != nil && !IsNil(o.FileNumber) { + return true + } + + return false +} + +// SetFileNumber gets a reference to the given int32 and assigns it to the FileNumber field. +func (o *S3fileInfo) SetFileNumber(v int32) { + o.FileNumber = &v +} + +// GetFilePath returns the FilePath field value if set, zero value otherwise. +func (o *S3fileInfo) GetFilePath() string { + if o == nil || IsNil(o.FilePath) { + var ret string + return ret + } + return *o.FilePath +} + +// GetFilePathOk returns a tuple with the FilePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *S3fileInfo) GetFilePathOk() (*string, bool) { + if o == nil || IsNil(o.FilePath) { + return nil, false + } + return o.FilePath, true +} + +// HasFilePath returns a boolean if a field has been set. +func (o *S3fileInfo) HasFilePath() bool { + if o != nil && !IsNil(o.FilePath) { + return true + } + + return false +} + +// SetFilePath gets a reference to the given string and assigns it to the FilePath field. +func (o *S3fileInfo) SetFilePath(v string) { + o.FilePath = &v +} + +func (o S3fileInfo) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o S3fileInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.FileNumber) { + toSerialize["file_number"] = o.FileNumber + } + if !IsNil(o.FilePath) { + toSerialize["file_path"] = o.FilePath + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *S3fileInfo) UnmarshalJSON(data []byte) (err error) { + varS3fileInfo := _S3fileInfo{} + + err = json.Unmarshal(data, &varS3fileInfo) + + if err != nil { + return err + } + + *o = S3fileInfo(varS3fileInfo) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "file_number") + delete(additionalProperties, "file_path") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableS3fileInfo struct { + value *S3fileInfo + isSet bool +} + +func (v NullableS3fileInfo) Get() *S3fileInfo { + return v.value +} + +func (v *NullableS3fileInfo) Set(val *S3fileInfo) { + v.value = val + v.isSet = true +} + +func (v NullableS3fileInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableS3fileInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableS3fileInfo(val *S3fileInfo) *NullableS3fileInfo { + return &NullableS3fileInfo{value: val, isSet: true} +} + +func (v NullableS3fileInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableS3fileInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_source_backup.go b/services/sqlserverflex/v3api/model_source_backup.go new file mode 100644 index 000000000..e79e2f7d6 --- /dev/null +++ b/services/sqlserverflex/v3api/model_source_backup.go @@ -0,0 +1,167 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the SourceBackup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SourceBackup{} + +// SourceBackup Restore from an existing managed backup. +type SourceBackup struct { + Type SourceBackupType `json:"type"` + AdditionalProperties map[string]interface{} +} + +type _SourceBackup SourceBackup + +// NewSourceBackup instantiates a new SourceBackup 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 NewSourceBackup(types SourceBackupType) *SourceBackup { + this := SourceBackup{} + this.Type = types + return &this +} + +// NewSourceBackupWithDefaults instantiates a new SourceBackup 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 NewSourceBackupWithDefaults() *SourceBackup { + this := SourceBackup{} + return &this +} + +// GetType returns the Type field value +func (o *SourceBackup) GetType() SourceBackupType { + if o == nil { + var ret SourceBackupType + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *SourceBackup) GetTypeOk() (*SourceBackupType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *SourceBackup) SetType(v SourceBackupType) { + o.Type = v +} + +func (o SourceBackup) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SourceBackup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *SourceBackup) 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{ + "type", + } + + 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) + } + } + + varSourceBackup := _SourceBackup{} + + err = json.Unmarshal(data, &varSourceBackup) + + if err != nil { + return err + } + + *o = SourceBackup(varSourceBackup) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableSourceBackup struct { + value *SourceBackup + isSet bool +} + +func (v NullableSourceBackup) Get() *SourceBackup { + return v.value +} + +func (v *NullableSourceBackup) Set(val *SourceBackup) { + v.value = val + v.isSet = true +} + +func (v NullableSourceBackup) IsSet() bool { + return v.isSet +} + +func (v *NullableSourceBackup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSourceBackup(val *SourceBackup) *NullableSourceBackup { + return &NullableSourceBackup{value: val, isSet: true} +} + +func (v NullableSourceBackup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSourceBackup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_source_backup_type.go b/services/sqlserverflex/v3api/model_source_backup_type.go new file mode 100644 index 000000000..c90c16b4d --- /dev/null +++ b/services/sqlserverflex/v3api/model_source_backup_type.go @@ -0,0 +1,112 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// SourceBackupType the model 'SourceBackupType' +type SourceBackupType string + +// List of source_backup_type +const ( + SOURCEBACKUPTYPE_BACKUP SourceBackupType = "BACKUP" + SOURCEBACKUPTYPE_UNKNOWN_DEFAULT_OPEN_API SourceBackupType = "unknown_default_open_api" +) + +// All allowed values of SourceBackupType enum +var AllowedSourceBackupTypeEnumValues = []SourceBackupType{ + "BACKUP", + "unknown_default_open_api", +} + +func (v *SourceBackupType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := SourceBackupType(value) + for _, existing := range AllowedSourceBackupTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = SOURCEBACKUPTYPE_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewSourceBackupTypeFromValue returns a pointer to a valid SourceBackupType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewSourceBackupTypeFromValue(v string) (*SourceBackupType, error) { + ev := SourceBackupType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for SourceBackupType: valid values are %v", v, AllowedSourceBackupTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v SourceBackupType) IsValid() bool { + for _, existing := range AllowedSourceBackupTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to source_backup_type value +func (v SourceBackupType) Ptr() *SourceBackupType { + return &v +} + +type NullableSourceBackupType struct { + value *SourceBackupType + isSet bool +} + +func (v NullableSourceBackupType) Get() *SourceBackupType { + return v.value +} + +func (v *NullableSourceBackupType) Set(val *SourceBackupType) { + v.value = val + v.isSet = true +} + +func (v NullableSourceBackupType) IsSet() bool { + return v.isSet +} + +func (v *NullableSourceBackupType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSourceBackupType(val *SourceBackupType) *NullableSourceBackupType { + return &NullableSourceBackupType{value: val, isSet: true} +} + +func (v NullableSourceBackupType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSourceBackupType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_source_external_s3.go b/services/sqlserverflex/v3api/model_source_external_s3.go new file mode 100644 index 000000000..5632bf8ac --- /dev/null +++ b/services/sqlserverflex/v3api/model_source_external_s3.go @@ -0,0 +1,264 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the SourceExternalS3 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SourceExternalS3{} + +// SourceExternalS3 Restore from an external S3 backup file. +type SourceExternalS3 struct { + // The owner of the database. + DatabaseOwner string `json:"database_owner"` + // Logging guid to have a complete activity log over all sub stored procedures. + LoggingGuid *string `json:"logging_guid,omitempty"` + S3Details ExternalS3 `json:"s3_details"` + Type SourceExternalS3Type `json:"type"` + AdditionalProperties map[string]interface{} +} + +type _SourceExternalS3 SourceExternalS3 + +// NewSourceExternalS3 instantiates a new SourceExternalS3 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 NewSourceExternalS3(databaseOwner string, s3Details ExternalS3, types SourceExternalS3Type) *SourceExternalS3 { + this := SourceExternalS3{} + this.DatabaseOwner = databaseOwner + this.S3Details = s3Details + this.Type = types + return &this +} + +// NewSourceExternalS3WithDefaults instantiates a new SourceExternalS3 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 NewSourceExternalS3WithDefaults() *SourceExternalS3 { + this := SourceExternalS3{} + return &this +} + +// GetDatabaseOwner returns the DatabaseOwner field value +func (o *SourceExternalS3) GetDatabaseOwner() string { + if o == nil { + var ret string + return ret + } + + return o.DatabaseOwner +} + +// GetDatabaseOwnerOk returns a tuple with the DatabaseOwner field value +// and a boolean to check if the value has been set. +func (o *SourceExternalS3) GetDatabaseOwnerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatabaseOwner, true +} + +// SetDatabaseOwner sets field value +func (o *SourceExternalS3) SetDatabaseOwner(v string) { + o.DatabaseOwner = v +} + +// GetLoggingGuid returns the LoggingGuid field value if set, zero value otherwise. +func (o *SourceExternalS3) GetLoggingGuid() string { + if o == nil || IsNil(o.LoggingGuid) { + var ret string + return ret + } + return *o.LoggingGuid +} + +// GetLoggingGuidOk returns a tuple with the LoggingGuid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SourceExternalS3) GetLoggingGuidOk() (*string, bool) { + if o == nil || IsNil(o.LoggingGuid) { + return nil, false + } + return o.LoggingGuid, true +} + +// HasLoggingGuid returns a boolean if a field has been set. +func (o *SourceExternalS3) HasLoggingGuid() bool { + if o != nil && !IsNil(o.LoggingGuid) { + return true + } + + return false +} + +// SetLoggingGuid gets a reference to the given string and assigns it to the LoggingGuid field. +func (o *SourceExternalS3) SetLoggingGuid(v string) { + o.LoggingGuid = &v +} + +// GetS3Details returns the S3Details field value +func (o *SourceExternalS3) GetS3Details() ExternalS3 { + if o == nil { + var ret ExternalS3 + return ret + } + + return o.S3Details +} + +// GetS3DetailsOk returns a tuple with the S3Details field value +// and a boolean to check if the value has been set. +func (o *SourceExternalS3) GetS3DetailsOk() (*ExternalS3, bool) { + if o == nil { + return nil, false + } + return &o.S3Details, true +} + +// SetS3Details sets field value +func (o *SourceExternalS3) SetS3Details(v ExternalS3) { + o.S3Details = v +} + +// GetType returns the Type field value +func (o *SourceExternalS3) GetType() SourceExternalS3Type { + if o == nil { + var ret SourceExternalS3Type + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *SourceExternalS3) GetTypeOk() (*SourceExternalS3Type, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *SourceExternalS3) SetType(v SourceExternalS3Type) { + o.Type = v +} + +func (o SourceExternalS3) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SourceExternalS3) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["database_owner"] = o.DatabaseOwner + if !IsNil(o.LoggingGuid) { + toSerialize["logging_guid"] = o.LoggingGuid + } + toSerialize["s3_details"] = o.S3Details + toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *SourceExternalS3) 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{ + "database_owner", + "s3_details", + "type", + } + + 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) + } + } + + varSourceExternalS3 := _SourceExternalS3{} + + err = json.Unmarshal(data, &varSourceExternalS3) + + if err != nil { + return err + } + + *o = SourceExternalS3(varSourceExternalS3) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "database_owner") + delete(additionalProperties, "logging_guid") + delete(additionalProperties, "s3_details") + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableSourceExternalS3 struct { + value *SourceExternalS3 + isSet bool +} + +func (v NullableSourceExternalS3) Get() *SourceExternalS3 { + return v.value +} + +func (v *NullableSourceExternalS3) Set(val *SourceExternalS3) { + v.value = val + v.isSet = true +} + +func (v NullableSourceExternalS3) IsSet() bool { + return v.isSet +} + +func (v *NullableSourceExternalS3) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSourceExternalS3(val *SourceExternalS3) *NullableSourceExternalS3 { + return &NullableSourceExternalS3{value: val, isSet: true} +} + +func (v NullableSourceExternalS3) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSourceExternalS3) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_source_external_s3_type.go b/services/sqlserverflex/v3api/model_source_external_s3_type.go new file mode 100644 index 000000000..b5eb4338a --- /dev/null +++ b/services/sqlserverflex/v3api/model_source_external_s3_type.go @@ -0,0 +1,112 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// SourceExternalS3Type the model 'SourceExternalS3Type' +type SourceExternalS3Type string + +// List of source_externalS3_type +const ( + SOURCEEXTERNALS3TYPE_EXTERNAL_S3 SourceExternalS3Type = "EXTERNAL_S3" + SOURCEEXTERNALS3TYPE_UNKNOWN_DEFAULT_OPEN_API SourceExternalS3Type = "unknown_default_open_api" +) + +// All allowed values of SourceExternalS3Type enum +var AllowedSourceExternalS3TypeEnumValues = []SourceExternalS3Type{ + "EXTERNAL_S3", + "unknown_default_open_api", +} + +func (v *SourceExternalS3Type) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := SourceExternalS3Type(value) + for _, existing := range AllowedSourceExternalS3TypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = SOURCEEXTERNALS3TYPE_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewSourceExternalS3TypeFromValue returns a pointer to a valid SourceExternalS3Type +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewSourceExternalS3TypeFromValue(v string) (*SourceExternalS3Type, error) { + ev := SourceExternalS3Type(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for SourceExternalS3Type: valid values are %v", v, AllowedSourceExternalS3TypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v SourceExternalS3Type) IsValid() bool { + for _, existing := range AllowedSourceExternalS3TypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to source_externalS3_type value +func (v SourceExternalS3Type) Ptr() *SourceExternalS3Type { + return &v +} + +type NullableSourceExternalS3Type struct { + value *SourceExternalS3Type + isSet bool +} + +func (v NullableSourceExternalS3Type) Get() *SourceExternalS3Type { + return v.value +} + +func (v *NullableSourceExternalS3Type) Set(val *SourceExternalS3Type) { + v.value = val + v.isSet = true +} + +func (v NullableSourceExternalS3Type) IsSet() bool { + return v.isSet +} + +func (v *NullableSourceExternalS3Type) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSourceExternalS3Type(val *SourceExternalS3Type) *NullableSourceExternalS3Type { + return &NullableSourceExternalS3Type{value: val, isSet: true} +} + +func (v NullableSourceExternalS3Type) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSourceExternalS3Type) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_state.go b/services/sqlserverflex/v3api/model_state.go new file mode 100644 index 000000000..a79e259be --- /dev/null +++ b/services/sqlserverflex/v3api/model_state.go @@ -0,0 +1,122 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// State the model 'State' +type State string + +// List of state +const ( + STATE_READY State = "READY" + STATE_PENDING State = "PENDING" + STATE_PROGRESSING State = "PROGRESSING" + STATE_FAILURE State = "FAILURE" + STATE_UNKNOWN State = "UNKNOWN" + STATE_TERMINATING State = "TERMINATING" + STATE_UNKNOWN_DEFAULT_OPEN_API State = "unknown_default_open_api" +) + +// All allowed values of State enum +var AllowedStateEnumValues = []State{ + "READY", + "PENDING", + "PROGRESSING", + "FAILURE", + "UNKNOWN", + "TERMINATING", + "unknown_default_open_api", +} + +func (v *State) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := State(value) + for _, existing := range AllowedStateEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = STATE_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewStateFromValue returns a pointer to a valid State +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewStateFromValue(v string) (*State, error) { + ev := State(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for State: valid values are %v", v, AllowedStateEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v State) IsValid() bool { + for _, existing := range AllowedStateEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to state value +func (v State) Ptr() *State { + return &v +} + +type NullableState struct { + value *State + isSet bool +} + +func (v NullableState) Get() *State { + return v.value +} + +func (v *NullableState) Set(val *State) { + v.value = val + v.isSet = true +} + +func (v NullableState) IsSet() bool { + return v.isSet +} + +func (v *NullableState) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableState(val *State) *NullableState { + return &NullableState{value: val, isSet: true} +} + +func (v NullableState) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableState) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_storage.go b/services/sqlserverflex/v3api/model_storage.go new file mode 100644 index 000000000..f22ead933 --- /dev/null +++ b/services/sqlserverflex/v3api/model_storage.go @@ -0,0 +1,193 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" +) + +// checks if the Storage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Storage{} + +// Storage The object containing information about the storage size and class. +type Storage struct { + // The storage class for the storage. + Class *string `json:"class,omitempty"` + // The storage size in Gigabytes. + Size *int64 `json:"size,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _Storage Storage + +// NewStorage instantiates a new Storage 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 NewStorage() *Storage { + this := Storage{} + return &this +} + +// NewStorageWithDefaults instantiates a new Storage 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 NewStorageWithDefaults() *Storage { + this := Storage{} + return &this +} + +// GetClass returns the Class field value if set, zero value otherwise. +func (o *Storage) GetClass() string { + if o == nil || IsNil(o.Class) { + var ret string + return ret + } + return *o.Class +} + +// GetClassOk returns a tuple with the Class field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Storage) GetClassOk() (*string, bool) { + if o == nil || IsNil(o.Class) { + return nil, false + } + return o.Class, true +} + +// HasClass returns a boolean if a field has been set. +func (o *Storage) HasClass() bool { + if o != nil && !IsNil(o.Class) { + return true + } + + return false +} + +// SetClass gets a reference to the given string and assigns it to the Class field. +func (o *Storage) SetClass(v string) { + o.Class = &v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *Storage) GetSize() int64 { + if o == nil || IsNil(o.Size) { + var ret int64 + return ret + } + return *o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Storage) GetSizeOk() (*int64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *Storage) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *Storage) SetSize(v int64) { + o.Size = &v +} + +func (o Storage) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Storage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Class) { + toSerialize["class"] = o.Class + } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Storage) UnmarshalJSON(data []byte) (err error) { + varStorage := _Storage{} + + err = json.Unmarshal(data, &varStorage) + + if err != nil { + return err + } + + *o = Storage(varStorage) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "class") + delete(additionalProperties, "size") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableStorage struct { + value *Storage + isSet bool +} + +func (v NullableStorage) Get() *Storage { + return v.value +} + +func (v *NullableStorage) Set(val *Storage) { + v.value = val + v.isSet = true +} + +func (v NullableStorage) IsSet() bool { + return v.isSet +} + +func (v *NullableStorage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStorage(val *Storage) *NullableStorage { + return &NullableStorage{value: val, isSet: true} +} + +func (v NullableStorage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStorage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_storage_create.go b/services/sqlserverflex/v3api/model_storage_create.go new file mode 100644 index 000000000..9e83be52a --- /dev/null +++ b/services/sqlserverflex/v3api/model_storage_create.go @@ -0,0 +1,198 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the StorageCreate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StorageCreate{} + +// StorageCreate The object containing information about the storage size and class. +type StorageCreate struct { + // The storage class for the storage. + Class string `json:"class"` + // The storage size in Gigabytes. + Size int64 `json:"size"` + AdditionalProperties map[string]interface{} +} + +type _StorageCreate StorageCreate + +// NewStorageCreate instantiates a new StorageCreate 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 NewStorageCreate(class string, size int64) *StorageCreate { + this := StorageCreate{} + this.Class = class + this.Size = size + return &this +} + +// NewStorageCreateWithDefaults instantiates a new StorageCreate 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 NewStorageCreateWithDefaults() *StorageCreate { + this := StorageCreate{} + return &this +} + +// GetClass returns the Class field value +func (o *StorageCreate) GetClass() string { + if o == nil { + var ret string + return ret + } + + return o.Class +} + +// GetClassOk returns a tuple with the Class field value +// and a boolean to check if the value has been set. +func (o *StorageCreate) GetClassOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Class, true +} + +// SetClass sets field value +func (o *StorageCreate) SetClass(v string) { + o.Class = v +} + +// GetSize returns the Size field value +func (o *StorageCreate) GetSize() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value +// and a boolean to check if the value has been set. +func (o *StorageCreate) GetSizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Size, true +} + +// SetSize sets field value +func (o *StorageCreate) SetSize(v int64) { + o.Size = v +} + +func (o StorageCreate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StorageCreate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["class"] = o.Class + toSerialize["size"] = o.Size + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *StorageCreate) 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{ + "class", + "size", + } + + 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) + } + } + + varStorageCreate := _StorageCreate{} + + err = json.Unmarshal(data, &varStorageCreate) + + if err != nil { + return err + } + + *o = StorageCreate(varStorageCreate) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "class") + delete(additionalProperties, "size") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableStorageCreate struct { + value *StorageCreate + isSet bool +} + +func (v NullableStorageCreate) Get() *StorageCreate { + return v.value +} + +func (v *NullableStorageCreate) Set(val *StorageCreate) { + v.value = val + v.isSet = true +} + +func (v NullableStorageCreate) IsSet() bool { + return v.isSet +} + +func (v *NullableStorageCreate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStorageCreate(val *StorageCreate) *NullableStorageCreate { + return &NullableStorageCreate{value: val, isSet: true} +} + +func (v NullableStorageCreate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStorageCreate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_storage_update.go b/services/sqlserverflex/v3api/model_storage_update.go new file mode 100644 index 000000000..578a0b411 --- /dev/null +++ b/services/sqlserverflex/v3api/model_storage_update.go @@ -0,0 +1,155 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" +) + +// checks if the StorageUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StorageUpdate{} + +// StorageUpdate The object containing information about the storage size and class. +type StorageUpdate struct { + // The storage size in Gigabytes. + Size *int64 `json:"size,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _StorageUpdate StorageUpdate + +// NewStorageUpdate instantiates a new StorageUpdate 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 NewStorageUpdate() *StorageUpdate { + this := StorageUpdate{} + return &this +} + +// NewStorageUpdateWithDefaults instantiates a new StorageUpdate 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 NewStorageUpdateWithDefaults() *StorageUpdate { + this := StorageUpdate{} + return &this +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *StorageUpdate) GetSize() int64 { + if o == nil || IsNil(o.Size) { + var ret int64 + return ret + } + return *o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StorageUpdate) GetSizeOk() (*int64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *StorageUpdate) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *StorageUpdate) SetSize(v int64) { + o.Size = &v +} + +func (o StorageUpdate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StorageUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *StorageUpdate) UnmarshalJSON(data []byte) (err error) { + varStorageUpdate := _StorageUpdate{} + + err = json.Unmarshal(data, &varStorageUpdate) + + if err != nil { + return err + } + + *o = StorageUpdate(varStorageUpdate) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "size") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableStorageUpdate struct { + value *StorageUpdate + isSet bool +} + +func (v NullableStorageUpdate) Get() *StorageUpdate { + return v.value +} + +func (v *NullableStorageUpdate) Set(val *StorageUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableStorageUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableStorageUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStorageUpdate(val *StorageUpdate) *NullableStorageUpdate { + return &NullableStorageUpdate{value: val, isSet: true} +} + +func (v NullableStorageUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStorageUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_trigger_restore_payload.go b/services/sqlserverflex/v3api/model_trigger_restore_payload.go new file mode 100644 index 000000000..0e4c10f61 --- /dev/null +++ b/services/sqlserverflex/v3api/model_trigger_restore_payload.go @@ -0,0 +1,198 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the TriggerRestorePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TriggerRestorePayload{} + +// TriggerRestorePayload struct for TriggerRestorePayload +type TriggerRestorePayload struct { + // The name of the database. + Name string `json:"name"` + // the time for the restore it will be calculated between first backup and last backup + RestoreDateTime string `json:"restoreDateTime"` + AdditionalProperties map[string]interface{} +} + +type _TriggerRestorePayload TriggerRestorePayload + +// NewTriggerRestorePayload instantiates a new TriggerRestorePayload 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 NewTriggerRestorePayload(name string, restoreDateTime string) *TriggerRestorePayload { + this := TriggerRestorePayload{} + this.Name = name + this.RestoreDateTime = restoreDateTime + return &this +} + +// NewTriggerRestorePayloadWithDefaults instantiates a new TriggerRestorePayload 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 NewTriggerRestorePayloadWithDefaults() *TriggerRestorePayload { + this := TriggerRestorePayload{} + return &this +} + +// GetName returns the Name field value +func (o *TriggerRestorePayload) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TriggerRestorePayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TriggerRestorePayload) SetName(v string) { + o.Name = v +} + +// GetRestoreDateTime returns the RestoreDateTime field value +func (o *TriggerRestorePayload) GetRestoreDateTime() string { + if o == nil { + var ret string + return ret + } + + return o.RestoreDateTime +} + +// GetRestoreDateTimeOk returns a tuple with the RestoreDateTime field value +// and a boolean to check if the value has been set. +func (o *TriggerRestorePayload) GetRestoreDateTimeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RestoreDateTime, true +} + +// SetRestoreDateTime sets field value +func (o *TriggerRestorePayload) SetRestoreDateTime(v string) { + o.RestoreDateTime = v +} + +func (o TriggerRestorePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TriggerRestorePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["restoreDateTime"] = o.RestoreDateTime + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *TriggerRestorePayload) 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{ + "name", + "restoreDateTime", + } + + 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) + } + } + + varTriggerRestorePayload := _TriggerRestorePayload{} + + err = json.Unmarshal(data, &varTriggerRestorePayload) + + if err != nil { + return err + } + + *o = TriggerRestorePayload(varTriggerRestorePayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "restoreDateTime") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTriggerRestorePayload struct { + value *TriggerRestorePayload + isSet bool +} + +func (v NullableTriggerRestorePayload) Get() *TriggerRestorePayload { + return v.value +} + +func (v *NullableTriggerRestorePayload) Set(val *TriggerRestorePayload) { + v.value = val + v.isSet = true +} + +func (v NullableTriggerRestorePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableTriggerRestorePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTriggerRestorePayload(val *TriggerRestorePayload) *NullableTriggerRestorePayload { + return &NullableTriggerRestorePayload{value: val, isSet: true} +} + +func (v NullableTriggerRestorePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTriggerRestorePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_update_instance_payload.go b/services/sqlserverflex/v3api/model_update_instance_payload.go new file mode 100644 index 000000000..d36bc8e39 --- /dev/null +++ b/services/sqlserverflex/v3api/model_update_instance_payload.go @@ -0,0 +1,383 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the UpdateInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateInstancePayload{} + +// UpdateInstancePayload struct for UpdateInstancePayload +type UpdateInstancePayload struct { + // The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule. + BackupSchedule string `json:"backupSchedule"` + // The id of the instance flavor. + FlavorId string `json:"flavorId"` + // A dictionary of user-defined key-value pairs used to categorize or organize the resource. **Rules for Keys:** * Must be between 1 and 63 characters long. * Must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$` * **Restriction:** The prefix `stackit-` is strictly reserved and cannot be used. **Rules for Values:** * Must be between 0 (empty string) and 63 characters long. * If not empty, must begin and end with an alphanumeric character. * May contain dashes (`-`), underscores (`_`), and dots (`.`). * **Regex:** `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$` + Labels *map[string]string `json:"labels,omitempty"` + // The name of the instance. + Name string `json:"name"` + Network UpdateInstancePayloadNetwork `json:"network"` + // The days for how long the backup files should be stored before cleaned up. 30 to 90 + RetentionDays int32 `json:"retentionDays"` + Storage StorageUpdate `json:"storage"` + Version InstanceVersion `json:"version"` + AdditionalProperties map[string]interface{} +} + +type _UpdateInstancePayload UpdateInstancePayload + +// NewUpdateInstancePayload instantiates a new UpdateInstancePayload 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 NewUpdateInstancePayload(backupSchedule string, flavorId string, name string, network UpdateInstancePayloadNetwork, retentionDays int32, storage StorageUpdate, version InstanceVersion) *UpdateInstancePayload { + this := UpdateInstancePayload{} + this.BackupSchedule = backupSchedule + this.FlavorId = flavorId + this.Name = name + this.Network = network + this.RetentionDays = retentionDays + this.Storage = storage + this.Version = version + return &this +} + +// NewUpdateInstancePayloadWithDefaults instantiates a new UpdateInstancePayload 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 NewUpdateInstancePayloadWithDefaults() *UpdateInstancePayload { + this := UpdateInstancePayload{} + return &this +} + +// GetBackupSchedule returns the BackupSchedule field value +func (o *UpdateInstancePayload) GetBackupSchedule() string { + if o == nil { + var ret string + return ret + } + + return o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetBackupScheduleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BackupSchedule, true +} + +// SetBackupSchedule sets field value +func (o *UpdateInstancePayload) SetBackupSchedule(v string) { + o.BackupSchedule = v +} + +// GetFlavorId returns the FlavorId field value +func (o *UpdateInstancePayload) GetFlavorId() string { + if o == nil { + var ret string + return ret + } + + return o.FlavorId +} + +// GetFlavorIdOk returns a tuple with the FlavorId field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetFlavorIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FlavorId, true +} + +// SetFlavorId sets field value +func (o *UpdateInstancePayload) SetFlavorId(v string) { + o.FlavorId = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *UpdateInstancePayload) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *UpdateInstancePayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *UpdateInstancePayload) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetName returns the Name field value +func (o *UpdateInstancePayload) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UpdateInstancePayload) SetName(v string) { + o.Name = v +} + +// GetNetwork returns the Network field value +func (o *UpdateInstancePayload) GetNetwork() UpdateInstancePayloadNetwork { + if o == nil { + var ret UpdateInstancePayloadNetwork + return ret + } + + return o.Network +} + +// GetNetworkOk returns a tuple with the Network field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetNetworkOk() (*UpdateInstancePayloadNetwork, bool) { + if o == nil { + return nil, false + } + return &o.Network, true +} + +// SetNetwork sets field value +func (o *UpdateInstancePayload) SetNetwork(v UpdateInstancePayloadNetwork) { + o.Network = v +} + +// GetRetentionDays returns the RetentionDays field value +func (o *UpdateInstancePayload) GetRetentionDays() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RetentionDays +} + +// GetRetentionDaysOk returns a tuple with the RetentionDays field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetRetentionDaysOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RetentionDays, true +} + +// SetRetentionDays sets field value +func (o *UpdateInstancePayload) SetRetentionDays(v int32) { + o.RetentionDays = v +} + +// GetStorage returns the Storage field value +func (o *UpdateInstancePayload) GetStorage() StorageUpdate { + if o == nil { + var ret StorageUpdate + return ret + } + + return o.Storage +} + +// GetStorageOk returns a tuple with the Storage field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetStorageOk() (*StorageUpdate, bool) { + if o == nil { + return nil, false + } + return &o.Storage, true +} + +// SetStorage sets field value +func (o *UpdateInstancePayload) SetStorage(v StorageUpdate) { + o.Storage = v +} + +// GetVersion returns the Version field value +func (o *UpdateInstancePayload) GetVersion() InstanceVersion { + if o == nil { + var ret InstanceVersion + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetVersionOk() (*InstanceVersion, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *UpdateInstancePayload) SetVersion(v InstanceVersion) { + o.Version = v +} + +func (o UpdateInstancePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["backupSchedule"] = o.BackupSchedule + toSerialize["flavorId"] = o.FlavorId + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + toSerialize["network"] = o.Network + toSerialize["retentionDays"] = o.RetentionDays + toSerialize["storage"] = o.Storage + toSerialize["version"] = o.Version + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateInstancePayload) 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{ + "backupSchedule", + "flavorId", + "name", + "network", + "retentionDays", + "storage", + "version", + } + + 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) + } + } + + varUpdateInstancePayload := _UpdateInstancePayload{} + + err = json.Unmarshal(data, &varUpdateInstancePayload) + + if err != nil { + return err + } + + *o = UpdateInstancePayload(varUpdateInstancePayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "backupSchedule") + delete(additionalProperties, "flavorId") + delete(additionalProperties, "labels") + delete(additionalProperties, "name") + delete(additionalProperties, "network") + delete(additionalProperties, "retentionDays") + delete(additionalProperties, "storage") + delete(additionalProperties, "version") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateInstancePayload struct { + value *UpdateInstancePayload + isSet bool +} + +func (v NullableUpdateInstancePayload) Get() *UpdateInstancePayload { + return v.value +} + +func (v *NullableUpdateInstancePayload) Set(val *UpdateInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateInstancePayload(val *UpdateInstancePayload) *NullableUpdateInstancePayload { + return &NullableUpdateInstancePayload{value: val, isSet: true} +} + +func (v NullableUpdateInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_update_instance_payload_network.go b/services/sqlserverflex/v3api/model_update_instance_payload_network.go new file mode 100644 index 000000000..949284316 --- /dev/null +++ b/services/sqlserverflex/v3api/model_update_instance_payload_network.go @@ -0,0 +1,168 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the UpdateInstancePayloadNetwork type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateInstancePayloadNetwork{} + +// UpdateInstancePayloadNetwork the network configuration of the instance. +type UpdateInstancePayloadNetwork struct { + // List of IPV4 cidr. + Acl []string `json:"acl"` + AdditionalProperties map[string]interface{} +} + +type _UpdateInstancePayloadNetwork UpdateInstancePayloadNetwork + +// NewUpdateInstancePayloadNetwork instantiates a new UpdateInstancePayloadNetwork 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 NewUpdateInstancePayloadNetwork(acl []string) *UpdateInstancePayloadNetwork { + this := UpdateInstancePayloadNetwork{} + this.Acl = acl + return &this +} + +// NewUpdateInstancePayloadNetworkWithDefaults instantiates a new UpdateInstancePayloadNetwork 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 NewUpdateInstancePayloadNetworkWithDefaults() *UpdateInstancePayloadNetwork { + this := UpdateInstancePayloadNetwork{} + return &this +} + +// GetAcl returns the Acl field value +func (o *UpdateInstancePayloadNetwork) GetAcl() []string { + if o == nil { + var ret []string + return ret + } + + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayloadNetwork) GetAclOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Acl, true +} + +// SetAcl sets field value +func (o *UpdateInstancePayloadNetwork) SetAcl(v []string) { + o.Acl = v +} + +func (o UpdateInstancePayloadNetwork) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateInstancePayloadNetwork) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["acl"] = o.Acl + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateInstancePayloadNetwork) 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{ + "acl", + } + + 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) + } + } + + varUpdateInstancePayloadNetwork := _UpdateInstancePayloadNetwork{} + + err = json.Unmarshal(data, &varUpdateInstancePayloadNetwork) + + if err != nil { + return err + } + + *o = UpdateInstancePayloadNetwork(varUpdateInstancePayloadNetwork) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "acl") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateInstancePayloadNetwork struct { + value *UpdateInstancePayloadNetwork + isSet bool +} + +func (v NullableUpdateInstancePayloadNetwork) Get() *UpdateInstancePayloadNetwork { + return v.value +} + +func (v *NullableUpdateInstancePayloadNetwork) Set(val *UpdateInstancePayloadNetwork) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateInstancePayloadNetwork) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateInstancePayloadNetwork) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateInstancePayloadNetwork(val *UpdateInstancePayloadNetwork) *NullableUpdateInstancePayloadNetwork { + return &NullableUpdateInstancePayloadNetwork{value: val, isSet: true} +} + +func (v NullableUpdateInstancePayloadNetwork) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateInstancePayloadNetwork) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_update_instance_protection_payload.go b/services/sqlserverflex/v3api/model_update_instance_protection_payload.go new file mode 100644 index 000000000..48e0eff71 --- /dev/null +++ b/services/sqlserverflex/v3api/model_update_instance_protection_payload.go @@ -0,0 +1,168 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the UpdateInstanceProtectionPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateInstanceProtectionPayload{} + +// UpdateInstanceProtectionPayload struct for UpdateInstanceProtectionPayload +type UpdateInstanceProtectionPayload struct { + // Protect instance from deletion. + IsDeletable bool `json:"isDeletable"` + AdditionalProperties map[string]interface{} +} + +type _UpdateInstanceProtectionPayload UpdateInstanceProtectionPayload + +// NewUpdateInstanceProtectionPayload instantiates a new UpdateInstanceProtectionPayload 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 NewUpdateInstanceProtectionPayload(isDeletable bool) *UpdateInstanceProtectionPayload { + this := UpdateInstanceProtectionPayload{} + this.IsDeletable = isDeletable + return &this +} + +// NewUpdateInstanceProtectionPayloadWithDefaults instantiates a new UpdateInstanceProtectionPayload 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 NewUpdateInstanceProtectionPayloadWithDefaults() *UpdateInstanceProtectionPayload { + this := UpdateInstanceProtectionPayload{} + return &this +} + +// GetIsDeletable returns the IsDeletable field value +func (o *UpdateInstanceProtectionPayload) GetIsDeletable() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeletable +} + +// GetIsDeletableOk returns a tuple with the IsDeletable field value +// and a boolean to check if the value has been set. +func (o *UpdateInstanceProtectionPayload) GetIsDeletableOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeletable, true +} + +// SetIsDeletable sets field value +func (o *UpdateInstanceProtectionPayload) SetIsDeletable(v bool) { + o.IsDeletable = v +} + +func (o UpdateInstanceProtectionPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateInstanceProtectionPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["isDeletable"] = o.IsDeletable + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateInstanceProtectionPayload) 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{ + "isDeletable", + } + + 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) + } + } + + varUpdateInstanceProtectionPayload := _UpdateInstanceProtectionPayload{} + + err = json.Unmarshal(data, &varUpdateInstanceProtectionPayload) + + if err != nil { + return err + } + + *o = UpdateInstanceProtectionPayload(varUpdateInstanceProtectionPayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "isDeletable") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateInstanceProtectionPayload struct { + value *UpdateInstanceProtectionPayload + isSet bool +} + +func (v NullableUpdateInstanceProtectionPayload) Get() *UpdateInstanceProtectionPayload { + return v.value +} + +func (v *NullableUpdateInstanceProtectionPayload) Set(val *UpdateInstanceProtectionPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateInstanceProtectionPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateInstanceProtectionPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateInstanceProtectionPayload(val *UpdateInstanceProtectionPayload) *NullableUpdateInstanceProtectionPayload { + return &NullableUpdateInstanceProtectionPayload{value: val, isSet: true} +} + +func (v NullableUpdateInstanceProtectionPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateInstanceProtectionPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_update_instance_protection_response.go b/services/sqlserverflex/v3api/model_update_instance_protection_response.go new file mode 100644 index 000000000..2ad261cd9 --- /dev/null +++ b/services/sqlserverflex/v3api/model_update_instance_protection_response.go @@ -0,0 +1,168 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the UpdateInstanceProtectionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateInstanceProtectionResponse{} + +// UpdateInstanceProtectionResponse struct for UpdateInstanceProtectionResponse +type UpdateInstanceProtectionResponse struct { + // Protect instance from deletion. + IsDeletable bool `json:"isDeletable"` + AdditionalProperties map[string]interface{} +} + +type _UpdateInstanceProtectionResponse UpdateInstanceProtectionResponse + +// NewUpdateInstanceProtectionResponse instantiates a new UpdateInstanceProtectionResponse 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 NewUpdateInstanceProtectionResponse(isDeletable bool) *UpdateInstanceProtectionResponse { + this := UpdateInstanceProtectionResponse{} + this.IsDeletable = isDeletable + return &this +} + +// NewUpdateInstanceProtectionResponseWithDefaults instantiates a new UpdateInstanceProtectionResponse 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 NewUpdateInstanceProtectionResponseWithDefaults() *UpdateInstanceProtectionResponse { + this := UpdateInstanceProtectionResponse{} + return &this +} + +// GetIsDeletable returns the IsDeletable field value +func (o *UpdateInstanceProtectionResponse) GetIsDeletable() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDeletable +} + +// GetIsDeletableOk returns a tuple with the IsDeletable field value +// and a boolean to check if the value has been set. +func (o *UpdateInstanceProtectionResponse) GetIsDeletableOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDeletable, true +} + +// SetIsDeletable sets field value +func (o *UpdateInstanceProtectionResponse) SetIsDeletable(v bool) { + o.IsDeletable = v +} + +func (o UpdateInstanceProtectionResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateInstanceProtectionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["isDeletable"] = o.IsDeletable + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateInstanceProtectionResponse) 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{ + "isDeletable", + } + + 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) + } + } + + varUpdateInstanceProtectionResponse := _UpdateInstanceProtectionResponse{} + + err = json.Unmarshal(data, &varUpdateInstanceProtectionResponse) + + if err != nil { + return err + } + + *o = UpdateInstanceProtectionResponse(varUpdateInstanceProtectionResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "isDeletable") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateInstanceProtectionResponse struct { + value *UpdateInstanceProtectionResponse + isSet bool +} + +func (v NullableUpdateInstanceProtectionResponse) Get() *UpdateInstanceProtectionResponse { + return v.value +} + +func (v *NullableUpdateInstanceProtectionResponse) Set(val *UpdateInstanceProtectionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateInstanceProtectionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateInstanceProtectionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateInstanceProtectionResponse(val *UpdateInstanceProtectionResponse) *NullableUpdateInstanceProtectionResponse { + return &NullableUpdateInstanceProtectionResponse{value: val, isSet: true} +} + +func (v NullableUpdateInstanceProtectionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateInstanceProtectionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_user_sort.go b/services/sqlserverflex/v3api/model_user_sort.go new file mode 100644 index 000000000..5ccf73113 --- /dev/null +++ b/services/sqlserverflex/v3api/model_user_sort.go @@ -0,0 +1,126 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// UserSort the model 'UserSort' +type UserSort string + +// List of user.sort +const ( + USERSORT_ID_ASC UserSort = "id.asc" + USERSORT_ID_DESC UserSort = "id.desc" + USERSORT_INDEX_DESC UserSort = "index.desc" + USERSORT_INDEX_ASC UserSort = "index.asc" + USERSORT_NAME_DESC UserSort = "name.desc" + USERSORT_NAME_ASC UserSort = "name.asc" + USERSORT_STATUS_DESC UserSort = "status.desc" + USERSORT_STATUS_ASC UserSort = "status.asc" + USERSORT_UNKNOWN_DEFAULT_OPEN_API UserSort = "unknown_default_open_api" +) + +// All allowed values of UserSort enum +var AllowedUserSortEnumValues = []UserSort{ + "id.asc", + "id.desc", + "index.desc", + "index.asc", + "name.desc", + "name.asc", + "status.desc", + "status.asc", + "unknown_default_open_api", +} + +func (v *UserSort) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := UserSort(value) + for _, existing := range AllowedUserSortEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + *v = USERSORT_UNKNOWN_DEFAULT_OPEN_API + return nil +} + +// NewUserSortFromValue returns a pointer to a valid UserSort +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewUserSortFromValue(v string) (*UserSort, error) { + ev := UserSort(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for UserSort: valid values are %v", v, AllowedUserSortEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v UserSort) IsValid() bool { + for _, existing := range AllowedUserSortEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to user.sort value +func (v UserSort) Ptr() *UserSort { + return &v +} + +type NullableUserSort struct { + value *UserSort + isSet bool +} + +func (v NullableUserSort) Get() *UserSort { + return v.value +} + +func (v *NullableUserSort) Set(val *UserSort) { + v.value = val + v.isSet = true +} + +func (v NullableUserSort) IsSet() bool { + return v.isSet +} + +func (v *NullableUserSort) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserSort(val *UserSort) *NullableUserSort { + return &NullableUserSort{value: val, isSet: true} +} + +func (v NullableUserSort) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserSort) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_validation_error.go b/services/sqlserverflex/v3api/model_validation_error.go new file mode 100644 index 000000000..8663f9672 --- /dev/null +++ b/services/sqlserverflex/v3api/model_validation_error.go @@ -0,0 +1,198 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ValidationError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ValidationError{} + +// ValidationError struct for ValidationError +type ValidationError struct { + // the http error should be always 422 for validationError + Code int32 `json:"code"` + // errors for all fields where the error happened + Validation []ValidationErrorValidationInner `json:"validation"` + AdditionalProperties map[string]interface{} +} + +type _ValidationError ValidationError + +// NewValidationError instantiates a new ValidationError 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 NewValidationError(code int32, validation []ValidationErrorValidationInner) *ValidationError { + this := ValidationError{} + this.Code = code + this.Validation = validation + return &this +} + +// NewValidationErrorWithDefaults instantiates a new ValidationError 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 NewValidationErrorWithDefaults() *ValidationError { + this := ValidationError{} + return &this +} + +// GetCode returns the Code field value +func (o *ValidationError) GetCode() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *ValidationError) GetCodeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Code, true +} + +// SetCode sets field value +func (o *ValidationError) SetCode(v int32) { + o.Code = v +} + +// GetValidation returns the Validation field value +func (o *ValidationError) GetValidation() []ValidationErrorValidationInner { + if o == nil { + var ret []ValidationErrorValidationInner + return ret + } + + return o.Validation +} + +// GetValidationOk returns a tuple with the Validation field value +// and a boolean to check if the value has been set. +func (o *ValidationError) GetValidationOk() ([]ValidationErrorValidationInner, bool) { + if o == nil { + return nil, false + } + return o.Validation, true +} + +// SetValidation sets field value +func (o *ValidationError) SetValidation(v []ValidationErrorValidationInner) { + o.Validation = v +} + +func (o ValidationError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ValidationError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["code"] = o.Code + toSerialize["validation"] = o.Validation + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ValidationError) 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{ + "code", + "validation", + } + + 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) + } + } + + varValidationError := _ValidationError{} + + err = json.Unmarshal(data, &varValidationError) + + if err != nil { + return err + } + + *o = ValidationError(varValidationError) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "code") + delete(additionalProperties, "validation") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableValidationError struct { + value *ValidationError + isSet bool +} + +func (v NullableValidationError) Get() *ValidationError { + return v.value +} + +func (v *NullableValidationError) Set(val *ValidationError) { + v.value = val + v.isSet = true +} + +func (v NullableValidationError) IsSet() bool { + return v.isSet +} + +func (v *NullableValidationError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableValidationError(val *ValidationError) *NullableValidationError { + return &NullableValidationError{value: val, isSet: true} +} + +func (v NullableValidationError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableValidationError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_validation_error_validation_inner.go b/services/sqlserverflex/v3api/model_validation_error_validation_inner.go new file mode 100644 index 000000000..78d9ffdcf --- /dev/null +++ b/services/sqlserverflex/v3api/model_validation_error_validation_inner.go @@ -0,0 +1,196 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the ValidationErrorValidationInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ValidationErrorValidationInner{} + +// ValidationErrorValidationInner struct for ValidationErrorValidationInner +type ValidationErrorValidationInner struct { + Field string `json:"field"` + Message string `json:"message"` + AdditionalProperties map[string]interface{} +} + +type _ValidationErrorValidationInner ValidationErrorValidationInner + +// NewValidationErrorValidationInner instantiates a new ValidationErrorValidationInner 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 NewValidationErrorValidationInner(field string, message string) *ValidationErrorValidationInner { + this := ValidationErrorValidationInner{} + this.Field = field + this.Message = message + return &this +} + +// NewValidationErrorValidationInnerWithDefaults instantiates a new ValidationErrorValidationInner 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 NewValidationErrorValidationInnerWithDefaults() *ValidationErrorValidationInner { + this := ValidationErrorValidationInner{} + return &this +} + +// GetField returns the Field field value +func (o *ValidationErrorValidationInner) GetField() string { + if o == nil { + var ret string + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *ValidationErrorValidationInner) GetFieldOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *ValidationErrorValidationInner) SetField(v string) { + o.Field = v +} + +// GetMessage returns the Message field value +func (o *ValidationErrorValidationInner) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *ValidationErrorValidationInner) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *ValidationErrorValidationInner) SetMessage(v string) { + o.Message = v +} + +func (o ValidationErrorValidationInner) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ValidationErrorValidationInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["field"] = o.Field + toSerialize["message"] = o.Message + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ValidationErrorValidationInner) 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{ + "field", + "message", + } + + 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) + } + } + + varValidationErrorValidationInner := _ValidationErrorValidationInner{} + + err = json.Unmarshal(data, &varValidationErrorValidationInner) + + if err != nil { + return err + } + + *o = ValidationErrorValidationInner(varValidationErrorValidationInner) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "field") + delete(additionalProperties, "message") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableValidationErrorValidationInner struct { + value *ValidationErrorValidationInner + isSet bool +} + +func (v NullableValidationErrorValidationInner) Get() *ValidationErrorValidationInner { + return v.value +} + +func (v *NullableValidationErrorValidationInner) Set(val *ValidationErrorValidationInner) { + v.value = val + v.isSet = true +} + +func (v NullableValidationErrorValidationInner) IsSet() bool { + return v.isSet +} + +func (v *NullableValidationErrorValidationInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableValidationErrorValidationInner(val *ValidationErrorValidationInner) *NullableValidationErrorValidationInner { + return &NullableValidationErrorValidationInner{value: val, isSet: true} +} + +func (v NullableValidationErrorValidationInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableValidationErrorValidationInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/model_version.go b/services/sqlserverflex/v3api/model_version.go new file mode 100644 index 000000000..074a2ee93 --- /dev/null +++ b/services/sqlserverflex/v3api/model_version.go @@ -0,0 +1,258 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +import ( + "encoding/json" + "fmt" +) + +// checks if the Version type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Version{} + +// Version The version of the sqlserver instance and more details. +type Version struct { + // Flag if the version is a beta version. If set the version may contain bugs and is not fully tested. + Beta bool `json:"beta"` + // Timestamp in RFC3339 format which says when the version will no longer be supported by STACKIT. + Deprecated string `json:"deprecated"` + // Flag if the version is recommend by the STACKIT Team. + Recommend bool `json:"recommend"` + // The sqlserver version used for the instance. + Version string `json:"version"` + AdditionalProperties map[string]interface{} +} + +type _Version Version + +// NewVersion instantiates a new Version 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 NewVersion(beta bool, deprecated string, recommend bool, version string) *Version { + this := Version{} + this.Beta = beta + this.Deprecated = deprecated + this.Recommend = recommend + this.Version = version + return &this +} + +// NewVersionWithDefaults instantiates a new Version 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 NewVersionWithDefaults() *Version { + this := Version{} + return &this +} + +// GetBeta returns the Beta field value +func (o *Version) GetBeta() bool { + if o == nil { + var ret bool + return ret + } + + return o.Beta +} + +// GetBetaOk returns a tuple with the Beta field value +// and a boolean to check if the value has been set. +func (o *Version) GetBetaOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Beta, true +} + +// SetBeta sets field value +func (o *Version) SetBeta(v bool) { + o.Beta = v +} + +// GetDeprecated returns the Deprecated field value +func (o *Version) GetDeprecated() string { + if o == nil { + var ret string + return ret + } + + return o.Deprecated +} + +// GetDeprecatedOk returns a tuple with the Deprecated field value +// and a boolean to check if the value has been set. +func (o *Version) GetDeprecatedOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Deprecated, true +} + +// SetDeprecated sets field value +func (o *Version) SetDeprecated(v string) { + o.Deprecated = v +} + +// GetRecommend returns the Recommend field value +func (o *Version) GetRecommend() bool { + if o == nil { + var ret bool + return ret + } + + return o.Recommend +} + +// GetRecommendOk returns a tuple with the Recommend field value +// and a boolean to check if the value has been set. +func (o *Version) GetRecommendOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Recommend, true +} + +// SetRecommend sets field value +func (o *Version) SetRecommend(v bool) { + o.Recommend = v +} + +// GetVersion returns the Version field value +func (o *Version) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *Version) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *Version) SetVersion(v string) { + o.Version = v +} + +func (o Version) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Version) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["beta"] = o.Beta + toSerialize["deprecated"] = o.Deprecated + toSerialize["recommend"] = o.Recommend + toSerialize["version"] = o.Version + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Version) 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{ + "beta", + "deprecated", + "recommend", + "version", + } + + 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) + } + } + + varVersion := _Version{} + + err = json.Unmarshal(data, &varVersion) + + if err != nil { + return err + } + + *o = Version(varVersion) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "beta") + delete(additionalProperties, "deprecated") + delete(additionalProperties, "recommend") + delete(additionalProperties, "version") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableVersion struct { + value *Version + isSet bool +} + +func (v NullableVersion) Get() *Version { + return v.value +} + +func (v *NullableVersion) Set(val *Version) { + v.value = val + v.isSet = true +} + +func (v NullableVersion) IsSet() bool { + return v.isSet +} + +func (v *NullableVersion) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVersion(val *Version) *NullableVersion { + return &NullableVersion{value: val, isSet: true} +} + +func (v NullableVersion) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVersion) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sqlserverflex/v3api/response.go b/services/sqlserverflex/v3api/response.go new file mode 100644 index 000000000..5b6ee0bbd --- /dev/null +++ b/services/sqlserverflex/v3api/response.go @@ -0,0 +1,48 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +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/sqlserverflex/v3api/utils.go b/services/sqlserverflex/v3api/utils.go new file mode 100644 index 000000000..19832e52d --- /dev/null +++ b/services/sqlserverflex/v3api/utils.go @@ -0,0 +1,362 @@ +/* +STACKIT MSSQL Service API + +This is the documentation for the STACKIT MSSQL service + +API version: 3.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3api + +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...) +} diff --git a/services/sqlserverflex/v3api/wait/wait.go b/services/sqlserverflex/v3api/wait/wait.go new file mode 100644 index 000000000..6881f1d54 --- /dev/null +++ b/services/sqlserverflex/v3api/wait/wait.go @@ -0,0 +1,68 @@ +package wait + +import ( + "context" + "errors" + "net/http" + "time" + + "github.com/stackitcloud/stackit-sdk-go/core/wait" + sqlserverflex "github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex/v3api" +) + +func createOrUpdateInstanceWaitHandler(ctx context.Context, client sqlserverflex.DefaultAPI, projectId, region, instanceId string) *wait.AsyncActionHandler[sqlserverflex.GetInstanceResponse] { + waitConfig := wait.WaiterHelper[sqlserverflex.GetInstanceResponse, sqlserverflex.State]{ + FetchInstance: client.GetInstance(ctx, projectId, region, instanceId).Execute, + GetState: func(response *sqlserverflex.GetInstanceResponse) (sqlserverflex.State, error) { + if response == nil { + return "", errors.New("empty response") + } + if response.State == "" { + return "", errors.New("state is missing") + } + return response.State, nil + }, + ActiveState: []sqlserverflex.State{sqlserverflex.STATE_READY}, + ErrorState: []sqlserverflex.State{ + sqlserverflex.STATE_FAILURE, + sqlserverflex.STATE_UNKNOWN, + sqlserverflex.STATE_TERMINATING, + }, + } + + handler := wait.New(waitConfig.Wait()) + handler.SetSleepBeforeWait(5 * time.Second) + handler.SetTimeout(45 * time.Minute) + return handler +} + +// CreateInstanceWaitHandler will wait for instance creation +func CreateInstanceWaitHandler(ctx context.Context, client sqlserverflex.DefaultAPI, projectId, region, instanceId string) *wait.AsyncActionHandler[sqlserverflex.GetInstanceResponse] { + return createOrUpdateInstanceWaitHandler(ctx, client, projectId, region, instanceId) +} + +// UpdateInstanceWaitHandler will wait for instance update +func UpdateInstanceWaitHandler(ctx context.Context, client sqlserverflex.DefaultAPI, projectId, region, instanceId string) *wait.AsyncActionHandler[sqlserverflex.GetInstanceResponse] { + return createOrUpdateInstanceWaitHandler(ctx, client, projectId, region, instanceId) +} + +// DeleteInstanceWaitHandler will wait for instance deletion +func DeleteInstanceWaitHandler(ctx context.Context, client sqlserverflex.DefaultAPI, projectId, region, instanceId string) *wait.AsyncActionHandler[sqlserverflex.GetInstanceResponse] { + waitConfig := wait.WaiterHelper[sqlserverflex.GetInstanceResponse, sqlserverflex.State]{ + FetchInstance: client.GetInstance(ctx, projectId, region, instanceId).Execute, + GetState: func(response *sqlserverflex.GetInstanceResponse) (sqlserverflex.State, error) { + if response == nil { + return "", errors.New("empty response") + } + if response.State == "" { + return "", errors.New("state is missing in response") + } + return response.State, nil + }, + ErrorState: []sqlserverflex.State{sqlserverflex.STATE_FAILURE}, + DeleteHttpErrorStatusCodes: []int{http.StatusNotFound}, + } + handler := wait.New(waitConfig.Wait()) + handler.SetTimeout(15 * time.Minute) + return handler +} diff --git a/services/sqlserverflex/v3api/wait/wait_test.go b/services/sqlserverflex/v3api/wait/wait_test.go new file mode 100644 index 000000000..3f61f0156 --- /dev/null +++ b/services/sqlserverflex/v3api/wait/wait_test.go @@ -0,0 +1,191 @@ +package wait + +import ( + "context" + "fmt" + "testing" + "testing/synctest" + "time" + + "github.com/google/go-cmp/cmp" + + "github.com/stackitcloud/stackit-sdk-go/core/oapierror" + "github.com/stackitcloud/stackit-sdk-go/core/utils" + "github.com/stackitcloud/stackit-sdk-go/core/wait" + sqlserverflex "github.com/stackitcloud/stackit-sdk-go/services/sqlserverflex/v3api" +) + +type mockSettings struct { + instanceId string + instanceState sqlserverflex.State + instanceIsDeleted bool + instanceGetFails bool +} + +// Used for testing instance operations +func newAPIMock(settings mockSettings) sqlserverflex.DefaultAPI { + return &sqlserverflex.DefaultAPIServiceMock{ + GetInstanceExecuteMock: utils.Ptr(func(_ sqlserverflex.ApiGetInstanceRequest) (*sqlserverflex.GetInstanceResponse, error) { + if settings.instanceGetFails { + return nil, &oapierror.GenericOpenAPIError{ + StatusCode: 500, + } + } + + if settings.instanceIsDeleted { + return nil, &oapierror.GenericOpenAPIError{ + StatusCode: 404, + } + } + + return &sqlserverflex.GetInstanceResponse{ + Id: settings.instanceId, + State: settings.instanceState, + }, nil + }), + } +} + +func TestCreateOrUpdateInstanceWaitHandler(t *testing.T) { + tests := []struct { + desc string + instanceGetFails bool + instanceState sqlserverflex.State + wantErr bool + wantResp bool + }{ + { + desc: "create_or_update_succeeded", + instanceGetFails: false, + instanceState: sqlserverflex.STATE_READY, + wantErr: false, + wantResp: true, + }, + { + desc: "create_or_update_failed", + instanceGetFails: false, + instanceState: sqlserverflex.STATE_FAILURE, + wantErr: true, + wantResp: true, + }, + { + desc: "create_or_update_failed_2", + instanceGetFails: false, + instanceState: sqlserverflex.STATE_UNKNOWN, + wantErr: true, + wantResp: true, + }, + { + desc: "instance_get_fails", + instanceGetFails: true, + wantErr: true, + wantResp: false, + }, + { + desc: "timeout", + instanceGetFails: false, + instanceState: sqlserverflex.STATE_PROGRESSING, + wantErr: true, + wantResp: false, + }, + { + desc: "timeout_2", + instanceGetFails: false, + instanceState: sqlserverflex.STATE_PENDING, + wantErr: true, + wantResp: false, + }, + } + + handlers := map[string]func(context.Context, sqlserverflex.DefaultAPI, string, string, string) *wait.AsyncActionHandler[sqlserverflex.GetInstanceResponse]{ + "common logic": createOrUpdateInstanceWaitHandler, + "create": CreateInstanceWaitHandler, + "update": UpdateInstanceWaitHandler, + } + + for handlerDesc, handlerFn := range handlers { + for _, tt := range tests { + t.Run(fmt.Sprintf("%s - %s", handlerDesc, tt.desc), func(t *testing.T) { + synctest.Test(t, func(t *testing.T) { + instanceId := "foo-bar" + + apiClient := newAPIMock(mockSettings{ + instanceGetFails: tt.instanceGetFails, + instanceId: instanceId, + instanceState: tt.instanceState, + }) + + var wantRes *sqlserverflex.GetInstanceResponse + if tt.wantResp { + wantRes = &sqlserverflex.GetInstanceResponse{ + Id: instanceId, + State: tt.instanceState, + } + } + + handler := handlerFn(context.Background(), apiClient, "", "", instanceId) + gotRes, err := handler.SetTimeout(10 * time.Millisecond).SetSleepBeforeWait(1 * time.Millisecond).WaitWithContext(context.Background()) + + if (err != nil) != tt.wantErr { + t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) + } + diff := cmp.Diff(gotRes, wantRes) + if diff != "" { + t.Fatalf("handler gotRes = %+v\n want %+v\n diff = %s", gotRes, wantRes, diff) + } + }) + }) + } + } +} + +func TestDeleteInstanceWaitHandler(t *testing.T) { + tests := []struct { + desc string + instanceGetFails bool + isDeleted bool + instanceState sqlserverflex.State + wantErr bool + }{ + { + desc: "delete_succeeded", + isDeleted: true, + instanceGetFails: false, + wantErr: false, + }, + { + desc: "delete_failed", + instanceGetFails: false, + instanceState: sqlserverflex.STATE_FAILURE, + wantErr: true, + }, + { + desc: "get_fails", + instanceGetFails: true, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.desc, func(t *testing.T) { + synctest.Test(t, func(t *testing.T) { + instanceId := "foo-bar" + instanceState := tt.instanceState + + apiClient := newAPIMock(mockSettings{ + instanceGetFails: tt.instanceGetFails, + instanceIsDeleted: tt.isDeleted, + instanceId: instanceId, + instanceState: instanceState, + }) + + handler := DeleteInstanceWaitHandler(context.Background(), apiClient, "", "", instanceId) + + _, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) + + if (err != nil) != tt.wantErr { + t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) + } + }) + }) + } +} diff --git a/services/sqlserverflex/v3beta2api/api_default.go b/services/sqlserverflex/v3beta2api/api_default.go index da327017f..b345b6571 100644 --- a/services/sqlserverflex/v3beta2api/api_default.go +++ b/services/sqlserverflex/v3beta2api/api_default.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/api_default_mock.go b/services/sqlserverflex/v3beta2api/api_default_mock.go index 348a5e8fe..2be2bc251 100644 --- a/services/sqlserverflex/v3beta2api/api_default_mock.go +++ b/services/sqlserverflex/v3beta2api/api_default_mock.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/client.go b/services/sqlserverflex/v3beta2api/client.go index e18f41d81..bf5167619 100644 --- a/services/sqlserverflex/v3beta2api/client.go +++ b/services/sqlserverflex/v3beta2api/client.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/configuration.go b/services/sqlserverflex/v3beta2api/configuration.go index 7c84a01b8..3a4f6056e 100644 --- a/services/sqlserverflex/v3beta2api/configuration.go +++ b/services/sqlserverflex/v3beta2api/configuration.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_backup_running_restore.go b/services/sqlserverflex/v3beta2api/model_backup_running_restore.go index be130dc29..ce215f185 100644 --- a/services/sqlserverflex/v3beta2api/model_backup_running_restore.go +++ b/services/sqlserverflex/v3beta2api/model_backup_running_restore.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_backup_sort.go b/services/sqlserverflex/v3beta2api/model_backup_sort.go index 98ff69816..510bb3489 100644 --- a/services/sqlserverflex/v3beta2api/model_backup_sort.go +++ b/services/sqlserverflex/v3beta2api/model_backup_sort.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_create_database_payload.go b/services/sqlserverflex/v3beta2api/model_create_database_payload.go index 5fd55fe7f..29cccedac 100644 --- a/services/sqlserverflex/v3beta2api/model_create_database_payload.go +++ b/services/sqlserverflex/v3beta2api/model_create_database_payload.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_create_database_response.go b/services/sqlserverflex/v3beta2api/model_create_database_response.go index 9a51de683..2c9a45c99 100644 --- a/services/sqlserverflex/v3beta2api/model_create_database_response.go +++ b/services/sqlserverflex/v3beta2api/model_create_database_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_create_instance_payload.go b/services/sqlserverflex/v3beta2api/model_create_instance_payload.go index 6bb2d1907..8ca148775 100644 --- a/services/sqlserverflex/v3beta2api/model_create_instance_payload.go +++ b/services/sqlserverflex/v3beta2api/model_create_instance_payload.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_create_instance_payload_network.go b/services/sqlserverflex/v3beta2api/model_create_instance_payload_network.go index 3d731cbc1..28e3ecaf2 100644 --- a/services/sqlserverflex/v3beta2api/model_create_instance_payload_network.go +++ b/services/sqlserverflex/v3beta2api/model_create_instance_payload_network.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_create_instance_response.go b/services/sqlserverflex/v3beta2api/model_create_instance_response.go index 3f44cdc0e..9d2e6616e 100644 --- a/services/sqlserverflex/v3beta2api/model_create_instance_response.go +++ b/services/sqlserverflex/v3beta2api/model_create_instance_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_create_user_payload.go b/services/sqlserverflex/v3beta2api/model_create_user_payload.go index 32bc39bf0..177496556 100644 --- a/services/sqlserverflex/v3beta2api/model_create_user_payload.go +++ b/services/sqlserverflex/v3beta2api/model_create_user_payload.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_create_user_response.go b/services/sqlserverflex/v3beta2api/model_create_user_response.go index 6d8050b2f..ce64faf8a 100644 --- a/services/sqlserverflex/v3beta2api/model_create_user_response.go +++ b/services/sqlserverflex/v3beta2api/model_create_user_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_database_getcollation.go b/services/sqlserverflex/v3beta2api/model_database_getcollation.go index 88936e436..355e948bc 100644 --- a/services/sqlserverflex/v3beta2api/model_database_getcollation.go +++ b/services/sqlserverflex/v3beta2api/model_database_getcollation.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_database_getcompatibility.go b/services/sqlserverflex/v3beta2api/model_database_getcompatibility.go index 3edd288a7..3b75f0da8 100644 --- a/services/sqlserverflex/v3beta2api/model_database_getcompatibility.go +++ b/services/sqlserverflex/v3beta2api/model_database_getcompatibility.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_database_roles.go b/services/sqlserverflex/v3beta2api/model_database_roles.go index 99f9d7a81..89bd88ed5 100644 --- a/services/sqlserverflex/v3beta2api/model_database_roles.go +++ b/services/sqlserverflex/v3beta2api/model_database_roles.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_database_sort.go b/services/sqlserverflex/v3beta2api/model_database_sort.go index 9af2d7187..488b2c0f6 100644 --- a/services/sqlserverflex/v3beta2api/model_database_sort.go +++ b/services/sqlserverflex/v3beta2api/model_database_sort.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_error.go b/services/sqlserverflex/v3beta2api/model_error.go index 0d11a724f..b4cd84255 100644 --- a/services/sqlserverflex/v3beta2api/model_error.go +++ b/services/sqlserverflex/v3beta2api/model_error.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_external_s3.go b/services/sqlserverflex/v3beta2api/model_external_s3.go index 0889a13c7..02b42da0a 100644 --- a/services/sqlserverflex/v3beta2api/model_external_s3.go +++ b/services/sqlserverflex/v3beta2api/model_external_s3.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_flavor_sort.go b/services/sqlserverflex/v3beta2api/model_flavor_sort.go index fce093420..6a8552307 100644 --- a/services/sqlserverflex/v3beta2api/model_flavor_sort.go +++ b/services/sqlserverflex/v3beta2api/model_flavor_sort.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_flavor_storage_classes_storage_class.go b/services/sqlserverflex/v3beta2api/model_flavor_storage_classes_storage_class.go index 58e2e612e..74ea574b4 100644 --- a/services/sqlserverflex/v3beta2api/model_flavor_storage_classes_storage_class.go +++ b/services/sqlserverflex/v3beta2api/model_flavor_storage_classes_storage_class.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_flavor_storage_range.go b/services/sqlserverflex/v3beta2api/model_flavor_storage_range.go index 5932789bb..6132392c6 100644 --- a/services/sqlserverflex/v3beta2api/model_flavor_storage_range.go +++ b/services/sqlserverflex/v3beta2api/model_flavor_storage_range.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_get_backup_response.go b/services/sqlserverflex/v3beta2api/model_get_backup_response.go index 0ec4f36f1..53eafa363 100644 --- a/services/sqlserverflex/v3beta2api/model_get_backup_response.go +++ b/services/sqlserverflex/v3beta2api/model_get_backup_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_get_database_response.go b/services/sqlserverflex/v3beta2api/model_get_database_response.go index 1c8dd5b8b..ee11eb55e 100644 --- a/services/sqlserverflex/v3beta2api/model_get_database_response.go +++ b/services/sqlserverflex/v3beta2api/model_get_database_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_get_instance_response.go b/services/sqlserverflex/v3beta2api/model_get_instance_response.go index 22260c88f..714b14595 100644 --- a/services/sqlserverflex/v3beta2api/model_get_instance_response.go +++ b/services/sqlserverflex/v3beta2api/model_get_instance_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_get_user_response.go b/services/sqlserverflex/v3beta2api/model_get_user_response.go index 59e23b793..606b5457e 100644 --- a/services/sqlserverflex/v3beta2api/model_get_user_response.go +++ b/services/sqlserverflex/v3beta2api/model_get_user_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_instance_edition.go b/services/sqlserverflex/v3beta2api/model_instance_edition.go index 50c3d706b..02bf43758 100644 --- a/services/sqlserverflex/v3beta2api/model_instance_edition.go +++ b/services/sqlserverflex/v3beta2api/model_instance_edition.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_instance_encryption.go b/services/sqlserverflex/v3beta2api/model_instance_encryption.go index f81a2b6d7..35773a279 100644 --- a/services/sqlserverflex/v3beta2api/model_instance_encryption.go +++ b/services/sqlserverflex/v3beta2api/model_instance_encryption.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_instance_network.go b/services/sqlserverflex/v3beta2api/model_instance_network.go index 28172273e..210bfa738 100644 --- a/services/sqlserverflex/v3beta2api/model_instance_network.go +++ b/services/sqlserverflex/v3beta2api/model_instance_network.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_instance_network_access_scope.go b/services/sqlserverflex/v3beta2api/model_instance_network_access_scope.go index 875b92ee8..adf427317 100644 --- a/services/sqlserverflex/v3beta2api/model_instance_network_access_scope.go +++ b/services/sqlserverflex/v3beta2api/model_instance_network_access_scope.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_instance_sort.go b/services/sqlserverflex/v3beta2api/model_instance_sort.go index 80dc6321b..337588b17 100644 --- a/services/sqlserverflex/v3beta2api/model_instance_sort.go +++ b/services/sqlserverflex/v3beta2api/model_instance_sort.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_instance_version.go b/services/sqlserverflex/v3beta2api/model_instance_version.go index ac1da1cc8..2a71678f1 100644 --- a/services/sqlserverflex/v3beta2api/model_instance_version.go +++ b/services/sqlserverflex/v3beta2api/model_instance_version.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_instance_version_opt.go b/services/sqlserverflex/v3beta2api/model_instance_version_opt.go index 986d31c62..6ba195a11 100644 --- a/services/sqlserverflex/v3beta2api/model_instance_version_opt.go +++ b/services/sqlserverflex/v3beta2api/model_instance_version_opt.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_list_backup.go b/services/sqlserverflex/v3beta2api/model_list_backup.go index b4aaec9e2..003b176f2 100644 --- a/services/sqlserverflex/v3beta2api/model_list_backup.go +++ b/services/sqlserverflex/v3beta2api/model_list_backup.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_list_backup_response.go b/services/sqlserverflex/v3beta2api/model_list_backup_response.go index 2a0c3119b..03d955493 100644 --- a/services/sqlserverflex/v3beta2api/model_list_backup_response.go +++ b/services/sqlserverflex/v3beta2api/model_list_backup_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_list_backups_response.go b/services/sqlserverflex/v3beta2api/model_list_backups_response.go index fb15fe12e..dd36e9efd 100644 --- a/services/sqlserverflex/v3beta2api/model_list_backups_response.go +++ b/services/sqlserverflex/v3beta2api/model_list_backups_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_list_collations_response.go b/services/sqlserverflex/v3beta2api/model_list_collations_response.go index 5510415df..d07a7e921 100644 --- a/services/sqlserverflex/v3beta2api/model_list_collations_response.go +++ b/services/sqlserverflex/v3beta2api/model_list_collations_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_list_compatibility_response.go b/services/sqlserverflex/v3beta2api/model_list_compatibility_response.go index 4e8e24169..9e889bd1d 100644 --- a/services/sqlserverflex/v3beta2api/model_list_compatibility_response.go +++ b/services/sqlserverflex/v3beta2api/model_list_compatibility_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_list_current_running_restore_jobs.go b/services/sqlserverflex/v3beta2api/model_list_current_running_restore_jobs.go index 68fd15a15..7b58f544c 100644 --- a/services/sqlserverflex/v3beta2api/model_list_current_running_restore_jobs.go +++ b/services/sqlserverflex/v3beta2api/model_list_current_running_restore_jobs.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_list_database.go b/services/sqlserverflex/v3beta2api/model_list_database.go index 6da8407fc..915b876fa 100644 --- a/services/sqlserverflex/v3beta2api/model_list_database.go +++ b/services/sqlserverflex/v3beta2api/model_list_database.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_list_databases_response.go b/services/sqlserverflex/v3beta2api/model_list_databases_response.go index 34c053b7d..db2e05b54 100644 --- a/services/sqlserverflex/v3beta2api/model_list_databases_response.go +++ b/services/sqlserverflex/v3beta2api/model_list_databases_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_list_flavors.go b/services/sqlserverflex/v3beta2api/model_list_flavors.go index a54682644..379b6406d 100644 --- a/services/sqlserverflex/v3beta2api/model_list_flavors.go +++ b/services/sqlserverflex/v3beta2api/model_list_flavors.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_list_flavors_response.go b/services/sqlserverflex/v3beta2api/model_list_flavors_response.go index 62acc4b24..db28e6bb7 100644 --- a/services/sqlserverflex/v3beta2api/model_list_flavors_response.go +++ b/services/sqlserverflex/v3beta2api/model_list_flavors_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_list_instance.go b/services/sqlserverflex/v3beta2api/model_list_instance.go index 2b6f011be..3ee113478 100644 --- a/services/sqlserverflex/v3beta2api/model_list_instance.go +++ b/services/sqlserverflex/v3beta2api/model_list_instance.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_list_instances_response.go b/services/sqlserverflex/v3beta2api/model_list_instances_response.go index b1ed5f2b7..51d5f58a7 100644 --- a/services/sqlserverflex/v3beta2api/model_list_instances_response.go +++ b/services/sqlserverflex/v3beta2api/model_list_instances_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_list_roles_response.go b/services/sqlserverflex/v3beta2api/model_list_roles_response.go index b14f99232..2c2607257 100644 --- a/services/sqlserverflex/v3beta2api/model_list_roles_response.go +++ b/services/sqlserverflex/v3beta2api/model_list_roles_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_list_storages_response.go b/services/sqlserverflex/v3beta2api/model_list_storages_response.go index 92a6c7067..30c224768 100644 --- a/services/sqlserverflex/v3beta2api/model_list_storages_response.go +++ b/services/sqlserverflex/v3beta2api/model_list_storages_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_list_user.go b/services/sqlserverflex/v3beta2api/model_list_user.go index 97257842a..213418093 100644 --- a/services/sqlserverflex/v3beta2api/model_list_user.go +++ b/services/sqlserverflex/v3beta2api/model_list_user.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_list_user_response.go b/services/sqlserverflex/v3beta2api/model_list_user_response.go index 1e8a48dd6..268033980 100644 --- a/services/sqlserverflex/v3beta2api/model_list_user_response.go +++ b/services/sqlserverflex/v3beta2api/model_list_user_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_list_versions_response.go b/services/sqlserverflex/v3beta2api/model_list_versions_response.go index 5ca10dc15..a56cb88dc 100644 --- a/services/sqlserverflex/v3beta2api/model_list_versions_response.go +++ b/services/sqlserverflex/v3beta2api/model_list_versions_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_pagination.go b/services/sqlserverflex/v3beta2api/model_pagination.go index 230c10ddc..c7a6708a0 100644 --- a/services/sqlserverflex/v3beta2api/model_pagination.go +++ b/services/sqlserverflex/v3beta2api/model_pagination.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_partial_update_instance_payload.go b/services/sqlserverflex/v3beta2api/model_partial_update_instance_payload.go index d30df6484..84061219c 100644 --- a/services/sqlserverflex/v3beta2api/model_partial_update_instance_payload.go +++ b/services/sqlserverflex/v3beta2api/model_partial_update_instance_payload.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_partial_update_instance_payload_network.go b/services/sqlserverflex/v3beta2api/model_partial_update_instance_payload_network.go index 4fac1b629..5a042fe08 100644 --- a/services/sqlserverflex/v3beta2api/model_partial_update_instance_payload_network.go +++ b/services/sqlserverflex/v3beta2api/model_partial_update_instance_payload_network.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_replicas.go b/services/sqlserverflex/v3beta2api/model_replicas.go index 8189873ca..ce2c5b28b 100644 --- a/services/sqlserverflex/v3beta2api/model_replicas.go +++ b/services/sqlserverflex/v3beta2api/model_replicas.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_reset_user_response.go b/services/sqlserverflex/v3beta2api/model_reset_user_response.go index 034c2b365..a71e6032c 100644 --- a/services/sqlserverflex/v3beta2api/model_reset_user_response.go +++ b/services/sqlserverflex/v3beta2api/model_reset_user_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_restore_database_from_backup_payload.go b/services/sqlserverflex/v3beta2api/model_restore_database_from_backup_payload.go index 630aaf971..f83fc1acd 100644 --- a/services/sqlserverflex/v3beta2api/model_restore_database_from_backup_payload.go +++ b/services/sqlserverflex/v3beta2api/model_restore_database_from_backup_payload.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_restore_database_from_backup_payload_source.go b/services/sqlserverflex/v3beta2api/model_restore_database_from_backup_payload_source.go index 97283d3aa..d86ff5a00 100644 --- a/services/sqlserverflex/v3beta2api/model_restore_database_from_backup_payload_source.go +++ b/services/sqlserverflex/v3beta2api/model_restore_database_from_backup_payload_source.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_s3file_info.go b/services/sqlserverflex/v3beta2api/model_s3file_info.go index 74a4dad26..b836b5381 100644 --- a/services/sqlserverflex/v3beta2api/model_s3file_info.go +++ b/services/sqlserverflex/v3beta2api/model_s3file_info.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_source_backup.go b/services/sqlserverflex/v3beta2api/model_source_backup.go index 1ad4ebb38..889eb2ecb 100644 --- a/services/sqlserverflex/v3beta2api/model_source_backup.go +++ b/services/sqlserverflex/v3beta2api/model_source_backup.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_source_backup_type.go b/services/sqlserverflex/v3beta2api/model_source_backup_type.go index ffe610735..6631adc72 100644 --- a/services/sqlserverflex/v3beta2api/model_source_backup_type.go +++ b/services/sqlserverflex/v3beta2api/model_source_backup_type.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_source_external_s3.go b/services/sqlserverflex/v3beta2api/model_source_external_s3.go index 3f5ba9866..36d9964b6 100644 --- a/services/sqlserverflex/v3beta2api/model_source_external_s3.go +++ b/services/sqlserverflex/v3beta2api/model_source_external_s3.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_source_external_s3_type.go b/services/sqlserverflex/v3beta2api/model_source_external_s3_type.go index edf9c617d..77dccabeb 100644 --- a/services/sqlserverflex/v3beta2api/model_source_external_s3_type.go +++ b/services/sqlserverflex/v3beta2api/model_source_external_s3_type.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_state.go b/services/sqlserverflex/v3beta2api/model_state.go index 22cdd1b5a..ab0e69fbf 100644 --- a/services/sqlserverflex/v3beta2api/model_state.go +++ b/services/sqlserverflex/v3beta2api/model_state.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_storage.go b/services/sqlserverflex/v3beta2api/model_storage.go index 1cf2955ca..56ec6e452 100644 --- a/services/sqlserverflex/v3beta2api/model_storage.go +++ b/services/sqlserverflex/v3beta2api/model_storage.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_storage_create.go b/services/sqlserverflex/v3beta2api/model_storage_create.go index fd486d168..84a135d97 100644 --- a/services/sqlserverflex/v3beta2api/model_storage_create.go +++ b/services/sqlserverflex/v3beta2api/model_storage_create.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_storage_update.go b/services/sqlserverflex/v3beta2api/model_storage_update.go index 79f66f799..5bf0aa7fd 100644 --- a/services/sqlserverflex/v3beta2api/model_storage_update.go +++ b/services/sqlserverflex/v3beta2api/model_storage_update.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_trigger_restore_payload.go b/services/sqlserverflex/v3beta2api/model_trigger_restore_payload.go index ed1ff084f..330abaa75 100644 --- a/services/sqlserverflex/v3beta2api/model_trigger_restore_payload.go +++ b/services/sqlserverflex/v3beta2api/model_trigger_restore_payload.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_update_instance_payload.go b/services/sqlserverflex/v3beta2api/model_update_instance_payload.go index e3834fb6c..e4d1dd40c 100644 --- a/services/sqlserverflex/v3beta2api/model_update_instance_payload.go +++ b/services/sqlserverflex/v3beta2api/model_update_instance_payload.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_update_instance_payload_network.go b/services/sqlserverflex/v3beta2api/model_update_instance_payload_network.go index 855a73aa5..084eeae9b 100644 --- a/services/sqlserverflex/v3beta2api/model_update_instance_payload_network.go +++ b/services/sqlserverflex/v3beta2api/model_update_instance_payload_network.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_update_instance_protection_payload.go b/services/sqlserverflex/v3beta2api/model_update_instance_protection_payload.go index 05c62712c..8d252cc52 100644 --- a/services/sqlserverflex/v3beta2api/model_update_instance_protection_payload.go +++ b/services/sqlserverflex/v3beta2api/model_update_instance_protection_payload.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_update_instance_protection_response.go b/services/sqlserverflex/v3beta2api/model_update_instance_protection_response.go index b2b200c2c..51f2850fd 100644 --- a/services/sqlserverflex/v3beta2api/model_update_instance_protection_response.go +++ b/services/sqlserverflex/v3beta2api/model_update_instance_protection_response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_user_sort.go b/services/sqlserverflex/v3beta2api/model_user_sort.go index bf23a1423..0d35d0a6a 100644 --- a/services/sqlserverflex/v3beta2api/model_user_sort.go +++ b/services/sqlserverflex/v3beta2api/model_user_sort.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_validation_error.go b/services/sqlserverflex/v3beta2api/model_validation_error.go index a923d89cf..e2d1ba0c5 100644 --- a/services/sqlserverflex/v3beta2api/model_validation_error.go +++ b/services/sqlserverflex/v3beta2api/model_validation_error.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_validation_error_validation_inner.go b/services/sqlserverflex/v3beta2api/model_validation_error_validation_inner.go index e72a1374b..bbb4a0dc4 100644 --- a/services/sqlserverflex/v3beta2api/model_validation_error_validation_inner.go +++ b/services/sqlserverflex/v3beta2api/model_validation_error_validation_inner.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/model_version.go b/services/sqlserverflex/v3beta2api/model_version.go index 193c44fec..762579bf5 100644 --- a/services/sqlserverflex/v3beta2api/model_version.go +++ b/services/sqlserverflex/v3beta2api/model_version.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/response.go b/services/sqlserverflex/v3beta2api/response.go index d3d168a80..d41eae13f 100644 --- a/services/sqlserverflex/v3beta2api/response.go +++ b/services/sqlserverflex/v3beta2api/response.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/v3beta2api/utils.go b/services/sqlserverflex/v3beta2api/utils.go index 11f051100..a3c600bbc 100644 --- a/services/sqlserverflex/v3beta2api/utils.go +++ b/services/sqlserverflex/v3beta2api/utils.go @@ -1,7 +1,7 @@ /* STACKIT MSSQL Service API -This is the documentation for the STACKIT MSSQL service +## ⚠️ WARNING: THIS API IS DEPRECATED Use V3 API version: 3beta2 Contact: support@stackit.cloud diff --git a/services/sqlserverflex/wait/wait.go b/services/sqlserverflex/wait/wait.go index 1a5f5f0c4..a912677cc 100644 --- a/services/sqlserverflex/wait/wait.go +++ b/services/sqlserverflex/wait/wait.go @@ -31,25 +31,25 @@ const ( // // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type APIClientInstanceInterface interface { - GetInstanceExecute(ctx context.Context, projectId, instanceId, region string) (*sqlserverflex.GetInstanceResponse, error) + GetInstanceExecute(ctx context.Context, projectId, region, instanceId string) (*sqlserverflex.GetInstanceResponse, error) } // CreateInstanceWaitHandler will wait for instance creation // // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func CreateInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, instanceId, region string) *wait.AsyncActionHandler[sqlserverflex.GetInstanceResponse] { +func CreateInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, region, instanceId string) *wait.AsyncActionHandler[sqlserverflex.GetInstanceResponse] { handler := wait.New(func() (waitFinished bool, response *sqlserverflex.GetInstanceResponse, err error) { - s, err := a.GetInstanceExecute(ctx, projectId, instanceId, region) + s, err := a.GetInstanceExecute(ctx, projectId, region, instanceId) if err != nil { return false, nil, err } - if s == nil || s.Item == nil || s.Item.Id == nil || *s.Item.Id != instanceId || s.Item.Status == nil { + if s == nil || s.Id == nil || *s.Id != instanceId || s.State == nil { return false, nil, nil } - switch strings.ToLower(*s.Item.Status) { - case strings.ToLower(InstanceStateSuccess): + switch strings.ToLower(string(*s.State)) { + case strings.ToLower(string(sqlserverflex.STATE_READY)): return true, s, nil - case strings.ToLower(InstanceStateUnknown), strings.ToLower(InstanceStateFailed): + case strings.ToLower(string(sqlserverflex.STATE_UNKNOWN)), strings.ToLower(string(sqlserverflex.STATE_FAILURE)): return true, s, fmt.Errorf("create failed for instance with id %s", instanceId) default: return false, s, nil @@ -63,19 +63,19 @@ func CreateInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface // UpdateInstanceWaitHandler will wait for instance update // // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func UpdateInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, instanceId, region string) *wait.AsyncActionHandler[sqlserverflex.GetInstanceResponse] { +func UpdateInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, region, instanceId string) *wait.AsyncActionHandler[sqlserverflex.GetInstanceResponse] { handler := wait.New(func() (waitFinished bool, response *sqlserverflex.GetInstanceResponse, err error) { - s, err := a.GetInstanceExecute(ctx, projectId, instanceId, region) + s, err := a.GetInstanceExecute(ctx, projectId, region, instanceId) if err != nil { return false, nil, err } - if s == nil || s.Item == nil || s.Item.Id == nil || *s.Item.Id != instanceId || s.Item.Status == nil { + if s == nil || s.Id == nil || *s.Id != instanceId || s.State == nil { return false, nil, nil } - switch strings.ToLower(*s.Item.Status) { - case strings.ToLower(InstanceStateSuccess): + switch strings.ToLower(string(*s.State)) { + case strings.ToLower(string(sqlserverflex.STATE_READY)): return true, s, nil - case strings.ToLower(InstanceStateUnknown), strings.ToLower(InstanceStateFailed): + case strings.ToLower(string(sqlserverflex.STATE_UNKNOWN)), strings.ToLower(string(sqlserverflex.STATE_FAILURE)): return true, s, fmt.Errorf("update failed for instance with id %s", instanceId) default: return false, s, nil @@ -89,16 +89,16 @@ func UpdateInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface // PartialUpdateInstanceWaitHandler will wait for instance update // // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func PartialUpdateInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, instanceId, region string) *wait.AsyncActionHandler[sqlserverflex.GetInstanceResponse] { - return UpdateInstanceWaitHandler(ctx, a, projectId, instanceId, region) +func PartialUpdateInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, region, instanceId string) *wait.AsyncActionHandler[sqlserverflex.GetInstanceResponse] { + return UpdateInstanceWaitHandler(ctx, a, projectId, region, instanceId) } // DeleteInstanceWaitHandler will wait for instance deletion // // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead -func DeleteInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, instanceId, region string) *wait.AsyncActionHandler[struct{}] { +func DeleteInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, region, instanceId string) *wait.AsyncActionHandler[struct{}] { handler := wait.New(func() (waitFinished bool, response *struct{}, err error) { - _, err = a.GetInstanceExecute(ctx, projectId, instanceId, region) + _, err = a.GetInstanceExecute(ctx, projectId, region, instanceId) if err == nil { return false, nil, nil } diff --git a/services/sqlserverflex/wait/wait_test.go b/services/sqlserverflex/wait/wait_test.go index 646e86c9f..c24617e74 100644 --- a/services/sqlserverflex/wait/wait_test.go +++ b/services/sqlserverflex/wait/wait_test.go @@ -16,7 +16,7 @@ import ( // Used for testing instance operations type apiClientInstanceMocked struct { instanceId string - instanceState string + instanceState sqlserverflex.State instanceIsDeleted bool instanceGetFails bool } @@ -35,17 +35,16 @@ func (a *apiClientInstanceMocked) GetInstanceExecute(_ context.Context, _, _, _ } return &sqlserverflex.GetInstanceResponse{ - Item: &sqlserverflex.Instance{ - Id: &a.instanceId, - Status: &a.instanceState, - }, + Id: &a.instanceId, + State: &a.instanceState, }, nil } + func TestCreateInstanceWaitHandler(t *testing.T) { tests := []struct { desc string instanceGetFails bool - instanceState string + instanceState sqlserverflex.State usersGetErrorStatus int wantErr bool wantResp bool @@ -53,21 +52,21 @@ func TestCreateInstanceWaitHandler(t *testing.T) { { desc: "create_succeeded", instanceGetFails: false, - instanceState: InstanceStateSuccess, + instanceState: sqlserverflex.STATE_READY, wantErr: false, wantResp: true, }, { desc: "create_failed", instanceGetFails: false, - instanceState: InstanceStateFailed, + instanceState: sqlserverflex.STATE_FAILURE, wantErr: true, wantResp: true, }, { desc: "create_failed_2", instanceGetFails: false, - instanceState: InstanceStateEmpty, + instanceState: sqlserverflex.STATE_UNKNOWN, wantErr: true, wantResp: true, }, @@ -80,7 +79,7 @@ func TestCreateInstanceWaitHandler(t *testing.T) { { desc: "timeout", instanceGetFails: false, - instanceState: InstanceStateProcessing, + instanceState: sqlserverflex.STATE_PROGRESSING, wantErr: true, wantResp: true, }, @@ -99,14 +98,12 @@ func TestCreateInstanceWaitHandler(t *testing.T) { var wantRes *sqlserverflex.GetInstanceResponse if tt.wantResp { wantRes = &sqlserverflex.GetInstanceResponse{ - Item: &sqlserverflex.Instance{ - Id: &instanceId, - Status: utils.Ptr(tt.instanceState), - }, + Id: &instanceId, + State: utils.Ptr(tt.instanceState), } } - handler := CreateInstanceWaitHandler(context.Background(), apiClient, "", instanceId, "") + handler := CreateInstanceWaitHandler(context.Background(), apiClient, "", "", instanceId) gotRes, err := handler.SetTimeout(10 * time.Millisecond).SetSleepBeforeWait(1 * time.Millisecond).WaitWithContext(context.Background()) @@ -125,28 +122,28 @@ func TestUpdateInstanceWaitHandler(t *testing.T) { tests := []struct { desc string instanceGetFails bool - instanceState string + instanceState sqlserverflex.State wantErr bool wantResp bool }{ { desc: "update_succeeded", instanceGetFails: false, - instanceState: InstanceStateSuccess, + instanceState: sqlserverflex.STATE_READY, wantErr: false, wantResp: true, }, { desc: "update_failed", instanceGetFails: false, - instanceState: InstanceStateFailed, + instanceState: sqlserverflex.STATE_FAILURE, wantErr: true, wantResp: true, }, { desc: "update_failed_2", instanceGetFails: false, - instanceState: InstanceStateEmpty, + instanceState: sqlserverflex.STATE_UNKNOWN, wantErr: true, wantResp: true, }, @@ -159,7 +156,7 @@ func TestUpdateInstanceWaitHandler(t *testing.T) { { desc: "timeout", instanceGetFails: false, - instanceState: InstanceStateProcessing, + instanceState: sqlserverflex.STATE_PROGRESSING, wantErr: true, wantResp: true, }, @@ -178,14 +175,12 @@ func TestUpdateInstanceWaitHandler(t *testing.T) { var wantRes *sqlserverflex.GetInstanceResponse if tt.wantResp { wantRes = &sqlserverflex.GetInstanceResponse{ - Item: &sqlserverflex.Instance{ - Id: &instanceId, - Status: utils.Ptr(tt.instanceState), - }, + Id: &instanceId, + State: utils.Ptr(tt.instanceState), } } - handler := UpdateInstanceWaitHandler(context.Background(), apiClient, "", instanceId, "") + handler := UpdateInstanceWaitHandler(context.Background(), apiClient, "", "", instanceId) gotRes, err := handler.SetTimeout(10 * time.Millisecond).SetSleepBeforeWait(1 * time.Millisecond).WaitWithContext(context.Background()) @@ -204,19 +199,19 @@ func TestDeleteInstanceWaitHandler(t *testing.T) { tests := []struct { desc string instanceGetFails bool - instanceState string + instanceState sqlserverflex.State wantErr bool }{ { desc: "delete_succeeded", instanceGetFails: false, - instanceState: InstanceStateSuccess, + instanceState: sqlserverflex.STATE_READY, wantErr: false, }, { desc: "delete_failed", instanceGetFails: false, - instanceState: InstanceStateFailed, + instanceState: sqlserverflex.STATE_FAILURE, wantErr: true, }, { @@ -232,12 +227,12 @@ func TestDeleteInstanceWaitHandler(t *testing.T) { apiClient := &apiClientInstanceMocked{ instanceGetFails: tt.instanceGetFails, - instanceIsDeleted: tt.instanceState == InstanceStateSuccess, + instanceIsDeleted: tt.instanceState == sqlserverflex.STATE_READY, instanceId: instanceId, instanceState: tt.instanceState, } - handler := DeleteInstanceWaitHandler(context.Background(), apiClient, "", instanceId, "") + handler := DeleteInstanceWaitHandler(context.Background(), apiClient, "", "", instanceId) _, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background())