From 24611e05c939112c92fd82e861adca53bb9d347c Mon Sep 17 00:00:00 2001 From: Tilo-K Date: Thu, 25 Dec 2025 13:59:50 +0100 Subject: [PATCH] Init --- .gitignore | 1 + Cargo.lock | 1264 ++++++ Cargo.toml | 7 + scp_core/.gitignore | 3 + scp_core/.openapi-generator-ignore | 23 + scp_core/.openapi-generator/FILES | 200 + scp_core/.openapi-generator/VERSION | 1 + scp_core/.travis.yml | 1 + scp_core/Cargo.toml | 20 + scp_core/README.md | 222 + .../docs/ApiV1ServersServerIdPatchRequest.md | 20 + scp_core/docs/Architecture.md | 13 + scp_core/docs/BandwidthClass.md | 13 + scp_core/docs/Bootorder.md | 14 + scp_core/docs/CpuTopology.md | 12 + scp_core/docs/DefaultApi.md | 2691 ++++++++++++ scp_core/docs/Disk.md | 14 + scp_core/docs/EditDisksDriver.md | 11 + scp_core/docs/FailoverIpv4.md | 17 + scp_core/docs/FailoverIpv6.md | 17 + scp_core/docs/FieldError.md | 12 + scp_core/docs/FirewallAction.md | 13 + scp_core/docs/FirewallPolicy.md | 15 + scp_core/docs/FirewallPolicySave.md | 13 + scp_core/docs/FirewallPolicyUpdateResult.md | 12 + scp_core/docs/FirewallProtocol.md | 15 + scp_core/docs/FirewallRule.md | 19 + scp_core/docs/FirewallRuleDirection.md | 13 + scp_core/docs/GuestAgentData.md | 12 + scp_core/docs/IdentifierInt.md | 11 + scp_core/docs/ImageFlavour.md | 15 + scp_core/docs/ImageMinimal.md | 12 + scp_core/docs/ImplicitRule.md | 13 + scp_core/docs/Interface.md | 15 + scp_core/docs/Ipv4AddressMinimal.md | 15 + scp_core/docs/Ipv6AddressMinimal.md | 14 + scp_core/docs/Iso.md | 12 + scp_core/docs/IsoImage.md | 14 + scp_core/docs/Log.md | 15 + scp_core/docs/LogType.md | 14 + scp_core/docs/Maintenance.md | 12 + scp_core/docs/NetworkDriver.md | 16 + scp_core/docs/NotFoundError.md | 12 + scp_core/docs/OsOptimization.md | 16 + scp_core/docs/RdnsIpv4.md | 11 + scp_core/docs/RdnsIpv6.md | 11 + scp_core/docs/RescueSystemStatus.md | 12 + scp_core/docs/ResponseError.md | 12 + scp_core/docs/RouteFailoverIp.md | 11 + scp_core/docs/S3CompletedPart.md | 12 + scp_core/docs/S3DownloadInfos.md | 14 + scp_core/docs/S3NoSuchUploadError.md | 12 + scp_core/docs/S3Object.md | 13 + scp_core/docs/S3SignPartUrl.md | 11 + scp_core/docs/S3Upload.md | 12 + scp_core/docs/Server.md | 26 + scp_core/docs/ServerAttachIso.md | 13 + scp_core/docs/ServerAutostartPatch.md | 11 + scp_core/docs/ServerBootorderPatch.md | 11 + scp_core/docs/ServerCpuTopologyPatch.md | 11 + scp_core/docs/ServerCreateNicVlan.md | 12 + scp_core/docs/ServerDisk.md | 14 + scp_core/docs/ServerFirewall.md | 15 + scp_core/docs/ServerFirewallSave.md | 12 + scp_core/docs/ServerHostnamePatch.md | 11 + scp_core/docs/ServerImageSetup.md | 22 + scp_core/docs/ServerInfo.md | 32 + scp_core/docs/ServerInterface.md | 22 + scp_core/docs/ServerInterfaceUpdate.md | 11 + scp_core/docs/ServerIpType.md | 13 + scp_core/docs/ServerIpv4.md | 19 + scp_core/docs/ServerIpv6.md | 20 + scp_core/docs/ServerKeyboardLayoutPatch.md | 11 + scp_core/docs/ServerListMinimal.md | 16 + scp_core/docs/ServerMinimal.md | 12 + scp_core/docs/ServerNicknamePatch.md | 11 + scp_core/docs/ServerOsOptimizationPatch.md | 11 + scp_core/docs/ServerSetRootPasswordPatch.md | 11 + scp_core/docs/ServerSnapshotCreate.md | 14 + scp_core/docs/ServerSnapshotCreateCheck.md | 12 + scp_core/docs/ServerState.md | 20 + scp_core/docs/ServerState1.md | 14 + scp_core/docs/ServerStatePatch.md | 11 + scp_core/docs/ServerTemplateMinimal.md | 12 + scp_core/docs/ServerUefiPatch.md | 11 + scp_core/docs/ServerUserImageSetup.md | 13 + scp_core/docs/SetRdnsIpv4.md | 12 + scp_core/docs/SetRdnsIpv6.md | 12 + scp_core/docs/Site.md | 12 + scp_core/docs/Snapshot.md | 20 + scp_core/docs/SnapshotMinimal.md | 19 + scp_core/docs/SshKey.md | 14 + scp_core/docs/StorageDriver.md | 15 + scp_core/docs/StorageOptimization.md | 16 + scp_core/docs/TaskInfo.md | 22 + scp_core/docs/TaskInfoMinimal.md | 19 + scp_core/docs/TaskInfoStep.md | 15 + scp_core/docs/TaskProgress.md | 12 + scp_core/docs/TaskState.md | 18 + scp_core/docs/User.md | 23 + scp_core/docs/UserMinimal.md | 16 + scp_core/docs/UserSave.md | 21 + scp_core/docs/VLan.md | 15 + scp_core/docs/VLanSave.md | 11 + scp_core/docs/ValidationError.md | 13 + scp_core/git_push.sh | 57 + scp_core/src/apis/configuration.rs | 51 + scp_core/src/apis/default_api.rs | 3841 +++++++++++++++++ scp_core/src/apis/mod.rs | 116 + scp_core/src/lib.rs | 11 + ...pi_v1_servers__server_id__patch_request.rs | 34 + scp_core/src/models/architecture.rs | 38 + scp_core/src/models/bandwidth_class.rs | 33 + scp_core/src/models/bootorder.rs | 41 + scp_core/src/models/cpu_topology.rs | 30 + scp_core/src/models/disk.rs | 36 + scp_core/src/models/edit_disks_driver.rs | 27 + scp_core/src/models/failover_ipv4.rs | 45 + scp_core/src/models/failover_ipv6.rs | 45 + scp_core/src/models/field_error.rs | 30 + scp_core/src/models/firewall_action.rs | 38 + scp_core/src/models/firewall_policy.rs | 39 + scp_core/src/models/firewall_policy_save.rs | 33 + .../models/firewall_policy_update_result.rs | 30 + scp_core/src/models/firewall_protocol.rs | 44 + scp_core/src/models/firewall_rule.rs | 55 + .../src/models/firewall_rule_direction.rs | 38 + scp_core/src/models/guest_agent_data.rs | 31 + scp_core/src/models/identifier_int.rs | 27 + scp_core/src/models/image_flavour.rs | 39 + scp_core/src/models/image_minimal.rs | 30 + scp_core/src/models/implicit_rule.rs | 38 + scp_core/src/models/interface.rs | 39 + scp_core/src/models/ipv4_address_minimal.rs | 39 + scp_core/src/models/ipv6_address_minimal.rs | 36 + scp_core/src/models/iso.rs | 30 + scp_core/src/models/iso_image.rs | 36 + scp_core/src/models/log.rs | 39 + scp_core/src/models/log_type.rs | 41 + scp_core/src/models/maintenance.rs | 30 + scp_core/src/models/mod.rs | 188 + scp_core/src/models/network_driver.rs | 47 + scp_core/src/models/not_found_error.rs | 30 + scp_core/src/models/os_optimization.rs | 47 + scp_core/src/models/rdns_ipv4.rs | 27 + scp_core/src/models/rdns_ipv6.rs | 27 + scp_core/src/models/rescue_system_status.rs | 30 + scp_core/src/models/response_error.rs | 30 + scp_core/src/models/route_failover_ip.rs | 27 + scp_core/src/models/s3_completed_part.rs | 30 + scp_core/src/models/s3_download_infos.rs | 36 + .../src/models/s3_no_such_upload_error.rs | 30 + scp_core/src/models/s3_object.rs | 33 + scp_core/src/models/s3_sign_part_url.rs | 27 + scp_core/src/models/s3_upload.rs | 30 + scp_core/src/models/server.rs | 72 + scp_core/src/models/server_attach_iso.rs | 33 + scp_core/src/models/server_autostart_patch.rs | 27 + scp_core/src/models/server_bootorder_patch.rs | 27 + .../src/models/server_cpu_topology_patch.rs | 27 + scp_core/src/models/server_create_nic_vlan.rs | 30 + scp_core/src/models/server_disk.rs | 36 + scp_core/src/models/server_firewall.rs | 39 + scp_core/src/models/server_firewall_save.rs | 30 + scp_core/src/models/server_hostname_patch.rs | 27 + scp_core/src/models/server_image_setup.rs | 60 + scp_core/src/models/server_info.rs | 90 + scp_core/src/models/server_interface.rs | 60 + .../src/models/server_interface_update.rs | 27 + scp_core/src/models/server_ip_type.rs | 38 + scp_core/src/models/server_ipv4.rs | 51 + scp_core/src/models/server_ipv6.rs | 54 + .../models/server_keyboard_layout_patch.rs | 27 + scp_core/src/models/server_list_minimal.rs | 42 + scp_core/src/models/server_minimal.rs | 30 + scp_core/src/models/server_nickname_patch.rs | 27 + .../models/server_os_optimization_patch.rs | 27 + .../models/server_set_root_password_patch.rs | 27 + scp_core/src/models/server_snapshot_create.rs | 36 + .../models/server_snapshot_create_check.rs | 31 + scp_core/src/models/server_state.rs | 59 + scp_core/src/models/server_state1.rs | 41 + scp_core/src/models/server_state_patch.rs | 29 + .../src/models/server_template_minimal.rs | 30 + scp_core/src/models/server_uefi_patch.rs | 27 + .../src/models/server_user_image_setup.rs | 33 + scp_core/src/models/set_rdns_ipv4.rs | 30 + scp_core/src/models/set_rdns_ipv6.rs | 30 + scp_core/src/models/site.rs | 30 + scp_core/src/models/snapshot.rs | 54 + scp_core/src/models/snapshot_minimal.rs | 51 + scp_core/src/models/ssh_key.rs | 36 + scp_core/src/models/storage_driver.rs | 44 + scp_core/src/models/storage_optimization.rs | 47 + scp_core/src/models/task_info.rs | 60 + scp_core/src/models/task_info_minimal.rs | 51 + scp_core/src/models/task_info_step.rs | 39 + scp_core/src/models/task_progress.rs | 30 + scp_core/src/models/task_state.rs | 53 + scp_core/src/models/user.rs | 63 + scp_core/src/models/user_minimal.rs | 42 + scp_core/src/models/user_save.rs | 57 + scp_core/src/models/v_lan.rs | 39 + scp_core/src/models/v_lan_save.rs | 27 + scp_core/src/models/validation_error.rs | 33 + src/main.rs | 3 + 206 files changed, 13603 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 scp_core/.gitignore create mode 100644 scp_core/.openapi-generator-ignore create mode 100644 scp_core/.openapi-generator/FILES create mode 100644 scp_core/.openapi-generator/VERSION create mode 100644 scp_core/.travis.yml create mode 100644 scp_core/Cargo.toml create mode 100644 scp_core/README.md create mode 100644 scp_core/docs/ApiV1ServersServerIdPatchRequest.md create mode 100644 scp_core/docs/Architecture.md create mode 100644 scp_core/docs/BandwidthClass.md create mode 100644 scp_core/docs/Bootorder.md create mode 100644 scp_core/docs/CpuTopology.md create mode 100644 scp_core/docs/DefaultApi.md create mode 100644 scp_core/docs/Disk.md create mode 100644 scp_core/docs/EditDisksDriver.md create mode 100644 scp_core/docs/FailoverIpv4.md create mode 100644 scp_core/docs/FailoverIpv6.md create mode 100644 scp_core/docs/FieldError.md create mode 100644 scp_core/docs/FirewallAction.md create mode 100644 scp_core/docs/FirewallPolicy.md create mode 100644 scp_core/docs/FirewallPolicySave.md create mode 100644 scp_core/docs/FirewallPolicyUpdateResult.md create mode 100644 scp_core/docs/FirewallProtocol.md create mode 100644 scp_core/docs/FirewallRule.md create mode 100644 scp_core/docs/FirewallRuleDirection.md create mode 100644 scp_core/docs/GuestAgentData.md create mode 100644 scp_core/docs/IdentifierInt.md create mode 100644 scp_core/docs/ImageFlavour.md create mode 100644 scp_core/docs/ImageMinimal.md create mode 100644 scp_core/docs/ImplicitRule.md create mode 100644 scp_core/docs/Interface.md create mode 100644 scp_core/docs/Ipv4AddressMinimal.md create mode 100644 scp_core/docs/Ipv6AddressMinimal.md create mode 100644 scp_core/docs/Iso.md create mode 100644 scp_core/docs/IsoImage.md create mode 100644 scp_core/docs/Log.md create mode 100644 scp_core/docs/LogType.md create mode 100644 scp_core/docs/Maintenance.md create mode 100644 scp_core/docs/NetworkDriver.md create mode 100644 scp_core/docs/NotFoundError.md create mode 100644 scp_core/docs/OsOptimization.md create mode 100644 scp_core/docs/RdnsIpv4.md create mode 100644 scp_core/docs/RdnsIpv6.md create mode 100644 scp_core/docs/RescueSystemStatus.md create mode 100644 scp_core/docs/ResponseError.md create mode 100644 scp_core/docs/RouteFailoverIp.md create mode 100644 scp_core/docs/S3CompletedPart.md create mode 100644 scp_core/docs/S3DownloadInfos.md create mode 100644 scp_core/docs/S3NoSuchUploadError.md create mode 100644 scp_core/docs/S3Object.md create mode 100644 scp_core/docs/S3SignPartUrl.md create mode 100644 scp_core/docs/S3Upload.md create mode 100644 scp_core/docs/Server.md create mode 100644 scp_core/docs/ServerAttachIso.md create mode 100644 scp_core/docs/ServerAutostartPatch.md create mode 100644 scp_core/docs/ServerBootorderPatch.md create mode 100644 scp_core/docs/ServerCpuTopologyPatch.md create mode 100644 scp_core/docs/ServerCreateNicVlan.md create mode 100644 scp_core/docs/ServerDisk.md create mode 100644 scp_core/docs/ServerFirewall.md create mode 100644 scp_core/docs/ServerFirewallSave.md create mode 100644 scp_core/docs/ServerHostnamePatch.md create mode 100644 scp_core/docs/ServerImageSetup.md create mode 100644 scp_core/docs/ServerInfo.md create mode 100644 scp_core/docs/ServerInterface.md create mode 100644 scp_core/docs/ServerInterfaceUpdate.md create mode 100644 scp_core/docs/ServerIpType.md create mode 100644 scp_core/docs/ServerIpv4.md create mode 100644 scp_core/docs/ServerIpv6.md create mode 100644 scp_core/docs/ServerKeyboardLayoutPatch.md create mode 100644 scp_core/docs/ServerListMinimal.md create mode 100644 scp_core/docs/ServerMinimal.md create mode 100644 scp_core/docs/ServerNicknamePatch.md create mode 100644 scp_core/docs/ServerOsOptimizationPatch.md create mode 100644 scp_core/docs/ServerSetRootPasswordPatch.md create mode 100644 scp_core/docs/ServerSnapshotCreate.md create mode 100644 scp_core/docs/ServerSnapshotCreateCheck.md create mode 100644 scp_core/docs/ServerState.md create mode 100644 scp_core/docs/ServerState1.md create mode 100644 scp_core/docs/ServerStatePatch.md create mode 100644 scp_core/docs/ServerTemplateMinimal.md create mode 100644 scp_core/docs/ServerUefiPatch.md create mode 100644 scp_core/docs/ServerUserImageSetup.md create mode 100644 scp_core/docs/SetRdnsIpv4.md create mode 100644 scp_core/docs/SetRdnsIpv6.md create mode 100644 scp_core/docs/Site.md create mode 100644 scp_core/docs/Snapshot.md create mode 100644 scp_core/docs/SnapshotMinimal.md create mode 100644 scp_core/docs/SshKey.md create mode 100644 scp_core/docs/StorageDriver.md create mode 100644 scp_core/docs/StorageOptimization.md create mode 100644 scp_core/docs/TaskInfo.md create mode 100644 scp_core/docs/TaskInfoMinimal.md create mode 100644 scp_core/docs/TaskInfoStep.md create mode 100644 scp_core/docs/TaskProgress.md create mode 100644 scp_core/docs/TaskState.md create mode 100644 scp_core/docs/User.md create mode 100644 scp_core/docs/UserMinimal.md create mode 100644 scp_core/docs/UserSave.md create mode 100644 scp_core/docs/VLan.md create mode 100644 scp_core/docs/VLanSave.md create mode 100644 scp_core/docs/ValidationError.md create mode 100644 scp_core/git_push.sh create mode 100644 scp_core/src/apis/configuration.rs create mode 100644 scp_core/src/apis/default_api.rs create mode 100644 scp_core/src/apis/mod.rs create mode 100644 scp_core/src/lib.rs create mode 100644 scp_core/src/models/_api_v1_servers__server_id__patch_request.rs create mode 100644 scp_core/src/models/architecture.rs create mode 100644 scp_core/src/models/bandwidth_class.rs create mode 100644 scp_core/src/models/bootorder.rs create mode 100644 scp_core/src/models/cpu_topology.rs create mode 100644 scp_core/src/models/disk.rs create mode 100644 scp_core/src/models/edit_disks_driver.rs create mode 100644 scp_core/src/models/failover_ipv4.rs create mode 100644 scp_core/src/models/failover_ipv6.rs create mode 100644 scp_core/src/models/field_error.rs create mode 100644 scp_core/src/models/firewall_action.rs create mode 100644 scp_core/src/models/firewall_policy.rs create mode 100644 scp_core/src/models/firewall_policy_save.rs create mode 100644 scp_core/src/models/firewall_policy_update_result.rs create mode 100644 scp_core/src/models/firewall_protocol.rs create mode 100644 scp_core/src/models/firewall_rule.rs create mode 100644 scp_core/src/models/firewall_rule_direction.rs create mode 100644 scp_core/src/models/guest_agent_data.rs create mode 100644 scp_core/src/models/identifier_int.rs create mode 100644 scp_core/src/models/image_flavour.rs create mode 100644 scp_core/src/models/image_minimal.rs create mode 100644 scp_core/src/models/implicit_rule.rs create mode 100644 scp_core/src/models/interface.rs create mode 100644 scp_core/src/models/ipv4_address_minimal.rs create mode 100644 scp_core/src/models/ipv6_address_minimal.rs create mode 100644 scp_core/src/models/iso.rs create mode 100644 scp_core/src/models/iso_image.rs create mode 100644 scp_core/src/models/log.rs create mode 100644 scp_core/src/models/log_type.rs create mode 100644 scp_core/src/models/maintenance.rs create mode 100644 scp_core/src/models/mod.rs create mode 100644 scp_core/src/models/network_driver.rs create mode 100644 scp_core/src/models/not_found_error.rs create mode 100644 scp_core/src/models/os_optimization.rs create mode 100644 scp_core/src/models/rdns_ipv4.rs create mode 100644 scp_core/src/models/rdns_ipv6.rs create mode 100644 scp_core/src/models/rescue_system_status.rs create mode 100644 scp_core/src/models/response_error.rs create mode 100644 scp_core/src/models/route_failover_ip.rs create mode 100644 scp_core/src/models/s3_completed_part.rs create mode 100644 scp_core/src/models/s3_download_infos.rs create mode 100644 scp_core/src/models/s3_no_such_upload_error.rs create mode 100644 scp_core/src/models/s3_object.rs create mode 100644 scp_core/src/models/s3_sign_part_url.rs create mode 100644 scp_core/src/models/s3_upload.rs create mode 100644 scp_core/src/models/server.rs create mode 100644 scp_core/src/models/server_attach_iso.rs create mode 100644 scp_core/src/models/server_autostart_patch.rs create mode 100644 scp_core/src/models/server_bootorder_patch.rs create mode 100644 scp_core/src/models/server_cpu_topology_patch.rs create mode 100644 scp_core/src/models/server_create_nic_vlan.rs create mode 100644 scp_core/src/models/server_disk.rs create mode 100644 scp_core/src/models/server_firewall.rs create mode 100644 scp_core/src/models/server_firewall_save.rs create mode 100644 scp_core/src/models/server_hostname_patch.rs create mode 100644 scp_core/src/models/server_image_setup.rs create mode 100644 scp_core/src/models/server_info.rs create mode 100644 scp_core/src/models/server_interface.rs create mode 100644 scp_core/src/models/server_interface_update.rs create mode 100644 scp_core/src/models/server_ip_type.rs create mode 100644 scp_core/src/models/server_ipv4.rs create mode 100644 scp_core/src/models/server_ipv6.rs create mode 100644 scp_core/src/models/server_keyboard_layout_patch.rs create mode 100644 scp_core/src/models/server_list_minimal.rs create mode 100644 scp_core/src/models/server_minimal.rs create mode 100644 scp_core/src/models/server_nickname_patch.rs create mode 100644 scp_core/src/models/server_os_optimization_patch.rs create mode 100644 scp_core/src/models/server_set_root_password_patch.rs create mode 100644 scp_core/src/models/server_snapshot_create.rs create mode 100644 scp_core/src/models/server_snapshot_create_check.rs create mode 100644 scp_core/src/models/server_state.rs create mode 100644 scp_core/src/models/server_state1.rs create mode 100644 scp_core/src/models/server_state_patch.rs create mode 100644 scp_core/src/models/server_template_minimal.rs create mode 100644 scp_core/src/models/server_uefi_patch.rs create mode 100644 scp_core/src/models/server_user_image_setup.rs create mode 100644 scp_core/src/models/set_rdns_ipv4.rs create mode 100644 scp_core/src/models/set_rdns_ipv6.rs create mode 100644 scp_core/src/models/site.rs create mode 100644 scp_core/src/models/snapshot.rs create mode 100644 scp_core/src/models/snapshot_minimal.rs create mode 100644 scp_core/src/models/ssh_key.rs create mode 100644 scp_core/src/models/storage_driver.rs create mode 100644 scp_core/src/models/storage_optimization.rs create mode 100644 scp_core/src/models/task_info.rs create mode 100644 scp_core/src/models/task_info_minimal.rs create mode 100644 scp_core/src/models/task_info_step.rs create mode 100644 scp_core/src/models/task_progress.rs create mode 100644 scp_core/src/models/task_state.rs create mode 100644 scp_core/src/models/user.rs create mode 100644 scp_core/src/models/user_minimal.rs create mode 100644 scp_core/src/models/user_save.rs create mode 100644 scp_core/src/models/v_lan.rs create mode 100644 scp_core/src/models/v_lan_save.rs create mode 100644 scp_core/src/models/validation_error.rs create mode 100644 src/main.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..59eb682 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,1264 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" + +[[package]] +name = "bumpalo" +version = "3.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" + +[[package]] +name = "bytes" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" + +[[package]] +name = "cc" +version = "1.2.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f50d563227a1c37cc0a263f64eca3334388c01c5e4c4861a9def205c614383c" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cupcontrol" +version = "0.1.0" +dependencies = [ + "scp_core", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "find-msvc-tools" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "pin-utils", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", +] + +[[package]] +name = "http" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hyper" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "icu_collections" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "iri-string" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f867b9d1d896b67beb18518eda36fdb77a32ea590de864f1325b294a6d14397" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "itoa" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee5b5339afb4c41626dde77b7a611bd4f2c202b897852b4bcf5d03eddc61010" + +[[package]] +name = "js-sys" +version = "0.3.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "libc" +version = "0.2.178" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" + +[[package]] +name = "linux-raw-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" + +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "mio" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "native-tls" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "openssl" +version = "0.10.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "openssl-sys" +version = "0.9.111" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + +[[package]] +name = "proc-macro2" +version = "1.0.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-tls", + "hyper-util", + "js-sys", + "log", + "mime_guess", + "native-tls", + "percent-encoding", + "pin-project-lite", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "rustix" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls-pki-types" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21e6f2ab2928ca4291b86736a8bd920a277a399bba1589409d72154ff87c1282" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ryu" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62049b2877bf12821e8f9ad256ee38fdc31db7387ec2d3b3f403024de2034aea" + +[[package]] +name = "schannel" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "scp_core" +version = "0.1.0" +dependencies = [ + "reqwest", + "serde", + "serde_json", + "serde_repr", + "url", +] + +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.147" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6af14725505314343e673e9ecb7cd7e8a36aa9791eb936235a3567cc31447ae4" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_repr" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "syn" +version = "2.0.111" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tempfile" +version = "3.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" +dependencies = [ + "fastrand", + "getrandom", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tokio" +version = "1.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "unicase" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" + +[[package]] +name = "unicode-ident" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" + +[[package]] +name = "url" +version = "2.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.1+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836d9622d604feee9e5de25ac10e3ea5f2d65b41eac0d9ce72eb5deae707ce7c" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "web-sys" +version = "0.3.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "wit-bindgen" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" + +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + +[[package]] +name = "yoke" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zmij" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1dccf46b25b205e4bebe1d5258a991df1cc17801017a845cb5b3fe0269781aa" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..aa94f4c --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "cupcontrol" +version = "0.1.0" +edition = "2024" + +[dependencies] +scp_core = { path = "./scp_core" } diff --git a/scp_core/.gitignore b/scp_core/.gitignore new file mode 100644 index 0000000..6aa1064 --- /dev/null +++ b/scp_core/.gitignore @@ -0,0 +1,3 @@ +/target/ +**/*.rs.bk +Cargo.lock diff --git a/scp_core/.openapi-generator-ignore b/scp_core/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/scp_core/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/scp_core/.openapi-generator/FILES b/scp_core/.openapi-generator/FILES new file mode 100644 index 0000000..25f1d66 --- /dev/null +++ b/scp_core/.openapi-generator/FILES @@ -0,0 +1,200 @@ +.gitignore +.openapi-generator-ignore +.travis.yml +Cargo.toml +README.md +docs/ApiV1ServersServerIdPatchRequest.md +docs/Architecture.md +docs/BandwidthClass.md +docs/Bootorder.md +docs/CpuTopology.md +docs/DefaultApi.md +docs/Disk.md +docs/EditDisksDriver.md +docs/FailoverIpv4.md +docs/FailoverIpv6.md +docs/FieldError.md +docs/FirewallAction.md +docs/FirewallPolicy.md +docs/FirewallPolicySave.md +docs/FirewallPolicyUpdateResult.md +docs/FirewallProtocol.md +docs/FirewallRule.md +docs/FirewallRuleDirection.md +docs/GuestAgentData.md +docs/IdentifierInt.md +docs/ImageFlavour.md +docs/ImageMinimal.md +docs/ImplicitRule.md +docs/Interface.md +docs/Ipv4AddressMinimal.md +docs/Ipv6AddressMinimal.md +docs/Iso.md +docs/IsoImage.md +docs/Log.md +docs/LogType.md +docs/Maintenance.md +docs/NetworkDriver.md +docs/NotFoundError.md +docs/OsOptimization.md +docs/RdnsIpv4.md +docs/RdnsIpv6.md +docs/RescueSystemStatus.md +docs/ResponseError.md +docs/RouteFailoverIp.md +docs/S3CompletedPart.md +docs/S3DownloadInfos.md +docs/S3NoSuchUploadError.md +docs/S3Object.md +docs/S3SignPartUrl.md +docs/S3Upload.md +docs/Server.md +docs/ServerAttachIso.md +docs/ServerAutostartPatch.md +docs/ServerBootorderPatch.md +docs/ServerCpuTopologyPatch.md +docs/ServerCreateNicVlan.md +docs/ServerDisk.md +docs/ServerFirewall.md +docs/ServerFirewallSave.md +docs/ServerHostnamePatch.md +docs/ServerImageSetup.md +docs/ServerInfo.md +docs/ServerInterface.md +docs/ServerInterfaceUpdate.md +docs/ServerIpType.md +docs/ServerIpv4.md +docs/ServerIpv6.md +docs/ServerKeyboardLayoutPatch.md +docs/ServerListMinimal.md +docs/ServerMinimal.md +docs/ServerNicknamePatch.md +docs/ServerOsOptimizationPatch.md +docs/ServerSetRootPasswordPatch.md +docs/ServerSnapshotCreate.md +docs/ServerSnapshotCreateCheck.md +docs/ServerState.md +docs/ServerState1.md +docs/ServerStatePatch.md +docs/ServerTemplateMinimal.md +docs/ServerUefiPatch.md +docs/ServerUserImageSetup.md +docs/SetRdnsIpv4.md +docs/SetRdnsIpv6.md +docs/Site.md +docs/Snapshot.md +docs/SnapshotMinimal.md +docs/SshKey.md +docs/StorageDriver.md +docs/StorageOptimization.md +docs/TaskInfo.md +docs/TaskInfoMinimal.md +docs/TaskInfoStep.md +docs/TaskProgress.md +docs/TaskState.md +docs/User.md +docs/UserMinimal.md +docs/UserSave.md +docs/VLan.md +docs/VLanSave.md +docs/ValidationError.md +git_push.sh +src/apis/configuration.rs +src/apis/default_api.rs +src/apis/mod.rs +src/lib.rs +src/models/_api_v1_servers__server_id__patch_request.rs +src/models/architecture.rs +src/models/bandwidth_class.rs +src/models/bootorder.rs +src/models/cpu_topology.rs +src/models/disk.rs +src/models/edit_disks_driver.rs +src/models/failover_ipv4.rs +src/models/failover_ipv6.rs +src/models/field_error.rs +src/models/firewall_action.rs +src/models/firewall_policy.rs +src/models/firewall_policy_save.rs +src/models/firewall_policy_update_result.rs +src/models/firewall_protocol.rs +src/models/firewall_rule.rs +src/models/firewall_rule_direction.rs +src/models/guest_agent_data.rs +src/models/identifier_int.rs +src/models/image_flavour.rs +src/models/image_minimal.rs +src/models/implicit_rule.rs +src/models/interface.rs +src/models/ipv4_address_minimal.rs +src/models/ipv6_address_minimal.rs +src/models/iso.rs +src/models/iso_image.rs +src/models/log.rs +src/models/log_type.rs +src/models/maintenance.rs +src/models/mod.rs +src/models/network_driver.rs +src/models/not_found_error.rs +src/models/os_optimization.rs +src/models/rdns_ipv4.rs +src/models/rdns_ipv6.rs +src/models/rescue_system_status.rs +src/models/response_error.rs +src/models/route_failover_ip.rs +src/models/s3_completed_part.rs +src/models/s3_download_infos.rs +src/models/s3_no_such_upload_error.rs +src/models/s3_object.rs +src/models/s3_sign_part_url.rs +src/models/s3_upload.rs +src/models/server.rs +src/models/server_attach_iso.rs +src/models/server_autostart_patch.rs +src/models/server_bootorder_patch.rs +src/models/server_cpu_topology_patch.rs +src/models/server_create_nic_vlan.rs +src/models/server_disk.rs +src/models/server_firewall.rs +src/models/server_firewall_save.rs +src/models/server_hostname_patch.rs +src/models/server_image_setup.rs +src/models/server_info.rs +src/models/server_interface.rs +src/models/server_interface_update.rs +src/models/server_ip_type.rs +src/models/server_ipv4.rs +src/models/server_ipv6.rs +src/models/server_keyboard_layout_patch.rs +src/models/server_list_minimal.rs +src/models/server_minimal.rs +src/models/server_nickname_patch.rs +src/models/server_os_optimization_patch.rs +src/models/server_set_root_password_patch.rs +src/models/server_snapshot_create.rs +src/models/server_snapshot_create_check.rs +src/models/server_state.rs +src/models/server_state1.rs +src/models/server_state_patch.rs +src/models/server_template_minimal.rs +src/models/server_uefi_patch.rs +src/models/server_user_image_setup.rs +src/models/set_rdns_ipv4.rs +src/models/set_rdns_ipv6.rs +src/models/site.rs +src/models/snapshot.rs +src/models/snapshot_minimal.rs +src/models/ssh_key.rs +src/models/storage_driver.rs +src/models/storage_optimization.rs +src/models/task_info.rs +src/models/task_info_minimal.rs +src/models/task_info_step.rs +src/models/task_progress.rs +src/models/task_state.rs +src/models/user.rs +src/models/user_minimal.rs +src/models/user_save.rs +src/models/v_lan.rs +src/models/v_lan_save.rs +src/models/validation_error.rs diff --git a/scp_core/.openapi-generator/VERSION b/scp_core/.openapi-generator/VERSION new file mode 100644 index 0000000..1b2d969 --- /dev/null +++ b/scp_core/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.18.0 diff --git a/scp_core/.travis.yml b/scp_core/.travis.yml new file mode 100644 index 0000000..22761ba --- /dev/null +++ b/scp_core/.travis.yml @@ -0,0 +1 @@ +language: rust diff --git a/scp_core/Cargo.toml b/scp_core/Cargo.toml new file mode 100644 index 0000000..5de4517 --- /dev/null +++ b/scp_core/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "scp_core" +version = "0.1.0" +authors = ["OpenAPI Generator team and contributors"] +description = "No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)" +# Override this license by providing a License Object in the OpenAPI. +license = "Unlicense" +edition = "2021" + +[dependencies] +serde = { version = "^1.0", features = ["derive"] } +serde_json = "^1.0" +serde_repr = "^0.1" +url = "^2.5" +reqwest = { version = "^0.12", default-features = false, features = ["json", "multipart"] } + +[features] +default = ["native-tls"] +native-tls = ["reqwest/native-tls"] +rustls-tls = ["reqwest/rustls-tls"] diff --git a/scp_core/README.md b/scp_core/README.md new file mode 100644 index 0000000..e186c74 --- /dev/null +++ b/scp_core/README.md @@ -0,0 +1,222 @@ +# Rust API client for scp_core + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + +## Overview + +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. + +- API version: 2025.1218.164029 +- Package version: 0.1.0 +- Generator version: 7.18.0 +- Build package: `org.openapitools.codegen.languages.RustClientCodegen` + +## Installation + +Put the package under your project folder in a directory named `scp_core` and add the following to `Cargo.toml` under `[dependencies]`: + +``` +scp_core = { path = "./scp_core" } +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://www.servercontrolpanel.de/scp-core* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**api_ping_get**](docs/DefaultApi.md#api_ping_get) | **GET** /api/ping | Check if application is available +*DefaultApi* | [**api_v1_maintenance_get**](docs/DefaultApi.md#api_v1_maintenance_get) | **GET** /api/v1/maintenance | Get maintenance information for system +*DefaultApi* | [**api_v1_openapi_get**](docs/DefaultApi.md#api_v1_openapi_get) | **GET** /api/v1/openapi | Get openapi spec +*DefaultApi* | [**api_v1_rdns_ipv4_ip_delete**](docs/DefaultApi.md#api_v1_rdns_ipv4_ip_delete) | **DELETE** /api/v1/rdns/ipv4/{ip} | Delete an rDNS entry of an IPv4. +*DefaultApi* | [**api_v1_rdns_ipv4_ip_get**](docs/DefaultApi.md#api_v1_rdns_ipv4_ip_get) | **GET** /api/v1/rdns/ipv4/{ip} | Get rDNS for an IPv4. +*DefaultApi* | [**api_v1_rdns_ipv4_post**](docs/DefaultApi.md#api_v1_rdns_ipv4_post) | **POST** /api/v1/rdns/ipv4 | Set an rDNS entry for an IPv4. +*DefaultApi* | [**api_v1_rdns_ipv6_ip_delete**](docs/DefaultApi.md#api_v1_rdns_ipv6_ip_delete) | **DELETE** /api/v1/rdns/ipv6/{ip} | Delete an rDNS entry of an IPv6. +*DefaultApi* | [**api_v1_rdns_ipv6_ip_get**](docs/DefaultApi.md#api_v1_rdns_ipv6_ip_get) | **GET** /api/v1/rdns/ipv6/{ip} | Get rDNS for an IPv6. +*DefaultApi* | [**api_v1_rdns_ipv6_post**](docs/DefaultApi.md#api_v1_rdns_ipv6_post) | **POST** /api/v1/rdns/ipv6 | Set an rDNS entry for an IPv6. +*DefaultApi* | [**api_v1_servers_get**](docs/DefaultApi.md#api_v1_servers_get) | **GET** /api/v1/servers | Get servers +*DefaultApi* | [**api_v1_servers_server_id_disks_disk_name_format_post**](docs/DefaultApi.md#api_v1_servers_server_id_disks_disk_name_format_post) | **POST** /api/v1/servers/{serverId}/disks/{diskName}:format | Format disk of a server. Attention: All data will be lost during formatting! +*DefaultApi* | [**api_v1_servers_server_id_disks_disk_name_get**](docs/DefaultApi.md#api_v1_servers_server_id_disks_disk_name_get) | **GET** /api/v1/servers/{serverId}/disks/{diskName} | Get a disk of a server +*DefaultApi* | [**api_v1_servers_server_id_disks_get**](docs/DefaultApi.md#api_v1_servers_server_id_disks_get) | **GET** /api/v1/servers/{serverId}/disks | Get disks of a server +*DefaultApi* | [**api_v1_servers_server_id_disks_patch**](docs/DefaultApi.md#api_v1_servers_server_id_disks_patch) | **PATCH** /api/v1/servers/{serverId}/disks | Patch disk driver of a server. +*DefaultApi* | [**api_v1_servers_server_id_disks_supported_drivers_get**](docs/DefaultApi.md#api_v1_servers_server_id_disks_supported_drivers_get) | **GET** /api/v1/servers/{serverId}/disks/supported-drivers | Get a list of supported storage drivers for this server +*DefaultApi* | [**api_v1_servers_server_id_get**](docs/DefaultApi.md#api_v1_servers_server_id_get) | **GET** /api/v1/servers/{serverId} | Get one server +*DefaultApi* | [**api_v1_servers_server_id_guest_agent_get**](docs/DefaultApi.md#api_v1_servers_server_id_guest_agent_get) | **GET** /api/v1/servers/{serverId}/guest-agent | Get guest agent data for server +*DefaultApi* | [**api_v1_servers_server_id_image_post**](docs/DefaultApi.md#api_v1_servers_server_id_image_post) | **POST** /api/v1/servers/{serverId}/image | Setup image for a server. Attention: All data will be lost during formatting on selected disk! +*DefaultApi* | [**api_v1_servers_server_id_imageflavours_get**](docs/DefaultApi.md#api_v1_servers_server_id_imageflavours_get) | **GET** /api/v1/servers/{serverId}/imageflavours | Get available image flavours for server image setup. Images whose storage driver is not supported by the server's machine type are not shown. +*DefaultApi* | [**api_v1_servers_server_id_interfaces_get**](docs/DefaultApi.md#api_v1_servers_server_id_interfaces_get) | **GET** /api/v1/servers/{serverId}/interfaces | Get all interfaces and IPs of a server including routed IPs and rDNS entries. +*DefaultApi* | [**api_v1_servers_server_id_interfaces_mac_delete**](docs/DefaultApi.md#api_v1_servers_server_id_interfaces_mac_delete) | **DELETE** /api/v1/servers/{serverId}/interfaces/{mac} | Delete an interface of a server. +*DefaultApi* | [**api_v1_servers_server_id_interfaces_mac_firewall_get**](docs/DefaultApi.md#api_v1_servers_server_id_interfaces_mac_firewall_get) | **GET** /api/v1/servers/{serverId}/interfaces/{mac}/firewall | Get firewall +*DefaultApi* | [**api_v1_servers_server_id_interfaces_mac_firewall_put**](docs/DefaultApi.md#api_v1_servers_server_id_interfaces_mac_firewall_put) | **PUT** /api/v1/servers/{serverId}/interfaces/{mac}/firewall | Configure firewall +*DefaultApi* | [**api_v1_servers_server_id_interfaces_mac_firewall_reapply_post**](docs/DefaultApi.md#api_v1_servers_server_id_interfaces_mac_firewall_reapply_post) | **POST** /api/v1/servers/{serverId}/interfaces/{mac}/firewall:reapply | Reapply firewall. Necessary if policy update timed out due to long running write operation on server (f.e. storage optimization) +*DefaultApi* | [**api_v1_servers_server_id_interfaces_mac_firewall_restore_copied_policies_post**](docs/DefaultApi.md#api_v1_servers_server_id_interfaces_mac_firewall_restore_copied_policies_post) | **POST** /api/v1/servers/{serverId}/interfaces/{mac}/firewall:restore-copied-policies | Restore copied firewall policies. +*DefaultApi* | [**api_v1_servers_server_id_interfaces_mac_get**](docs/DefaultApi.md#api_v1_servers_server_id_interfaces_mac_get) | **GET** /api/v1/servers/{serverId}/interfaces/{mac} | Get an interface and IPs of a server including routed IPs and rDNS entries. +*DefaultApi* | [**api_v1_servers_server_id_interfaces_mac_put**](docs/DefaultApi.md#api_v1_servers_server_id_interfaces_mac_put) | **PUT** /api/v1/servers/{serverId}/interfaces/{mac} | Update interface attributes. +*DefaultApi* | [**api_v1_servers_server_id_interfaces_post**](docs/DefaultApi.md#api_v1_servers_server_id_interfaces_post) | **POST** /api/v1/servers/{serverId}/interfaces | Create an interface in a server. +*DefaultApi* | [**api_v1_servers_server_id_iso_delete**](docs/DefaultApi.md#api_v1_servers_server_id_iso_delete) | **DELETE** /api/v1/servers/{serverId}/iso | Detach an ISO from a server. +*DefaultApi* | [**api_v1_servers_server_id_iso_get**](docs/DefaultApi.md#api_v1_servers_server_id_iso_get) | **GET** /api/v1/servers/{serverId}/iso | Get attached ISO of a server. +*DefaultApi* | [**api_v1_servers_server_id_iso_post**](docs/DefaultApi.md#api_v1_servers_server_id_iso_post) | **POST** /api/v1/servers/{serverId}/iso | Attach an ISO to a server. +*DefaultApi* | [**api_v1_servers_server_id_isoimages_get**](docs/DefaultApi.md#api_v1_servers_server_id_isoimages_get) | **GET** /api/v1/servers/{serverId}/isoimages | Get available ISO images for server +*DefaultApi* | [**api_v1_servers_server_id_logs_get**](docs/DefaultApi.md#api_v1_servers_server_id_logs_get) | **GET** /api/v1/servers/{serverId}/logs | Get server logs +*DefaultApi* | [**api_v1_servers_server_id_metrics_cpu_get**](docs/DefaultApi.md#api_v1_servers_server_id_metrics_cpu_get) | **GET** /api/v1/servers/{serverId}/metrics/cpu | Get CPU metrics of a server. +*DefaultApi* | [**api_v1_servers_server_id_metrics_disk_get**](docs/DefaultApi.md#api_v1_servers_server_id_metrics_disk_get) | **GET** /api/v1/servers/{serverId}/metrics/disk | Get disk metrics of a server. +*DefaultApi* | [**api_v1_servers_server_id_metrics_network_get**](docs/DefaultApi.md#api_v1_servers_server_id_metrics_network_get) | **GET** /api/v1/servers/{serverId}/metrics/network | Get network metrics of a server. +*DefaultApi* | [**api_v1_servers_server_id_metrics_network_packet_get**](docs/DefaultApi.md#api_v1_servers_server_id_metrics_network_packet_get) | **GET** /api/v1/servers/{serverId}/metrics/network/packet | Get network packet metrics of a server. +*DefaultApi* | [**api_v1_servers_server_id_patch**](docs/DefaultApi.md#api_v1_servers_server_id_patch) | **PATCH** /api/v1/servers/{serverId} | Start - stop server or update attributes like hostname, nickname, uefi, bootorder, ... +*DefaultApi* | [**api_v1_servers_server_id_rescuesystem_delete**](docs/DefaultApi.md#api_v1_servers_server_id_rescuesystem_delete) | **DELETE** /api/v1/servers/{serverId}/rescuesystem | Deactivate rescue system for a server. +*DefaultApi* | [**api_v1_servers_server_id_rescuesystem_get**](docs/DefaultApi.md#api_v1_servers_server_id_rescuesystem_get) | **GET** /api/v1/servers/{serverId}/rescuesystem | Get rescue system status for a server. +*DefaultApi* | [**api_v1_servers_server_id_rescuesystem_post**](docs/DefaultApi.md#api_v1_servers_server_id_rescuesystem_post) | **POST** /api/v1/servers/{serverId}/rescuesystem | Activate rescue system for a server. +*DefaultApi* | [**api_v1_servers_server_id_snapshots_dryrun_post**](docs/DefaultApi.md#api_v1_servers_server_id_snapshots_dryrun_post) | **POST** /api/v1/servers/{serverId}/snapshots:dryrun | Check if creating a snapshot is possible. +*DefaultApi* | [**api_v1_servers_server_id_snapshots_get**](docs/DefaultApi.md#api_v1_servers_server_id_snapshots_get) | **GET** /api/v1/servers/{serverId}/snapshots | Get all snapshots of a server. +*DefaultApi* | [**api_v1_servers_server_id_snapshots_name_delete**](docs/DefaultApi.md#api_v1_servers_server_id_snapshots_name_delete) | **DELETE** /api/v1/servers/{serverId}/snapshots/{name} | Delete a snapshot of a server +*DefaultApi* | [**api_v1_servers_server_id_snapshots_name_export_post**](docs/DefaultApi.md#api_v1_servers_server_id_snapshots_name_export_post) | **POST** /api/v1/servers/{serverId}/snapshots/{name}/export | Export a snapshot of a server +*DefaultApi* | [**api_v1_servers_server_id_snapshots_name_get**](docs/DefaultApi.md#api_v1_servers_server_id_snapshots_name_get) | **GET** /api/v1/servers/{serverId}/snapshots/{name} | Get a snapshot of a server. +*DefaultApi* | [**api_v1_servers_server_id_snapshots_name_revert_post**](docs/DefaultApi.md#api_v1_servers_server_id_snapshots_name_revert_post) | **POST** /api/v1/servers/{serverId}/snapshots/{name}/revert | Revert a snapshot of a server +*DefaultApi* | [**api_v1_servers_server_id_snapshots_post**](docs/DefaultApi.md#api_v1_servers_server_id_snapshots_post) | **POST** /api/v1/servers/{serverId}/snapshots | Create a snapshot +*DefaultApi* | [**api_v1_servers_server_id_storageoptimization_post**](docs/DefaultApi.md#api_v1_servers_server_id_storageoptimization_post) | **POST** /api/v1/servers/{serverId}/storageoptimization | Optimize storage of a server. +*DefaultApi* | [**api_v1_servers_server_id_user_image_post**](docs/DefaultApi.md#api_v1_servers_server_id_user_image_post) | **POST** /api/v1/servers/{serverId}/user-image | Setup user image for a server. +*DefaultApi* | [**api_v1_tasks_get**](docs/DefaultApi.md#api_v1_tasks_get) | **GET** /api/v1/tasks | Get all tasks +*DefaultApi* | [**api_v1_tasks_uuid_cancel_put**](docs/DefaultApi.md#api_v1_tasks_uuid_cancel_put) | **PUT** /api/v1/tasks/{uuid}:cancel | Cancel a running task +*DefaultApi* | [**api_v1_tasks_uuid_get**](docs/DefaultApi.md#api_v1_tasks_uuid_get) | **GET** /api/v1/tasks/{uuid} | Get one task +*DefaultApi* | [**api_v1_users_user_id_failoverips_v4_get**](docs/DefaultApi.md#api_v1_users_user_id_failoverips_v4_get) | **GET** /api/v1/users/{userId}/failoverips/v4 | Get all failover IPv4s of this user. +*DefaultApi* | [**api_v1_users_user_id_failoverips_v4_id_patch**](docs/DefaultApi.md#api_v1_users_user_id_failoverips_v4_id_patch) | **PATCH** /api/v1/users/{userId}/failoverips/v4/{id} | Route a failover IPv4. +*DefaultApi* | [**api_v1_users_user_id_failoverips_v6_get**](docs/DefaultApi.md#api_v1_users_user_id_failoverips_v6_get) | **GET** /api/v1/users/{userId}/failoverips/v6 | Get all failover IPv6s of this user. +*DefaultApi* | [**api_v1_users_user_id_failoverips_v6_id_patch**](docs/DefaultApi.md#api_v1_users_user_id_failoverips_v6_id_patch) | **PATCH** /api/v1/users/{userId}/failoverips/v6/{id} | Route a failover IPv6. +*DefaultApi* | [**api_v1_users_user_id_firewall_policies_get**](docs/DefaultApi.md#api_v1_users_user_id_firewall_policies_get) | **GET** /api/v1/users/{userId}/firewall-policies | Get firewall policies +*DefaultApi* | [**api_v1_users_user_id_firewall_policies_id_delete**](docs/DefaultApi.md#api_v1_users_user_id_firewall_policies_id_delete) | **DELETE** /api/v1/users/{userId}/firewall-policies/{id} | Delete firewall policy +*DefaultApi* | [**api_v1_users_user_id_firewall_policies_id_get**](docs/DefaultApi.md#api_v1_users_user_id_firewall_policies_id_get) | **GET** /api/v1/users/{userId}/firewall-policies/{id} | Get firewall policy +*DefaultApi* | [**api_v1_users_user_id_firewall_policies_id_put**](docs/DefaultApi.md#api_v1_users_user_id_firewall_policies_id_put) | **PUT** /api/v1/users/{userId}/firewall-policies/{id} | Update firewall policy +*DefaultApi* | [**api_v1_users_user_id_firewall_policies_post**](docs/DefaultApi.md#api_v1_users_user_id_firewall_policies_post) | **POST** /api/v1/users/{userId}/firewall-policies | Create firewall policy +*DefaultApi* | [**api_v1_users_user_id_get**](docs/DefaultApi.md#api_v1_users_user_id_get) | **GET** /api/v1/users/{userId} | Get one user +*DefaultApi* | [**api_v1_users_user_id_images_get**](docs/DefaultApi.md#api_v1_users_user_id_images_get) | **GET** /api/v1/users/{userId}/images | Get all available user images +*DefaultApi* | [**api_v1_users_user_id_images_key_delete**](docs/DefaultApi.md#api_v1_users_user_id_images_key_delete) | **DELETE** /api/v1/users/{userId}/images/{key} | Delete an image +*DefaultApi* | [**api_v1_users_user_id_images_key_get**](docs/DefaultApi.md#api_v1_users_user_id_images_key_get) | **GET** /api/v1/users/{userId}/images/{key} | Get download informations for an image +*DefaultApi* | [**api_v1_users_user_id_images_key_post**](docs/DefaultApi.md#api_v1_users_user_id_images_key_post) | **POST** /api/v1/users/{userId}/images/{key} | Prepares an upload for an image +*DefaultApi* | [**api_v1_users_user_id_images_key_upload_id_parts_part_number_get**](docs/DefaultApi.md#api_v1_users_user_id_images_key_upload_id_parts_part_number_get) | **GET** /api/v1/users/{userId}/images/{key}/{uploadId}/parts/{partNumber} | Get a presigned upload URL for a single part +*DefaultApi* | [**api_v1_users_user_id_images_key_upload_id_put**](docs/DefaultApi.md#api_v1_users_user_id_images_key_upload_id_put) | **PUT** /api/v1/users/{userId}/images/{key}/{uploadId} | Completes a multipart upload for an image +*DefaultApi* | [**api_v1_users_user_id_isos_get**](docs/DefaultApi.md#api_v1_users_user_id_isos_get) | **GET** /api/v1/users/{userId}/isos | Get all available ISOs +*DefaultApi* | [**api_v1_users_user_id_isos_key_delete**](docs/DefaultApi.md#api_v1_users_user_id_isos_key_delete) | **DELETE** /api/v1/users/{userId}/isos/{key} | Delete an ISO +*DefaultApi* | [**api_v1_users_user_id_isos_key_get**](docs/DefaultApi.md#api_v1_users_user_id_isos_key_get) | **GET** /api/v1/users/{userId}/isos/{key} | Get presigned URL for an ISO +*DefaultApi* | [**api_v1_users_user_id_isos_key_post**](docs/DefaultApi.md#api_v1_users_user_id_isos_key_post) | **POST** /api/v1/users/{userId}/isos/{key} | Prepares an upload for an ISO +*DefaultApi* | [**api_v1_users_user_id_isos_key_upload_id_parts_part_number_get**](docs/DefaultApi.md#api_v1_users_user_id_isos_key_upload_id_parts_part_number_get) | **GET** /api/v1/users/{userId}/isos/{key}/{uploadId}/parts/{partNumber} | Get a presigned upload URL for a single part +*DefaultApi* | [**api_v1_users_user_id_isos_key_upload_id_put**](docs/DefaultApi.md#api_v1_users_user_id_isos_key_upload_id_put) | **PUT** /api/v1/users/{userId}/isos/{key}/{uploadId} | Completes a multipart upload for an ISO +*DefaultApi* | [**api_v1_users_user_id_logs_get**](docs/DefaultApi.md#api_v1_users_user_id_logs_get) | **GET** /api/v1/users/{userId}/logs | Get user logs +*DefaultApi* | [**api_v1_users_user_id_put**](docs/DefaultApi.md#api_v1_users_user_id_put) | **PUT** /api/v1/users/{userId} | Update a user +*DefaultApi* | [**api_v1_users_user_id_ssh_keys_get**](docs/DefaultApi.md#api_v1_users_user_id_ssh_keys_get) | **GET** /api/v1/users/{userId}/ssh-keys | Get SSH keys +*DefaultApi* | [**api_v1_users_user_id_ssh_keys_id_delete**](docs/DefaultApi.md#api_v1_users_user_id_ssh_keys_id_delete) | **DELETE** /api/v1/users/{userId}/ssh-keys/{id} | Delete SSH key +*DefaultApi* | [**api_v1_users_user_id_ssh_keys_post**](docs/DefaultApi.md#api_v1_users_user_id_ssh_keys_post) | **POST** /api/v1/users/{userId}/ssh-keys | Create SSH key +*DefaultApi* | [**api_v1_users_user_id_vlans_get**](docs/DefaultApi.md#api_v1_users_user_id_vlans_get) | **GET** /api/v1/users/{userId}/vlans | Get VLans of a user +*DefaultApi* | [**api_v1_users_user_id_vlans_vlan_id_get**](docs/DefaultApi.md#api_v1_users_user_id_vlans_vlan_id_get) | **GET** /api/v1/users/{userId}/vlans/{vlanId} | Get a VLan of a user +*DefaultApi* | [**api_v1_users_user_id_vlans_vlan_id_put**](docs/DefaultApi.md#api_v1_users_user_id_vlans_vlan_id_put) | **PUT** /api/v1/users/{userId}/vlans/{vlanId} | Update a VLan +*DefaultApi* | [**api_v1_vlans_vlan_id_get**](docs/DefaultApi.md#api_v1_vlans_vlan_id_get) | **GET** /api/v1/vlans/{vlanId} | Get a VLan + + +## Documentation For Models + + - [ApiV1ServersServerIdPatchRequest](docs/ApiV1ServersServerIdPatchRequest.md) + - [Architecture](docs/Architecture.md) + - [BandwidthClass](docs/BandwidthClass.md) + - [Bootorder](docs/Bootorder.md) + - [CpuTopology](docs/CpuTopology.md) + - [Disk](docs/Disk.md) + - [EditDisksDriver](docs/EditDisksDriver.md) + - [FailoverIpv4](docs/FailoverIpv4.md) + - [FailoverIpv6](docs/FailoverIpv6.md) + - [FieldError](docs/FieldError.md) + - [FirewallAction](docs/FirewallAction.md) + - [FirewallPolicy](docs/FirewallPolicy.md) + - [FirewallPolicySave](docs/FirewallPolicySave.md) + - [FirewallPolicyUpdateResult](docs/FirewallPolicyUpdateResult.md) + - [FirewallProtocol](docs/FirewallProtocol.md) + - [FirewallRule](docs/FirewallRule.md) + - [FirewallRuleDirection](docs/FirewallRuleDirection.md) + - [GuestAgentData](docs/GuestAgentData.md) + - [IdentifierInt](docs/IdentifierInt.md) + - [ImageFlavour](docs/ImageFlavour.md) + - [ImageMinimal](docs/ImageMinimal.md) + - [ImplicitRule](docs/ImplicitRule.md) + - [Interface](docs/Interface.md) + - [Ipv4AddressMinimal](docs/Ipv4AddressMinimal.md) + - [Ipv6AddressMinimal](docs/Ipv6AddressMinimal.md) + - [Iso](docs/Iso.md) + - [IsoImage](docs/IsoImage.md) + - [Log](docs/Log.md) + - [LogType](docs/LogType.md) + - [Maintenance](docs/Maintenance.md) + - [NetworkDriver](docs/NetworkDriver.md) + - [NotFoundError](docs/NotFoundError.md) + - [OsOptimization](docs/OsOptimization.md) + - [RdnsIpv4](docs/RdnsIpv4.md) + - [RdnsIpv6](docs/RdnsIpv6.md) + - [RescueSystemStatus](docs/RescueSystemStatus.md) + - [ResponseError](docs/ResponseError.md) + - [RouteFailoverIp](docs/RouteFailoverIp.md) + - [S3CompletedPart](docs/S3CompletedPart.md) + - [S3DownloadInfos](docs/S3DownloadInfos.md) + - [S3NoSuchUploadError](docs/S3NoSuchUploadError.md) + - [S3Object](docs/S3Object.md) + - [S3SignPartUrl](docs/S3SignPartUrl.md) + - [S3Upload](docs/S3Upload.md) + - [Server](docs/Server.md) + - [ServerAttachIso](docs/ServerAttachIso.md) + - [ServerAutostartPatch](docs/ServerAutostartPatch.md) + - [ServerBootorderPatch](docs/ServerBootorderPatch.md) + - [ServerCpuTopologyPatch](docs/ServerCpuTopologyPatch.md) + - [ServerCreateNicVlan](docs/ServerCreateNicVlan.md) + - [ServerDisk](docs/ServerDisk.md) + - [ServerFirewall](docs/ServerFirewall.md) + - [ServerFirewallSave](docs/ServerFirewallSave.md) + - [ServerHostnamePatch](docs/ServerHostnamePatch.md) + - [ServerImageSetup](docs/ServerImageSetup.md) + - [ServerInfo](docs/ServerInfo.md) + - [ServerInterface](docs/ServerInterface.md) + - [ServerInterfaceUpdate](docs/ServerInterfaceUpdate.md) + - [ServerIpType](docs/ServerIpType.md) + - [ServerIpv4](docs/ServerIpv4.md) + - [ServerIpv6](docs/ServerIpv6.md) + - [ServerKeyboardLayoutPatch](docs/ServerKeyboardLayoutPatch.md) + - [ServerListMinimal](docs/ServerListMinimal.md) + - [ServerMinimal](docs/ServerMinimal.md) + - [ServerNicknamePatch](docs/ServerNicknamePatch.md) + - [ServerOsOptimizationPatch](docs/ServerOsOptimizationPatch.md) + - [ServerSetRootPasswordPatch](docs/ServerSetRootPasswordPatch.md) + - [ServerSnapshotCreate](docs/ServerSnapshotCreate.md) + - [ServerSnapshotCreateCheck](docs/ServerSnapshotCreateCheck.md) + - [ServerState](docs/ServerState.md) + - [ServerState1](docs/ServerState1.md) + - [ServerStatePatch](docs/ServerStatePatch.md) + - [ServerTemplateMinimal](docs/ServerTemplateMinimal.md) + - [ServerUefiPatch](docs/ServerUefiPatch.md) + - [ServerUserImageSetup](docs/ServerUserImageSetup.md) + - [SetRdnsIpv4](docs/SetRdnsIpv4.md) + - [SetRdnsIpv6](docs/SetRdnsIpv6.md) + - [Site](docs/Site.md) + - [Snapshot](docs/Snapshot.md) + - [SnapshotMinimal](docs/SnapshotMinimal.md) + - [SshKey](docs/SshKey.md) + - [StorageDriver](docs/StorageDriver.md) + - [StorageOptimization](docs/StorageOptimization.md) + - [TaskInfo](docs/TaskInfo.md) + - [TaskInfoMinimal](docs/TaskInfoMinimal.md) + - [TaskInfoStep](docs/TaskInfoStep.md) + - [TaskProgress](docs/TaskProgress.md) + - [TaskState](docs/TaskState.md) + - [User](docs/User.md) + - [UserMinimal](docs/UserMinimal.md) + - [UserSave](docs/UserSave.md) + - [VLan](docs/VLan.md) + - [VLanSave](docs/VLanSave.md) + - [ValidationError](docs/ValidationError.md) + + +To get access to the crate's generated documentation, use: + +``` +cargo doc --open +``` + +## Author + + + diff --git a/scp_core/docs/ApiV1ServersServerIdPatchRequest.md b/scp_core/docs/ApiV1ServersServerIdPatchRequest.md new file mode 100644 index 0000000..bbab8ff --- /dev/null +++ b/scp_core/docs/ApiV1ServersServerIdPatchRequest.md @@ -0,0 +1,20 @@ +# ApiV1ServersServerIdPatchRequest + +## Enum Variants + +| Name | Description | +|---- | -----| +| ServerAutostartPatch | | +| ServerBootorderPatch | | +| ServerCpuTopologyPatch | | +| ServerHostnamePatch | | +| ServerKeyboardLayoutPatch | | +| ServerNicknamePatch | | +| ServerOsOptimizationPatch | | +| ServerSetRootPasswordPatch | | +| ServerStatePatch | | +| ServerUefiPatch | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/Architecture.md b/scp_core/docs/Architecture.md new file mode 100644 index 0000000..90e00ff --- /dev/null +++ b/scp_core/docs/Architecture.md @@ -0,0 +1,13 @@ +# Architecture + +## Enum Variants + +| Name | Value | +|---- | -----| +| Amd64 | AMD64 | +| Arm64 | ARM64 | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/BandwidthClass.md b/scp_core/docs/BandwidthClass.md new file mode 100644 index 0000000..ddd57a7 --- /dev/null +++ b/scp_core/docs/BandwidthClass.md @@ -0,0 +1,13 @@ +# BandwidthClass + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i32**> | | [optional] +**name** | **String** | | +**speed_in_m_bit** | **i32** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/Bootorder.md b/scp_core/docs/Bootorder.md new file mode 100644 index 0000000..d871a00 --- /dev/null +++ b/scp_core/docs/Bootorder.md @@ -0,0 +1,14 @@ +# Bootorder + +## Enum Variants + +| Name | Value | +|---- | -----| +| Hdd | HDD | +| Cdrom | CDROM | +| Network | NETWORK | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/CpuTopology.md b/scp_core/docs/CpuTopology.md new file mode 100644 index 0000000..adf161c --- /dev/null +++ b/scp_core/docs/CpuTopology.md @@ -0,0 +1,12 @@ +# CpuTopology + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**socket_count** | Option<**i32**> | | [optional] +**cores_per_socket_count** | Option<**i32**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/DefaultApi.md b/scp_core/docs/DefaultApi.md new file mode 100644 index 0000000..81e50b4 --- /dev/null +++ b/scp_core/docs/DefaultApi.md @@ -0,0 +1,2691 @@ +# \DefaultApi + +All URIs are relative to *https://www.servercontrolpanel.de/scp-core* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**api_ping_get**](DefaultApi.md#api_ping_get) | **GET** /api/ping | Check if application is available +[**api_v1_maintenance_get**](DefaultApi.md#api_v1_maintenance_get) | **GET** /api/v1/maintenance | Get maintenance information for system +[**api_v1_openapi_get**](DefaultApi.md#api_v1_openapi_get) | **GET** /api/v1/openapi | Get openapi spec +[**api_v1_rdns_ipv4_ip_delete**](DefaultApi.md#api_v1_rdns_ipv4_ip_delete) | **DELETE** /api/v1/rdns/ipv4/{ip} | Delete an rDNS entry of an IPv4. +[**api_v1_rdns_ipv4_ip_get**](DefaultApi.md#api_v1_rdns_ipv4_ip_get) | **GET** /api/v1/rdns/ipv4/{ip} | Get rDNS for an IPv4. +[**api_v1_rdns_ipv4_post**](DefaultApi.md#api_v1_rdns_ipv4_post) | **POST** /api/v1/rdns/ipv4 | Set an rDNS entry for an IPv4. +[**api_v1_rdns_ipv6_ip_delete**](DefaultApi.md#api_v1_rdns_ipv6_ip_delete) | **DELETE** /api/v1/rdns/ipv6/{ip} | Delete an rDNS entry of an IPv6. +[**api_v1_rdns_ipv6_ip_get**](DefaultApi.md#api_v1_rdns_ipv6_ip_get) | **GET** /api/v1/rdns/ipv6/{ip} | Get rDNS for an IPv6. +[**api_v1_rdns_ipv6_post**](DefaultApi.md#api_v1_rdns_ipv6_post) | **POST** /api/v1/rdns/ipv6 | Set an rDNS entry for an IPv6. +[**api_v1_servers_get**](DefaultApi.md#api_v1_servers_get) | **GET** /api/v1/servers | Get servers +[**api_v1_servers_server_id_disks_disk_name_format_post**](DefaultApi.md#api_v1_servers_server_id_disks_disk_name_format_post) | **POST** /api/v1/servers/{serverId}/disks/{diskName}:format | Format disk of a server. Attention: All data will be lost during formatting! +[**api_v1_servers_server_id_disks_disk_name_get**](DefaultApi.md#api_v1_servers_server_id_disks_disk_name_get) | **GET** /api/v1/servers/{serverId}/disks/{diskName} | Get a disk of a server +[**api_v1_servers_server_id_disks_get**](DefaultApi.md#api_v1_servers_server_id_disks_get) | **GET** /api/v1/servers/{serverId}/disks | Get disks of a server +[**api_v1_servers_server_id_disks_patch**](DefaultApi.md#api_v1_servers_server_id_disks_patch) | **PATCH** /api/v1/servers/{serverId}/disks | Patch disk driver of a server. +[**api_v1_servers_server_id_disks_supported_drivers_get**](DefaultApi.md#api_v1_servers_server_id_disks_supported_drivers_get) | **GET** /api/v1/servers/{serverId}/disks/supported-drivers | Get a list of supported storage drivers for this server +[**api_v1_servers_server_id_get**](DefaultApi.md#api_v1_servers_server_id_get) | **GET** /api/v1/servers/{serverId} | Get one server +[**api_v1_servers_server_id_guest_agent_get**](DefaultApi.md#api_v1_servers_server_id_guest_agent_get) | **GET** /api/v1/servers/{serverId}/guest-agent | Get guest agent data for server +[**api_v1_servers_server_id_image_post**](DefaultApi.md#api_v1_servers_server_id_image_post) | **POST** /api/v1/servers/{serverId}/image | Setup image for a server. Attention: All data will be lost during formatting on selected disk! +[**api_v1_servers_server_id_imageflavours_get**](DefaultApi.md#api_v1_servers_server_id_imageflavours_get) | **GET** /api/v1/servers/{serverId}/imageflavours | Get available image flavours for server image setup. Images whose storage driver is not supported by the server's machine type are not shown. +[**api_v1_servers_server_id_interfaces_get**](DefaultApi.md#api_v1_servers_server_id_interfaces_get) | **GET** /api/v1/servers/{serverId}/interfaces | Get all interfaces and IPs of a server including routed IPs and rDNS entries. +[**api_v1_servers_server_id_interfaces_mac_delete**](DefaultApi.md#api_v1_servers_server_id_interfaces_mac_delete) | **DELETE** /api/v1/servers/{serverId}/interfaces/{mac} | Delete an interface of a server. +[**api_v1_servers_server_id_interfaces_mac_firewall_get**](DefaultApi.md#api_v1_servers_server_id_interfaces_mac_firewall_get) | **GET** /api/v1/servers/{serverId}/interfaces/{mac}/firewall | Get firewall +[**api_v1_servers_server_id_interfaces_mac_firewall_put**](DefaultApi.md#api_v1_servers_server_id_interfaces_mac_firewall_put) | **PUT** /api/v1/servers/{serverId}/interfaces/{mac}/firewall | Configure firewall +[**api_v1_servers_server_id_interfaces_mac_firewall_reapply_post**](DefaultApi.md#api_v1_servers_server_id_interfaces_mac_firewall_reapply_post) | **POST** /api/v1/servers/{serverId}/interfaces/{mac}/firewall:reapply | Reapply firewall. Necessary if policy update timed out due to long running write operation on server (f.e. storage optimization) +[**api_v1_servers_server_id_interfaces_mac_firewall_restore_copied_policies_post**](DefaultApi.md#api_v1_servers_server_id_interfaces_mac_firewall_restore_copied_policies_post) | **POST** /api/v1/servers/{serverId}/interfaces/{mac}/firewall:restore-copied-policies | Restore copied firewall policies. +[**api_v1_servers_server_id_interfaces_mac_get**](DefaultApi.md#api_v1_servers_server_id_interfaces_mac_get) | **GET** /api/v1/servers/{serverId}/interfaces/{mac} | Get an interface and IPs of a server including routed IPs and rDNS entries. +[**api_v1_servers_server_id_interfaces_mac_put**](DefaultApi.md#api_v1_servers_server_id_interfaces_mac_put) | **PUT** /api/v1/servers/{serverId}/interfaces/{mac} | Update interface attributes. +[**api_v1_servers_server_id_interfaces_post**](DefaultApi.md#api_v1_servers_server_id_interfaces_post) | **POST** /api/v1/servers/{serverId}/interfaces | Create an interface in a server. +[**api_v1_servers_server_id_iso_delete**](DefaultApi.md#api_v1_servers_server_id_iso_delete) | **DELETE** /api/v1/servers/{serverId}/iso | Detach an ISO from a server. +[**api_v1_servers_server_id_iso_get**](DefaultApi.md#api_v1_servers_server_id_iso_get) | **GET** /api/v1/servers/{serverId}/iso | Get attached ISO of a server. +[**api_v1_servers_server_id_iso_post**](DefaultApi.md#api_v1_servers_server_id_iso_post) | **POST** /api/v1/servers/{serverId}/iso | Attach an ISO to a server. +[**api_v1_servers_server_id_isoimages_get**](DefaultApi.md#api_v1_servers_server_id_isoimages_get) | **GET** /api/v1/servers/{serverId}/isoimages | Get available ISO images for server +[**api_v1_servers_server_id_logs_get**](DefaultApi.md#api_v1_servers_server_id_logs_get) | **GET** /api/v1/servers/{serverId}/logs | Get server logs +[**api_v1_servers_server_id_metrics_cpu_get**](DefaultApi.md#api_v1_servers_server_id_metrics_cpu_get) | **GET** /api/v1/servers/{serverId}/metrics/cpu | Get CPU metrics of a server. +[**api_v1_servers_server_id_metrics_disk_get**](DefaultApi.md#api_v1_servers_server_id_metrics_disk_get) | **GET** /api/v1/servers/{serverId}/metrics/disk | Get disk metrics of a server. +[**api_v1_servers_server_id_metrics_network_get**](DefaultApi.md#api_v1_servers_server_id_metrics_network_get) | **GET** /api/v1/servers/{serverId}/metrics/network | Get network metrics of a server. +[**api_v1_servers_server_id_metrics_network_packet_get**](DefaultApi.md#api_v1_servers_server_id_metrics_network_packet_get) | **GET** /api/v1/servers/{serverId}/metrics/network/packet | Get network packet metrics of a server. +[**api_v1_servers_server_id_patch**](DefaultApi.md#api_v1_servers_server_id_patch) | **PATCH** /api/v1/servers/{serverId} | Start - stop server or update attributes like hostname, nickname, uefi, bootorder, ... +[**api_v1_servers_server_id_rescuesystem_delete**](DefaultApi.md#api_v1_servers_server_id_rescuesystem_delete) | **DELETE** /api/v1/servers/{serverId}/rescuesystem | Deactivate rescue system for a server. +[**api_v1_servers_server_id_rescuesystem_get**](DefaultApi.md#api_v1_servers_server_id_rescuesystem_get) | **GET** /api/v1/servers/{serverId}/rescuesystem | Get rescue system status for a server. +[**api_v1_servers_server_id_rescuesystem_post**](DefaultApi.md#api_v1_servers_server_id_rescuesystem_post) | **POST** /api/v1/servers/{serverId}/rescuesystem | Activate rescue system for a server. +[**api_v1_servers_server_id_snapshots_dryrun_post**](DefaultApi.md#api_v1_servers_server_id_snapshots_dryrun_post) | **POST** /api/v1/servers/{serverId}/snapshots:dryrun | Check if creating a snapshot is possible. +[**api_v1_servers_server_id_snapshots_get**](DefaultApi.md#api_v1_servers_server_id_snapshots_get) | **GET** /api/v1/servers/{serverId}/snapshots | Get all snapshots of a server. +[**api_v1_servers_server_id_snapshots_name_delete**](DefaultApi.md#api_v1_servers_server_id_snapshots_name_delete) | **DELETE** /api/v1/servers/{serverId}/snapshots/{name} | Delete a snapshot of a server +[**api_v1_servers_server_id_snapshots_name_export_post**](DefaultApi.md#api_v1_servers_server_id_snapshots_name_export_post) | **POST** /api/v1/servers/{serverId}/snapshots/{name}/export | Export a snapshot of a server +[**api_v1_servers_server_id_snapshots_name_get**](DefaultApi.md#api_v1_servers_server_id_snapshots_name_get) | **GET** /api/v1/servers/{serverId}/snapshots/{name} | Get a snapshot of a server. +[**api_v1_servers_server_id_snapshots_name_revert_post**](DefaultApi.md#api_v1_servers_server_id_snapshots_name_revert_post) | **POST** /api/v1/servers/{serverId}/snapshots/{name}/revert | Revert a snapshot of a server +[**api_v1_servers_server_id_snapshots_post**](DefaultApi.md#api_v1_servers_server_id_snapshots_post) | **POST** /api/v1/servers/{serverId}/snapshots | Create a snapshot +[**api_v1_servers_server_id_storageoptimization_post**](DefaultApi.md#api_v1_servers_server_id_storageoptimization_post) | **POST** /api/v1/servers/{serverId}/storageoptimization | Optimize storage of a server. +[**api_v1_servers_server_id_user_image_post**](DefaultApi.md#api_v1_servers_server_id_user_image_post) | **POST** /api/v1/servers/{serverId}/user-image | Setup user image for a server. +[**api_v1_tasks_get**](DefaultApi.md#api_v1_tasks_get) | **GET** /api/v1/tasks | Get all tasks +[**api_v1_tasks_uuid_cancel_put**](DefaultApi.md#api_v1_tasks_uuid_cancel_put) | **PUT** /api/v1/tasks/{uuid}:cancel | Cancel a running task +[**api_v1_tasks_uuid_get**](DefaultApi.md#api_v1_tasks_uuid_get) | **GET** /api/v1/tasks/{uuid} | Get one task +[**api_v1_users_user_id_failoverips_v4_get**](DefaultApi.md#api_v1_users_user_id_failoverips_v4_get) | **GET** /api/v1/users/{userId}/failoverips/v4 | Get all failover IPv4s of this user. +[**api_v1_users_user_id_failoverips_v4_id_patch**](DefaultApi.md#api_v1_users_user_id_failoverips_v4_id_patch) | **PATCH** /api/v1/users/{userId}/failoverips/v4/{id} | Route a failover IPv4. +[**api_v1_users_user_id_failoverips_v6_get**](DefaultApi.md#api_v1_users_user_id_failoverips_v6_get) | **GET** /api/v1/users/{userId}/failoverips/v6 | Get all failover IPv6s of this user. +[**api_v1_users_user_id_failoverips_v6_id_patch**](DefaultApi.md#api_v1_users_user_id_failoverips_v6_id_patch) | **PATCH** /api/v1/users/{userId}/failoverips/v6/{id} | Route a failover IPv6. +[**api_v1_users_user_id_firewall_policies_get**](DefaultApi.md#api_v1_users_user_id_firewall_policies_get) | **GET** /api/v1/users/{userId}/firewall-policies | Get firewall policies +[**api_v1_users_user_id_firewall_policies_id_delete**](DefaultApi.md#api_v1_users_user_id_firewall_policies_id_delete) | **DELETE** /api/v1/users/{userId}/firewall-policies/{id} | Delete firewall policy +[**api_v1_users_user_id_firewall_policies_id_get**](DefaultApi.md#api_v1_users_user_id_firewall_policies_id_get) | **GET** /api/v1/users/{userId}/firewall-policies/{id} | Get firewall policy +[**api_v1_users_user_id_firewall_policies_id_put**](DefaultApi.md#api_v1_users_user_id_firewall_policies_id_put) | **PUT** /api/v1/users/{userId}/firewall-policies/{id} | Update firewall policy +[**api_v1_users_user_id_firewall_policies_post**](DefaultApi.md#api_v1_users_user_id_firewall_policies_post) | **POST** /api/v1/users/{userId}/firewall-policies | Create firewall policy +[**api_v1_users_user_id_get**](DefaultApi.md#api_v1_users_user_id_get) | **GET** /api/v1/users/{userId} | Get one user +[**api_v1_users_user_id_images_get**](DefaultApi.md#api_v1_users_user_id_images_get) | **GET** /api/v1/users/{userId}/images | Get all available user images +[**api_v1_users_user_id_images_key_delete**](DefaultApi.md#api_v1_users_user_id_images_key_delete) | **DELETE** /api/v1/users/{userId}/images/{key} | Delete an image +[**api_v1_users_user_id_images_key_get**](DefaultApi.md#api_v1_users_user_id_images_key_get) | **GET** /api/v1/users/{userId}/images/{key} | Get download informations for an image +[**api_v1_users_user_id_images_key_post**](DefaultApi.md#api_v1_users_user_id_images_key_post) | **POST** /api/v1/users/{userId}/images/{key} | Prepares an upload for an image +[**api_v1_users_user_id_images_key_upload_id_parts_part_number_get**](DefaultApi.md#api_v1_users_user_id_images_key_upload_id_parts_part_number_get) | **GET** /api/v1/users/{userId}/images/{key}/{uploadId}/parts/{partNumber} | Get a presigned upload URL for a single part +[**api_v1_users_user_id_images_key_upload_id_put**](DefaultApi.md#api_v1_users_user_id_images_key_upload_id_put) | **PUT** /api/v1/users/{userId}/images/{key}/{uploadId} | Completes a multipart upload for an image +[**api_v1_users_user_id_isos_get**](DefaultApi.md#api_v1_users_user_id_isos_get) | **GET** /api/v1/users/{userId}/isos | Get all available ISOs +[**api_v1_users_user_id_isos_key_delete**](DefaultApi.md#api_v1_users_user_id_isos_key_delete) | **DELETE** /api/v1/users/{userId}/isos/{key} | Delete an ISO +[**api_v1_users_user_id_isos_key_get**](DefaultApi.md#api_v1_users_user_id_isos_key_get) | **GET** /api/v1/users/{userId}/isos/{key} | Get presigned URL for an ISO +[**api_v1_users_user_id_isos_key_post**](DefaultApi.md#api_v1_users_user_id_isos_key_post) | **POST** /api/v1/users/{userId}/isos/{key} | Prepares an upload for an ISO +[**api_v1_users_user_id_isos_key_upload_id_parts_part_number_get**](DefaultApi.md#api_v1_users_user_id_isos_key_upload_id_parts_part_number_get) | **GET** /api/v1/users/{userId}/isos/{key}/{uploadId}/parts/{partNumber} | Get a presigned upload URL for a single part +[**api_v1_users_user_id_isos_key_upload_id_put**](DefaultApi.md#api_v1_users_user_id_isos_key_upload_id_put) | **PUT** /api/v1/users/{userId}/isos/{key}/{uploadId} | Completes a multipart upload for an ISO +[**api_v1_users_user_id_logs_get**](DefaultApi.md#api_v1_users_user_id_logs_get) | **GET** /api/v1/users/{userId}/logs | Get user logs +[**api_v1_users_user_id_put**](DefaultApi.md#api_v1_users_user_id_put) | **PUT** /api/v1/users/{userId} | Update a user +[**api_v1_users_user_id_ssh_keys_get**](DefaultApi.md#api_v1_users_user_id_ssh_keys_get) | **GET** /api/v1/users/{userId}/ssh-keys | Get SSH keys +[**api_v1_users_user_id_ssh_keys_id_delete**](DefaultApi.md#api_v1_users_user_id_ssh_keys_id_delete) | **DELETE** /api/v1/users/{userId}/ssh-keys/{id} | Delete SSH key +[**api_v1_users_user_id_ssh_keys_post**](DefaultApi.md#api_v1_users_user_id_ssh_keys_post) | **POST** /api/v1/users/{userId}/ssh-keys | Create SSH key +[**api_v1_users_user_id_vlans_get**](DefaultApi.md#api_v1_users_user_id_vlans_get) | **GET** /api/v1/users/{userId}/vlans | Get VLans of a user +[**api_v1_users_user_id_vlans_vlan_id_get**](DefaultApi.md#api_v1_users_user_id_vlans_vlan_id_get) | **GET** /api/v1/users/{userId}/vlans/{vlanId} | Get a VLan of a user +[**api_v1_users_user_id_vlans_vlan_id_put**](DefaultApi.md#api_v1_users_user_id_vlans_vlan_id_put) | **PUT** /api/v1/users/{userId}/vlans/{vlanId} | Update a VLan +[**api_v1_vlans_vlan_id_get**](DefaultApi.md#api_v1_vlans_vlan_id_get) | **GET** /api/v1/vlans/{vlanId} | Get a VLan + + + +## api_ping_get + +> api_ping_get() +Check if application is available + +### Parameters + +This endpoint does not need any parameter. + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_maintenance_get + +> Vec api_v1_maintenance_get() +Get maintenance information for system + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**Vec**](Maintenance.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_openapi_get + +> serde_json::Value api_v1_openapi_get() +Get openapi spec + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_rdns_ipv4_ip_delete + +> api_v1_rdns_ipv4_ip_delete(ip) +Delete an rDNS entry of an IPv4. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**ip** | **String** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_rdns_ipv4_ip_get + +> models::RdnsIpv4 api_v1_rdns_ipv4_ip_get(ip) +Get rDNS for an IPv4. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**ip** | **String** | | [required] | + +### Return type + +[**models::RdnsIpv4**](RdnsIpv4.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_rdns_ipv4_post + +> api_v1_rdns_ipv4_post(set_rdns_ipv4) +Set an rDNS entry for an IPv4. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**set_rdns_ipv4** | Option<[**SetRdnsIpv4**](SetRdnsIpv4.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_rdns_ipv6_ip_delete + +> api_v1_rdns_ipv6_ip_delete(ip) +Delete an rDNS entry of an IPv6. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**ip** | **String** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_rdns_ipv6_ip_get + +> models::RdnsIpv6 api_v1_rdns_ipv6_ip_get(ip) +Get rDNS for an IPv6. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**ip** | **String** | | [required] | + +### Return type + +[**models::RdnsIpv6**](RdnsIpv6.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_rdns_ipv6_post + +> api_v1_rdns_ipv6_post(set_rdns_ipv6) +Set an rDNS entry for an IPv6. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**set_rdns_ipv6** | Option<[**SetRdnsIpv6**](SetRdnsIpv6.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_get + +> Vec api_v1_servers_get(ip, limit, name, offset, q) +Get servers + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**ip** | Option<**String**> | Filter by ip | | +**limit** | Option<**i32**> | | | +**name** | Option<**String**> | Filter by server name | | +**offset** | Option<**i32**> | | | +**q** | Option<**String**> | Search ignoring case within the property name, nickname, or ipv4Addresses | | + +### Return type + +[**Vec**](ServerListMinimal.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_disks_disk_name_format_post + +> models::TaskInfo api_v1_servers_server_id_disks_disk_name_format_post(disk_name, server_id) +Format disk of a server. Attention: All data will be lost during formatting! + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**disk_name** | **String** | | [required] | +**server_id** | **i32** | | [required] | + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_disks_disk_name_get + +> models::Disk api_v1_servers_server_id_disks_disk_name_get(disk_name, server_id) +Get a disk of a server + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**disk_name** | **String** | | [required] | +**server_id** | **i32** | | [required] | + +### Return type + +[**models::Disk**](Disk.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_disks_get + +> Vec api_v1_servers_server_id_disks_get(server_id) +Get disks of a server + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | + +### Return type + +[**Vec**](Disk.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_disks_patch + +> models::TaskInfo api_v1_servers_server_id_disks_patch(server_id, edit_disks_driver) +Patch disk driver of a server. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**edit_disks_driver** | [**EditDisksDriver**](EditDisksDriver.md) | | [required] | + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: application/merge-patch+json +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_disks_supported_drivers_get + +> Vec api_v1_servers_server_id_disks_supported_drivers_get(server_id) +Get a list of supported storage drivers for this server + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | + +### Return type + +[**Vec**](StorageDriver.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_get + +> models::Server api_v1_servers_server_id_get(server_id, load_server_live_info) +Get one server + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**load_server_live_info** | Option<**bool**> | | |[default to true] + +### Return type + +[**models::Server**](Server.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_guest_agent_get + +> models::GuestAgentData api_v1_servers_server_id_guest_agent_get(server_id) +Get guest agent data for server + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | Server id | [required] | + +### Return type + +[**models::GuestAgentData**](GuestAgentData.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_image_post + +> models::TaskInfo api_v1_servers_server_id_image_post(server_id, server_image_setup) +Setup image for a server. Attention: All data will be lost during formatting on selected disk! + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**server_image_setup** | Option<[**ServerImageSetup**](ServerImageSetup.md)> | | | + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_imageflavours_get + +> Vec api_v1_servers_server_id_imageflavours_get(server_id) +Get available image flavours for server image setup. Images whose storage driver is not supported by the server's machine type are not shown. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | + +### Return type + +[**Vec**](ImageFlavour.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_interfaces_get + +> Vec api_v1_servers_server_id_interfaces_get(server_id, load_rdns) +Get all interfaces and IPs of a server including routed IPs and rDNS entries. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**load_rdns** | Option<**bool**> | | |[default to true] + +### Return type + +[**Vec**](Interface.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_interfaces_mac_delete + +> models::TaskInfo api_v1_servers_server_id_interfaces_mac_delete(mac, server_id) +Delete an interface of a server. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**mac** | **String** | | [required] | +**server_id** | **i32** | | [required] | + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_interfaces_mac_firewall_get + +> models::ServerFirewall api_v1_servers_server_id_interfaces_mac_firewall_get(server_id, mac, consistency_check) +Get firewall + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**mac** | **String** | | [required] | +**consistency_check** | Option<**bool**> | Check that the firewall rules have been applied. This will set the consistent attribute to true or false. | |[default to false] + +### Return type + +[**models::ServerFirewall**](ServerFirewall.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_interfaces_mac_firewall_put + +> models::TaskInfo api_v1_servers_server_id_interfaces_mac_firewall_put(server_id, mac, server_firewall_save) +Configure firewall + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**mac** | **String** | | [required] | +**server_firewall_save** | Option<[**ServerFirewallSave**](ServerFirewallSave.md)> | | | + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_interfaces_mac_firewall_reapply_post + +> models::TaskInfo api_v1_servers_server_id_interfaces_mac_firewall_reapply_post(server_id, mac) +Reapply firewall. Necessary if policy update timed out due to long running write operation on server (f.e. storage optimization) + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**mac** | **String** | | [required] | + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_interfaces_mac_firewall_restore_copied_policies_post + +> models::TaskInfo api_v1_servers_server_id_interfaces_mac_firewall_restore_copied_policies_post(server_id, mac) +Restore copied firewall policies. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**mac** | **String** | | [required] | + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_interfaces_mac_get + +> models::Interface api_v1_servers_server_id_interfaces_mac_get(server_id, mac, load_rdns) +Get an interface and IPs of a server including routed IPs and rDNS entries. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**mac** | **String** | | [required] | +**load_rdns** | Option<**bool**> | | |[default to true] + +### Return type + +[**models::Interface**](Interface.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_interfaces_mac_put + +> models::TaskInfo api_v1_servers_server_id_interfaces_mac_put(server_id, mac, server_interface_update) +Update interface attributes. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**mac** | **String** | | [required] | +**server_interface_update** | Option<[**ServerInterfaceUpdate**](ServerInterfaceUpdate.md)> | | | + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_interfaces_post + +> models::TaskInfo api_v1_servers_server_id_interfaces_post(server_id, server_create_nic_vlan) +Create an interface in a server. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**server_create_nic_vlan** | [**ServerCreateNicVlan**](ServerCreateNicVlan.md) | | [required] | + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: application/merge-patch+json +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_iso_delete + +> api_v1_servers_server_id_iso_delete(server_id) +Detach an ISO from a server. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_iso_get + +> models::Iso api_v1_servers_server_id_iso_get(server_id) +Get attached ISO of a server. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | + +### Return type + +[**models::Iso**](Iso.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_iso_post + +> models::TaskInfo api_v1_servers_server_id_iso_post(server_id, server_attach_iso) +Attach an ISO to a server. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**server_attach_iso** | Option<[**ServerAttachIso**](ServerAttachIso.md)> | | | + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_isoimages_get + +> Vec api_v1_servers_server_id_isoimages_get(server_id) +Get available ISO images for server + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | + +### Return type + +[**Vec**](IsoImage.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_logs_get + +> Vec api_v1_servers_server_id_logs_get(server_id, limit, offset) +Get server logs + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | Server id | [required] | +**limit** | Option<**i32**> | | | +**offset** | Option<**i32**> | | | + +### Return type + +[**Vec**](Log.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_metrics_cpu_get + +> serde_json::Value api_v1_servers_server_id_metrics_cpu_get(server_id, hours) +Get CPU metrics of a server. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**hours** | Option<**i32**> | | | + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_metrics_disk_get + +> serde_json::Value api_v1_servers_server_id_metrics_disk_get(server_id, hours) +Get disk metrics of a server. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**hours** | Option<**i32**> | | | + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_metrics_network_get + +> serde_json::Value api_v1_servers_server_id_metrics_network_get(server_id, hours) +Get network metrics of a server. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**hours** | Option<**i32**> | | | + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_metrics_network_packet_get + +> serde_json::Value api_v1_servers_server_id_metrics_network_packet_get(server_id, hours) +Get network packet metrics of a server. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**hours** | Option<**i32**> | | | + +### Return type + +[**serde_json::Value**](serde_json::Value.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_patch + +> api_v1_servers_server_id_patch(server_id, api_v1_servers_server_id_patch_request, state_option) +Start - stop server or update attributes like hostname, nickname, uefi, bootorder, ... + +Only one attribute at a time. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**api_v1_servers_server_id_patch_request** | [**ApiV1ServersServerIdPatchRequest**](ApiV1ServersServerIdPatchRequest.md) | | [required] | +**state_option** | Option<**String**> | Only applicable if ServerStatePatch is used. Valid values for state ON: POWERCYCLE, RESET. Valid values for state OFF: POWEROFF. | | + +### Return type + + (empty response body) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: application/merge-patch+json +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_rescuesystem_delete + +> models::TaskInfo api_v1_servers_server_id_rescuesystem_delete(server_id) +Deactivate rescue system for a server. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_rescuesystem_get + +> models::RescueSystemStatus api_v1_servers_server_id_rescuesystem_get(server_id) +Get rescue system status for a server. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | + +### Return type + +[**models::RescueSystemStatus**](RescueSystemStatus.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_rescuesystem_post + +> models::TaskInfo api_v1_servers_server_id_rescuesystem_post(server_id) +Activate rescue system for a server. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_snapshots_dryrun_post + +> Vec api_v1_servers_server_id_snapshots_dryrun_post(server_id, server_snapshot_create_check) +Check if creating a snapshot is possible. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**server_snapshot_create_check** | Option<[**ServerSnapshotCreateCheck**](ServerSnapshotCreateCheck.md)> | | | + +### Return type + +[**Vec**](ResponseError.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_snapshots_get + +> Vec api_v1_servers_server_id_snapshots_get(server_id) +Get all snapshots of a server. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | + +### Return type + +[**Vec**](SnapshotMinimal.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_snapshots_name_delete + +> models::TaskInfo api_v1_servers_server_id_snapshots_name_delete(server_id, name) +Delete a snapshot of a server + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**name** | **String** | | [required] | + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_snapshots_name_export_post + +> models::TaskInfo api_v1_servers_server_id_snapshots_name_export_post(server_id, name) +Export a snapshot of a server + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**name** | **String** | | [required] | + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_snapshots_name_get + +> models::Snapshot api_v1_servers_server_id_snapshots_name_get(server_id, name) +Get a snapshot of a server. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**name** | **String** | | [required] | + +### Return type + +[**models::Snapshot**](Snapshot.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_snapshots_name_revert_post + +> models::TaskInfo api_v1_servers_server_id_snapshots_name_revert_post(server_id, name) +Revert a snapshot of a server + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**name** | **String** | | [required] | + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_snapshots_post + +> models::TaskInfo api_v1_servers_server_id_snapshots_post(server_id, server_snapshot_create) +Create a snapshot + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**server_snapshot_create** | Option<[**ServerSnapshotCreate**](ServerSnapshotCreate.md)> | | | + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_storageoptimization_post + +> models::TaskInfo api_v1_servers_server_id_storageoptimization_post(server_id, disks, start_after_optimization) +Optimize storage of a server. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**disks** | Option<[**Vec**](String.md)> | | | +**start_after_optimization** | Option<**bool**> | | |[default to false] + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_servers_server_id_user_image_post + +> models::TaskInfo api_v1_servers_server_id_user_image_post(server_id, server_user_image_setup) +Setup user image for a server. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**server_id** | **i32** | | [required] | +**server_user_image_setup** | Option<[**ServerUserImageSetup**](ServerUserImageSetup.md)> | | | + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_tasks_get + +> Vec api_v1_tasks_get(limit, offset, q, server_id, state) +Get all tasks + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**limit** | Option<**i32**> | | | +**offset** | Option<**i32**> | | | +**q** | Option<**String**> | Search ignoring case within the properties name, uuid, server name, server nickname and server uuid | | +**server_id** | Option<**i32**> | | | +**state** | Option<[**TaskState**](.md)> | Filter by state (ROLLBACK is not supported) | | + +### Return type + +[**Vec**](TaskInfoMinimal.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_tasks_uuid_cancel_put + +> models::TaskInfo api_v1_tasks_uuid_cancel_put(uuid) +Cancel a running task + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**uuid** | **String** | | [required] | + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_tasks_uuid_get + +> models::TaskInfo api_v1_tasks_uuid_get(uuid) +Get one task + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**uuid** | **String** | | [required] | + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_failoverips_v4_get + +> Vec api_v1_users_user_id_failoverips_v4_get(user_id, ip, server_id) +Get all failover IPv4s of this user. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**ip** | Option<**String**> | | | +**server_id** | Option<**i32**> | Filter failover IPv4s of this user by server id | | + +### Return type + +[**Vec**](FailoverIPv4.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_failoverips_v4_id_patch + +> models::TaskInfo api_v1_users_user_id_failoverips_v4_id_patch(user_id, id, route_failover_ip) +Route a failover IPv4. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**id** | **i32** | | [required] | +**route_failover_ip** | Option<[**RouteFailoverIp**](RouteFailoverIp.md)> | | | + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_failoverips_v6_get + +> Vec api_v1_users_user_id_failoverips_v6_get(user_id, ip, server_id) +Get all failover IPv6s of this user. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**ip** | Option<**String**> | | | +**server_id** | Option<**i32**> | Filter failover IPv6s of this user by server id | | + +### Return type + +[**Vec**](FailoverIPv6.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_failoverips_v6_id_patch + +> models::TaskInfo api_v1_users_user_id_failoverips_v6_id_patch(user_id, id, route_failover_ip) +Route a failover IPv6. + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**id** | **i32** | | [required] | +**route_failover_ip** | Option<[**RouteFailoverIp**](RouteFailoverIp.md)> | | | + +### Return type + +[**models::TaskInfo**](TaskInfo.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_firewall_policies_get + +> Vec api_v1_users_user_id_firewall_policies_get(user_id, limit, offset, q) +Get firewall policies + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**limit** | Option<**i32**> | | | +**offset** | Option<**i32**> | | | +**q** | Option<**String**> | Search by name or description | | + +### Return type + +[**Vec**](FirewallPolicy.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_firewall_policies_id_delete + +> api_v1_users_user_id_firewall_policies_id_delete(user_id, id) +Delete firewall policy + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**id** | **i32** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_firewall_policies_id_get + +> models::FirewallPolicy api_v1_users_user_id_firewall_policies_id_get(user_id, id, with_count_of_affected_servers) +Get firewall policy + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**id** | **i32** | | [required] | +**with_count_of_affected_servers** | Option<**bool**> | | |[default to false] + +### Return type + +[**models::FirewallPolicy**](FirewallPolicy.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_firewall_policies_id_put + +> models::FirewallPolicyUpdateResult api_v1_users_user_id_firewall_policies_id_put(user_id, id, firewall_policy_save) +Update firewall policy + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**id** | **i32** | | [required] | +**firewall_policy_save** | Option<[**FirewallPolicySave**](FirewallPolicySave.md)> | | | + +### Return type + +[**models::FirewallPolicyUpdateResult**](FirewallPolicyUpdateResult.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_firewall_policies_post + +> models::FirewallPolicy api_v1_users_user_id_firewall_policies_post(user_id, firewall_policy_save) +Create firewall policy + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**firewall_policy_save** | Option<[**FirewallPolicySave**](FirewallPolicySave.md)> | | | + +### Return type + +[**models::FirewallPolicy**](FirewallPolicy.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_get + +> models::User api_v1_users_user_id_get(user_id) +Get one user + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | + +### Return type + +[**models::User**](User.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_images_get + +> Vec api_v1_users_user_id_images_get(user_id) +Get all available user images + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | + +### Return type + +[**Vec**](S3Object.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_images_key_delete + +> api_v1_users_user_id_images_key_delete(user_id, key) +Delete an image + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**key** | **String** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_images_key_get + +> models::S3DownloadInfos api_v1_users_user_id_images_key_get(user_id, key) +Get download informations for an image + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**key** | **String** | | [required] | + +### Return type + +[**models::S3DownloadInfos**](S3DownloadInfos.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_images_key_post + +> models::S3Upload api_v1_users_user_id_images_key_post(user_id, key, multipart) +Prepares an upload for an image + +If \"multipart=true\", returns \"uploadId\" that is used to fetch upload URLs for each part with \"GET /api/v1/users/{userId}/images/{key}/{uploadId}/parts/{partNumber}\". Use this URL to upload individual parts and get an \"ETag\" for each part. To finish, call \"PUT /api/v1/users/{userId}/images/{key}/{uploadId}\" with the list of all uploaded parts, containing \"ETag\" and \"partNumber\" for each part. Part numbers start at 1. If \"multipart=false\", returns \"presignedUrl\" that is used to upload the image at once. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**key** | **String** | | [required] | +**multipart** | Option<**bool**> | | |[default to true] + +### Return type + +[**models::S3Upload**](S3Upload.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_images_key_upload_id_parts_part_number_get + +> models::S3SignPartUrl api_v1_users_user_id_images_key_upload_id_parts_part_number_get(user_id, key, part_number, upload_id) +Get a presigned upload URL for a single part + +Call this endpoint for every part. Use the returned URL to upload the part and get an \"ETag\" from the HTTP headers in return. Once all parts are uploaded, call \"PUT /api/v1/users/{userId}/images/{key}/{uploadId}\" with the list of all uploaded parts, containing \"ETag\" and \"partNumber\" for each part. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**key** | **String** | | [required] | +**part_number** | **i32** | | [required] | +**upload_id** | **String** | | [required] | + +### Return type + +[**models::S3SignPartUrl**](S3SignPartURL.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_images_key_upload_id_put + +> api_v1_users_user_id_images_key_upload_id_put(user_id, key, upload_id, s3_completed_part) +Completes a multipart upload for an image + +Call this endpoint after uploading all parts. The body must include a list of parts \"ETag\" and \"partNumber\" in order. This finishes the upload and makes the image available with the provided \"key\". + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**key** | **String** | | [required] | +**upload_id** | **String** | | [required] | +**s3_completed_part** | Option<[**Vec**](S3CompletedPart.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_isos_get + +> Vec api_v1_users_user_id_isos_get(user_id) +Get all available ISOs + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | + +### Return type + +[**Vec**](S3Object.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_isos_key_delete + +> api_v1_users_user_id_isos_key_delete(user_id, key) +Delete an ISO + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**key** | **String** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_isos_key_get + +> models::S3DownloadInfos api_v1_users_user_id_isos_key_get(user_id, key) +Get presigned URL for an ISO + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**key** | **String** | | [required] | + +### Return type + +[**models::S3DownloadInfos**](S3DownloadInfos.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_isos_key_post + +> models::S3Upload api_v1_users_user_id_isos_key_post(user_id, key, multipart) +Prepares an upload for an ISO + +If \"multipart=true\", returns \"uploadId\" that is used to fetch upload URLs for each part with \"GET /api/v1/users/{userId}/isos/{key}/{uploadId}/parts/{partNumber}\". Use this URL to upload individual parts and get an \"ETag\" for each part. To finish, call \"PUT /api/v1/users/{userId}/isos/{key}/{uploadId}\" with the list of all uploaded parts, containing \"ETag\" and \"partNumber\" for each part. Part numbers start at 1. If \"multipart=false\", returns \"presignedUrl\" that is used to upload the ISO at once. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**key** | **String** | | [required] | +**multipart** | Option<**bool**> | | |[default to true] + +### Return type + +[**models::S3Upload**](S3Upload.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_isos_key_upload_id_parts_part_number_get + +> models::S3SignPartUrl api_v1_users_user_id_isos_key_upload_id_parts_part_number_get(user_id, key, part_number, upload_id) +Get a presigned upload URL for a single part + +Call this endpoint for every part. Use the returned URL to upload the part and get an \"ETag\" from the HTTP headers in return. Once all parts are uploaded, call \"PUT /api/v1/users/{userId}/isos/{key}/{uploadId}\" with the list of all uploaded parts, containing \"ETag\" and \"partNumber\" for each part. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**key** | **String** | | [required] | +**part_number** | **i32** | | [required] | +**upload_id** | **String** | | [required] | + +### Return type + +[**models::S3SignPartUrl**](S3SignPartURL.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_isos_key_upload_id_put + +> api_v1_users_user_id_isos_key_upload_id_put(user_id, key, upload_id, s3_completed_part) +Completes a multipart upload for an ISO + +Call this endpoint after uploading all parts. The body must include a list of parts \"ETag\" and \"partNumber\" in order. This finishes the upload and makes the ISO available with the provided \"key\". + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**key** | **String** | | [required] | +**upload_id** | **String** | | [required] | +**s3_completed_part** | Option<[**Vec**](S3CompletedPart.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_logs_get + +> Vec api_v1_users_user_id_logs_get(user_id, limit, offset) +Get user logs + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | User id | [required] | +**limit** | Option<**i32**> | | | +**offset** | Option<**i32**> | | | + +### Return type + +[**Vec**](Log.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_put + +> models::UserSave api_v1_users_user_id_put(user_id, user_save) +Update a user + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**user_save** | Option<[**UserSave**](UserSave.md)> | | | + +### Return type + +[**models::UserSave**](UserSave.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_ssh_keys_get + +> Vec api_v1_users_user_id_ssh_keys_get(user_id) +Get SSH keys + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | + +### Return type + +[**Vec**](SSHKey.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_ssh_keys_id_delete + +> api_v1_users_user_id_ssh_keys_id_delete(user_id, id) +Delete SSH key + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**id** | **i32** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_ssh_keys_post + +> models::SshKey api_v1_users_user_id_ssh_keys_post(user_id, ssh_key) +Create SSH key + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**ssh_key** | Option<[**SshKey**](SshKey.md)> | | | + +### Return type + +[**models::SshKey**](SSHKey.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_vlans_get + +> Vec api_v1_users_user_id_vlans_get(user_id, server_id) +Get VLans of a user + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**server_id** | Option<**i32**> | Filter VLans of a user by server id | | + +### Return type + +[**Vec**](VLan.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_vlans_vlan_id_get + +> models::VLan api_v1_users_user_id_vlans_vlan_id_get(user_id, vlan_id) +Get a VLan of a user + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**vlan_id** | **i32** | | [required] | + +### Return type + +[**models::VLan**](VLan.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_users_user_id_vlans_vlan_id_put + +> api_v1_users_user_id_vlans_vlan_id_put(user_id, vlan_id, v_lan_save) +Update a VLan + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user_id** | **i32** | | [required] | +**vlan_id** | **i32** | | [required] | +**v_lan_save** | Option<[**VLanSave**](VLanSave.md)> | | | + +### Return type + + (empty response body) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## api_v1_vlans_vlan_id_get + +> models::VLan api_v1_vlans_vlan_id_get(vlan_id) +Get a VLan + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**vlan_id** | **i32** | | [required] | + +### Return type + +[**models::VLan**](VLan.md) + +### Authorization + +[Authorization](../README.md#Authorization) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/hal+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/scp_core/docs/Disk.md b/scp_core/docs/Disk.md new file mode 100644 index 0000000..b32ddd7 --- /dev/null +++ b/scp_core/docs/Disk.md @@ -0,0 +1,14 @@ +# Disk + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | Option<**String**> | | [optional] +**allocation_in_mi_b** | Option<**i64**> | | [optional] +**capacity_in_mi_b** | Option<**i64**> | | [optional] +**storage_driver** | Option<[**models::StorageDriver**](StorageDriver.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/EditDisksDriver.md b/scp_core/docs/EditDisksDriver.md new file mode 100644 index 0000000..7d4dada --- /dev/null +++ b/scp_core/docs/EditDisksDriver.md @@ -0,0 +1,11 @@ +# EditDisksDriver + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**driver** | [**models::StorageDriver**](StorageDriver.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/FailoverIpv4.md b/scp_core/docs/FailoverIpv4.md new file mode 100644 index 0000000..ecae3ae --- /dev/null +++ b/scp_core/docs/FailoverIpv4.md @@ -0,0 +1,17 @@ +# FailoverIpv4 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i32**> | | [optional] +**ip** | Option<**String**> | | [optional] +**cidr_suffix** | Option<**i32**> | | [optional] +**user** | Option<[**models::UserMinimal**](UserMinimal.md)> | | [optional] +**editable** | Option<**bool**> | | [optional] +**site** | Option<[**models::Site**](Site.md)> | | [optional] +**server** | Option<[**models::ServerMinimal**](ServerMinimal.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/FailoverIpv6.md b/scp_core/docs/FailoverIpv6.md new file mode 100644 index 0000000..f27cab2 --- /dev/null +++ b/scp_core/docs/FailoverIpv6.md @@ -0,0 +1,17 @@ +# FailoverIpv6 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i32**> | | [optional] +**network_prefix** | Option<**String**> | | [optional] +**network_prefix_length** | Option<**i32**> | | [optional] +**user** | Option<[**models::UserMinimal**](UserMinimal.md)> | | [optional] +**editable** | Option<**bool**> | | [optional] +**site** | Option<[**models::Site**](Site.md)> | | [optional] +**server** | Option<[**models::ServerMinimal**](ServerMinimal.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/FieldError.md b/scp_core/docs/FieldError.md new file mode 100644 index 0000000..84a5417 --- /dev/null +++ b/scp_core/docs/FieldError.md @@ -0,0 +1,12 @@ +# FieldError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field** | Option<**String**> | | [optional] +**message** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/FirewallAction.md b/scp_core/docs/FirewallAction.md new file mode 100644 index 0000000..573d938 --- /dev/null +++ b/scp_core/docs/FirewallAction.md @@ -0,0 +1,13 @@ +# FirewallAction + +## Enum Variants + +| Name | Value | +|---- | -----| +| Accept | ACCEPT | +| Drop | DROP | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/FirewallPolicy.md b/scp_core/docs/FirewallPolicy.md new file mode 100644 index 0000000..a612347 --- /dev/null +++ b/scp_core/docs/FirewallPolicy.md @@ -0,0 +1,15 @@ +# FirewallPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i32**> | | [optional] +**name** | Option<**String**> | | [optional] +**description** | Option<**String**> | | [optional] +**rules** | Option<[**Vec**](FirewallRule.md)> | | [optional] +**count_of_affected_servers** | Option<**i32**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/FirewallPolicySave.md b/scp_core/docs/FirewallPolicySave.md new file mode 100644 index 0000000..6a94b53 --- /dev/null +++ b/scp_core/docs/FirewallPolicySave.md @@ -0,0 +1,13 @@ +# FirewallPolicySave + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | +**description** | Option<**String**> | | [optional] +**rules** | Option<[**Vec**](FirewallRule.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/FirewallPolicyUpdateResult.md b/scp_core/docs/FirewallPolicyUpdateResult.md new file mode 100644 index 0000000..b7be257 --- /dev/null +++ b/scp_core/docs/FirewallPolicyUpdateResult.md @@ -0,0 +1,12 @@ +# FirewallPolicyUpdateResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**firewall_policy** | Option<[**models::FirewallPolicy**](FirewallPolicy.md)> | | [optional] +**task_info** | Option<[**models::TaskInfo**](TaskInfo.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/FirewallProtocol.md b/scp_core/docs/FirewallProtocol.md new file mode 100644 index 0000000..58875d0 --- /dev/null +++ b/scp_core/docs/FirewallProtocol.md @@ -0,0 +1,15 @@ +# FirewallProtocol + +## Enum Variants + +| Name | Value | +|---- | -----| +| Tcp | TCP | +| Udp | UDP | +| Icmp | ICMP | +| Icmpv6 | ICMPv6 | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/FirewallRule.md b/scp_core/docs/FirewallRule.md new file mode 100644 index 0000000..9c54578 --- /dev/null +++ b/scp_core/docs/FirewallRule.md @@ -0,0 +1,19 @@ +# FirewallRule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**number_of_effective_rules** | Option<**i32**> | | [optional] +**description** | Option<**String**> | | [optional] +**direction** | [**models::FirewallRuleDirection**](FirewallRuleDirection.md) | | +**protocol** | [**models::FirewallProtocol**](FirewallProtocol.md) | | +**action** | [**models::FirewallAction**](FirewallAction.md) | | +**sources** | Option<**Vec**> | Valid configurations are any IP (null or empty array), IPv4/IPv6 address (f.e. 192.168.10.1 or 0092:e10f:cb66:35a9::) or IPv4 network / IPv6 prefix (f.e. 192.168.10.0/24 or 0092:e10f:cb66:35a9::/64). If more than one IP/network is specified for the source, the destination must be empty (any) or contain only a single IP/network. If IPv4 addresses and IPv6 addresses are mixed in sources, destinations must empty (any). | [optional] +**source_ports** | Option<**String**> | Valid configurations are any port (null), single port (f.e. 1234) or port range (f.e. 1024-65535). | [optional] +**destinations** | Option<**Vec**> | Valid configurations are any IP (null or empty array), IPv4/IPv6 address (f.e. 192.168.10.1 or 0092:e10f:cb66:35a9::) or IPv4 network / IPv6 prefix (f.e. 192.168.10.0/24 or 0092:e10f:cb66:35a9::/64). If more than one IP/network is specified for the destination, the source must be empty (any) or contain only a single IP/network. If IPv4 addresses and IPv6 addresses are mixed in destinations, sources must be empty (any). | [optional] +**destination_ports** | Option<**String**> | Valid configurations are any port (null), single port (f.e. 1234) or port range (f.e. 1024-65535). | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/FirewallRuleDirection.md b/scp_core/docs/FirewallRuleDirection.md new file mode 100644 index 0000000..5cfc647 --- /dev/null +++ b/scp_core/docs/FirewallRuleDirection.md @@ -0,0 +1,13 @@ +# FirewallRuleDirection + +## Enum Variants + +| Name | Value | +|---- | -----| +| Ingress | INGRESS | +| Egress | EGRESS | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/GuestAgentData.md b/scp_core/docs/GuestAgentData.md new file mode 100644 index 0000000..c234da4 --- /dev/null +++ b/scp_core/docs/GuestAgentData.md @@ -0,0 +1,12 @@ +# GuestAgentData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**guest_agent_available** | Option<**bool**> | | [optional] +**guest_agent_data** | Option<[**serde_json::Value**](.md)> | Information in json format about the qemu guest agent, which may change depending on the version. We do not guarantee backwards compatibility for this data. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/IdentifierInt.md b/scp_core/docs/IdentifierInt.md new file mode 100644 index 0000000..26d6387 --- /dev/null +++ b/scp_core/docs/IdentifierInt.md @@ -0,0 +1,11 @@ +# IdentifierInt + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **i32** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ImageFlavour.md b/scp_core/docs/ImageFlavour.md new file mode 100644 index 0000000..adad21c --- /dev/null +++ b/scp_core/docs/ImageFlavour.md @@ -0,0 +1,15 @@ +# ImageFlavour + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i32**> | | [optional] +**name** | **String** | | +**alias** | **String** | | +**text** | **String** | | +**image** | Option<[**models::ImageMinimal**](ImageMinimal.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ImageMinimal.md b/scp_core/docs/ImageMinimal.md new file mode 100644 index 0000000..d790f69 --- /dev/null +++ b/scp_core/docs/ImageMinimal.md @@ -0,0 +1,12 @@ +# ImageMinimal + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i32**> | | [optional] +**name** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ImplicitRule.md b/scp_core/docs/ImplicitRule.md new file mode 100644 index 0000000..4b5cead --- /dev/null +++ b/scp_core/docs/ImplicitRule.md @@ -0,0 +1,13 @@ +# ImplicitRule + +## Enum Variants + +| Name | Value | +|---- | -----| +| AcceptAll | ACCEPT_ALL | +| DropAll | DROP_ALL | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/Interface.md b/scp_core/docs/Interface.md new file mode 100644 index 0000000..2cba3a8 --- /dev/null +++ b/scp_core/docs/Interface.md @@ -0,0 +1,15 @@ +# Interface + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mac** | Option<**String**> | | [optional] +**driver** | Option<**String**> | | [optional] +**speed_in_m_bits** | Option<**i32**> | | [optional] +**ipv4_addresses** | Option<[**Vec**](ServerIpv4.md)> | | [optional] +**ipv6_addresses** | Option<[**Vec**](ServerIpv6.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/Ipv4AddressMinimal.md b/scp_core/docs/Ipv4AddressMinimal.md new file mode 100644 index 0000000..61282f5 --- /dev/null +++ b/scp_core/docs/Ipv4AddressMinimal.md @@ -0,0 +1,15 @@ +# Ipv4AddressMinimal + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i32**> | | [optional] +**ip** | Option<**String**> | | [optional] +**netmask** | Option<**String**> | | [optional] +**gateway** | Option<**String**> | | [optional] +**broadcast** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/Ipv6AddressMinimal.md b/scp_core/docs/Ipv6AddressMinimal.md new file mode 100644 index 0000000..70944cb --- /dev/null +++ b/scp_core/docs/Ipv6AddressMinimal.md @@ -0,0 +1,14 @@ +# Ipv6AddressMinimal + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i32**> | | [optional] +**network_prefix** | Option<**String**> | | [optional] +**network_prefix_length** | Option<**i32**> | | [optional] +**gateway** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/Iso.md b/scp_core/docs/Iso.md new file mode 100644 index 0000000..e6fc12b --- /dev/null +++ b/scp_core/docs/Iso.md @@ -0,0 +1,12 @@ +# Iso + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**iso_attached** | Option<**bool**> | | [optional] +**iso** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/IsoImage.md b/scp_core/docs/IsoImage.md new file mode 100644 index 0000000..445643c --- /dev/null +++ b/scp_core/docs/IsoImage.md @@ -0,0 +1,14 @@ +# IsoImage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i32**> | | [optional] +**name** | **String** | | +**description** | Option<**String**> | | [optional] +**architecture** | [**models::Architecture**](Architecture.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/Log.md b/scp_core/docs/Log.md new file mode 100644 index 0000000..7c69009 --- /dev/null +++ b/scp_core/docs/Log.md @@ -0,0 +1,15 @@ +# Log + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**r#type** | Option<[**models::LogType**](LogType.md)> | | [optional] +**executing_user** | Option<[**models::UserMinimal**](UserMinimal.md)> | | [optional] +**date** | Option<**String**> | | [optional] +**log_key** | Option<**String**> | | [optional] +**message** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/LogType.md b/scp_core/docs/LogType.md new file mode 100644 index 0000000..183c4dc --- /dev/null +++ b/scp_core/docs/LogType.md @@ -0,0 +1,14 @@ +# LogType + +## Enum Variants + +| Name | Value | +|---- | -----| +| Error | ERROR | +| Warning | WARNING | +| Info | INFO | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/Maintenance.md b/scp_core/docs/Maintenance.md new file mode 100644 index 0000000..41b5384 --- /dev/null +++ b/scp_core/docs/Maintenance.md @@ -0,0 +1,12 @@ +# Maintenance + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_at** | **String** | | +**finish_at** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/NetworkDriver.md b/scp_core/docs/NetworkDriver.md new file mode 100644 index 0000000..10ea236 --- /dev/null +++ b/scp_core/docs/NetworkDriver.md @@ -0,0 +1,16 @@ +# NetworkDriver + +## Enum Variants + +| Name | Value | +|---- | -----| +| Virtio | VIRTIO | +| E1000 | E1000 | +| E1000E | E1000E | +| Rtl8139 | RTL8139 | +| Vmxnet3 | VMXNET3 | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/NotFoundError.md b/scp_core/docs/NotFoundError.md new file mode 100644 index 0000000..b97d506 --- /dev/null +++ b/scp_core/docs/NotFoundError.md @@ -0,0 +1,12 @@ +# NotFoundError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | Option<**String**> | | [optional] +**message** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/OsOptimization.md b/scp_core/docs/OsOptimization.md new file mode 100644 index 0000000..15a1cdf --- /dev/null +++ b/scp_core/docs/OsOptimization.md @@ -0,0 +1,16 @@ +# OsOptimization + +## Enum Variants + +| Name | Value | +|---- | -----| +| Linux | LINUX | +| Windows | WINDOWS | +| Bsd | BSD | +| LinuxLegacy | LINUX_LEGACY | +| Unknown | UNKNOWN | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/RdnsIpv4.md b/scp_core/docs/RdnsIpv4.md new file mode 100644 index 0000000..8c7d996 --- /dev/null +++ b/scp_core/docs/RdnsIpv4.md @@ -0,0 +1,11 @@ +# RdnsIpv4 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rdns** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/RdnsIpv6.md b/scp_core/docs/RdnsIpv6.md new file mode 100644 index 0000000..384e132 --- /dev/null +++ b/scp_core/docs/RdnsIpv6.md @@ -0,0 +1,11 @@ +# RdnsIpv6 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rdns** | Option<**std::collections::HashMap**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/RescueSystemStatus.md b/scp_core/docs/RescueSystemStatus.md new file mode 100644 index 0000000..ddce41c --- /dev/null +++ b/scp_core/docs/RescueSystemStatus.md @@ -0,0 +1,12 @@ +# RescueSystemStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | Option<**bool**> | | [optional] +**password** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ResponseError.md b/scp_core/docs/ResponseError.md new file mode 100644 index 0000000..50247ad --- /dev/null +++ b/scp_core/docs/ResponseError.md @@ -0,0 +1,12 @@ +# ResponseError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | Option<**String**> | | [optional] +**message** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/RouteFailoverIp.md b/scp_core/docs/RouteFailoverIp.md new file mode 100644 index 0000000..03800ee --- /dev/null +++ b/scp_core/docs/RouteFailoverIp.md @@ -0,0 +1,11 @@ +# RouteFailoverIp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**server_id** | Option<**i32**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/S3CompletedPart.md b/scp_core/docs/S3CompletedPart.md new file mode 100644 index 0000000..63f10af --- /dev/null +++ b/scp_core/docs/S3CompletedPart.md @@ -0,0 +1,12 @@ +# S3CompletedPart + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**e_tag** | Option<**String**> | | [optional] +**part_number** | Option<**i32**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/S3DownloadInfos.md b/scp_core/docs/S3DownloadInfos.md new file mode 100644 index 0000000..5204d8b --- /dev/null +++ b/scp_core/docs/S3DownloadInfos.md @@ -0,0 +1,14 @@ +# S3DownloadInfos + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filename** | Option<**String**> | | [optional] +**presigned_url** | Option<**String**> | | [optional] +**presigned_url_validity_duration_in_hours** | Option<**i32**> | | [optional] +**headers** | Option<[**std::collections::HashMap>**](Vec.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/S3NoSuchUploadError.md b/scp_core/docs/S3NoSuchUploadError.md new file mode 100644 index 0000000..be2f53e --- /dev/null +++ b/scp_core/docs/S3NoSuchUploadError.md @@ -0,0 +1,12 @@ +# S3NoSuchUploadError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | Option<**String**> | | [optional] +**message** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/S3Object.md b/scp_core/docs/S3Object.md new file mode 100644 index 0000000..94407eb --- /dev/null +++ b/scp_core/docs/S3Object.md @@ -0,0 +1,13 @@ +# S3Object + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | Option<**String**> | | [optional] +**last_modified** | Option<**String**> | | [optional] +**size_in_b** | Option<**i64**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/S3SignPartUrl.md b/scp_core/docs/S3SignPartUrl.md new file mode 100644 index 0000000..dcaab67 --- /dev/null +++ b/scp_core/docs/S3SignPartUrl.md @@ -0,0 +1,11 @@ +# S3SignPartUrl + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/S3Upload.md b/scp_core/docs/S3Upload.md new file mode 100644 index 0000000..9d94eb4 --- /dev/null +++ b/scp_core/docs/S3Upload.md @@ -0,0 +1,12 @@ +# S3Upload + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**upload_id** | Option<**String**> | | [optional] +**presigned_url** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/Server.md b/scp_core/docs/Server.md new file mode 100644 index 0000000..2d197e4 --- /dev/null +++ b/scp_core/docs/Server.md @@ -0,0 +1,26 @@ +# Server + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i32**> | | [optional] +**name** | Option<**String**> | | [optional] +**hostname** | Option<**String**> | | [optional] +**nickname** | Option<**String**> | | [optional] +**disabled** | Option<**bool**> | | [optional] +**template** | Option<[**models::ServerTemplateMinimal**](ServerTemplateMinimal.md)> | | [optional] +**server_live_info** | Option<[**models::ServerInfo**](ServerInfo.md)> | | [optional] +**ipv4_addresses** | Option<[**Vec**](IPv4AddressMinimal.md)> | | [optional] +**ipv6_addresses** | Option<[**Vec**](IPv6AddressMinimal.md)> | | [optional] +**site** | Option<[**models::Site**](Site.md)> | | [optional] +**snapshot_count** | Option<**i32**> | | [optional] +**max_cpu_count** | Option<**i32**> | | [optional] +**disks_available_space_in_mi_b** | Option<**i64**> | | [optional] +**rescue_system_active** | Option<**bool**> | | [optional] +**snapshot_allowed** | Option<**bool**> | | [optional] +**architecture** | Option<[**models::Architecture**](Architecture.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerAttachIso.md b/scp_core/docs/ServerAttachIso.md new file mode 100644 index 0000000..0ecff1a --- /dev/null +++ b/scp_core/docs/ServerAttachIso.md @@ -0,0 +1,13 @@ +# ServerAttachIso + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**iso_id** | Option<**i32**> | | [optional] +**user_iso_name** | Option<**String**> | | [optional] +**change_boot_device_to_cdrom** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerAutostartPatch.md b/scp_core/docs/ServerAutostartPatch.md new file mode 100644 index 0000000..c65b000 --- /dev/null +++ b/scp_core/docs/ServerAutostartPatch.md @@ -0,0 +1,11 @@ +# ServerAutostartPatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**autostart** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerBootorderPatch.md b/scp_core/docs/ServerBootorderPatch.md new file mode 100644 index 0000000..52763d2 --- /dev/null +++ b/scp_core/docs/ServerBootorderPatch.md @@ -0,0 +1,11 @@ +# ServerBootorderPatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bootorder** | [**Vec**](Bootorder.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerCpuTopologyPatch.md b/scp_core/docs/ServerCpuTopologyPatch.md new file mode 100644 index 0000000..e7d4bbf --- /dev/null +++ b/scp_core/docs/ServerCpuTopologyPatch.md @@ -0,0 +1,11 @@ +# ServerCpuTopologyPatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cpu_topology** | Option<[**models::CpuTopology**](CpuTopology.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerCreateNicVlan.md b/scp_core/docs/ServerCreateNicVlan.md new file mode 100644 index 0000000..0c9cd34 --- /dev/null +++ b/scp_core/docs/ServerCreateNicVlan.md @@ -0,0 +1,12 @@ +# ServerCreateNicVlan + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vlan_id** | **i32** | | +**network_driver** | [**models::NetworkDriver**](NetworkDriver.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerDisk.md b/scp_core/docs/ServerDisk.md new file mode 100644 index 0000000..7f37069 --- /dev/null +++ b/scp_core/docs/ServerDisk.md @@ -0,0 +1,14 @@ +# ServerDisk + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dev** | Option<**String**> | | [optional] +**driver** | Option<**String**> | | [optional] +**capacity_in_mi_b** | Option<**i64**> | | [optional] +**allocation_in_mi_b** | Option<**i64**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerFirewall.md b/scp_core/docs/ServerFirewall.md new file mode 100644 index 0000000..c524db1 --- /dev/null +++ b/scp_core/docs/ServerFirewall.md @@ -0,0 +1,15 @@ +# ServerFirewall + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**copied_policies** | Option<[**Vec**](FirewallPolicy.md)> | | [optional] +**user_policies** | Option<[**Vec**](FirewallPolicy.md)> | | [optional] +**ingress_implicit_rule** | Option<[**models::ImplicitRule**](ImplicitRule.md)> | | [optional] +**egress_implicit_rule** | Option<[**models::ImplicitRule**](ImplicitRule.md)> | | [optional] +**consistent** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerFirewallSave.md b/scp_core/docs/ServerFirewallSave.md new file mode 100644 index 0000000..4925fe5 --- /dev/null +++ b/scp_core/docs/ServerFirewallSave.md @@ -0,0 +1,12 @@ +# ServerFirewallSave + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**copied_policies** | [**Vec**](IdentifierInt.md) | | +**user_policies** | [**Vec**](IdentifierInt.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerHostnamePatch.md b/scp_core/docs/ServerHostnamePatch.md new file mode 100644 index 0000000..5be8276 --- /dev/null +++ b/scp_core/docs/ServerHostnamePatch.md @@ -0,0 +1,11 @@ +# ServerHostnamePatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hostname** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerImageSetup.md b/scp_core/docs/ServerImageSetup.md new file mode 100644 index 0000000..ed471f0 --- /dev/null +++ b/scp_core/docs/ServerImageSetup.md @@ -0,0 +1,22 @@ +# ServerImageSetup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image_flavour_id** | Option<**i32**> | | [optional] +**disk_name** | Option<**String**> | | [optional] +**root_partition_full_disk_size** | Option<**bool**> | | [optional] +**hostname** | Option<**String**> | | [optional] +**locale** | Option<**String**> | | [optional] +**timezone** | Option<**String**> | | [optional] +**additional_user_username** | Option<**String**> | | [optional] +**additional_user_password** | Option<**String**> | | [optional] +**ssh_key_ids** | Option<**Vec**> | | [optional] +**ssh_password_authentication** | Option<**bool**> | | [optional] +**custom_script** | Option<**String**> | | [optional] +**email_to_executing_user** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerInfo.md b/scp_core/docs/ServerInfo.md new file mode 100644 index 0000000..751c6b1 --- /dev/null +++ b/scp_core/docs/ServerInfo.md @@ -0,0 +1,32 @@ +# ServerInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | Option<[**models::ServerState**](ServerState.md)> | | [optional] +**autostart** | Option<**bool**> | | [optional] +**uefi** | Option<**bool**> | | [optional] +**interfaces** | Option<[**Vec**](ServerInterface.md)> | | [optional] +**disks** | Option<[**Vec**](ServerDisk.md)> | | [optional] +**bootorder** | Option<[**Vec**](Bootorder.md)> | | [optional] +**required_storage_optimization** | Option<[**models::StorageOptimization**](StorageOptimization.md)> | | [optional] +**template** | Option<**String**> | | [optional] +**uptime_in_seconds** | Option<**i32**> | | [optional] +**current_server_memory_in_mi_b** | Option<**i64**> | | [optional] +**max_server_memory_in_mi_b** | Option<**i64**> | | [optional] +**cpu_count** | Option<**i32**> | | [optional] +**cpu_max_count** | Option<**i32**> | | [optional] +**sockets** | Option<**i32**> | | [optional] +**cores_per_socket** | Option<**i32**> | | [optional] +**latest_qemu** | Option<**bool**> | | [optional] +**config_changed** | Option<**bool**> | | [optional] +**os_optimization** | Option<[**models::OsOptimization**](OsOptimization.md)> | | [optional] +**nested_guest** | Option<**bool**> | | [optional] +**machine_type** | Option<**String**> | | [optional] +**keyboard_layout** | Option<**String**> | | [optional] +**cloudinit_attached** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerInterface.md b/scp_core/docs/ServerInterface.md new file mode 100644 index 0000000..230c960 --- /dev/null +++ b/scp_core/docs/ServerInterface.md @@ -0,0 +1,22 @@ +# ServerInterface + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mac** | Option<**String**> | | [optional] +**driver** | Option<**String**> | | [optional] +**mtu** | Option<**i32**> | | [optional] +**speed_in_m_bits** | Option<**i32**> | | [optional] +**rx_monthly_in_mi_b** | Option<**i32**> | | [optional] +**tx_monthly_in_mi_b** | Option<**i32**> | | [optional] +**ipv4_addresses** | Option<**Vec**> | | [optional] +**ipv6_link_local_addresses** | Option<**Vec**> | | [optional] +**ipv6_network_prefixes** | Option<**Vec**> | | [optional] +**traffic_throttled** | Option<**bool**> | | [optional] +**vlan_interface** | Option<**bool**> | | [optional] +**vlan_id** | Option<**i32**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerInterfaceUpdate.md b/scp_core/docs/ServerInterfaceUpdate.md new file mode 100644 index 0000000..62d0477 --- /dev/null +++ b/scp_core/docs/ServerInterfaceUpdate.md @@ -0,0 +1,11 @@ +# ServerInterfaceUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**driver** | Option<[**models::NetworkDriver**](NetworkDriver.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerIpType.md b/scp_core/docs/ServerIpType.md new file mode 100644 index 0000000..29dced2 --- /dev/null +++ b/scp_core/docs/ServerIpType.md @@ -0,0 +1,13 @@ +# ServerIpType + +## Enum Variants + +| Name | Value | +|---- | -----| +| Ip | IP | +| RoutedIp | ROUTED_IP | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerIpv4.md b/scp_core/docs/ServerIpv4.md new file mode 100644 index 0000000..ac7387e --- /dev/null +++ b/scp_core/docs/ServerIpv4.md @@ -0,0 +1,19 @@ +# ServerIpv4 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i32**> | | [optional] +**interface_mac** | Option<**String**> | | [optional] +**r#type** | Option<[**models::ServerIpType**](ServerIpType.md)> | | [optional] +**ip** | Option<**String**> | | [optional] +**cidr** | Option<**String**> | | [optional] +**gateway** | Option<**String**> | | [optional] +**rdns** | Option<**String**> | | [optional] +**destination_ip** | Option<**String**> | | [optional] +**editable** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerIpv6.md b/scp_core/docs/ServerIpv6.md new file mode 100644 index 0000000..a411e0b --- /dev/null +++ b/scp_core/docs/ServerIpv6.md @@ -0,0 +1,20 @@ +# ServerIpv6 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i32**> | | [optional] +**interface_mac** | Option<**String**> | | [optional] +**r#type** | Option<[**models::ServerIpType**](ServerIpType.md)> | | [optional] +**network_prefix** | Option<**String**> | | [optional] +**cidr** | Option<**String**> | | [optional] +**gateway** | Option<**String**> | | [optional] +**link_local** | Option<**bool**> | | [optional] +**rdns** | Option<**std::collections::HashMap**> | | [optional] +**destination_ip** | Option<**String**> | | [optional] +**editable** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerKeyboardLayoutPatch.md b/scp_core/docs/ServerKeyboardLayoutPatch.md new file mode 100644 index 0000000..bab58cc --- /dev/null +++ b/scp_core/docs/ServerKeyboardLayoutPatch.md @@ -0,0 +1,11 @@ +# ServerKeyboardLayoutPatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**keyboard_layout** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerListMinimal.md b/scp_core/docs/ServerListMinimal.md new file mode 100644 index 0000000..f345708 --- /dev/null +++ b/scp_core/docs/ServerListMinimal.md @@ -0,0 +1,16 @@ +# ServerListMinimal + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i32**> | | [optional] +**name** | Option<**String**> | | [optional] +**hostname** | Option<**String**> | | [optional] +**nickname** | Option<**String**> | | [optional] +**disabled** | Option<**bool**> | | [optional] +**template** | Option<[**models::ServerTemplateMinimal**](ServerTemplateMinimal.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerMinimal.md b/scp_core/docs/ServerMinimal.md new file mode 100644 index 0000000..4aaa95c --- /dev/null +++ b/scp_core/docs/ServerMinimal.md @@ -0,0 +1,12 @@ +# ServerMinimal + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i32**> | | [optional] +**name** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerNicknamePatch.md b/scp_core/docs/ServerNicknamePatch.md new file mode 100644 index 0000000..490f642 --- /dev/null +++ b/scp_core/docs/ServerNicknamePatch.md @@ -0,0 +1,11 @@ +# ServerNicknamePatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**nickname** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerOsOptimizationPatch.md b/scp_core/docs/ServerOsOptimizationPatch.md new file mode 100644 index 0000000..0b62eb0 --- /dev/null +++ b/scp_core/docs/ServerOsOptimizationPatch.md @@ -0,0 +1,11 @@ +# ServerOsOptimizationPatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**os_optimization** | Option<[**models::OsOptimization**](OsOptimization.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerSetRootPasswordPatch.md b/scp_core/docs/ServerSetRootPasswordPatch.md new file mode 100644 index 0000000..a246f61 --- /dev/null +++ b/scp_core/docs/ServerSetRootPasswordPatch.md @@ -0,0 +1,11 @@ +# ServerSetRootPasswordPatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**root_password** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerSnapshotCreate.md b/scp_core/docs/ServerSnapshotCreate.md new file mode 100644 index 0000000..a44cd14 --- /dev/null +++ b/scp_core/docs/ServerSnapshotCreate.md @@ -0,0 +1,14 @@ +# ServerSnapshotCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | +**description** | Option<**String**> | | [optional] +**disk_name** | Option<**String**> | | [optional] +**online_snapshot** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerSnapshotCreateCheck.md b/scp_core/docs/ServerSnapshotCreateCheck.md new file mode 100644 index 0000000..e2113ea --- /dev/null +++ b/scp_core/docs/ServerSnapshotCreateCheck.md @@ -0,0 +1,12 @@ +# ServerSnapshotCreateCheck + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**disk_name** | Option<**String**> | Must be set if attribute onlineSnapshot is false. | [optional] +**online_snapshot** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerState.md b/scp_core/docs/ServerState.md new file mode 100644 index 0000000..608f6c5 --- /dev/null +++ b/scp_core/docs/ServerState.md @@ -0,0 +1,20 @@ +# ServerState + +## Enum Variants + +| Name | Value | +|---- | -----| +| Nostate | NOSTATE | +| Running | RUNNING | +| Blocked | BLOCKED | +| Paused | PAUSED | +| Shutdown | SHUTDOWN | +| Shutoff | SHUTOFF | +| Crashed | CRASHED | +| Pmsuspended | PMSUSPENDED | +| DiskSnapshot | DISK_SNAPSHOT | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerState1.md b/scp_core/docs/ServerState1.md new file mode 100644 index 0000000..13331d8 --- /dev/null +++ b/scp_core/docs/ServerState1.md @@ -0,0 +1,14 @@ +# ServerState1 + +## Enum Variants + +| Name | Value | +|---- | -----| +| On | ON | +| Off | OFF | +| Suspended | SUSPENDED | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerStatePatch.md b/scp_core/docs/ServerStatePatch.md new file mode 100644 index 0000000..20e48b0 --- /dev/null +++ b/scp_core/docs/ServerStatePatch.md @@ -0,0 +1,11 @@ +# ServerStatePatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | Option<[**models::ServerState1**](ServerState1.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerTemplateMinimal.md b/scp_core/docs/ServerTemplateMinimal.md new file mode 100644 index 0000000..18c2d08 --- /dev/null +++ b/scp_core/docs/ServerTemplateMinimal.md @@ -0,0 +1,12 @@ +# ServerTemplateMinimal + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i32**> | | [optional] +**name** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerUefiPatch.md b/scp_core/docs/ServerUefiPatch.md new file mode 100644 index 0000000..efa9e77 --- /dev/null +++ b/scp_core/docs/ServerUefiPatch.md @@ -0,0 +1,11 @@ +# ServerUefiPatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uefi** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ServerUserImageSetup.md b/scp_core/docs/ServerUserImageSetup.md new file mode 100644 index 0000000..1639b40 --- /dev/null +++ b/scp_core/docs/ServerUserImageSetup.md @@ -0,0 +1,13 @@ +# ServerUserImageSetup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_image_name** | **String** | | +**disk_name** | Option<**String**> | | [optional] +**email_notification** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/SetRdnsIpv4.md b/scp_core/docs/SetRdnsIpv4.md new file mode 100644 index 0000000..627f53f --- /dev/null +++ b/scp_core/docs/SetRdnsIpv4.md @@ -0,0 +1,12 @@ +# SetRdnsIpv4 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip** | **String** | | +**rdns** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/SetRdnsIpv6.md b/scp_core/docs/SetRdnsIpv6.md new file mode 100644 index 0000000..b64b35d --- /dev/null +++ b/scp_core/docs/SetRdnsIpv6.md @@ -0,0 +1,12 @@ +# SetRdnsIpv6 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip** | **String** | | +**rdns** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/Site.md b/scp_core/docs/Site.md new file mode 100644 index 0000000..74f5e73 --- /dev/null +++ b/scp_core/docs/Site.md @@ -0,0 +1,12 @@ +# Site + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i32**> | | [optional] +**city** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/Snapshot.md b/scp_core/docs/Snapshot.md new file mode 100644 index 0000000..3e6f2fd --- /dev/null +++ b/scp_core/docs/Snapshot.md @@ -0,0 +1,20 @@ +# Snapshot + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | Option<**String**> | | [optional] +**name** | Option<**String**> | | [optional] +**description** | Option<**String**> | | [optional] +**disks** | Option<**Vec**> | | [optional] +**creation_time** | Option<**String**> | | [optional] +**state** | Option<[**models::ServerState**](ServerState.md)> | | [optional] +**online** | Option<**bool**> | | [optional] +**exported** | Option<**bool**> | | [optional] +**exported_size_in_ki_b** | Option<**i64**> | | [optional] +**download_infos** | Option<[**models::S3DownloadInfos**](S3DownloadInfos.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/SnapshotMinimal.md b/scp_core/docs/SnapshotMinimal.md new file mode 100644 index 0000000..f11af47 --- /dev/null +++ b/scp_core/docs/SnapshotMinimal.md @@ -0,0 +1,19 @@ +# SnapshotMinimal + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | Option<**String**> | | [optional] +**name** | Option<**String**> | | [optional] +**description** | Option<**String**> | | [optional] +**disks** | Option<**Vec**> | | [optional] +**creation_time** | Option<**String**> | | [optional] +**state** | Option<[**models::ServerState**](ServerState.md)> | | [optional] +**online** | Option<**bool**> | | [optional] +**exported** | Option<**bool**> | | [optional] +**exported_size_in_ki_b** | Option<**i64**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/SshKey.md b/scp_core/docs/SshKey.md new file mode 100644 index 0000000..1f7a219 --- /dev/null +++ b/scp_core/docs/SshKey.md @@ -0,0 +1,14 @@ +# SshKey + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i32**> | | [optional] +**name** | **String** | | +**key** | **String** | | +**created_at** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/StorageDriver.md b/scp_core/docs/StorageDriver.md new file mode 100644 index 0000000..e282c39 --- /dev/null +++ b/scp_core/docs/StorageDriver.md @@ -0,0 +1,15 @@ +# StorageDriver + +## Enum Variants + +| Name | Value | +|---- | -----| +| Virtio | VIRTIO | +| VirtioScsi | VIRTIO_SCSI | +| Ide | IDE | +| Sata | SATA | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/StorageOptimization.md b/scp_core/docs/StorageOptimization.md new file mode 100644 index 0000000..71412db --- /dev/null +++ b/scp_core/docs/StorageOptimization.md @@ -0,0 +1,16 @@ +# StorageOptimization + +## Enum Variants + +| Name | Value | +|---- | -----| +| Inconsistent | INCONSISTENT | +| Compat | COMPAT | +| Slow | SLOW | +| Fast | FAST | +| No | NO | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/TaskInfo.md b/scp_core/docs/TaskInfo.md new file mode 100644 index 0000000..b6a1985 --- /dev/null +++ b/scp_core/docs/TaskInfo.md @@ -0,0 +1,22 @@ +# TaskInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | Option<**String**> | | [optional] +**name** | Option<**String**> | | [optional] +**state** | Option<[**models::TaskState**](TaskState.md)> | | [optional] +**started_at** | Option<**String**> | | [optional] +**finished_at** | Option<**String**> | | [optional] +**executing_user** | Option<[**models::UserMinimal**](UserMinimal.md)> | | [optional] +**task_progress** | Option<[**models::TaskProgress**](TaskProgress.md)> | | [optional] +**message** | Option<**String**> | | [optional] +**on_rollback** | Option<**bool**> | | [optional] +**steps** | Option<[**Vec**](TaskInfoStep.md)> | | [optional] +**result** | Option<[**serde_json::Value**](.md)> | | [optional] +**response_error** | Option<[**models::ResponseError**](ResponseError.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/TaskInfoMinimal.md b/scp_core/docs/TaskInfoMinimal.md new file mode 100644 index 0000000..1445553 --- /dev/null +++ b/scp_core/docs/TaskInfoMinimal.md @@ -0,0 +1,19 @@ +# TaskInfoMinimal + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | Option<**String**> | | [optional] +**name** | Option<**String**> | | [optional] +**state** | Option<[**models::TaskState**](TaskState.md)> | | [optional] +**started_at** | Option<**String**> | | [optional] +**finished_at** | Option<**String**> | | [optional] +**executing_user** | Option<[**models::UserMinimal**](UserMinimal.md)> | | [optional] +**task_progress** | Option<[**models::TaskProgress**](TaskProgress.md)> | | [optional] +**message** | Option<**String**> | | [optional] +**on_rollback** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/TaskInfoStep.md b/scp_core/docs/TaskInfoStep.md new file mode 100644 index 0000000..88b62d3 --- /dev/null +++ b/scp_core/docs/TaskInfoStep.md @@ -0,0 +1,15 @@ +# TaskInfoStep + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | Option<**String**> | | [optional] +**name** | Option<**String**> | | [optional] +**state** | Option<[**models::TaskState**](TaskState.md)> | | [optional] +**started_at** | Option<**String**> | | [optional] +**finished_at** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/TaskProgress.md b/scp_core/docs/TaskProgress.md new file mode 100644 index 0000000..0a69c02 --- /dev/null +++ b/scp_core/docs/TaskProgress.md @@ -0,0 +1,12 @@ +# TaskProgress + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**expected_finished_at** | Option<**String**> | | [optional] +**progress_in_percent** | Option<**f32**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/TaskState.md b/scp_core/docs/TaskState.md new file mode 100644 index 0000000..11fc210 --- /dev/null +++ b/scp_core/docs/TaskState.md @@ -0,0 +1,18 @@ +# TaskState + +## Enum Variants + +| Name | Value | +|---- | -----| +| Pending | PENDING | +| Running | RUNNING | +| Finished | FINISHED | +| Error | ERROR | +| WaitingForCancel | WAITING_FOR_CANCEL | +| Canceled | CANCELED | +| Rollback | ROLLBACK | + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/User.md b/scp_core/docs/User.md new file mode 100644 index 0000000..32b40d7 --- /dev/null +++ b/scp_core/docs/User.md @@ -0,0 +1,23 @@ +# User + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i32**> | | [optional] +**username** | Option<**String**> | | [optional] +**firstname** | Option<**String**> | | [optional] +**lastname** | Option<**String**> | | [optional] +**email** | Option<**String**> | | [optional] +**company** | Option<**String**> | | [optional] +**language** | Option<**String**> | | [optional] +**time_zone** | Option<**String**> | | [optional] +**show_nickname** | Option<**bool**> | | [optional] +**passwordless_mode** | Option<**bool**> | | [optional] +**secure_mode** | Option<**bool**> | | [optional] +**secure_mode_app_access** | Option<**bool**> | | [optional] +**api_ip_login_restrictions** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/UserMinimal.md b/scp_core/docs/UserMinimal.md new file mode 100644 index 0000000..07dc94d --- /dev/null +++ b/scp_core/docs/UserMinimal.md @@ -0,0 +1,16 @@ +# UserMinimal + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i32**> | | [optional] +**username** | Option<**String**> | | [optional] +**firstname** | Option<**String**> | | [optional] +**lastname** | Option<**String**> | | [optional] +**email** | Option<**String**> | | [optional] +**company** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/UserSave.md b/scp_core/docs/UserSave.md new file mode 100644 index 0000000..38e5ac6 --- /dev/null +++ b/scp_core/docs/UserSave.md @@ -0,0 +1,21 @@ +# UserSave + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i32**> | | [optional] +**language** | **String** | | +**time_zone** | **String** | | +**api_ip_login_restrictions** | Option<**String**> | | [optional] +**password** | Option<**String**> | | [optional] +**old_password** | Option<**String**> | | [optional] +**soap_webservice_password** | Option<**String**> | | [optional] +**show_nickname** | Option<**bool**> | | [optional] +**passwordless_mode** | Option<**bool**> | | [optional] +**secure_mode** | Option<**bool**> | | [optional] +**secure_mode_app_access** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/VLan.md b/scp_core/docs/VLan.md new file mode 100644 index 0000000..5b962df --- /dev/null +++ b/scp_core/docs/VLan.md @@ -0,0 +1,15 @@ +# VLan + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vlan_id** | Option<**i32**> | | [optional] +**name** | Option<**String**> | | [optional] +**user** | Option<[**models::UserMinimal**](UserMinimal.md)> | | [optional] +**site** | Option<[**models::Site**](Site.md)> | | [optional] +**bandwidth_class** | Option<[**models::BandwidthClass**](BandwidthClass.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/VLanSave.md b/scp_core/docs/VLanSave.md new file mode 100644 index 0000000..93cfaa5 --- /dev/null +++ b/scp_core/docs/VLanSave.md @@ -0,0 +1,11 @@ +# VLanSave + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/docs/ValidationError.md b/scp_core/docs/ValidationError.md new file mode 100644 index 0000000..8d76243 --- /dev/null +++ b/scp_core/docs/ValidationError.md @@ -0,0 +1,13 @@ +# ValidationError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | Option<**String**> | | [optional] +**message** | Option<**String**> | | [optional] +**errors** | Option<[**Vec**](FieldError.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/scp_core/git_push.sh b/scp_core/git_push.sh new file mode 100644 index 0000000..f53a75d --- /dev/null +++ b/scp_core/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/scp_core/src/apis/configuration.rs b/scp_core/src/apis/configuration.rs new file mode 100644 index 0000000..e2380bc --- /dev/null +++ b/scp_core/src/apis/configuration.rs @@ -0,0 +1,51 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + + + +#[derive(Debug, Clone)] +pub struct Configuration { + pub base_path: String, + pub user_agent: Option, + pub client: reqwest::Client, + pub basic_auth: Option, + pub oauth_access_token: Option, + pub bearer_access_token: Option, + pub api_key: Option, +} + +pub type BasicAuth = (String, Option); + +#[derive(Debug, Clone)] +pub struct ApiKey { + pub prefix: Option, + pub key: String, +} + + +impl Configuration { + pub fn new() -> Configuration { + Configuration::default() + } +} + +impl Default for Configuration { + fn default() -> Self { + Configuration { + base_path: "https://www.servercontrolpanel.de/scp-core".to_owned(), + user_agent: Some("OpenAPI-Generator/2025.1218.164029/rust".to_owned()), + client: reqwest::Client::new(), + basic_auth: None, + oauth_access_token: None, + bearer_access_token: None, + api_key: None, + } + } +} diff --git a/scp_core/src/apis/default_api.rs b/scp_core/src/apis/default_api.rs new file mode 100644 index 0000000..9c170ef --- /dev/null +++ b/scp_core/src/apis/default_api.rs @@ -0,0 +1,3841 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + + +/// struct for typed errors of method [`api_ping_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiPingGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_maintenance_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1MaintenanceGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_openapi_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1OpenapiGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_rdns_ipv4_ip_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1RdnsIpv4IpDeleteError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_rdns_ipv4_ip_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1RdnsIpv4IpGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_rdns_ipv4_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1RdnsIpv4PostError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_rdns_ipv6_ip_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1RdnsIpv6IpDeleteError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_rdns_ipv6_ip_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1RdnsIpv6IpGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_rdns_ipv6_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1RdnsIpv6PostError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_disks_disk_name_format_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdDisksDiskNameFormatPostError { + Status400(models::ResponseError), + Status404(models::ResponseError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_disks_disk_name_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdDisksDiskNameGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_disks_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdDisksGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_disks_patch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdDisksPatchError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_disks_supported_drivers_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdDisksSupportedDriversGetError { + Status404(models::ResponseError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdGetError { + Status404(models::NotFoundError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_guest_agent_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdGuestAgentGetError { + Status404(models::NotFoundError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_image_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdImagePostError { + Status422(models::ValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_imageflavours_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdImageflavoursGetError { + Status404(models::NotFoundError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_interfaces_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdInterfacesGetError { + Status404(models::NotFoundError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_interfaces_mac_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdInterfacesMacDeleteError { + Status422(models::ValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_interfaces_mac_firewall_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdInterfacesMacFirewallGetError { + Status404(models::ValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_interfaces_mac_firewall_put`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdInterfacesMacFirewallPutError { + Status404(models::ValidationError), + Status422(models::ValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_interfaces_mac_firewall_reapply_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdInterfacesMacFirewallReapplyPostError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_interfaces_mac_firewall_restore_copied_policies_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdInterfacesMacFirewallRestoreCopiedPoliciesPostError { + Status404(models::ValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_interfaces_mac_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdInterfacesMacGetError { + Status404(models::NotFoundError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_interfaces_mac_put`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdInterfacesMacPutError { + Status404(models::NotFoundError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_interfaces_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdInterfacesPostError { + Status400(models::ValidationError), + Status422(models::ValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_iso_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdIsoDeleteError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_iso_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdIsoGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_iso_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdIsoPostError { + Status422(models::ValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_isoimages_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdIsoimagesGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_logs_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdLogsGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_metrics_cpu_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdMetricsCpuGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_metrics_disk_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdMetricsDiskGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_metrics_network_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdMetricsNetworkGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_metrics_network_packet_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdMetricsNetworkPacketGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_patch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdPatchError { + Status503(models::ResponseError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_rescuesystem_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdRescuesystemDeleteError { + Status400(models::ResponseError), + Status404(models::NotFoundError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_rescuesystem_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdRescuesystemGetError { + Status404(models::NotFoundError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_rescuesystem_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdRescuesystemPostError { + Status400(models::ResponseError), + Status404(models::NotFoundError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_snapshots_dryrun_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdSnapshotsDryrunPostError { + Status400(Vec), + Status404(models::NotFoundError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_snapshots_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdSnapshotsGetError { + Status404(models::NotFoundError), + Status503(models::ResponseError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_snapshots_name_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdSnapshotsNameDeleteError { + Status404(models::NotFoundError), + Status503(models::ResponseError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_snapshots_name_export_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdSnapshotsNameExportPostError { + Status400(models::ResponseError), + Status404(models::NotFoundError), + Status503(models::ResponseError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_snapshots_name_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdSnapshotsNameGetError { + Status404(models::NotFoundError), + Status503(models::ResponseError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_snapshots_name_revert_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdSnapshotsNameRevertPostError { + Status404(models::NotFoundError), + Status503(models::ResponseError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_snapshots_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdSnapshotsPostError { + Status400(models::ResponseError), + Status404(models::NotFoundError), + Status503(models::ResponseError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_storageoptimization_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdStorageoptimizationPostError { + Status503(models::ResponseError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_servers_server_id_user_image_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdUserImagePostError { + Status422(models::ValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_tasks_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1TasksGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_tasks_uuid_cancel_put`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1TasksUuidCancelPutError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_tasks_uuid_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1TasksUuidGetError { + Status404(models::NotFoundError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_failoverips_v4_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdFailoveripsV4GetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_failoverips_v4_id_patch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdFailoveripsV4IdPatchError { + Status400(models::ResponseError), + Status404(models::ResponseError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_failoverips_v6_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdFailoveripsV6GetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_failoverips_v6_id_patch`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdFailoveripsV6IdPatchError { + Status400(models::ResponseError), + Status404(models::ResponseError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_firewall_policies_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdFirewallPoliciesGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_firewall_policies_id_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdFirewallPoliciesIdDeleteError { + Status404(models::ValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_firewall_policies_id_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdFirewallPoliciesIdGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_firewall_policies_id_put`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdFirewallPoliciesIdPutError { + Status400(models::ResponseError), + Status422(models::ValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_firewall_policies_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdFirewallPoliciesPostError { + Status400(models::ResponseError), + Status422(models::ValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdGetError { + Status404(models::NotFoundError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_images_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdImagesGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_images_key_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdImagesKeyDeleteError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_images_key_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdImagesKeyGetError { + Status404(models::ResponseError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_images_key_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdImagesKeyPostError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_images_key_upload_id_parts_part_number_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdImagesKeyUploadIdPartsPartNumberGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_images_key_upload_id_put`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdImagesKeyUploadIdPutError { + Status404(models::S3NoSuchUploadError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_isos_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdIsosGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_isos_key_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdIsosKeyDeleteError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_isos_key_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdIsosKeyGetError { + Status404(models::ResponseError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_isos_key_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdIsosKeyPostError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_isos_key_upload_id_parts_part_number_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdIsosKeyUploadIdPartsPartNumberGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_isos_key_upload_id_put`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdIsosKeyUploadIdPutError { + Status404(models::S3NoSuchUploadError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_logs_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdLogsGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_put`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdPutError { + Status404(models::NotFoundError), + Status422(models::ValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_ssh_keys_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdSshKeysGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_ssh_keys_id_delete`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdSshKeysIdDeleteError { + Status403(models::ResponseError), + Status404(models::ValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_ssh_keys_post`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdSshKeysPostError { + Status422(models::ValidationError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_vlans_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdVlansGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_vlans_vlan_id_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdVlansVlanIdGetError { + Status404(models::NotFoundError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_users_user_id_vlans_vlan_id_put`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1UsersUserIdVlansVlanIdPutError { + Status400(models::ResponseError), + Status404(models::NotFoundError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`api_v1_vlans_vlan_id_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1VlansVlanIdGetError { + Status404(models::NotFoundError), + UnknownValue(serde_json::Value), +} + + +pub async fn api_ping_get(configuration: &configuration::Configuration, ) -> Result<(), Error> { + + let uri_str = format!("{}/api/ping", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_maintenance_get(configuration: &configuration::Configuration, ) -> Result, Error> { + + let uri_str = format!("{}/api/v1/maintenance", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Maintenance>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Maintenance>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_openapi_get(configuration: &configuration::Configuration, ) -> Result> { + + let uri_str = format!("{}/api/v1/openapi", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_rdns_ipv4_ip_delete(configuration: &configuration::Configuration, ip: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_ip = ip; + + let uri_str = format!("{}/api/v1/rdns/ipv4/{ip}", configuration.base_path, ip=crate::apis::urlencode(p_path_ip)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_rdns_ipv4_ip_get(configuration: &configuration::Configuration, ip: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_ip = ip; + + let uri_str = format!("{}/api/v1/rdns/ipv4/{ip}", configuration.base_path, ip=crate::apis::urlencode(p_path_ip)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RdnsIpv4`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RdnsIpv4`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_rdns_ipv4_post(configuration: &configuration::Configuration, set_rdns_ipv4: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_set_rdns_ipv4 = set_rdns_ipv4; + + let uri_str = format!("{}/api/v1/rdns/ipv4", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_set_rdns_ipv4); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_rdns_ipv6_ip_delete(configuration: &configuration::Configuration, ip: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_ip = ip; + + let uri_str = format!("{}/api/v1/rdns/ipv6/{ip}", configuration.base_path, ip=crate::apis::urlencode(p_path_ip)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_rdns_ipv6_ip_get(configuration: &configuration::Configuration, ip: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_ip = ip; + + let uri_str = format!("{}/api/v1/rdns/ipv6/{ip}", configuration.base_path, ip=crate::apis::urlencode(p_path_ip)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RdnsIpv6`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RdnsIpv6`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_rdns_ipv6_post(configuration: &configuration::Configuration, set_rdns_ipv6: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_body_set_rdns_ipv6 = set_rdns_ipv6; + + let uri_str = format!("{}/api/v1/rdns/ipv6", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_set_rdns_ipv6); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_get(configuration: &configuration::Configuration, ip: Option<&str>, limit: Option, name: Option<&str>, offset: Option, q: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_ip = ip; + let p_query_limit = limit; + let p_query_name = name; + let p_query_offset = offset; + let p_query_q = q; + + let uri_str = format!("{}/api/v1/servers", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_ip { + req_builder = req_builder.query(&[("ip", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_name { + req_builder = req_builder.query(&[("name", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_offset { + req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_q { + req_builder = req_builder.query(&[("q", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ServerListMinimal>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ServerListMinimal>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_disks_disk_name_format_post(configuration: &configuration::Configuration, disk_name: &str, server_id: i32) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_disk_name = disk_name; + let p_path_server_id = server_id; + + let uri_str = format!("{}/api/v1/servers/{serverId}/disks/{diskName}:format", configuration.base_path, diskName=crate::apis::urlencode(p_path_disk_name), serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_disks_disk_name_get(configuration: &configuration::Configuration, disk_name: &str, server_id: i32) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_disk_name = disk_name; + let p_path_server_id = server_id; + + let uri_str = format!("{}/api/v1/servers/{serverId}/disks/{diskName}", configuration.base_path, diskName=crate::apis::urlencode(p_path_disk_name), serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Disk`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Disk`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_disks_get(configuration: &configuration::Configuration, server_id: i32) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + + let uri_str = format!("{}/api/v1/servers/{serverId}/disks", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Disk>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Disk>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_disks_patch(configuration: &configuration::Configuration, server_id: i32, edit_disks_driver: models::EditDisksDriver) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_body_edit_disks_driver = edit_disks_driver; + + let uri_str = format!("{}/api/v1/servers/{serverId}/disks", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_edit_disks_driver); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_disks_supported_drivers_get(configuration: &configuration::Configuration, server_id: i32) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + + let uri_str = format!("{}/api/v1/servers/{serverId}/disks/supported-drivers", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::StorageDriver>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::StorageDriver>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_get(configuration: &configuration::Configuration, server_id: i32, load_server_live_info: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_query_load_server_live_info = load_server_live_info; + + let uri_str = format!("{}/api/v1/servers/{serverId}", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_load_server_live_info { + req_builder = req_builder.query(&[("loadServerLiveInfo", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Server`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Server`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_guest_agent_get(configuration: &configuration::Configuration, server_id: i32) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + + let uri_str = format!("{}/api/v1/servers/{serverId}/guest-agent", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GuestAgentData`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GuestAgentData`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_image_post(configuration: &configuration::Configuration, server_id: i32, server_image_setup: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_body_server_image_setup = server_image_setup; + + let uri_str = format!("{}/api/v1/servers/{serverId}/image", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_server_image_setup); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_imageflavours_get(configuration: &configuration::Configuration, server_id: i32) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + + let uri_str = format!("{}/api/v1/servers/{serverId}/imageflavours", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ImageFlavour>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ImageFlavour>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_interfaces_get(configuration: &configuration::Configuration, server_id: i32, load_rdns: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_query_load_rdns = load_rdns; + + let uri_str = format!("{}/api/v1/servers/{serverId}/interfaces", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_load_rdns { + req_builder = req_builder.query(&[("loadRdns", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Interface>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Interface>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_interfaces_mac_delete(configuration: &configuration::Configuration, mac: &str, server_id: i32) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_mac = mac; + let p_path_server_id = server_id; + + let uri_str = format!("{}/api/v1/servers/{serverId}/interfaces/{mac}", configuration.base_path, mac=crate::apis::urlencode(p_path_mac), serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_interfaces_mac_firewall_get(configuration: &configuration::Configuration, server_id: i32, mac: &str, consistency_check: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_path_mac = mac; + let p_query_consistency_check = consistency_check; + + let uri_str = format!("{}/api/v1/servers/{serverId}/interfaces/{mac}/firewall", configuration.base_path, serverId=p_path_server_id, mac=crate::apis::urlencode(p_path_mac)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_consistency_check { + req_builder = req_builder.query(&[("consistencyCheck", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ServerFirewall`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ServerFirewall`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_interfaces_mac_firewall_put(configuration: &configuration::Configuration, server_id: i32, mac: &str, server_firewall_save: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_path_mac = mac; + let p_body_server_firewall_save = server_firewall_save; + + let uri_str = format!("{}/api/v1/servers/{serverId}/interfaces/{mac}/firewall", configuration.base_path, serverId=p_path_server_id, mac=crate::apis::urlencode(p_path_mac)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_server_firewall_save); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_interfaces_mac_firewall_reapply_post(configuration: &configuration::Configuration, server_id: i32, mac: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_path_mac = mac; + + let uri_str = format!("{}/api/v1/servers/{serverId}/interfaces/{mac}/firewall:reapply", configuration.base_path, serverId=p_path_server_id, mac=crate::apis::urlencode(p_path_mac)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_interfaces_mac_firewall_restore_copied_policies_post(configuration: &configuration::Configuration, server_id: i32, mac: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_path_mac = mac; + + let uri_str = format!("{}/api/v1/servers/{serverId}/interfaces/{mac}/firewall:restore-copied-policies", configuration.base_path, serverId=p_path_server_id, mac=crate::apis::urlencode(p_path_mac)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_interfaces_mac_get(configuration: &configuration::Configuration, server_id: i32, mac: &str, load_rdns: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_path_mac = mac; + let p_query_load_rdns = load_rdns; + + let uri_str = format!("{}/api/v1/servers/{serverId}/interfaces/{mac}", configuration.base_path, serverId=p_path_server_id, mac=crate::apis::urlencode(p_path_mac)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_load_rdns { + req_builder = req_builder.query(&[("loadRdns", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Interface`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Interface`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_interfaces_mac_put(configuration: &configuration::Configuration, server_id: i32, mac: &str, server_interface_update: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_path_mac = mac; + let p_body_server_interface_update = server_interface_update; + + let uri_str = format!("{}/api/v1/servers/{serverId}/interfaces/{mac}", configuration.base_path, serverId=p_path_server_id, mac=crate::apis::urlencode(p_path_mac)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_server_interface_update); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_interfaces_post(configuration: &configuration::Configuration, server_id: i32, server_create_nic_vlan: models::ServerCreateNicVlan) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_body_server_create_nic_vlan = server_create_nic_vlan; + + let uri_str = format!("{}/api/v1/servers/{serverId}/interfaces", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_server_create_nic_vlan); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_iso_delete(configuration: &configuration::Configuration, server_id: i32) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + + let uri_str = format!("{}/api/v1/servers/{serverId}/iso", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_iso_get(configuration: &configuration::Configuration, server_id: i32) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + + let uri_str = format!("{}/api/v1/servers/{serverId}/iso", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Iso`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Iso`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_iso_post(configuration: &configuration::Configuration, server_id: i32, server_attach_iso: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_body_server_attach_iso = server_attach_iso; + + let uri_str = format!("{}/api/v1/servers/{serverId}/iso", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_server_attach_iso); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_isoimages_get(configuration: &configuration::Configuration, server_id: i32) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + + let uri_str = format!("{}/api/v1/servers/{serverId}/isoimages", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::IsoImage>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::IsoImage>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_logs_get(configuration: &configuration::Configuration, server_id: i32, limit: Option, offset: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_query_limit = limit; + let p_query_offset = offset; + + let uri_str = format!("{}/api/v1/servers/{serverId}/logs", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_offset { + req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Log>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Log>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_metrics_cpu_get(configuration: &configuration::Configuration, server_id: i32, hours: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_query_hours = hours; + + let uri_str = format!("{}/api/v1/servers/{serverId}/metrics/cpu", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_hours { + req_builder = req_builder.query(&[("hours", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_metrics_disk_get(configuration: &configuration::Configuration, server_id: i32, hours: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_query_hours = hours; + + let uri_str = format!("{}/api/v1/servers/{serverId}/metrics/disk", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_hours { + req_builder = req_builder.query(&[("hours", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_metrics_network_get(configuration: &configuration::Configuration, server_id: i32, hours: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_query_hours = hours; + + let uri_str = format!("{}/api/v1/servers/{serverId}/metrics/network", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_hours { + req_builder = req_builder.query(&[("hours", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_metrics_network_packet_get(configuration: &configuration::Configuration, server_id: i32, hours: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_query_hours = hours; + + let uri_str = format!("{}/api/v1/servers/{serverId}/metrics/network/packet", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_hours { + req_builder = req_builder.query(&[("hours", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// Only one attribute at a time. +pub async fn api_v1_servers_server_id_patch(configuration: &configuration::Configuration, server_id: i32, api_v1_servers_server_id_patch_request: models::ApiV1ServersServerIdPatchRequest, state_option: Option<&str>) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_body_api_v1_servers_server_id_patch_request = api_v1_servers_server_id_patch_request; + let p_query_state_option = state_option; + + let uri_str = format!("{}/api/v1/servers/{serverId}", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref param_value) = p_query_state_option { + req_builder = req_builder.query(&[("stateOption", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_api_v1_servers_server_id_patch_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_rescuesystem_delete(configuration: &configuration::Configuration, server_id: i32) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + + let uri_str = format!("{}/api/v1/servers/{serverId}/rescuesystem", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_rescuesystem_get(configuration: &configuration::Configuration, server_id: i32) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + + let uri_str = format!("{}/api/v1/servers/{serverId}/rescuesystem", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RescueSystemStatus`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RescueSystemStatus`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_rescuesystem_post(configuration: &configuration::Configuration, server_id: i32) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + + let uri_str = format!("{}/api/v1/servers/{serverId}/rescuesystem", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_snapshots_dryrun_post(configuration: &configuration::Configuration, server_id: i32, server_snapshot_create_check: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_body_server_snapshot_create_check = server_snapshot_create_check; + + let uri_str = format!("{}/api/v1/servers/{serverId}/snapshots:dryrun", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_server_snapshot_create_check); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ResponseError>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ResponseError>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_snapshots_get(configuration: &configuration::Configuration, server_id: i32) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + + let uri_str = format!("{}/api/v1/servers/{serverId}/snapshots", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::SnapshotMinimal>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::SnapshotMinimal>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_snapshots_name_delete(configuration: &configuration::Configuration, server_id: i32, name: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_path_name = name; + + let uri_str = format!("{}/api/v1/servers/{serverId}/snapshots/{name}", configuration.base_path, serverId=p_path_server_id, name=crate::apis::urlencode(p_path_name)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_snapshots_name_export_post(configuration: &configuration::Configuration, server_id: i32, name: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_path_name = name; + + let uri_str = format!("{}/api/v1/servers/{serverId}/snapshots/{name}/export", configuration.base_path, serverId=p_path_server_id, name=crate::apis::urlencode(p_path_name)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_snapshots_name_get(configuration: &configuration::Configuration, server_id: i32, name: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_path_name = name; + + let uri_str = format!("{}/api/v1/servers/{serverId}/snapshots/{name}", configuration.base_path, serverId=p_path_server_id, name=crate::apis::urlencode(p_path_name)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Snapshot`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Snapshot`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_snapshots_name_revert_post(configuration: &configuration::Configuration, server_id: i32, name: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_path_name = name; + + let uri_str = format!("{}/api/v1/servers/{serverId}/snapshots/{name}/revert", configuration.base_path, serverId=p_path_server_id, name=crate::apis::urlencode(p_path_name)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_snapshots_post(configuration: &configuration::Configuration, server_id: i32, server_snapshot_create: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_body_server_snapshot_create = server_snapshot_create; + + let uri_str = format!("{}/api/v1/servers/{serverId}/snapshots", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_server_snapshot_create); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_storageoptimization_post(configuration: &configuration::Configuration, server_id: i32, disks: Option>, start_after_optimization: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_query_disks = disks; + let p_query_start_after_optimization = start_after_optimization; + + let uri_str = format!("{}/api/v1/servers/{serverId}/storageoptimization", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref param_value) = p_query_disks { + req_builder = match "multi" { + "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("disks".to_owned(), p.to_string())).collect::>()), + _ => req_builder.query(&[("disks", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + }; + } + if let Some(ref param_value) = p_query_start_after_optimization { + req_builder = req_builder.query(&[("startAfterOptimization", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_servers_server_id_user_image_post(configuration: &configuration::Configuration, server_id: i32, server_user_image_setup: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_server_id = server_id; + let p_body_server_user_image_setup = server_user_image_setup; + + let uri_str = format!("{}/api/v1/servers/{serverId}/user-image", configuration.base_path, serverId=p_path_server_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_server_user_image_setup); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_tasks_get(configuration: &configuration::Configuration, limit: Option, offset: Option, q: Option<&str>, server_id: Option, state: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query_limit = limit; + let p_query_offset = offset; + let p_query_q = q; + let p_query_server_id = server_id; + let p_query_state = state; + + let uri_str = format!("{}/api/v1/tasks", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_offset { + req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_q { + req_builder = req_builder.query(&[("q", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_server_id { + req_builder = req_builder.query(&[("serverId", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_state { + req_builder = req_builder.query(&[("state", &serde_json::to_string(param_value)?)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::TaskInfoMinimal>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::TaskInfoMinimal>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_tasks_uuid_cancel_put(configuration: &configuration::Configuration, uuid: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_uuid = uuid; + + let uri_str = format!("{}/api/v1/tasks/{uuid}:cancel", configuration.base_path, uuid=crate::apis::urlencode(p_path_uuid)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_tasks_uuid_get(configuration: &configuration::Configuration, uuid: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_uuid = uuid; + + let uri_str = format!("{}/api/v1/tasks/{uuid}", configuration.base_path, uuid=crate::apis::urlencode(p_path_uuid)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_failoverips_v4_get(configuration: &configuration::Configuration, user_id: i32, ip: Option<&str>, server_id: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_query_ip = ip; + let p_query_server_id = server_id; + + let uri_str = format!("{}/api/v1/users/{userId}/failoverips/v4", configuration.base_path, userId=p_path_user_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_ip { + req_builder = req_builder.query(&[("ip", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_server_id { + req_builder = req_builder.query(&[("serverId", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::FailoverIpv4>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::FailoverIpv4>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_failoverips_v4_id_patch(configuration: &configuration::Configuration, user_id: i32, id: i32, route_failover_ip: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_path_id = id; + let p_body_route_failover_ip = route_failover_ip; + + let uri_str = format!("{}/api/v1/users/{userId}/failoverips/v4/{id}", configuration.base_path, userId=p_path_user_id, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_route_failover_ip); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_failoverips_v6_get(configuration: &configuration::Configuration, user_id: i32, ip: Option<&str>, server_id: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_query_ip = ip; + let p_query_server_id = server_id; + + let uri_str = format!("{}/api/v1/users/{userId}/failoverips/v6", configuration.base_path, userId=p_path_user_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_ip { + req_builder = req_builder.query(&[("ip", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_server_id { + req_builder = req_builder.query(&[("serverId", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::FailoverIpv6>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::FailoverIpv6>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_failoverips_v6_id_patch(configuration: &configuration::Configuration, user_id: i32, id: i32, route_failover_ip: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_path_id = id; + let p_body_route_failover_ip = route_failover_ip; + + let uri_str = format!("{}/api/v1/users/{userId}/failoverips/v6/{id}", configuration.base_path, userId=p_path_user_id, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_route_failover_ip); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::TaskInfo`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::TaskInfo`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_firewall_policies_get(configuration: &configuration::Configuration, user_id: i32, limit: Option, offset: Option, q: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_query_limit = limit; + let p_query_offset = offset; + let p_query_q = q; + + let uri_str = format!("{}/api/v1/users/{userId}/firewall-policies", configuration.base_path, userId=p_path_user_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_offset { + req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_q { + req_builder = req_builder.query(&[("q", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::FirewallPolicy>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::FirewallPolicy>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_firewall_policies_id_delete(configuration: &configuration::Configuration, user_id: i32, id: i32) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_path_id = id; + + let uri_str = format!("{}/api/v1/users/{userId}/firewall-policies/{id}", configuration.base_path, userId=p_path_user_id, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_firewall_policies_id_get(configuration: &configuration::Configuration, user_id: i32, id: i32, with_count_of_affected_servers: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_path_id = id; + let p_query_with_count_of_affected_servers = with_count_of_affected_servers; + + let uri_str = format!("{}/api/v1/users/{userId}/firewall-policies/{id}", configuration.base_path, userId=p_path_user_id, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_with_count_of_affected_servers { + req_builder = req_builder.query(&[("withCountOfAffectedServers", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::FirewallPolicy`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::FirewallPolicy`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_firewall_policies_id_put(configuration: &configuration::Configuration, user_id: i32, id: i32, firewall_policy_save: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_path_id = id; + let p_body_firewall_policy_save = firewall_policy_save; + + let uri_str = format!("{}/api/v1/users/{userId}/firewall-policies/{id}", configuration.base_path, userId=p_path_user_id, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_firewall_policy_save); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::FirewallPolicyUpdateResult`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::FirewallPolicyUpdateResult`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_firewall_policies_post(configuration: &configuration::Configuration, user_id: i32, firewall_policy_save: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_body_firewall_policy_save = firewall_policy_save; + + let uri_str = format!("{}/api/v1/users/{userId}/firewall-policies", configuration.base_path, userId=p_path_user_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_firewall_policy_save); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::FirewallPolicy`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::FirewallPolicy`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_get(configuration: &configuration::Configuration, user_id: i32) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + + let uri_str = format!("{}/api/v1/users/{userId}", configuration.base_path, userId=p_path_user_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::User`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::User`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_images_get(configuration: &configuration::Configuration, user_id: i32) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + + let uri_str = format!("{}/api/v1/users/{userId}/images", configuration.base_path, userId=p_path_user_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::S3Object>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::S3Object>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_images_key_delete(configuration: &configuration::Configuration, user_id: i32, key: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_path_key = key; + + let uri_str = format!("{}/api/v1/users/{userId}/images/{key}", configuration.base_path, userId=p_path_user_id, key=crate::apis::urlencode(p_path_key)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_images_key_get(configuration: &configuration::Configuration, user_id: i32, key: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_path_key = key; + + let uri_str = format!("{}/api/v1/users/{userId}/images/{key}", configuration.base_path, userId=p_path_user_id, key=crate::apis::urlencode(p_path_key)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::S3DownloadInfos`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::S3DownloadInfos`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// If \"multipart=true\", returns \"uploadId\" that is used to fetch upload URLs for each part with \"GET /api/v1/users/{userId}/images/{key}/{uploadId}/parts/{partNumber}\". Use this URL to upload individual parts and get an \"ETag\" for each part. To finish, call \"PUT /api/v1/users/{userId}/images/{key}/{uploadId}\" with the list of all uploaded parts, containing \"ETag\" and \"partNumber\" for each part. Part numbers start at 1. If \"multipart=false\", returns \"presignedUrl\" that is used to upload the image at once. +pub async fn api_v1_users_user_id_images_key_post(configuration: &configuration::Configuration, user_id: i32, key: &str, multipart: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_path_key = key; + let p_query_multipart = multipart; + + let uri_str = format!("{}/api/v1/users/{userId}/images/{key}", configuration.base_path, userId=p_path_user_id, key=crate::apis::urlencode(p_path_key)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref param_value) = p_query_multipart { + req_builder = req_builder.query(&[("multipart", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::S3Upload`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::S3Upload`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// Call this endpoint for every part. Use the returned URL to upload the part and get an \"ETag\" from the HTTP headers in return. Once all parts are uploaded, call \"PUT /api/v1/users/{userId}/images/{key}/{uploadId}\" with the list of all uploaded parts, containing \"ETag\" and \"partNumber\" for each part. +pub async fn api_v1_users_user_id_images_key_upload_id_parts_part_number_get(configuration: &configuration::Configuration, user_id: i32, key: &str, part_number: i32, upload_id: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_path_key = key; + let p_path_part_number = part_number; + let p_path_upload_id = upload_id; + + let uri_str = format!("{}/api/v1/users/{userId}/images/{key}/{uploadId}/parts/{partNumber}", configuration.base_path, userId=p_path_user_id, key=crate::apis::urlencode(p_path_key), partNumber=p_path_part_number, uploadId=crate::apis::urlencode(p_path_upload_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::S3SignPartUrl`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::S3SignPartUrl`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// Call this endpoint after uploading all parts. The body must include a list of parts \"ETag\" and \"partNumber\" in order. This finishes the upload and makes the image available with the provided \"key\". +pub async fn api_v1_users_user_id_images_key_upload_id_put(configuration: &configuration::Configuration, user_id: i32, key: &str, upload_id: &str, s3_completed_part: Option>) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_path_key = key; + let p_path_upload_id = upload_id; + let p_body_s3_completed_part = s3_completed_part; + + let uri_str = format!("{}/api/v1/users/{userId}/images/{key}/{uploadId}", configuration.base_path, userId=p_path_user_id, key=crate::apis::urlencode(p_path_key), uploadId=crate::apis::urlencode(p_path_upload_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_s3_completed_part); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_isos_get(configuration: &configuration::Configuration, user_id: i32) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + + let uri_str = format!("{}/api/v1/users/{userId}/isos", configuration.base_path, userId=p_path_user_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::S3Object>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::S3Object>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_isos_key_delete(configuration: &configuration::Configuration, user_id: i32, key: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_path_key = key; + + let uri_str = format!("{}/api/v1/users/{userId}/isos/{key}", configuration.base_path, userId=p_path_user_id, key=crate::apis::urlencode(p_path_key)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_isos_key_get(configuration: &configuration::Configuration, user_id: i32, key: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_path_key = key; + + let uri_str = format!("{}/api/v1/users/{userId}/isos/{key}", configuration.base_path, userId=p_path_user_id, key=crate::apis::urlencode(p_path_key)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::S3DownloadInfos`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::S3DownloadInfos`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// If \"multipart=true\", returns \"uploadId\" that is used to fetch upload URLs for each part with \"GET /api/v1/users/{userId}/isos/{key}/{uploadId}/parts/{partNumber}\". Use this URL to upload individual parts and get an \"ETag\" for each part. To finish, call \"PUT /api/v1/users/{userId}/isos/{key}/{uploadId}\" with the list of all uploaded parts, containing \"ETag\" and \"partNumber\" for each part. Part numbers start at 1. If \"multipart=false\", returns \"presignedUrl\" that is used to upload the ISO at once. +pub async fn api_v1_users_user_id_isos_key_post(configuration: &configuration::Configuration, user_id: i32, key: &str, multipart: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_path_key = key; + let p_query_multipart = multipart; + + let uri_str = format!("{}/api/v1/users/{userId}/isos/{key}", configuration.base_path, userId=p_path_user_id, key=crate::apis::urlencode(p_path_key)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref param_value) = p_query_multipart { + req_builder = req_builder.query(&[("multipart", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::S3Upload`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::S3Upload`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// Call this endpoint for every part. Use the returned URL to upload the part and get an \"ETag\" from the HTTP headers in return. Once all parts are uploaded, call \"PUT /api/v1/users/{userId}/isos/{key}/{uploadId}\" with the list of all uploaded parts, containing \"ETag\" and \"partNumber\" for each part. +pub async fn api_v1_users_user_id_isos_key_upload_id_parts_part_number_get(configuration: &configuration::Configuration, user_id: i32, key: &str, part_number: i32, upload_id: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_path_key = key; + let p_path_part_number = part_number; + let p_path_upload_id = upload_id; + + let uri_str = format!("{}/api/v1/users/{userId}/isos/{key}/{uploadId}/parts/{partNumber}", configuration.base_path, userId=p_path_user_id, key=crate::apis::urlencode(p_path_key), partNumber=p_path_part_number, uploadId=crate::apis::urlencode(p_path_upload_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::S3SignPartUrl`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::S3SignPartUrl`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// Call this endpoint after uploading all parts. The body must include a list of parts \"ETag\" and \"partNumber\" in order. This finishes the upload and makes the ISO available with the provided \"key\". +pub async fn api_v1_users_user_id_isos_key_upload_id_put(configuration: &configuration::Configuration, user_id: i32, key: &str, upload_id: &str, s3_completed_part: Option>) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_path_key = key; + let p_path_upload_id = upload_id; + let p_body_s3_completed_part = s3_completed_part; + + let uri_str = format!("{}/api/v1/users/{userId}/isos/{key}/{uploadId}", configuration.base_path, userId=p_path_user_id, key=crate::apis::urlencode(p_path_key), uploadId=crate::apis::urlencode(p_path_upload_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_s3_completed_part); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_logs_get(configuration: &configuration::Configuration, user_id: i32, limit: Option, offset: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_query_limit = limit; + let p_query_offset = offset; + + let uri_str = format!("{}/api/v1/users/{userId}/logs", configuration.base_path, userId=p_path_user_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_offset { + req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Log>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Log>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_put(configuration: &configuration::Configuration, user_id: i32, user_save: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_body_user_save = user_save; + + let uri_str = format!("{}/api/v1/users/{userId}", configuration.base_path, userId=p_path_user_id); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_user_save); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UserSave`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UserSave`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_ssh_keys_get(configuration: &configuration::Configuration, user_id: i32) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + + let uri_str = format!("{}/api/v1/users/{userId}/ssh-keys", configuration.base_path, userId=p_path_user_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::SshKey>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::SshKey>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_ssh_keys_id_delete(configuration: &configuration::Configuration, user_id: i32, id: i32) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_path_id = id; + + let uri_str = format!("{}/api/v1/users/{userId}/ssh-keys/{id}", configuration.base_path, userId=p_path_user_id, id=p_path_id); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_ssh_keys_post(configuration: &configuration::Configuration, user_id: i32, ssh_key: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_body_ssh_key = ssh_key; + + let uri_str = format!("{}/api/v1/users/{userId}/ssh-keys", configuration.base_path, userId=p_path_user_id); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_ssh_key); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SshKey`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SshKey`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_vlans_get(configuration: &configuration::Configuration, user_id: i32, server_id: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_query_server_id = server_id; + + let uri_str = format!("{}/api/v1/users/{userId}/vlans", configuration.base_path, userId=p_path_user_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_server_id { + req_builder = req_builder.query(&[("serverId", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::VLan>`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::VLan>`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_vlans_vlan_id_get(configuration: &configuration::Configuration, user_id: i32, vlan_id: i32) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_path_vlan_id = vlan_id; + + let uri_str = format!("{}/api/v1/users/{userId}/vlans/{vlanId}", configuration.base_path, userId=p_path_user_id, vlanId=p_path_vlan_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::VLan`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::VLan`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_users_user_id_vlans_vlan_id_put(configuration: &configuration::Configuration, user_id: i32, vlan_id: i32, v_lan_save: Option) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_user_id = user_id; + let p_path_vlan_id = vlan_id; + let p_body_v_lan_save = v_lan_save; + + let uri_str = format!("{}/api/v1/users/{userId}/vlans/{vlanId}", configuration.base_path, userId=p_path_user_id, vlanId=p_path_vlan_id); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + req_builder = req_builder.json(&p_body_v_lan_save); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// +pub async fn api_v1_vlans_vlan_id_get(configuration: &configuration::Configuration, vlan_id: i32) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_vlan_id = vlan_id; + + let uri_str = format!("{}/api/v1/vlans/{vlanId}", configuration.base_path, vlanId=p_path_vlan_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::VLan`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::VLan`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/scp_core/src/apis/mod.rs b/scp_core/src/apis/mod.rs new file mode 100644 index 0000000..fdcc89b --- /dev/null +++ b/scp_core/src/apis/mod.rs @@ -0,0 +1,116 @@ +use std::error; +use std::fmt; + +#[derive(Debug, Clone)] +pub struct ResponseContent { + pub status: reqwest::StatusCode, + pub content: String, + pub entity: Option, +} + +#[derive(Debug)] +pub enum Error { + Reqwest(reqwest::Error), + Serde(serde_json::Error), + Io(std::io::Error), + ResponseError(ResponseContent), +} + +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let (module, e) = match self { + Error::Reqwest(e) => ("reqwest", e.to_string()), + Error::Serde(e) => ("serde", e.to_string()), + Error::Io(e) => ("IO", e.to_string()), + Error::ResponseError(e) => ("response", format!("status code {}", e.status)), + }; + write!(f, "error in {}: {}", module, e) + } +} + +impl error::Error for Error { + fn source(&self) -> Option<&(dyn error::Error + 'static)> { + Some(match self { + Error::Reqwest(e) => e, + Error::Serde(e) => e, + Error::Io(e) => e, + Error::ResponseError(_) => return None, + }) + } +} + +impl From for Error { + fn from(e: reqwest::Error) -> Self { + Error::Reqwest(e) + } +} + +impl From for Error { + fn from(e: serde_json::Error) -> Self { + Error::Serde(e) + } +} + +impl From for Error { + fn from(e: std::io::Error) -> Self { + Error::Io(e) + } +} + +pub fn urlencode>(s: T) -> String { + ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() +} + +pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> { + if let serde_json::Value::Object(object) = value { + let mut params = vec![]; + + for (key, value) in object { + match value { + serde_json::Value::Object(_) => params.append(&mut parse_deep_object( + &format!("{}[{}]", prefix, key), + value, + )), + serde_json::Value::Array(array) => { + for (i, value) in array.iter().enumerate() { + params.append(&mut parse_deep_object( + &format!("{}[{}][{}]", prefix, key, i), + value, + )); + } + }, + serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), + } + } + + return params; + } + + unimplemented!("Only objects are supported with style=deepObject") +} + +/// Internal use only +/// A content type supported by this client. +#[allow(dead_code)] +enum ContentType { + Json, + Text, + Unsupported(String) +} + +impl From<&str> for ContentType { + fn from(content_type: &str) -> Self { + if content_type.starts_with("application") && content_type.contains("json") { + return Self::Json; + } else if content_type.starts_with("text/plain") { + return Self::Text; + } else { + return Self::Unsupported(content_type.to_string()); + } + } +} + +pub mod default_api; + +pub mod configuration; diff --git a/scp_core/src/lib.rs b/scp_core/src/lib.rs new file mode 100644 index 0000000..e152062 --- /dev/null +++ b/scp_core/src/lib.rs @@ -0,0 +1,11 @@ +#![allow(unused_imports)] +#![allow(clippy::too_many_arguments)] + +extern crate serde_repr; +extern crate serde; +extern crate serde_json; +extern crate url; +extern crate reqwest; + +pub mod apis; +pub mod models; diff --git a/scp_core/src/models/_api_v1_servers__server_id__patch_request.rs b/scp_core/src/models/_api_v1_servers__server_id__patch_request.rs new file mode 100644 index 0000000..37a8ef4 --- /dev/null +++ b/scp_core/src/models/_api_v1_servers__server_id__patch_request.rs @@ -0,0 +1,34 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApiV1ServersServerIdPatchRequest { + ServerStatePatch(Box), + ServerAutostartPatch(Box), + ServerBootorderPatch(Box), + ServerOsOptimizationPatch(Box), + ServerCpuTopologyPatch(Box), + ServerUefiPatch(Box), + ServerHostnamePatch(Box), + ServerNicknamePatch(Box), + ServerKeyboardLayoutPatch(Box), + ServerSetRootPasswordPatch(Box), +} + +impl Default for ApiV1ServersServerIdPatchRequest { + fn default() -> Self { + Self::ServerStatePatch(Default::default()) + } +} + diff --git a/scp_core/src/models/architecture.rs b/scp_core/src/models/architecture.rs new file mode 100644 index 0000000..b506b46 --- /dev/null +++ b/scp_core/src/models/architecture.rs @@ -0,0 +1,38 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Architecture { + #[serde(rename = "AMD64")] + Amd64, + #[serde(rename = "ARM64")] + Arm64, + +} + +impl std::fmt::Display for Architecture { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Amd64 => write!(f, "AMD64"), + Self::Arm64 => write!(f, "ARM64"), + } + } +} + +impl Default for Architecture { + fn default() -> Architecture { + Self::Amd64 + } +} + diff --git a/scp_core/src/models/bandwidth_class.rs b/scp_core/src/models/bandwidth_class.rs new file mode 100644 index 0000000..a6869d6 --- /dev/null +++ b/scp_core/src/models/bandwidth_class.rs @@ -0,0 +1,33 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct BandwidthClass { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "speedInMBit")] + pub speed_in_m_bit: i32, +} + +impl BandwidthClass { + pub fn new(name: String, speed_in_m_bit: i32) -> BandwidthClass { + BandwidthClass { + id: None, + name, + speed_in_m_bit, + } + } +} + diff --git a/scp_core/src/models/bootorder.rs b/scp_core/src/models/bootorder.rs new file mode 100644 index 0000000..3425f39 --- /dev/null +++ b/scp_core/src/models/bootorder.rs @@ -0,0 +1,41 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Bootorder { + #[serde(rename = "HDD")] + Hdd, + #[serde(rename = "CDROM")] + Cdrom, + #[serde(rename = "NETWORK")] + Network, + +} + +impl std::fmt::Display for Bootorder { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Hdd => write!(f, "HDD"), + Self::Cdrom => write!(f, "CDROM"), + Self::Network => write!(f, "NETWORK"), + } + } +} + +impl Default for Bootorder { + fn default() -> Bootorder { + Self::Hdd + } +} + diff --git a/scp_core/src/models/cpu_topology.rs b/scp_core/src/models/cpu_topology.rs new file mode 100644 index 0000000..027a152 --- /dev/null +++ b/scp_core/src/models/cpu_topology.rs @@ -0,0 +1,30 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CpuTopology { + #[serde(rename = "socketCount", skip_serializing_if = "Option::is_none")] + pub socket_count: Option, + #[serde(rename = "coresPerSocketCount", skip_serializing_if = "Option::is_none")] + pub cores_per_socket_count: Option, +} + +impl CpuTopology { + pub fn new() -> CpuTopology { + CpuTopology { + socket_count: None, + cores_per_socket_count: None, + } + } +} + diff --git a/scp_core/src/models/disk.rs b/scp_core/src/models/disk.rs new file mode 100644 index 0000000..d5b4410 --- /dev/null +++ b/scp_core/src/models/disk.rs @@ -0,0 +1,36 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Disk { + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "allocationInMiB", skip_serializing_if = "Option::is_none")] + pub allocation_in_mi_b: Option, + #[serde(rename = "capacityInMiB", skip_serializing_if = "Option::is_none")] + pub capacity_in_mi_b: Option, + #[serde(rename = "storageDriver", skip_serializing_if = "Option::is_none")] + pub storage_driver: Option, +} + +impl Disk { + pub fn new() -> Disk { + Disk { + name: None, + allocation_in_mi_b: None, + capacity_in_mi_b: None, + storage_driver: None, + } + } +} + diff --git a/scp_core/src/models/edit_disks_driver.rs b/scp_core/src/models/edit_disks_driver.rs new file mode 100644 index 0000000..4eeee9c --- /dev/null +++ b/scp_core/src/models/edit_disks_driver.rs @@ -0,0 +1,27 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct EditDisksDriver { + #[serde(rename = "driver")] + pub driver: models::StorageDriver, +} + +impl EditDisksDriver { + pub fn new(driver: models::StorageDriver) -> EditDisksDriver { + EditDisksDriver { + driver, + } + } +} + diff --git a/scp_core/src/models/failover_ipv4.rs b/scp_core/src/models/failover_ipv4.rs new file mode 100644 index 0000000..e208d48 --- /dev/null +++ b/scp_core/src/models/failover_ipv4.rs @@ -0,0 +1,45 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct FailoverIpv4 { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "ip", skip_serializing_if = "Option::is_none")] + pub ip: Option, + #[serde(rename = "cidrSuffix", skip_serializing_if = "Option::is_none")] + pub cidr_suffix: Option, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, + #[serde(rename = "editable", skip_serializing_if = "Option::is_none")] + pub editable: Option, + #[serde(rename = "site", skip_serializing_if = "Option::is_none")] + pub site: Option>, + #[serde(rename = "server", skip_serializing_if = "Option::is_none")] + pub server: Option>, +} + +impl FailoverIpv4 { + pub fn new() -> FailoverIpv4 { + FailoverIpv4 { + id: None, + ip: None, + cidr_suffix: None, + user: None, + editable: None, + site: None, + server: None, + } + } +} + diff --git a/scp_core/src/models/failover_ipv6.rs b/scp_core/src/models/failover_ipv6.rs new file mode 100644 index 0000000..4f64499 --- /dev/null +++ b/scp_core/src/models/failover_ipv6.rs @@ -0,0 +1,45 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct FailoverIpv6 { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "networkPrefix", skip_serializing_if = "Option::is_none")] + pub network_prefix: Option, + #[serde(rename = "networkPrefixLength", skip_serializing_if = "Option::is_none")] + pub network_prefix_length: Option, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, + #[serde(rename = "editable", skip_serializing_if = "Option::is_none")] + pub editable: Option, + #[serde(rename = "site", skip_serializing_if = "Option::is_none")] + pub site: Option>, + #[serde(rename = "server", skip_serializing_if = "Option::is_none")] + pub server: Option>, +} + +impl FailoverIpv6 { + pub fn new() -> FailoverIpv6 { + FailoverIpv6 { + id: None, + network_prefix: None, + network_prefix_length: None, + user: None, + editable: None, + site: None, + server: None, + } + } +} + diff --git a/scp_core/src/models/field_error.rs b/scp_core/src/models/field_error.rs new file mode 100644 index 0000000..61c3435 --- /dev/null +++ b/scp_core/src/models/field_error.rs @@ -0,0 +1,30 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct FieldError { + #[serde(rename = "field", skip_serializing_if = "Option::is_none")] + pub field: Option, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, +} + +impl FieldError { + pub fn new() -> FieldError { + FieldError { + field: None, + message: None, + } + } +} + diff --git a/scp_core/src/models/firewall_action.rs b/scp_core/src/models/firewall_action.rs new file mode 100644 index 0000000..bb6fcc4 --- /dev/null +++ b/scp_core/src/models/firewall_action.rs @@ -0,0 +1,38 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FirewallAction { + #[serde(rename = "ACCEPT")] + Accept, + #[serde(rename = "DROP")] + Drop, + +} + +impl std::fmt::Display for FirewallAction { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Accept => write!(f, "ACCEPT"), + Self::Drop => write!(f, "DROP"), + } + } +} + +impl Default for FirewallAction { + fn default() -> FirewallAction { + Self::Accept + } +} + diff --git a/scp_core/src/models/firewall_policy.rs b/scp_core/src/models/firewall_policy.rs new file mode 100644 index 0000000..ca55669 --- /dev/null +++ b/scp_core/src/models/firewall_policy.rs @@ -0,0 +1,39 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct FirewallPolicy { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "rules", skip_serializing_if = "Option::is_none")] + pub rules: Option>, + #[serde(rename = "countOfAffectedServers", skip_serializing_if = "Option::is_none")] + pub count_of_affected_servers: Option, +} + +impl FirewallPolicy { + pub fn new() -> FirewallPolicy { + FirewallPolicy { + id: None, + name: None, + description: None, + rules: None, + count_of_affected_servers: None, + } + } +} + diff --git a/scp_core/src/models/firewall_policy_save.rs b/scp_core/src/models/firewall_policy_save.rs new file mode 100644 index 0000000..ce2e8e4 --- /dev/null +++ b/scp_core/src/models/firewall_policy_save.rs @@ -0,0 +1,33 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct FirewallPolicySave { + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "rules", skip_serializing_if = "Option::is_none")] + pub rules: Option>, +} + +impl FirewallPolicySave { + pub fn new(name: String) -> FirewallPolicySave { + FirewallPolicySave { + name, + description: None, + rules: None, + } + } +} + diff --git a/scp_core/src/models/firewall_policy_update_result.rs b/scp_core/src/models/firewall_policy_update_result.rs new file mode 100644 index 0000000..b78b7bf --- /dev/null +++ b/scp_core/src/models/firewall_policy_update_result.rs @@ -0,0 +1,30 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct FirewallPolicyUpdateResult { + #[serde(rename = "firewallPolicy", skip_serializing_if = "Option::is_none")] + pub firewall_policy: Option>, + #[serde(rename = "taskInfo", skip_serializing_if = "Option::is_none")] + pub task_info: Option>, +} + +impl FirewallPolicyUpdateResult { + pub fn new() -> FirewallPolicyUpdateResult { + FirewallPolicyUpdateResult { + firewall_policy: None, + task_info: None, + } + } +} + diff --git a/scp_core/src/models/firewall_protocol.rs b/scp_core/src/models/firewall_protocol.rs new file mode 100644 index 0000000..0cfbc7c --- /dev/null +++ b/scp_core/src/models/firewall_protocol.rs @@ -0,0 +1,44 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FirewallProtocol { + #[serde(rename = "TCP")] + Tcp, + #[serde(rename = "UDP")] + Udp, + #[serde(rename = "ICMP")] + Icmp, + #[serde(rename = "ICMPv6")] + Icmpv6, + +} + +impl std::fmt::Display for FirewallProtocol { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Tcp => write!(f, "TCP"), + Self::Udp => write!(f, "UDP"), + Self::Icmp => write!(f, "ICMP"), + Self::Icmpv6 => write!(f, "ICMPv6"), + } + } +} + +impl Default for FirewallProtocol { + fn default() -> FirewallProtocol { + Self::Tcp + } +} + diff --git a/scp_core/src/models/firewall_rule.rs b/scp_core/src/models/firewall_rule.rs new file mode 100644 index 0000000..601cb1a --- /dev/null +++ b/scp_core/src/models/firewall_rule.rs @@ -0,0 +1,55 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct FirewallRule { + #[serde(rename = "numberOfEffectiveRules", skip_serializing_if = "Option::is_none")] + pub number_of_effective_rules: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "direction")] + pub direction: models::FirewallRuleDirection, + #[serde(rename = "protocol")] + pub protocol: models::FirewallProtocol, + #[serde(rename = "action")] + pub action: models::FirewallAction, + /// Valid configurations are any IP (null or empty array), IPv4/IPv6 address (f.e. 192.168.10.1 or 0092:e10f:cb66:35a9::) or IPv4 network / IPv6 prefix (f.e. 192.168.10.0/24 or 0092:e10f:cb66:35a9::/64). If more than one IP/network is specified for the source, the destination must be empty (any) or contain only a single IP/network. If IPv4 addresses and IPv6 addresses are mixed in sources, destinations must empty (any). + #[serde(rename = "sources", skip_serializing_if = "Option::is_none")] + pub sources: Option>, + /// Valid configurations are any port (null), single port (f.e. 1234) or port range (f.e. 1024-65535). + #[serde(rename = "sourcePorts", skip_serializing_if = "Option::is_none")] + pub source_ports: Option, + /// Valid configurations are any IP (null or empty array), IPv4/IPv6 address (f.e. 192.168.10.1 or 0092:e10f:cb66:35a9::) or IPv4 network / IPv6 prefix (f.e. 192.168.10.0/24 or 0092:e10f:cb66:35a9::/64). If more than one IP/network is specified for the destination, the source must be empty (any) or contain only a single IP/network. If IPv4 addresses and IPv6 addresses are mixed in destinations, sources must be empty (any). + #[serde(rename = "destinations", skip_serializing_if = "Option::is_none")] + pub destinations: Option>, + /// Valid configurations are any port (null), single port (f.e. 1234) or port range (f.e. 1024-65535). + #[serde(rename = "destinationPorts", skip_serializing_if = "Option::is_none")] + pub destination_ports: Option, +} + +impl FirewallRule { + pub fn new(direction: models::FirewallRuleDirection, protocol: models::FirewallProtocol, action: models::FirewallAction) -> FirewallRule { + FirewallRule { + number_of_effective_rules: None, + description: None, + direction, + protocol, + action, + sources: None, + source_ports: None, + destinations: None, + destination_ports: None, + } + } +} + diff --git a/scp_core/src/models/firewall_rule_direction.rs b/scp_core/src/models/firewall_rule_direction.rs new file mode 100644 index 0000000..0ca1965 --- /dev/null +++ b/scp_core/src/models/firewall_rule_direction.rs @@ -0,0 +1,38 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FirewallRuleDirection { + #[serde(rename = "INGRESS")] + Ingress, + #[serde(rename = "EGRESS")] + Egress, + +} + +impl std::fmt::Display for FirewallRuleDirection { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Ingress => write!(f, "INGRESS"), + Self::Egress => write!(f, "EGRESS"), + } + } +} + +impl Default for FirewallRuleDirection { + fn default() -> FirewallRuleDirection { + Self::Ingress + } +} + diff --git a/scp_core/src/models/guest_agent_data.rs b/scp_core/src/models/guest_agent_data.rs new file mode 100644 index 0000000..284789b --- /dev/null +++ b/scp_core/src/models/guest_agent_data.rs @@ -0,0 +1,31 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct GuestAgentData { + #[serde(rename = "guestAgentAvailable", skip_serializing_if = "Option::is_none")] + pub guest_agent_available: Option, + /// Information in json format about the qemu guest agent, which may change depending on the version. We do not guarantee backwards compatibility for this data. + #[serde(rename = "guestAgentData", skip_serializing_if = "Option::is_none")] + pub guest_agent_data: Option, +} + +impl GuestAgentData { + pub fn new() -> GuestAgentData { + GuestAgentData { + guest_agent_available: None, + guest_agent_data: None, + } + } +} + diff --git a/scp_core/src/models/identifier_int.rs b/scp_core/src/models/identifier_int.rs new file mode 100644 index 0000000..49a0324 --- /dev/null +++ b/scp_core/src/models/identifier_int.rs @@ -0,0 +1,27 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IdentifierInt { + #[serde(rename = "id")] + pub id: i32, +} + +impl IdentifierInt { + pub fn new(id: i32) -> IdentifierInt { + IdentifierInt { + id, + } + } +} + diff --git a/scp_core/src/models/image_flavour.rs b/scp_core/src/models/image_flavour.rs new file mode 100644 index 0000000..666a9ce --- /dev/null +++ b/scp_core/src/models/image_flavour.rs @@ -0,0 +1,39 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ImageFlavour { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "alias")] + pub alias: String, + #[serde(rename = "text")] + pub text: String, + #[serde(rename = "image", skip_serializing_if = "Option::is_none")] + pub image: Option>, +} + +impl ImageFlavour { + pub fn new(name: String, alias: String, text: String) -> ImageFlavour { + ImageFlavour { + id: None, + name, + alias, + text, + image: None, + } + } +} + diff --git a/scp_core/src/models/image_minimal.rs b/scp_core/src/models/image_minimal.rs new file mode 100644 index 0000000..d4db6d1 --- /dev/null +++ b/scp_core/src/models/image_minimal.rs @@ -0,0 +1,30 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ImageMinimal { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name")] + pub name: String, +} + +impl ImageMinimal { + pub fn new(name: String) -> ImageMinimal { + ImageMinimal { + id: None, + name, + } + } +} + diff --git a/scp_core/src/models/implicit_rule.rs b/scp_core/src/models/implicit_rule.rs new file mode 100644 index 0000000..1fbfb4e --- /dev/null +++ b/scp_core/src/models/implicit_rule.rs @@ -0,0 +1,38 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ImplicitRule { + #[serde(rename = "ACCEPT_ALL")] + AcceptAll, + #[serde(rename = "DROP_ALL")] + DropAll, + +} + +impl std::fmt::Display for ImplicitRule { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::AcceptAll => write!(f, "ACCEPT_ALL"), + Self::DropAll => write!(f, "DROP_ALL"), + } + } +} + +impl Default for ImplicitRule { + fn default() -> ImplicitRule { + Self::AcceptAll + } +} + diff --git a/scp_core/src/models/interface.rs b/scp_core/src/models/interface.rs new file mode 100644 index 0000000..1975e60 --- /dev/null +++ b/scp_core/src/models/interface.rs @@ -0,0 +1,39 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Interface { + #[serde(rename = "mac", skip_serializing_if = "Option::is_none")] + pub mac: Option, + #[serde(rename = "driver", skip_serializing_if = "Option::is_none")] + pub driver: Option, + #[serde(rename = "speedInMBits", skip_serializing_if = "Option::is_none")] + pub speed_in_m_bits: Option, + #[serde(rename = "ipv4Addresses", skip_serializing_if = "Option::is_none")] + pub ipv4_addresses: Option>, + #[serde(rename = "ipv6Addresses", skip_serializing_if = "Option::is_none")] + pub ipv6_addresses: Option>, +} + +impl Interface { + pub fn new() -> Interface { + Interface { + mac: None, + driver: None, + speed_in_m_bits: None, + ipv4_addresses: None, + ipv6_addresses: None, + } + } +} + diff --git a/scp_core/src/models/ipv4_address_minimal.rs b/scp_core/src/models/ipv4_address_minimal.rs new file mode 100644 index 0000000..2fc2f6f --- /dev/null +++ b/scp_core/src/models/ipv4_address_minimal.rs @@ -0,0 +1,39 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Ipv4AddressMinimal { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "ip", skip_serializing_if = "Option::is_none")] + pub ip: Option, + #[serde(rename = "netmask", skip_serializing_if = "Option::is_none")] + pub netmask: Option, + #[serde(rename = "gateway", skip_serializing_if = "Option::is_none")] + pub gateway: Option, + #[serde(rename = "broadcast", skip_serializing_if = "Option::is_none")] + pub broadcast: Option, +} + +impl Ipv4AddressMinimal { + pub fn new() -> Ipv4AddressMinimal { + Ipv4AddressMinimal { + id: None, + ip: None, + netmask: None, + gateway: None, + broadcast: None, + } + } +} + diff --git a/scp_core/src/models/ipv6_address_minimal.rs b/scp_core/src/models/ipv6_address_minimal.rs new file mode 100644 index 0000000..8944d10 --- /dev/null +++ b/scp_core/src/models/ipv6_address_minimal.rs @@ -0,0 +1,36 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Ipv6AddressMinimal { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "networkPrefix", skip_serializing_if = "Option::is_none")] + pub network_prefix: Option, + #[serde(rename = "networkPrefixLength", skip_serializing_if = "Option::is_none")] + pub network_prefix_length: Option, + #[serde(rename = "gateway", skip_serializing_if = "Option::is_none")] + pub gateway: Option, +} + +impl Ipv6AddressMinimal { + pub fn new() -> Ipv6AddressMinimal { + Ipv6AddressMinimal { + id: None, + network_prefix: None, + network_prefix_length: None, + gateway: None, + } + } +} + diff --git a/scp_core/src/models/iso.rs b/scp_core/src/models/iso.rs new file mode 100644 index 0000000..b0aa4c5 --- /dev/null +++ b/scp_core/src/models/iso.rs @@ -0,0 +1,30 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Iso { + #[serde(rename = "isoAttached", skip_serializing_if = "Option::is_none")] + pub iso_attached: Option, + #[serde(rename = "iso", skip_serializing_if = "Option::is_none")] + pub iso: Option, +} + +impl Iso { + pub fn new() -> Iso { + Iso { + iso_attached: None, + iso: None, + } + } +} + diff --git a/scp_core/src/models/iso_image.rs b/scp_core/src/models/iso_image.rs new file mode 100644 index 0000000..7bbcc46 --- /dev/null +++ b/scp_core/src/models/iso_image.rs @@ -0,0 +1,36 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IsoImage { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "architecture")] + pub architecture: models::Architecture, +} + +impl IsoImage { + pub fn new(name: String, architecture: models::Architecture) -> IsoImage { + IsoImage { + id: None, + name, + description: None, + architecture, + } + } +} + diff --git a/scp_core/src/models/log.rs b/scp_core/src/models/log.rs new file mode 100644 index 0000000..d39ba34 --- /dev/null +++ b/scp_core/src/models/log.rs @@ -0,0 +1,39 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Log { + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub r#type: Option, + #[serde(rename = "executingUser", skip_serializing_if = "Option::is_none")] + pub executing_user: Option>, + #[serde(rename = "date", skip_serializing_if = "Option::is_none")] + pub date: Option, + #[serde(rename = "logKey", skip_serializing_if = "Option::is_none")] + pub log_key: Option, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, +} + +impl Log { + pub fn new() -> Log { + Log { + r#type: None, + executing_user: None, + date: None, + log_key: None, + message: None, + } + } +} + diff --git a/scp_core/src/models/log_type.rs b/scp_core/src/models/log_type.rs new file mode 100644 index 0000000..4e10a14 --- /dev/null +++ b/scp_core/src/models/log_type.rs @@ -0,0 +1,41 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum LogType { + #[serde(rename = "ERROR")] + Error, + #[serde(rename = "WARNING")] + Warning, + #[serde(rename = "INFO")] + Info, + +} + +impl std::fmt::Display for LogType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Error => write!(f, "ERROR"), + Self::Warning => write!(f, "WARNING"), + Self::Info => write!(f, "INFO"), + } + } +} + +impl Default for LogType { + fn default() -> LogType { + Self::Error + } +} + diff --git a/scp_core/src/models/maintenance.rs b/scp_core/src/models/maintenance.rs new file mode 100644 index 0000000..241233b --- /dev/null +++ b/scp_core/src/models/maintenance.rs @@ -0,0 +1,30 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Maintenance { + #[serde(rename = "startAt")] + pub start_at: String, + #[serde(rename = "finishAt")] + pub finish_at: String, +} + +impl Maintenance { + pub fn new(start_at: String, finish_at: String) -> Maintenance { + Maintenance { + start_at, + finish_at, + } + } +} + diff --git a/scp_core/src/models/mod.rs b/scp_core/src/models/mod.rs new file mode 100644 index 0000000..a94caea --- /dev/null +++ b/scp_core/src/models/mod.rs @@ -0,0 +1,188 @@ +pub mod _api_v1_servers__server_id__patch_request; +pub use self::_api_v1_servers__server_id__patch_request::ApiV1ServersServerIdPatchRequest; +pub mod architecture; +pub use self::architecture::Architecture; +pub mod bandwidth_class; +pub use self::bandwidth_class::BandwidthClass; +pub mod bootorder; +pub use self::bootorder::Bootorder; +pub mod cpu_topology; +pub use self::cpu_topology::CpuTopology; +pub mod disk; +pub use self::disk::Disk; +pub mod edit_disks_driver; +pub use self::edit_disks_driver::EditDisksDriver; +pub mod failover_ipv4; +pub use self::failover_ipv4::FailoverIpv4; +pub mod failover_ipv6; +pub use self::failover_ipv6::FailoverIpv6; +pub mod field_error; +pub use self::field_error::FieldError; +pub mod firewall_action; +pub use self::firewall_action::FirewallAction; +pub mod firewall_policy; +pub use self::firewall_policy::FirewallPolicy; +pub mod firewall_policy_save; +pub use self::firewall_policy_save::FirewallPolicySave; +pub mod firewall_policy_update_result; +pub use self::firewall_policy_update_result::FirewallPolicyUpdateResult; +pub mod firewall_protocol; +pub use self::firewall_protocol::FirewallProtocol; +pub mod firewall_rule; +pub use self::firewall_rule::FirewallRule; +pub mod firewall_rule_direction; +pub use self::firewall_rule_direction::FirewallRuleDirection; +pub mod guest_agent_data; +pub use self::guest_agent_data::GuestAgentData; +pub mod identifier_int; +pub use self::identifier_int::IdentifierInt; +pub mod image_flavour; +pub use self::image_flavour::ImageFlavour; +pub mod image_minimal; +pub use self::image_minimal::ImageMinimal; +pub mod implicit_rule; +pub use self::implicit_rule::ImplicitRule; +pub mod interface; +pub use self::interface::Interface; +pub mod ipv4_address_minimal; +pub use self::ipv4_address_minimal::Ipv4AddressMinimal; +pub mod ipv6_address_minimal; +pub use self::ipv6_address_minimal::Ipv6AddressMinimal; +pub mod iso; +pub use self::iso::Iso; +pub mod iso_image; +pub use self::iso_image::IsoImage; +pub mod log; +pub use self::log::Log; +pub mod log_type; +pub use self::log_type::LogType; +pub mod maintenance; +pub use self::maintenance::Maintenance; +pub mod network_driver; +pub use self::network_driver::NetworkDriver; +pub mod not_found_error; +pub use self::not_found_error::NotFoundError; +pub mod os_optimization; +pub use self::os_optimization::OsOptimization; +pub mod rdns_ipv4; +pub use self::rdns_ipv4::RdnsIpv4; +pub mod rdns_ipv6; +pub use self::rdns_ipv6::RdnsIpv6; +pub mod rescue_system_status; +pub use self::rescue_system_status::RescueSystemStatus; +pub mod response_error; +pub use self::response_error::ResponseError; +pub mod route_failover_ip; +pub use self::route_failover_ip::RouteFailoverIp; +pub mod s3_completed_part; +pub use self::s3_completed_part::S3CompletedPart; +pub mod s3_download_infos; +pub use self::s3_download_infos::S3DownloadInfos; +pub mod s3_no_such_upload_error; +pub use self::s3_no_such_upload_error::S3NoSuchUploadError; +pub mod s3_object; +pub use self::s3_object::S3Object; +pub mod s3_sign_part_url; +pub use self::s3_sign_part_url::S3SignPartUrl; +pub mod s3_upload; +pub use self::s3_upload::S3Upload; +pub mod server; +pub use self::server::Server; +pub mod server_attach_iso; +pub use self::server_attach_iso::ServerAttachIso; +pub mod server_autostart_patch; +pub use self::server_autostart_patch::ServerAutostartPatch; +pub mod server_bootorder_patch; +pub use self::server_bootorder_patch::ServerBootorderPatch; +pub mod server_cpu_topology_patch; +pub use self::server_cpu_topology_patch::ServerCpuTopologyPatch; +pub mod server_create_nic_vlan; +pub use self::server_create_nic_vlan::ServerCreateNicVlan; +pub mod server_disk; +pub use self::server_disk::ServerDisk; +pub mod server_firewall; +pub use self::server_firewall::ServerFirewall; +pub mod server_firewall_save; +pub use self::server_firewall_save::ServerFirewallSave; +pub mod server_hostname_patch; +pub use self::server_hostname_patch::ServerHostnamePatch; +pub mod server_image_setup; +pub use self::server_image_setup::ServerImageSetup; +pub mod server_info; +pub use self::server_info::ServerInfo; +pub mod server_interface; +pub use self::server_interface::ServerInterface; +pub mod server_interface_update; +pub use self::server_interface_update::ServerInterfaceUpdate; +pub mod server_ip_type; +pub use self::server_ip_type::ServerIpType; +pub mod server_ipv4; +pub use self::server_ipv4::ServerIpv4; +pub mod server_ipv6; +pub use self::server_ipv6::ServerIpv6; +pub mod server_keyboard_layout_patch; +pub use self::server_keyboard_layout_patch::ServerKeyboardLayoutPatch; +pub mod server_list_minimal; +pub use self::server_list_minimal::ServerListMinimal; +pub mod server_minimal; +pub use self::server_minimal::ServerMinimal; +pub mod server_nickname_patch; +pub use self::server_nickname_patch::ServerNicknamePatch; +pub mod server_os_optimization_patch; +pub use self::server_os_optimization_patch::ServerOsOptimizationPatch; +pub mod server_set_root_password_patch; +pub use self::server_set_root_password_patch::ServerSetRootPasswordPatch; +pub mod server_snapshot_create; +pub use self::server_snapshot_create::ServerSnapshotCreate; +pub mod server_snapshot_create_check; +pub use self::server_snapshot_create_check::ServerSnapshotCreateCheck; +pub mod server_state; +pub use self::server_state::ServerState; +pub mod server_state1; +pub use self::server_state1::ServerState1; +pub mod server_state_patch; +pub use self::server_state_patch::ServerStatePatch; +pub mod server_template_minimal; +pub use self::server_template_minimal::ServerTemplateMinimal; +pub mod server_uefi_patch; +pub use self::server_uefi_patch::ServerUefiPatch; +pub mod server_user_image_setup; +pub use self::server_user_image_setup::ServerUserImageSetup; +pub mod set_rdns_ipv4; +pub use self::set_rdns_ipv4::SetRdnsIpv4; +pub mod set_rdns_ipv6; +pub use self::set_rdns_ipv6::SetRdnsIpv6; +pub mod site; +pub use self::site::Site; +pub mod snapshot; +pub use self::snapshot::Snapshot; +pub mod snapshot_minimal; +pub use self::snapshot_minimal::SnapshotMinimal; +pub mod ssh_key; +pub use self::ssh_key::SshKey; +pub mod storage_driver; +pub use self::storage_driver::StorageDriver; +pub mod storage_optimization; +pub use self::storage_optimization::StorageOptimization; +pub mod task_info; +pub use self::task_info::TaskInfo; +pub mod task_info_minimal; +pub use self::task_info_minimal::TaskInfoMinimal; +pub mod task_info_step; +pub use self::task_info_step::TaskInfoStep; +pub mod task_progress; +pub use self::task_progress::TaskProgress; +pub mod task_state; +pub use self::task_state::TaskState; +pub mod user; +pub use self::user::User; +pub mod user_minimal; +pub use self::user_minimal::UserMinimal; +pub mod user_save; +pub use self::user_save::UserSave; +pub mod v_lan; +pub use self::v_lan::VLan; +pub mod v_lan_save; +pub use self::v_lan_save::VLanSave; +pub mod validation_error; +pub use self::validation_error::ValidationError; diff --git a/scp_core/src/models/network_driver.rs b/scp_core/src/models/network_driver.rs new file mode 100644 index 0000000..414e533 --- /dev/null +++ b/scp_core/src/models/network_driver.rs @@ -0,0 +1,47 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum NetworkDriver { + #[serde(rename = "VIRTIO")] + Virtio, + #[serde(rename = "E1000")] + E1000, + #[serde(rename = "E1000E")] + E1000E, + #[serde(rename = "RTL8139")] + Rtl8139, + #[serde(rename = "VMXNET3")] + Vmxnet3, + +} + +impl std::fmt::Display for NetworkDriver { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Virtio => write!(f, "VIRTIO"), + Self::E1000 => write!(f, "E1000"), + Self::E1000E => write!(f, "E1000E"), + Self::Rtl8139 => write!(f, "RTL8139"), + Self::Vmxnet3 => write!(f, "VMXNET3"), + } + } +} + +impl Default for NetworkDriver { + fn default() -> NetworkDriver { + Self::Virtio + } +} + diff --git a/scp_core/src/models/not_found_error.rs b/scp_core/src/models/not_found_error.rs new file mode 100644 index 0000000..d48b106 --- /dev/null +++ b/scp_core/src/models/not_found_error.rs @@ -0,0 +1,30 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct NotFoundError { + #[serde(rename = "code", skip_serializing_if = "Option::is_none")] + pub code: Option, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, +} + +impl NotFoundError { + pub fn new() -> NotFoundError { + NotFoundError { + code: None, + message: None, + } + } +} + diff --git a/scp_core/src/models/os_optimization.rs b/scp_core/src/models/os_optimization.rs new file mode 100644 index 0000000..a493fa8 --- /dev/null +++ b/scp_core/src/models/os_optimization.rs @@ -0,0 +1,47 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum OsOptimization { + #[serde(rename = "LINUX")] + Linux, + #[serde(rename = "WINDOWS")] + Windows, + #[serde(rename = "BSD")] + Bsd, + #[serde(rename = "LINUX_LEGACY")] + LinuxLegacy, + #[serde(rename = "UNKNOWN")] + Unknown, + +} + +impl std::fmt::Display for OsOptimization { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Linux => write!(f, "LINUX"), + Self::Windows => write!(f, "WINDOWS"), + Self::Bsd => write!(f, "BSD"), + Self::LinuxLegacy => write!(f, "LINUX_LEGACY"), + Self::Unknown => write!(f, "UNKNOWN"), + } + } +} + +impl Default for OsOptimization { + fn default() -> OsOptimization { + Self::Linux + } +} + diff --git a/scp_core/src/models/rdns_ipv4.rs b/scp_core/src/models/rdns_ipv4.rs new file mode 100644 index 0000000..3ece785 --- /dev/null +++ b/scp_core/src/models/rdns_ipv4.rs @@ -0,0 +1,27 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct RdnsIpv4 { + #[serde(rename = "rdns", skip_serializing_if = "Option::is_none")] + pub rdns: Option, +} + +impl RdnsIpv4 { + pub fn new() -> RdnsIpv4 { + RdnsIpv4 { + rdns: None, + } + } +} + diff --git a/scp_core/src/models/rdns_ipv6.rs b/scp_core/src/models/rdns_ipv6.rs new file mode 100644 index 0000000..a782cae --- /dev/null +++ b/scp_core/src/models/rdns_ipv6.rs @@ -0,0 +1,27 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct RdnsIpv6 { + #[serde(rename = "rdns", skip_serializing_if = "Option::is_none")] + pub rdns: Option>, +} + +impl RdnsIpv6 { + pub fn new() -> RdnsIpv6 { + RdnsIpv6 { + rdns: None, + } + } +} + diff --git a/scp_core/src/models/rescue_system_status.rs b/scp_core/src/models/rescue_system_status.rs new file mode 100644 index 0000000..921cab6 --- /dev/null +++ b/scp_core/src/models/rescue_system_status.rs @@ -0,0 +1,30 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct RescueSystemStatus { + #[serde(rename = "active", skip_serializing_if = "Option::is_none")] + pub active: Option, + #[serde(rename = "password", skip_serializing_if = "Option::is_none")] + pub password: Option, +} + +impl RescueSystemStatus { + pub fn new() -> RescueSystemStatus { + RescueSystemStatus { + active: None, + password: None, + } + } +} + diff --git a/scp_core/src/models/response_error.rs b/scp_core/src/models/response_error.rs new file mode 100644 index 0000000..e5ef9ca --- /dev/null +++ b/scp_core/src/models/response_error.rs @@ -0,0 +1,30 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ResponseError { + #[serde(rename = "code", skip_serializing_if = "Option::is_none")] + pub code: Option, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, +} + +impl ResponseError { + pub fn new() -> ResponseError { + ResponseError { + code: None, + message: None, + } + } +} + diff --git a/scp_core/src/models/route_failover_ip.rs b/scp_core/src/models/route_failover_ip.rs new file mode 100644 index 0000000..7a430a9 --- /dev/null +++ b/scp_core/src/models/route_failover_ip.rs @@ -0,0 +1,27 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct RouteFailoverIp { + #[serde(rename = "serverId", skip_serializing_if = "Option::is_none")] + pub server_id: Option, +} + +impl RouteFailoverIp { + pub fn new() -> RouteFailoverIp { + RouteFailoverIp { + server_id: None, + } + } +} + diff --git a/scp_core/src/models/s3_completed_part.rs b/scp_core/src/models/s3_completed_part.rs new file mode 100644 index 0000000..6817249 --- /dev/null +++ b/scp_core/src/models/s3_completed_part.rs @@ -0,0 +1,30 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct S3CompletedPart { + #[serde(rename = "ETag", skip_serializing_if = "Option::is_none")] + pub e_tag: Option, + #[serde(rename = "partNumber", skip_serializing_if = "Option::is_none")] + pub part_number: Option, +} + +impl S3CompletedPart { + pub fn new() -> S3CompletedPart { + S3CompletedPart { + e_tag: None, + part_number: None, + } + } +} + diff --git a/scp_core/src/models/s3_download_infos.rs b/scp_core/src/models/s3_download_infos.rs new file mode 100644 index 0000000..06b01b5 --- /dev/null +++ b/scp_core/src/models/s3_download_infos.rs @@ -0,0 +1,36 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct S3DownloadInfos { + #[serde(rename = "filename", skip_serializing_if = "Option::is_none")] + pub filename: Option, + #[serde(rename = "presignedUrl", skip_serializing_if = "Option::is_none")] + pub presigned_url: Option, + #[serde(rename = "presignedUrlValidityDurationInHours", skip_serializing_if = "Option::is_none")] + pub presigned_url_validity_duration_in_hours: Option, + #[serde(rename = "headers", skip_serializing_if = "Option::is_none")] + pub headers: Option>>, +} + +impl S3DownloadInfos { + pub fn new() -> S3DownloadInfos { + S3DownloadInfos { + filename: None, + presigned_url: None, + presigned_url_validity_duration_in_hours: None, + headers: None, + } + } +} + diff --git a/scp_core/src/models/s3_no_such_upload_error.rs b/scp_core/src/models/s3_no_such_upload_error.rs new file mode 100644 index 0000000..72b7805 --- /dev/null +++ b/scp_core/src/models/s3_no_such_upload_error.rs @@ -0,0 +1,30 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct S3NoSuchUploadError { + #[serde(rename = "code", skip_serializing_if = "Option::is_none")] + pub code: Option, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, +} + +impl S3NoSuchUploadError { + pub fn new() -> S3NoSuchUploadError { + S3NoSuchUploadError { + code: None, + message: None, + } + } +} + diff --git a/scp_core/src/models/s3_object.rs b/scp_core/src/models/s3_object.rs new file mode 100644 index 0000000..94944aa --- /dev/null +++ b/scp_core/src/models/s3_object.rs @@ -0,0 +1,33 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct S3Object { + #[serde(rename = "key", skip_serializing_if = "Option::is_none")] + pub key: Option, + #[serde(rename = "lastModified", skip_serializing_if = "Option::is_none")] + pub last_modified: Option, + #[serde(rename = "sizeInB", skip_serializing_if = "Option::is_none")] + pub size_in_b: Option, +} + +impl S3Object { + pub fn new() -> S3Object { + S3Object { + key: None, + last_modified: None, + size_in_b: None, + } + } +} + diff --git a/scp_core/src/models/s3_sign_part_url.rs b/scp_core/src/models/s3_sign_part_url.rs new file mode 100644 index 0000000..00f5b56 --- /dev/null +++ b/scp_core/src/models/s3_sign_part_url.rs @@ -0,0 +1,27 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct S3SignPartUrl { + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +impl S3SignPartUrl { + pub fn new() -> S3SignPartUrl { + S3SignPartUrl { + url: None, + } + } +} + diff --git a/scp_core/src/models/s3_upload.rs b/scp_core/src/models/s3_upload.rs new file mode 100644 index 0000000..b6d887c --- /dev/null +++ b/scp_core/src/models/s3_upload.rs @@ -0,0 +1,30 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct S3Upload { + #[serde(rename = "uploadId", skip_serializing_if = "Option::is_none")] + pub upload_id: Option, + #[serde(rename = "presignedUrl", skip_serializing_if = "Option::is_none")] + pub presigned_url: Option, +} + +impl S3Upload { + pub fn new() -> S3Upload { + S3Upload { + upload_id: None, + presigned_url: None, + } + } +} + diff --git a/scp_core/src/models/server.rs b/scp_core/src/models/server.rs new file mode 100644 index 0000000..e30b418 --- /dev/null +++ b/scp_core/src/models/server.rs @@ -0,0 +1,72 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Server { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "hostname", skip_serializing_if = "Option::is_none")] + pub hostname: Option, + #[serde(rename = "nickname", skip_serializing_if = "Option::is_none")] + pub nickname: Option, + #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")] + pub disabled: Option, + #[serde(rename = "template", skip_serializing_if = "Option::is_none")] + pub template: Option>, + #[serde(rename = "serverLiveInfo", skip_serializing_if = "Option::is_none")] + pub server_live_info: Option>, + #[serde(rename = "ipv4Addresses", skip_serializing_if = "Option::is_none")] + pub ipv4_addresses: Option>, + #[serde(rename = "ipv6Addresses", skip_serializing_if = "Option::is_none")] + pub ipv6_addresses: Option>, + #[serde(rename = "site", skip_serializing_if = "Option::is_none")] + pub site: Option>, + #[serde(rename = "snapshotCount", skip_serializing_if = "Option::is_none")] + pub snapshot_count: Option, + #[serde(rename = "maxCpuCount", skip_serializing_if = "Option::is_none")] + pub max_cpu_count: Option, + #[serde(rename = "disksAvailableSpaceInMiB", skip_serializing_if = "Option::is_none")] + pub disks_available_space_in_mi_b: Option, + #[serde(rename = "rescueSystemActive", skip_serializing_if = "Option::is_none")] + pub rescue_system_active: Option, + #[serde(rename = "snapshotAllowed", skip_serializing_if = "Option::is_none")] + pub snapshot_allowed: Option, + #[serde(rename = "architecture", skip_serializing_if = "Option::is_none")] + pub architecture: Option, +} + +impl Server { + pub fn new() -> Server { + Server { + id: None, + name: None, + hostname: None, + nickname: None, + disabled: None, + template: None, + server_live_info: None, + ipv4_addresses: None, + ipv6_addresses: None, + site: None, + snapshot_count: None, + max_cpu_count: None, + disks_available_space_in_mi_b: None, + rescue_system_active: None, + snapshot_allowed: None, + architecture: None, + } + } +} + diff --git a/scp_core/src/models/server_attach_iso.rs b/scp_core/src/models/server_attach_iso.rs new file mode 100644 index 0000000..cf03c01 --- /dev/null +++ b/scp_core/src/models/server_attach_iso.rs @@ -0,0 +1,33 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerAttachIso { + #[serde(rename = "isoId", skip_serializing_if = "Option::is_none")] + pub iso_id: Option, + #[serde(rename = "userIsoName", skip_serializing_if = "Option::is_none")] + pub user_iso_name: Option, + #[serde(rename = "changeBootDeviceToCdrom", skip_serializing_if = "Option::is_none")] + pub change_boot_device_to_cdrom: Option, +} + +impl ServerAttachIso { + pub fn new() -> ServerAttachIso { + ServerAttachIso { + iso_id: None, + user_iso_name: None, + change_boot_device_to_cdrom: None, + } + } +} + diff --git a/scp_core/src/models/server_autostart_patch.rs b/scp_core/src/models/server_autostart_patch.rs new file mode 100644 index 0000000..aa935e5 --- /dev/null +++ b/scp_core/src/models/server_autostart_patch.rs @@ -0,0 +1,27 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerAutostartPatch { + #[serde(rename = "autostart", skip_serializing_if = "Option::is_none")] + pub autostart: Option, +} + +impl ServerAutostartPatch { + pub fn new() -> ServerAutostartPatch { + ServerAutostartPatch { + autostart: None, + } + } +} + diff --git a/scp_core/src/models/server_bootorder_patch.rs b/scp_core/src/models/server_bootorder_patch.rs new file mode 100644 index 0000000..ece453e --- /dev/null +++ b/scp_core/src/models/server_bootorder_patch.rs @@ -0,0 +1,27 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerBootorderPatch { + #[serde(rename = "bootorder")] + pub bootorder: Vec, +} + +impl ServerBootorderPatch { + pub fn new(bootorder: Vec) -> ServerBootorderPatch { + ServerBootorderPatch { + bootorder, + } + } +} + diff --git a/scp_core/src/models/server_cpu_topology_patch.rs b/scp_core/src/models/server_cpu_topology_patch.rs new file mode 100644 index 0000000..3d5399b --- /dev/null +++ b/scp_core/src/models/server_cpu_topology_patch.rs @@ -0,0 +1,27 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerCpuTopologyPatch { + #[serde(rename = "cpuTopology", skip_serializing_if = "Option::is_none")] + pub cpu_topology: Option>, +} + +impl ServerCpuTopologyPatch { + pub fn new() -> ServerCpuTopologyPatch { + ServerCpuTopologyPatch { + cpu_topology: None, + } + } +} + diff --git a/scp_core/src/models/server_create_nic_vlan.rs b/scp_core/src/models/server_create_nic_vlan.rs new file mode 100644 index 0000000..adf30b0 --- /dev/null +++ b/scp_core/src/models/server_create_nic_vlan.rs @@ -0,0 +1,30 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerCreateNicVlan { + #[serde(rename = "vlanId")] + pub vlan_id: i32, + #[serde(rename = "networkDriver")] + pub network_driver: models::NetworkDriver, +} + +impl ServerCreateNicVlan { + pub fn new(vlan_id: i32, network_driver: models::NetworkDriver) -> ServerCreateNicVlan { + ServerCreateNicVlan { + vlan_id, + network_driver, + } + } +} + diff --git a/scp_core/src/models/server_disk.rs b/scp_core/src/models/server_disk.rs new file mode 100644 index 0000000..14a4c13 --- /dev/null +++ b/scp_core/src/models/server_disk.rs @@ -0,0 +1,36 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerDisk { + #[serde(rename = "dev", skip_serializing_if = "Option::is_none")] + pub dev: Option, + #[serde(rename = "driver", skip_serializing_if = "Option::is_none")] + pub driver: Option, + #[serde(rename = "capacityInMiB", skip_serializing_if = "Option::is_none")] + pub capacity_in_mi_b: Option, + #[serde(rename = "allocationInMiB", skip_serializing_if = "Option::is_none")] + pub allocation_in_mi_b: Option, +} + +impl ServerDisk { + pub fn new() -> ServerDisk { + ServerDisk { + dev: None, + driver: None, + capacity_in_mi_b: None, + allocation_in_mi_b: None, + } + } +} + diff --git a/scp_core/src/models/server_firewall.rs b/scp_core/src/models/server_firewall.rs new file mode 100644 index 0000000..5d3a71b --- /dev/null +++ b/scp_core/src/models/server_firewall.rs @@ -0,0 +1,39 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerFirewall { + #[serde(rename = "copiedPolicies", skip_serializing_if = "Option::is_none")] + pub copied_policies: Option>, + #[serde(rename = "userPolicies", skip_serializing_if = "Option::is_none")] + pub user_policies: Option>, + #[serde(rename = "ingressImplicitRule", skip_serializing_if = "Option::is_none")] + pub ingress_implicit_rule: Option, + #[serde(rename = "egressImplicitRule", skip_serializing_if = "Option::is_none")] + pub egress_implicit_rule: Option, + #[serde(rename = "consistent", skip_serializing_if = "Option::is_none")] + pub consistent: Option, +} + +impl ServerFirewall { + pub fn new() -> ServerFirewall { + ServerFirewall { + copied_policies: None, + user_policies: None, + ingress_implicit_rule: None, + egress_implicit_rule: None, + consistent: None, + } + } +} + diff --git a/scp_core/src/models/server_firewall_save.rs b/scp_core/src/models/server_firewall_save.rs new file mode 100644 index 0000000..b0a9da9 --- /dev/null +++ b/scp_core/src/models/server_firewall_save.rs @@ -0,0 +1,30 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerFirewallSave { + #[serde(rename = "copiedPolicies")] + pub copied_policies: Vec, + #[serde(rename = "userPolicies")] + pub user_policies: Vec, +} + +impl ServerFirewallSave { + pub fn new(copied_policies: Vec, user_policies: Vec) -> ServerFirewallSave { + ServerFirewallSave { + copied_policies, + user_policies, + } + } +} + diff --git a/scp_core/src/models/server_hostname_patch.rs b/scp_core/src/models/server_hostname_patch.rs new file mode 100644 index 0000000..5567538 --- /dev/null +++ b/scp_core/src/models/server_hostname_patch.rs @@ -0,0 +1,27 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerHostnamePatch { + #[serde(rename = "hostname", skip_serializing_if = "Option::is_none")] + pub hostname: Option, +} + +impl ServerHostnamePatch { + pub fn new() -> ServerHostnamePatch { + ServerHostnamePatch { + hostname: None, + } + } +} + diff --git a/scp_core/src/models/server_image_setup.rs b/scp_core/src/models/server_image_setup.rs new file mode 100644 index 0000000..bfcb997 --- /dev/null +++ b/scp_core/src/models/server_image_setup.rs @@ -0,0 +1,60 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerImageSetup { + #[serde(rename = "imageFlavourId", skip_serializing_if = "Option::is_none")] + pub image_flavour_id: Option, + #[serde(rename = "diskName", skip_serializing_if = "Option::is_none")] + pub disk_name: Option, + #[serde(rename = "rootPartitionFullDiskSize", skip_serializing_if = "Option::is_none")] + pub root_partition_full_disk_size: Option, + #[serde(rename = "hostname", skip_serializing_if = "Option::is_none")] + pub hostname: Option, + #[serde(rename = "locale", skip_serializing_if = "Option::is_none")] + pub locale: Option, + #[serde(rename = "timezone", skip_serializing_if = "Option::is_none")] + pub timezone: Option, + #[serde(rename = "additionalUserUsername", skip_serializing_if = "Option::is_none")] + pub additional_user_username: Option, + #[serde(rename = "additionalUserPassword", skip_serializing_if = "Option::is_none")] + pub additional_user_password: Option, + #[serde(rename = "sshKeyIds", skip_serializing_if = "Option::is_none")] + pub ssh_key_ids: Option>, + #[serde(rename = "sshPasswordAuthentication", skip_serializing_if = "Option::is_none")] + pub ssh_password_authentication: Option, + #[serde(rename = "customScript", skip_serializing_if = "Option::is_none")] + pub custom_script: Option, + #[serde(rename = "emailToExecutingUser", skip_serializing_if = "Option::is_none")] + pub email_to_executing_user: Option, +} + +impl ServerImageSetup { + pub fn new() -> ServerImageSetup { + ServerImageSetup { + image_flavour_id: None, + disk_name: None, + root_partition_full_disk_size: None, + hostname: None, + locale: None, + timezone: None, + additional_user_username: None, + additional_user_password: None, + ssh_key_ids: None, + ssh_password_authentication: None, + custom_script: None, + email_to_executing_user: None, + } + } +} + diff --git a/scp_core/src/models/server_info.rs b/scp_core/src/models/server_info.rs new file mode 100644 index 0000000..910b932 --- /dev/null +++ b/scp_core/src/models/server_info.rs @@ -0,0 +1,90 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerInfo { + #[serde(rename = "state", skip_serializing_if = "Option::is_none")] + pub state: Option, + #[serde(rename = "autostart", skip_serializing_if = "Option::is_none")] + pub autostart: Option, + #[serde(rename = "uefi", skip_serializing_if = "Option::is_none")] + pub uefi: Option, + #[serde(rename = "interfaces", skip_serializing_if = "Option::is_none")] + pub interfaces: Option>, + #[serde(rename = "disks", skip_serializing_if = "Option::is_none")] + pub disks: Option>, + #[serde(rename = "bootorder", skip_serializing_if = "Option::is_none")] + pub bootorder: Option>, + #[serde(rename = "requiredStorageOptimization", skip_serializing_if = "Option::is_none")] + pub required_storage_optimization: Option, + #[serde(rename = "template", skip_serializing_if = "Option::is_none")] + pub template: Option, + #[serde(rename = "uptimeInSeconds", skip_serializing_if = "Option::is_none")] + pub uptime_in_seconds: Option, + #[serde(rename = "currentServerMemoryInMiB", skip_serializing_if = "Option::is_none")] + pub current_server_memory_in_mi_b: Option, + #[serde(rename = "maxServerMemoryInMiB", skip_serializing_if = "Option::is_none")] + pub max_server_memory_in_mi_b: Option, + #[serde(rename = "cpuCount", skip_serializing_if = "Option::is_none")] + pub cpu_count: Option, + #[serde(rename = "cpuMaxCount", skip_serializing_if = "Option::is_none")] + pub cpu_max_count: Option, + #[serde(rename = "sockets", skip_serializing_if = "Option::is_none")] + pub sockets: Option, + #[serde(rename = "coresPerSocket", skip_serializing_if = "Option::is_none")] + pub cores_per_socket: Option, + #[serde(rename = "latestQemu", skip_serializing_if = "Option::is_none")] + pub latest_qemu: Option, + #[serde(rename = "configChanged", skip_serializing_if = "Option::is_none")] + pub config_changed: Option, + #[serde(rename = "osOptimization", skip_serializing_if = "Option::is_none")] + pub os_optimization: Option, + #[serde(rename = "nestedGuest", skip_serializing_if = "Option::is_none")] + pub nested_guest: Option, + #[serde(rename = "machineType", skip_serializing_if = "Option::is_none")] + pub machine_type: Option, + #[serde(rename = "keyboardLayout", skip_serializing_if = "Option::is_none")] + pub keyboard_layout: Option, + #[serde(rename = "cloudinitAttached", skip_serializing_if = "Option::is_none")] + pub cloudinit_attached: Option, +} + +impl ServerInfo { + pub fn new() -> ServerInfo { + ServerInfo { + state: None, + autostart: None, + uefi: None, + interfaces: None, + disks: None, + bootorder: None, + required_storage_optimization: None, + template: None, + uptime_in_seconds: None, + current_server_memory_in_mi_b: None, + max_server_memory_in_mi_b: None, + cpu_count: None, + cpu_max_count: None, + sockets: None, + cores_per_socket: None, + latest_qemu: None, + config_changed: None, + os_optimization: None, + nested_guest: None, + machine_type: None, + keyboard_layout: None, + cloudinit_attached: None, + } + } +} + diff --git a/scp_core/src/models/server_interface.rs b/scp_core/src/models/server_interface.rs new file mode 100644 index 0000000..820d702 --- /dev/null +++ b/scp_core/src/models/server_interface.rs @@ -0,0 +1,60 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerInterface { + #[serde(rename = "mac", skip_serializing_if = "Option::is_none")] + pub mac: Option, + #[serde(rename = "driver", skip_serializing_if = "Option::is_none")] + pub driver: Option, + #[serde(rename = "mtu", skip_serializing_if = "Option::is_none")] + pub mtu: Option, + #[serde(rename = "speedInMBits", skip_serializing_if = "Option::is_none")] + pub speed_in_m_bits: Option, + #[serde(rename = "rxMonthlyInMiB", skip_serializing_if = "Option::is_none")] + pub rx_monthly_in_mi_b: Option, + #[serde(rename = "txMonthlyInMiB", skip_serializing_if = "Option::is_none")] + pub tx_monthly_in_mi_b: Option, + #[serde(rename = "ipv4Addresses", skip_serializing_if = "Option::is_none")] + pub ipv4_addresses: Option>, + #[serde(rename = "ipv6LinkLocalAddresses", skip_serializing_if = "Option::is_none")] + pub ipv6_link_local_addresses: Option>, + #[serde(rename = "ipv6NetworkPrefixes", skip_serializing_if = "Option::is_none")] + pub ipv6_network_prefixes: Option>, + #[serde(rename = "trafficThrottled", skip_serializing_if = "Option::is_none")] + pub traffic_throttled: Option, + #[serde(rename = "vlanInterface", skip_serializing_if = "Option::is_none")] + pub vlan_interface: Option, + #[serde(rename = "vlanId", skip_serializing_if = "Option::is_none")] + pub vlan_id: Option, +} + +impl ServerInterface { + pub fn new() -> ServerInterface { + ServerInterface { + mac: None, + driver: None, + mtu: None, + speed_in_m_bits: None, + rx_monthly_in_mi_b: None, + tx_monthly_in_mi_b: None, + ipv4_addresses: None, + ipv6_link_local_addresses: None, + ipv6_network_prefixes: None, + traffic_throttled: None, + vlan_interface: None, + vlan_id: None, + } + } +} + diff --git a/scp_core/src/models/server_interface_update.rs b/scp_core/src/models/server_interface_update.rs new file mode 100644 index 0000000..e5a098e --- /dev/null +++ b/scp_core/src/models/server_interface_update.rs @@ -0,0 +1,27 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerInterfaceUpdate { + #[serde(rename = "driver", skip_serializing_if = "Option::is_none")] + pub driver: Option, +} + +impl ServerInterfaceUpdate { + pub fn new() -> ServerInterfaceUpdate { + ServerInterfaceUpdate { + driver: None, + } + } +} + diff --git a/scp_core/src/models/server_ip_type.rs b/scp_core/src/models/server_ip_type.rs new file mode 100644 index 0000000..a35fdf3 --- /dev/null +++ b/scp_core/src/models/server_ip_type.rs @@ -0,0 +1,38 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServerIpType { + #[serde(rename = "IP")] + Ip, + #[serde(rename = "ROUTED_IP")] + RoutedIp, + +} + +impl std::fmt::Display for ServerIpType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Ip => write!(f, "IP"), + Self::RoutedIp => write!(f, "ROUTED_IP"), + } + } +} + +impl Default for ServerIpType { + fn default() -> ServerIpType { + Self::Ip + } +} + diff --git a/scp_core/src/models/server_ipv4.rs b/scp_core/src/models/server_ipv4.rs new file mode 100644 index 0000000..e902d62 --- /dev/null +++ b/scp_core/src/models/server_ipv4.rs @@ -0,0 +1,51 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerIpv4 { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "interfaceMac", skip_serializing_if = "Option::is_none")] + pub interface_mac: Option, + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub r#type: Option, + #[serde(rename = "ip", skip_serializing_if = "Option::is_none")] + pub ip: Option, + #[serde(rename = "cidr", skip_serializing_if = "Option::is_none")] + pub cidr: Option, + #[serde(rename = "gateway", skip_serializing_if = "Option::is_none")] + pub gateway: Option, + #[serde(rename = "rdns", skip_serializing_if = "Option::is_none")] + pub rdns: Option, + #[serde(rename = "destinationIp", skip_serializing_if = "Option::is_none")] + pub destination_ip: Option, + #[serde(rename = "editable", skip_serializing_if = "Option::is_none")] + pub editable: Option, +} + +impl ServerIpv4 { + pub fn new() -> ServerIpv4 { + ServerIpv4 { + id: None, + interface_mac: None, + r#type: None, + ip: None, + cidr: None, + gateway: None, + rdns: None, + destination_ip: None, + editable: None, + } + } +} + diff --git a/scp_core/src/models/server_ipv6.rs b/scp_core/src/models/server_ipv6.rs new file mode 100644 index 0000000..52b0390 --- /dev/null +++ b/scp_core/src/models/server_ipv6.rs @@ -0,0 +1,54 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerIpv6 { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "interfaceMac", skip_serializing_if = "Option::is_none")] + pub interface_mac: Option, + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub r#type: Option, + #[serde(rename = "networkPrefix", skip_serializing_if = "Option::is_none")] + pub network_prefix: Option, + #[serde(rename = "cidr", skip_serializing_if = "Option::is_none")] + pub cidr: Option, + #[serde(rename = "gateway", skip_serializing_if = "Option::is_none")] + pub gateway: Option, + #[serde(rename = "linkLocal", skip_serializing_if = "Option::is_none")] + pub link_local: Option, + #[serde(rename = "rdns", skip_serializing_if = "Option::is_none")] + pub rdns: Option>, + #[serde(rename = "destinationIp", skip_serializing_if = "Option::is_none")] + pub destination_ip: Option, + #[serde(rename = "editable", skip_serializing_if = "Option::is_none")] + pub editable: Option, +} + +impl ServerIpv6 { + pub fn new() -> ServerIpv6 { + ServerIpv6 { + id: None, + interface_mac: None, + r#type: None, + network_prefix: None, + cidr: None, + gateway: None, + link_local: None, + rdns: None, + destination_ip: None, + editable: None, + } + } +} + diff --git a/scp_core/src/models/server_keyboard_layout_patch.rs b/scp_core/src/models/server_keyboard_layout_patch.rs new file mode 100644 index 0000000..d2ec636 --- /dev/null +++ b/scp_core/src/models/server_keyboard_layout_patch.rs @@ -0,0 +1,27 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerKeyboardLayoutPatch { + #[serde(rename = "keyboardLayout", skip_serializing_if = "Option::is_none")] + pub keyboard_layout: Option, +} + +impl ServerKeyboardLayoutPatch { + pub fn new() -> ServerKeyboardLayoutPatch { + ServerKeyboardLayoutPatch { + keyboard_layout: None, + } + } +} + diff --git a/scp_core/src/models/server_list_minimal.rs b/scp_core/src/models/server_list_minimal.rs new file mode 100644 index 0000000..509acac --- /dev/null +++ b/scp_core/src/models/server_list_minimal.rs @@ -0,0 +1,42 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerListMinimal { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "hostname", skip_serializing_if = "Option::is_none")] + pub hostname: Option, + #[serde(rename = "nickname", skip_serializing_if = "Option::is_none")] + pub nickname: Option, + #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")] + pub disabled: Option, + #[serde(rename = "template", skip_serializing_if = "Option::is_none")] + pub template: Option>, +} + +impl ServerListMinimal { + pub fn new() -> ServerListMinimal { + ServerListMinimal { + id: None, + name: None, + hostname: None, + nickname: None, + disabled: None, + template: None, + } + } +} + diff --git a/scp_core/src/models/server_minimal.rs b/scp_core/src/models/server_minimal.rs new file mode 100644 index 0000000..99b6040 --- /dev/null +++ b/scp_core/src/models/server_minimal.rs @@ -0,0 +1,30 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerMinimal { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +impl ServerMinimal { + pub fn new() -> ServerMinimal { + ServerMinimal { + id: None, + name: None, + } + } +} + diff --git a/scp_core/src/models/server_nickname_patch.rs b/scp_core/src/models/server_nickname_patch.rs new file mode 100644 index 0000000..91144f8 --- /dev/null +++ b/scp_core/src/models/server_nickname_patch.rs @@ -0,0 +1,27 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerNicknamePatch { + #[serde(rename = "nickname", skip_serializing_if = "Option::is_none")] + pub nickname: Option, +} + +impl ServerNicknamePatch { + pub fn new() -> ServerNicknamePatch { + ServerNicknamePatch { + nickname: None, + } + } +} + diff --git a/scp_core/src/models/server_os_optimization_patch.rs b/scp_core/src/models/server_os_optimization_patch.rs new file mode 100644 index 0000000..a0a3593 --- /dev/null +++ b/scp_core/src/models/server_os_optimization_patch.rs @@ -0,0 +1,27 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerOsOptimizationPatch { + #[serde(rename = "os_optimization", skip_serializing_if = "Option::is_none")] + pub os_optimization: Option, +} + +impl ServerOsOptimizationPatch { + pub fn new() -> ServerOsOptimizationPatch { + ServerOsOptimizationPatch { + os_optimization: None, + } + } +} + diff --git a/scp_core/src/models/server_set_root_password_patch.rs b/scp_core/src/models/server_set_root_password_patch.rs new file mode 100644 index 0000000..0cff829 --- /dev/null +++ b/scp_core/src/models/server_set_root_password_patch.rs @@ -0,0 +1,27 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerSetRootPasswordPatch { + #[serde(rename = "rootPassword", skip_serializing_if = "Option::is_none")] + pub root_password: Option, +} + +impl ServerSetRootPasswordPatch { + pub fn new() -> ServerSetRootPasswordPatch { + ServerSetRootPasswordPatch { + root_password: None, + } + } +} + diff --git a/scp_core/src/models/server_snapshot_create.rs b/scp_core/src/models/server_snapshot_create.rs new file mode 100644 index 0000000..01fb184 --- /dev/null +++ b/scp_core/src/models/server_snapshot_create.rs @@ -0,0 +1,36 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerSnapshotCreate { + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "diskName", skip_serializing_if = "Option::is_none")] + pub disk_name: Option, + #[serde(rename = "onlineSnapshot", skip_serializing_if = "Option::is_none")] + pub online_snapshot: Option, +} + +impl ServerSnapshotCreate { + pub fn new(name: String) -> ServerSnapshotCreate { + ServerSnapshotCreate { + name, + description: None, + disk_name: None, + online_snapshot: None, + } + } +} + diff --git a/scp_core/src/models/server_snapshot_create_check.rs b/scp_core/src/models/server_snapshot_create_check.rs new file mode 100644 index 0000000..7751afe --- /dev/null +++ b/scp_core/src/models/server_snapshot_create_check.rs @@ -0,0 +1,31 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerSnapshotCreateCheck { + /// Must be set if attribute onlineSnapshot is false. + #[serde(rename = "diskName", skip_serializing_if = "Option::is_none")] + pub disk_name: Option, + #[serde(rename = "onlineSnapshot", skip_serializing_if = "Option::is_none")] + pub online_snapshot: Option, +} + +impl ServerSnapshotCreateCheck { + pub fn new() -> ServerSnapshotCreateCheck { + ServerSnapshotCreateCheck { + disk_name: None, + online_snapshot: None, + } + } +} + diff --git a/scp_core/src/models/server_state.rs b/scp_core/src/models/server_state.rs new file mode 100644 index 0000000..a99ae31 --- /dev/null +++ b/scp_core/src/models/server_state.rs @@ -0,0 +1,59 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServerState { + #[serde(rename = "NOSTATE")] + Nostate, + #[serde(rename = "RUNNING")] + Running, + #[serde(rename = "BLOCKED")] + Blocked, + #[serde(rename = "PAUSED")] + Paused, + #[serde(rename = "SHUTDOWN")] + Shutdown, + #[serde(rename = "SHUTOFF")] + Shutoff, + #[serde(rename = "CRASHED")] + Crashed, + #[serde(rename = "PMSUSPENDED")] + Pmsuspended, + #[serde(rename = "DISK_SNAPSHOT")] + DiskSnapshot, + +} + +impl std::fmt::Display for ServerState { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Nostate => write!(f, "NOSTATE"), + Self::Running => write!(f, "RUNNING"), + Self::Blocked => write!(f, "BLOCKED"), + Self::Paused => write!(f, "PAUSED"), + Self::Shutdown => write!(f, "SHUTDOWN"), + Self::Shutoff => write!(f, "SHUTOFF"), + Self::Crashed => write!(f, "CRASHED"), + Self::Pmsuspended => write!(f, "PMSUSPENDED"), + Self::DiskSnapshot => write!(f, "DISK_SNAPSHOT"), + } + } +} + +impl Default for ServerState { + fn default() -> ServerState { + Self::Nostate + } +} + diff --git a/scp_core/src/models/server_state1.rs b/scp_core/src/models/server_state1.rs new file mode 100644 index 0000000..3a87a4c --- /dev/null +++ b/scp_core/src/models/server_state1.rs @@ -0,0 +1,41 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum ServerState1 { + #[serde(rename = "ON")] + On, + #[serde(rename = "OFF")] + Off, + #[serde(rename = "SUSPENDED")] + Suspended, + +} + +impl std::fmt::Display for ServerState1 { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::On => write!(f, "ON"), + Self::Off => write!(f, "OFF"), + Self::Suspended => write!(f, "SUSPENDED"), + } + } +} + +impl Default for ServerState1 { + fn default() -> ServerState1 { + Self::On + } +} + diff --git a/scp_core/src/models/server_state_patch.rs b/scp_core/src/models/server_state_patch.rs new file mode 100644 index 0000000..14e2eb2 --- /dev/null +++ b/scp_core/src/models/server_state_patch.rs @@ -0,0 +1,29 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ServerStatePatch : Optional query parameters: stateOption. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerStatePatch { + #[serde(rename = "state", skip_serializing_if = "Option::is_none")] + pub state: Option, +} + +impl ServerStatePatch { + /// Optional query parameters: stateOption. + pub fn new() -> ServerStatePatch { + ServerStatePatch { + state: None, + } + } +} + diff --git a/scp_core/src/models/server_template_minimal.rs b/scp_core/src/models/server_template_minimal.rs new file mode 100644 index 0000000..035c8a7 --- /dev/null +++ b/scp_core/src/models/server_template_minimal.rs @@ -0,0 +1,30 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerTemplateMinimal { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name")] + pub name: String, +} + +impl ServerTemplateMinimal { + pub fn new(name: String) -> ServerTemplateMinimal { + ServerTemplateMinimal { + id: None, + name, + } + } +} + diff --git a/scp_core/src/models/server_uefi_patch.rs b/scp_core/src/models/server_uefi_patch.rs new file mode 100644 index 0000000..3fd6639 --- /dev/null +++ b/scp_core/src/models/server_uefi_patch.rs @@ -0,0 +1,27 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerUefiPatch { + #[serde(rename = "uefi", skip_serializing_if = "Option::is_none")] + pub uefi: Option, +} + +impl ServerUefiPatch { + pub fn new() -> ServerUefiPatch { + ServerUefiPatch { + uefi: None, + } + } +} + diff --git a/scp_core/src/models/server_user_image_setup.rs b/scp_core/src/models/server_user_image_setup.rs new file mode 100644 index 0000000..6f00c53 --- /dev/null +++ b/scp_core/src/models/server_user_image_setup.rs @@ -0,0 +1,33 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ServerUserImageSetup { + #[serde(rename = "userImageName")] + pub user_image_name: String, + #[serde(rename = "diskName", skip_serializing_if = "Option::is_none")] + pub disk_name: Option, + #[serde(rename = "emailNotification", skip_serializing_if = "Option::is_none")] + pub email_notification: Option, +} + +impl ServerUserImageSetup { + pub fn new(user_image_name: String) -> ServerUserImageSetup { + ServerUserImageSetup { + user_image_name, + disk_name: None, + email_notification: None, + } + } +} + diff --git a/scp_core/src/models/set_rdns_ipv4.rs b/scp_core/src/models/set_rdns_ipv4.rs new file mode 100644 index 0000000..b88f8ad --- /dev/null +++ b/scp_core/src/models/set_rdns_ipv4.rs @@ -0,0 +1,30 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SetRdnsIpv4 { + #[serde(rename = "ip")] + pub ip: String, + #[serde(rename = "rdns")] + pub rdns: String, +} + +impl SetRdnsIpv4 { + pub fn new(ip: String, rdns: String) -> SetRdnsIpv4 { + SetRdnsIpv4 { + ip, + rdns, + } + } +} + diff --git a/scp_core/src/models/set_rdns_ipv6.rs b/scp_core/src/models/set_rdns_ipv6.rs new file mode 100644 index 0000000..da0fb67 --- /dev/null +++ b/scp_core/src/models/set_rdns_ipv6.rs @@ -0,0 +1,30 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SetRdnsIpv6 { + #[serde(rename = "ip")] + pub ip: String, + #[serde(rename = "rdns")] + pub rdns: String, +} + +impl SetRdnsIpv6 { + pub fn new(ip: String, rdns: String) -> SetRdnsIpv6 { + SetRdnsIpv6 { + ip, + rdns, + } + } +} + diff --git a/scp_core/src/models/site.rs b/scp_core/src/models/site.rs new file mode 100644 index 0000000..f99f156 --- /dev/null +++ b/scp_core/src/models/site.rs @@ -0,0 +1,30 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Site { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "city")] + pub city: String, +} + +impl Site { + pub fn new(city: String) -> Site { + Site { + id: None, + city, + } + } +} + diff --git a/scp_core/src/models/snapshot.rs b/scp_core/src/models/snapshot.rs new file mode 100644 index 0000000..96522ee --- /dev/null +++ b/scp_core/src/models/snapshot.rs @@ -0,0 +1,54 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct Snapshot { + #[serde(rename = "uuid", skip_serializing_if = "Option::is_none")] + pub uuid: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "disks", skip_serializing_if = "Option::is_none")] + pub disks: Option>, + #[serde(rename = "creationTime", skip_serializing_if = "Option::is_none")] + pub creation_time: Option, + #[serde(rename = "state", skip_serializing_if = "Option::is_none")] + pub state: Option, + #[serde(rename = "online", skip_serializing_if = "Option::is_none")] + pub online: Option, + #[serde(rename = "exported", skip_serializing_if = "Option::is_none")] + pub exported: Option, + #[serde(rename = "exportedSizeInKiB", skip_serializing_if = "Option::is_none")] + pub exported_size_in_ki_b: Option, + #[serde(rename = "downloadInfos", skip_serializing_if = "Option::is_none")] + pub download_infos: Option>, +} + +impl Snapshot { + pub fn new() -> Snapshot { + Snapshot { + uuid: None, + name: None, + description: None, + disks: None, + creation_time: None, + state: None, + online: None, + exported: None, + exported_size_in_ki_b: None, + download_infos: None, + } + } +} + diff --git a/scp_core/src/models/snapshot_minimal.rs b/scp_core/src/models/snapshot_minimal.rs new file mode 100644 index 0000000..b5974f6 --- /dev/null +++ b/scp_core/src/models/snapshot_minimal.rs @@ -0,0 +1,51 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SnapshotMinimal { + #[serde(rename = "uuid", skip_serializing_if = "Option::is_none")] + pub uuid: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "disks", skip_serializing_if = "Option::is_none")] + pub disks: Option>, + #[serde(rename = "creationTime", skip_serializing_if = "Option::is_none")] + pub creation_time: Option, + #[serde(rename = "state", skip_serializing_if = "Option::is_none")] + pub state: Option, + #[serde(rename = "online", skip_serializing_if = "Option::is_none")] + pub online: Option, + #[serde(rename = "exported", skip_serializing_if = "Option::is_none")] + pub exported: Option, + #[serde(rename = "exportedSizeInKiB", skip_serializing_if = "Option::is_none")] + pub exported_size_in_ki_b: Option, +} + +impl SnapshotMinimal { + pub fn new() -> SnapshotMinimal { + SnapshotMinimal { + uuid: None, + name: None, + description: None, + disks: None, + creation_time: None, + state: None, + online: None, + exported: None, + exported_size_in_ki_b: None, + } + } +} + diff --git a/scp_core/src/models/ssh_key.rs b/scp_core/src/models/ssh_key.rs new file mode 100644 index 0000000..432dd74 --- /dev/null +++ b/scp_core/src/models/ssh_key.rs @@ -0,0 +1,36 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct SshKey { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "key")] + pub key: String, + #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")] + pub created_at: Option, +} + +impl SshKey { + pub fn new(name: String, key: String) -> SshKey { + SshKey { + id: None, + name, + key, + created_at: None, + } + } +} + diff --git a/scp_core/src/models/storage_driver.rs b/scp_core/src/models/storage_driver.rs new file mode 100644 index 0000000..a58da2f --- /dev/null +++ b/scp_core/src/models/storage_driver.rs @@ -0,0 +1,44 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum StorageDriver { + #[serde(rename = "VIRTIO")] + Virtio, + #[serde(rename = "VIRTIO_SCSI")] + VirtioScsi, + #[serde(rename = "IDE")] + Ide, + #[serde(rename = "SATA")] + Sata, + +} + +impl std::fmt::Display for StorageDriver { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Virtio => write!(f, "VIRTIO"), + Self::VirtioScsi => write!(f, "VIRTIO_SCSI"), + Self::Ide => write!(f, "IDE"), + Self::Sata => write!(f, "SATA"), + } + } +} + +impl Default for StorageDriver { + fn default() -> StorageDriver { + Self::Virtio + } +} + diff --git a/scp_core/src/models/storage_optimization.rs b/scp_core/src/models/storage_optimization.rs new file mode 100644 index 0000000..9164536 --- /dev/null +++ b/scp_core/src/models/storage_optimization.rs @@ -0,0 +1,47 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum StorageOptimization { + #[serde(rename = "INCONSISTENT")] + Inconsistent, + #[serde(rename = "COMPAT")] + Compat, + #[serde(rename = "SLOW")] + Slow, + #[serde(rename = "FAST")] + Fast, + #[serde(rename = "NO")] + No, + +} + +impl std::fmt::Display for StorageOptimization { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Inconsistent => write!(f, "INCONSISTENT"), + Self::Compat => write!(f, "COMPAT"), + Self::Slow => write!(f, "SLOW"), + Self::Fast => write!(f, "FAST"), + Self::No => write!(f, "NO"), + } + } +} + +impl Default for StorageOptimization { + fn default() -> StorageOptimization { + Self::Inconsistent + } +} + diff --git a/scp_core/src/models/task_info.rs b/scp_core/src/models/task_info.rs new file mode 100644 index 0000000..3b92231 --- /dev/null +++ b/scp_core/src/models/task_info.rs @@ -0,0 +1,60 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TaskInfo { + #[serde(rename = "uuid", skip_serializing_if = "Option::is_none")] + pub uuid: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "state", skip_serializing_if = "Option::is_none")] + pub state: Option, + #[serde(rename = "startedAt", skip_serializing_if = "Option::is_none")] + pub started_at: Option, + #[serde(rename = "finishedAt", skip_serializing_if = "Option::is_none")] + pub finished_at: Option, + #[serde(rename = "executingUser", skip_serializing_if = "Option::is_none")] + pub executing_user: Option>, + #[serde(rename = "taskProgress", skip_serializing_if = "Option::is_none")] + pub task_progress: Option>, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + #[serde(rename = "onRollback", skip_serializing_if = "Option::is_none")] + pub on_rollback: Option, + #[serde(rename = "steps", skip_serializing_if = "Option::is_none")] + pub steps: Option>, + #[serde(rename = "result", skip_serializing_if = "Option::is_none")] + pub result: Option, + #[serde(rename = "responseError", skip_serializing_if = "Option::is_none")] + pub response_error: Option>, +} + +impl TaskInfo { + pub fn new() -> TaskInfo { + TaskInfo { + uuid: None, + name: None, + state: None, + started_at: None, + finished_at: None, + executing_user: None, + task_progress: None, + message: None, + on_rollback: None, + steps: None, + result: None, + response_error: None, + } + } +} + diff --git a/scp_core/src/models/task_info_minimal.rs b/scp_core/src/models/task_info_minimal.rs new file mode 100644 index 0000000..3c29e71 --- /dev/null +++ b/scp_core/src/models/task_info_minimal.rs @@ -0,0 +1,51 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TaskInfoMinimal { + #[serde(rename = "uuid", skip_serializing_if = "Option::is_none")] + pub uuid: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "state", skip_serializing_if = "Option::is_none")] + pub state: Option, + #[serde(rename = "startedAt", skip_serializing_if = "Option::is_none")] + pub started_at: Option, + #[serde(rename = "finishedAt", skip_serializing_if = "Option::is_none")] + pub finished_at: Option, + #[serde(rename = "executingUser", skip_serializing_if = "Option::is_none")] + pub executing_user: Option>, + #[serde(rename = "taskProgress", skip_serializing_if = "Option::is_none")] + pub task_progress: Option>, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + #[serde(rename = "onRollback", skip_serializing_if = "Option::is_none")] + pub on_rollback: Option, +} + +impl TaskInfoMinimal { + pub fn new() -> TaskInfoMinimal { + TaskInfoMinimal { + uuid: None, + name: None, + state: None, + started_at: None, + finished_at: None, + executing_user: None, + task_progress: None, + message: None, + on_rollback: None, + } + } +} + diff --git a/scp_core/src/models/task_info_step.rs b/scp_core/src/models/task_info_step.rs new file mode 100644 index 0000000..331abc3 --- /dev/null +++ b/scp_core/src/models/task_info_step.rs @@ -0,0 +1,39 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TaskInfoStep { + #[serde(rename = "uuid", skip_serializing_if = "Option::is_none")] + pub uuid: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "state", skip_serializing_if = "Option::is_none")] + pub state: Option, + #[serde(rename = "startedAt", skip_serializing_if = "Option::is_none")] + pub started_at: Option, + #[serde(rename = "finishedAt", skip_serializing_if = "Option::is_none")] + pub finished_at: Option, +} + +impl TaskInfoStep { + pub fn new() -> TaskInfoStep { + TaskInfoStep { + uuid: None, + name: None, + state: None, + started_at: None, + finished_at: None, + } + } +} + diff --git a/scp_core/src/models/task_progress.rs b/scp_core/src/models/task_progress.rs new file mode 100644 index 0000000..2fdb539 --- /dev/null +++ b/scp_core/src/models/task_progress.rs @@ -0,0 +1,30 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TaskProgress { + #[serde(rename = "expectedFinishedAt", skip_serializing_if = "Option::is_none")] + pub expected_finished_at: Option, + #[serde(rename = "progressInPercent", skip_serializing_if = "Option::is_none")] + pub progress_in_percent: Option, +} + +impl TaskProgress { + pub fn new() -> TaskProgress { + TaskProgress { + expected_finished_at: None, + progress_in_percent: None, + } + } +} + diff --git a/scp_core/src/models/task_state.rs b/scp_core/src/models/task_state.rs new file mode 100644 index 0000000..0d0963c --- /dev/null +++ b/scp_core/src/models/task_state.rs @@ -0,0 +1,53 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum TaskState { + #[serde(rename = "PENDING")] + Pending, + #[serde(rename = "RUNNING")] + Running, + #[serde(rename = "FINISHED")] + Finished, + #[serde(rename = "ERROR")] + Error, + #[serde(rename = "WAITING_FOR_CANCEL")] + WaitingForCancel, + #[serde(rename = "CANCELED")] + Canceled, + #[serde(rename = "ROLLBACK")] + Rollback, + +} + +impl std::fmt::Display for TaskState { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Pending => write!(f, "PENDING"), + Self::Running => write!(f, "RUNNING"), + Self::Finished => write!(f, "FINISHED"), + Self::Error => write!(f, "ERROR"), + Self::WaitingForCancel => write!(f, "WAITING_FOR_CANCEL"), + Self::Canceled => write!(f, "CANCELED"), + Self::Rollback => write!(f, "ROLLBACK"), + } + } +} + +impl Default for TaskState { + fn default() -> TaskState { + Self::Pending + } +} + diff --git a/scp_core/src/models/user.rs b/scp_core/src/models/user.rs new file mode 100644 index 0000000..952a5ce --- /dev/null +++ b/scp_core/src/models/user.rs @@ -0,0 +1,63 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct User { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "username", skip_serializing_if = "Option::is_none")] + pub username: Option, + #[serde(rename = "firstname", skip_serializing_if = "Option::is_none")] + pub firstname: Option, + #[serde(rename = "lastname", skip_serializing_if = "Option::is_none")] + pub lastname: Option, + #[serde(rename = "email", skip_serializing_if = "Option::is_none")] + pub email: Option, + #[serde(rename = "company", skip_serializing_if = "Option::is_none")] + pub company: Option, + #[serde(rename = "language", skip_serializing_if = "Option::is_none")] + pub language: Option, + #[serde(rename = "timeZone", skip_serializing_if = "Option::is_none")] + pub time_zone: Option, + #[serde(rename = "showNickname", skip_serializing_if = "Option::is_none")] + pub show_nickname: Option, + #[serde(rename = "passwordlessMode", skip_serializing_if = "Option::is_none")] + pub passwordless_mode: Option, + #[serde(rename = "secureMode", skip_serializing_if = "Option::is_none")] + pub secure_mode: Option, + #[serde(rename = "secureModeAppAccess", skip_serializing_if = "Option::is_none")] + pub secure_mode_app_access: Option, + #[serde(rename = "apiIpLoginRestrictions", skip_serializing_if = "Option::is_none")] + pub api_ip_login_restrictions: Option, +} + +impl User { + pub fn new() -> User { + User { + id: None, + username: None, + firstname: None, + lastname: None, + email: None, + company: None, + language: None, + time_zone: None, + show_nickname: None, + passwordless_mode: None, + secure_mode: None, + secure_mode_app_access: None, + api_ip_login_restrictions: None, + } + } +} + diff --git a/scp_core/src/models/user_minimal.rs b/scp_core/src/models/user_minimal.rs new file mode 100644 index 0000000..06b8371 --- /dev/null +++ b/scp_core/src/models/user_minimal.rs @@ -0,0 +1,42 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserMinimal { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "username", skip_serializing_if = "Option::is_none")] + pub username: Option, + #[serde(rename = "firstname", skip_serializing_if = "Option::is_none")] + pub firstname: Option, + #[serde(rename = "lastname", skip_serializing_if = "Option::is_none")] + pub lastname: Option, + #[serde(rename = "email", skip_serializing_if = "Option::is_none")] + pub email: Option, + #[serde(rename = "company", skip_serializing_if = "Option::is_none")] + pub company: Option, +} + +impl UserMinimal { + pub fn new() -> UserMinimal { + UserMinimal { + id: None, + username: None, + firstname: None, + lastname: None, + email: None, + company: None, + } + } +} + diff --git a/scp_core/src/models/user_save.rs b/scp_core/src/models/user_save.rs new file mode 100644 index 0000000..c8d016a --- /dev/null +++ b/scp_core/src/models/user_save.rs @@ -0,0 +1,57 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserSave { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "language")] + pub language: String, + #[serde(rename = "timeZone")] + pub time_zone: String, + #[serde(rename = "apiIpLoginRestrictions", skip_serializing_if = "Option::is_none")] + pub api_ip_login_restrictions: Option, + #[serde(rename = "password", skip_serializing_if = "Option::is_none")] + pub password: Option, + #[serde(rename = "oldPassword", skip_serializing_if = "Option::is_none")] + pub old_password: Option, + #[serde(rename = "soapWebservicePassword", skip_serializing_if = "Option::is_none")] + pub soap_webservice_password: Option, + #[serde(rename = "showNickname", skip_serializing_if = "Option::is_none")] + pub show_nickname: Option, + #[serde(rename = "passwordlessMode", skip_serializing_if = "Option::is_none")] + pub passwordless_mode: Option, + #[serde(rename = "secureMode", skip_serializing_if = "Option::is_none")] + pub secure_mode: Option, + #[serde(rename = "secureModeAppAccess", skip_serializing_if = "Option::is_none")] + pub secure_mode_app_access: Option, +} + +impl UserSave { + pub fn new(language: String, time_zone: String) -> UserSave { + UserSave { + id: None, + language, + time_zone, + api_ip_login_restrictions: None, + password: None, + old_password: None, + soap_webservice_password: None, + show_nickname: None, + passwordless_mode: None, + secure_mode: None, + secure_mode_app_access: None, + } + } +} + diff --git a/scp_core/src/models/v_lan.rs b/scp_core/src/models/v_lan.rs new file mode 100644 index 0000000..2058a1e --- /dev/null +++ b/scp_core/src/models/v_lan.rs @@ -0,0 +1,39 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct VLan { + #[serde(rename = "vlanId", skip_serializing_if = "Option::is_none")] + pub vlan_id: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, + #[serde(rename = "site", skip_serializing_if = "Option::is_none")] + pub site: Option>, + #[serde(rename = "bandwidthClass", skip_serializing_if = "Option::is_none")] + pub bandwidth_class: Option>, +} + +impl VLan { + pub fn new() -> VLan { + VLan { + vlan_id: None, + name: None, + user: None, + site: None, + bandwidth_class: None, + } + } +} + diff --git a/scp_core/src/models/v_lan_save.rs b/scp_core/src/models/v_lan_save.rs new file mode 100644 index 0000000..932cd2d --- /dev/null +++ b/scp_core/src/models/v_lan_save.rs @@ -0,0 +1,27 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct VLanSave { + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +impl VLanSave { + pub fn new() -> VLanSave { + VLanSave { + name: None, + } + } +} + diff --git a/scp_core/src/models/validation_error.rs b/scp_core/src/models/validation_error.rs new file mode 100644 index 0000000..56e8d70 --- /dev/null +++ b/scp_core/src/models/validation_error.rs @@ -0,0 +1,33 @@ +/* + * SCP (Server Control Panel) REST API + * + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2025.1218.164029 + * + * Generated by: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ValidationError { + #[serde(rename = "code", skip_serializing_if = "Option::is_none")] + pub code: Option, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + #[serde(rename = "errors", skip_serializing_if = "Option::is_none")] + pub errors: Option>, +} + +impl ValidationError { + pub fn new() -> ValidationError { + ValidationError { + code: None, + message: None, + errors: None, + } + } +} + diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}